diff --git a/java-bigquerydatatransfer/.OwlBot-hermetic.yaml b/java-bigquerydatatransfer/.OwlBot-hermetic.yaml index 2172642f387b..efba65859bb4 100644 --- a/java-bigquerydatatransfer/.OwlBot-hermetic.yaml +++ b/java-bigquerydatatransfer/.OwlBot-hermetic.yaml @@ -20,52 +20,7 @@ deep-remove-regex: - "/java-bigquerydatatransfer/samples/snippets/generated" deep-preserve-regex: -- "/java-bigquerydatatransfer/google-.*/src/test/java/com/google/cloud/.*/v.*/it/IT.*Test.java" - "/java-bigquerydatatransfer/google-cloud-bigquerydatatransfer/src/main/java/com/google/cloud/bigquery/datatransfer/v1/SampleApp.java" -- "/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/proto/google/cloud/bigquery/datatransfer/v1/resourcestate.proto" -- "/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/proto/google/cloud/bigquery/datatransfer/v1/datasource.proto" -- "/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/UntypedDataSourceName.java" -- "/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/UntypedRunName.java" -- "/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/UntypedTransferConfigName.java" -- "/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/UpdateDataSourceDefinitionRequest.java" -- "/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/UpdateDataSourceDefinitionRequestOrBuilder.java" -- "/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/UpdateTransferRunRequest.java" -- "/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/UpdateTransferRunRequestOrBuilder.java" -- "/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/WriteDisposition.java" -- "/java-bigquerydatatransfer/grpc-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataSourceServiceGrpc.java" -- "/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/CreateDataSourceDefinitionRequest.java" -- "/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/CreateDataSourceDefinitionRequestOrBuilder.java" -- "/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataSourceDefinition.java" -- "/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataSourceDefinitionOrBuilder.java" -- "/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataSourceNames.java" -- "/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataSourceProto.java" -- "/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DeleteDataSourceDefinitionRequest.java" -- "/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DeleteDataSourceDefinitionRequestOrBuilder.java" -- "/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/FinishRunRequest.java" -- "/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/FinishRunRequestOrBuilder.java" -- "/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/GetDataSourceDefinitionRequest.java" -- "/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/GetDataSourceDefinitionRequestOrBuilder.java" -- "/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ImportedDataInfo.java" -- "/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ImportedDataInfoOrBuilder.java" -- "/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListDataSourceDefinitionsRequest.java" -- "/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListDataSourceDefinitionsRequestOrBuilder.java" -- "/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListDataSourceDefinitionsResponse.java" -- "/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListDataSourceDefinitionsResponseOrBuilder.java" -- "/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/LocationDataSourceName.java" -- "/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/LocationRunName.java" -- "/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/LocationTransferConfigName.java" -- "/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/LogTransferRunMessagesRequest.java" -- "/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/LogTransferRunMessagesRequestOrBuilder.java" -- "/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ProjectDataSourceName.java" -- "/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ProjectRunName.java" -- "/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ProjectTransferConfigName.java" -- "/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/RunNames.java" -- "/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/StartBigQueryJobsRequest.java" -- "/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/StartBigQueryJobsRequestOrBuilder.java" -- "/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/TransferConfigNames.java" -- "/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataSourceName.java" -- "/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/TransferConfigName.java" -- "/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/RunName.java" deep-copy-regex: - source: "/google/cloud/bigquery/datatransfer/(v.*)/.*-java/proto-google-.*/src" diff --git a/java-bigquerydatatransfer/grpc-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataSourceServiceGrpc.java b/java-bigquerydatatransfer/grpc-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataSourceServiceGrpc.java deleted file mode 100644 index f0a78da9f0c1..000000000000 --- a/java-bigquerydatatransfer/grpc-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataSourceServiceGrpc.java +++ /dev/null @@ -1,1609 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.google.cloud.bigquery.datatransfer.v1; - -import static io.grpc.MethodDescriptor.generateFullMethodName; -import static io.grpc.stub.ClientCalls.asyncUnaryCall; -import static io.grpc.stub.ClientCalls.blockingUnaryCall; -import static io.grpc.stub.ClientCalls.futureUnaryCall; -import static io.grpc.stub.ServerCalls.asyncUnaryCall; -import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; - -/** - * - * - *
- * The Google BigQuery Data Transfer API allows BigQuery users to
- * configure transfer of their data from other Google Products into BigQuery.
- * This service exposes methods that should be used by data source backend.
- * 
- */ -@javax.annotation.Generated( - value = "by gRPC proto compiler (version 1.10.0)", - comments = "Source: google/cloud/bigquery/datatransfer/v1/datasource.proto") -public final class DataSourceServiceGrpc { - - private DataSourceServiceGrpc() {} - - public static final String SERVICE_NAME = - "google.cloud.bigquery.datatransfer.v1.DataSourceService"; - - // Static method descriptors that strictly reflect the proto. - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getUpdateTransferRunMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.cloud.bigquery.datatransfer.v1.UpdateTransferRunRequest, - com.google.cloud.bigquery.datatransfer.v1.TransferRun> - METHOD_UPDATE_TRANSFER_RUN = getUpdateTransferRunMethodHelper(); - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.bigquery.datatransfer.v1.UpdateTransferRunRequest, - com.google.cloud.bigquery.datatransfer.v1.TransferRun> - getUpdateTransferRunMethod; - - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - public static io.grpc.MethodDescriptor< - com.google.cloud.bigquery.datatransfer.v1.UpdateTransferRunRequest, - com.google.cloud.bigquery.datatransfer.v1.TransferRun> - getUpdateTransferRunMethod() { - return getUpdateTransferRunMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.cloud.bigquery.datatransfer.v1.UpdateTransferRunRequest, - com.google.cloud.bigquery.datatransfer.v1.TransferRun> - getUpdateTransferRunMethodHelper() { - io.grpc.MethodDescriptor< - com.google.cloud.bigquery.datatransfer.v1.UpdateTransferRunRequest, - com.google.cloud.bigquery.datatransfer.v1.TransferRun> - getUpdateTransferRunMethod; - if ((getUpdateTransferRunMethod = DataSourceServiceGrpc.getUpdateTransferRunMethod) == null) { - synchronized (DataSourceServiceGrpc.class) { - if ((getUpdateTransferRunMethod = DataSourceServiceGrpc.getUpdateTransferRunMethod) - == null) { - DataSourceServiceGrpc.getUpdateTransferRunMethod = - getUpdateTransferRunMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName( - "google.cloud.bigquery.datatransfer.v1.DataSourceService", - "UpdateTransferRun")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.bigquery.datatransfer.v1.UpdateTransferRunRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.bigquery.datatransfer.v1.TransferRun - .getDefaultInstance())) - .setSchemaDescriptor( - new DataSourceServiceMethodDescriptorSupplier("UpdateTransferRun")) - .build(); - } - } - } - return getUpdateTransferRunMethod; - } - - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getLogTransferRunMessagesMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.cloud.bigquery.datatransfer.v1.LogTransferRunMessagesRequest, - com.google.protobuf.Empty> - METHOD_LOG_TRANSFER_RUN_MESSAGES = getLogTransferRunMessagesMethodHelper(); - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.bigquery.datatransfer.v1.LogTransferRunMessagesRequest, - com.google.protobuf.Empty> - getLogTransferRunMessagesMethod; - - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - public static io.grpc.MethodDescriptor< - com.google.cloud.bigquery.datatransfer.v1.LogTransferRunMessagesRequest, - com.google.protobuf.Empty> - getLogTransferRunMessagesMethod() { - return getLogTransferRunMessagesMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.cloud.bigquery.datatransfer.v1.LogTransferRunMessagesRequest, - com.google.protobuf.Empty> - getLogTransferRunMessagesMethodHelper() { - io.grpc.MethodDescriptor< - com.google.cloud.bigquery.datatransfer.v1.LogTransferRunMessagesRequest, - com.google.protobuf.Empty> - getLogTransferRunMessagesMethod; - if ((getLogTransferRunMessagesMethod = DataSourceServiceGrpc.getLogTransferRunMessagesMethod) - == null) { - synchronized (DataSourceServiceGrpc.class) { - if ((getLogTransferRunMessagesMethod = - DataSourceServiceGrpc.getLogTransferRunMessagesMethod) - == null) { - DataSourceServiceGrpc.getLogTransferRunMessagesMethod = - getLogTransferRunMessagesMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName( - "google.cloud.bigquery.datatransfer.v1.DataSourceService", - "LogTransferRunMessages")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.bigquery.datatransfer.v1 - .LogTransferRunMessagesRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protobuf.Empty.getDefaultInstance())) - .setSchemaDescriptor( - new DataSourceServiceMethodDescriptorSupplier("LogTransferRunMessages")) - .build(); - } - } - } - return getLogTransferRunMessagesMethod; - } - - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getStartBigQueryJobsMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.cloud.bigquery.datatransfer.v1.StartBigQueryJobsRequest, - com.google.protobuf.Empty> - METHOD_START_BIG_QUERY_JOBS = getStartBigQueryJobsMethodHelper(); - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.bigquery.datatransfer.v1.StartBigQueryJobsRequest, - com.google.protobuf.Empty> - getStartBigQueryJobsMethod; - - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - public static io.grpc.MethodDescriptor< - com.google.cloud.bigquery.datatransfer.v1.StartBigQueryJobsRequest, - com.google.protobuf.Empty> - getStartBigQueryJobsMethod() { - return getStartBigQueryJobsMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.cloud.bigquery.datatransfer.v1.StartBigQueryJobsRequest, - com.google.protobuf.Empty> - getStartBigQueryJobsMethodHelper() { - io.grpc.MethodDescriptor< - com.google.cloud.bigquery.datatransfer.v1.StartBigQueryJobsRequest, - com.google.protobuf.Empty> - getStartBigQueryJobsMethod; - if ((getStartBigQueryJobsMethod = DataSourceServiceGrpc.getStartBigQueryJobsMethod) == null) { - synchronized (DataSourceServiceGrpc.class) { - if ((getStartBigQueryJobsMethod = DataSourceServiceGrpc.getStartBigQueryJobsMethod) - == null) { - DataSourceServiceGrpc.getStartBigQueryJobsMethod = - getStartBigQueryJobsMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName( - "google.cloud.bigquery.datatransfer.v1.DataSourceService", - "StartBigQueryJobs")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.bigquery.datatransfer.v1.StartBigQueryJobsRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protobuf.Empty.getDefaultInstance())) - .setSchemaDescriptor( - new DataSourceServiceMethodDescriptorSupplier("StartBigQueryJobs")) - .build(); - } - } - } - return getStartBigQueryJobsMethod; - } - - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getFinishRunMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.cloud.bigquery.datatransfer.v1.FinishRunRequest, com.google.protobuf.Empty> - METHOD_FINISH_RUN = getFinishRunMethodHelper(); - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.bigquery.datatransfer.v1.FinishRunRequest, com.google.protobuf.Empty> - getFinishRunMethod; - - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - public static io.grpc.MethodDescriptor< - com.google.cloud.bigquery.datatransfer.v1.FinishRunRequest, com.google.protobuf.Empty> - getFinishRunMethod() { - return getFinishRunMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.cloud.bigquery.datatransfer.v1.FinishRunRequest, com.google.protobuf.Empty> - getFinishRunMethodHelper() { - io.grpc.MethodDescriptor< - com.google.cloud.bigquery.datatransfer.v1.FinishRunRequest, com.google.protobuf.Empty> - getFinishRunMethod; - if ((getFinishRunMethod = DataSourceServiceGrpc.getFinishRunMethod) == null) { - synchronized (DataSourceServiceGrpc.class) { - if ((getFinishRunMethod = DataSourceServiceGrpc.getFinishRunMethod) == null) { - DataSourceServiceGrpc.getFinishRunMethod = - getFinishRunMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName( - "google.cloud.bigquery.datatransfer.v1.DataSourceService", - "FinishRun")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.bigquery.datatransfer.v1.FinishRunRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protobuf.Empty.getDefaultInstance())) - .setSchemaDescriptor( - new DataSourceServiceMethodDescriptorSupplier("FinishRun")) - .build(); - } - } - } - return getFinishRunMethod; - } - - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getCreateDataSourceDefinitionMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.cloud.bigquery.datatransfer.v1.CreateDataSourceDefinitionRequest, - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition> - METHOD_CREATE_DATA_SOURCE_DEFINITION = getCreateDataSourceDefinitionMethodHelper(); - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.bigquery.datatransfer.v1.CreateDataSourceDefinitionRequest, - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition> - getCreateDataSourceDefinitionMethod; - - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - public static io.grpc.MethodDescriptor< - com.google.cloud.bigquery.datatransfer.v1.CreateDataSourceDefinitionRequest, - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition> - getCreateDataSourceDefinitionMethod() { - return getCreateDataSourceDefinitionMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.cloud.bigquery.datatransfer.v1.CreateDataSourceDefinitionRequest, - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition> - getCreateDataSourceDefinitionMethodHelper() { - io.grpc.MethodDescriptor< - com.google.cloud.bigquery.datatransfer.v1.CreateDataSourceDefinitionRequest, - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition> - getCreateDataSourceDefinitionMethod; - if ((getCreateDataSourceDefinitionMethod = - DataSourceServiceGrpc.getCreateDataSourceDefinitionMethod) - == null) { - synchronized (DataSourceServiceGrpc.class) { - if ((getCreateDataSourceDefinitionMethod = - DataSourceServiceGrpc.getCreateDataSourceDefinitionMethod) - == null) { - DataSourceServiceGrpc.getCreateDataSourceDefinitionMethod = - getCreateDataSourceDefinitionMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName( - "google.cloud.bigquery.datatransfer.v1.DataSourceService", - "CreateDataSourceDefinition")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.bigquery.datatransfer.v1 - .CreateDataSourceDefinitionRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition - .getDefaultInstance())) - .setSchemaDescriptor( - new DataSourceServiceMethodDescriptorSupplier( - "CreateDataSourceDefinition")) - .build(); - } - } - } - return getCreateDataSourceDefinitionMethod; - } - - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getUpdateDataSourceDefinitionMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.cloud.bigquery.datatransfer.v1.UpdateDataSourceDefinitionRequest, - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition> - METHOD_UPDATE_DATA_SOURCE_DEFINITION = getUpdateDataSourceDefinitionMethodHelper(); - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.bigquery.datatransfer.v1.UpdateDataSourceDefinitionRequest, - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition> - getUpdateDataSourceDefinitionMethod; - - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - public static io.grpc.MethodDescriptor< - com.google.cloud.bigquery.datatransfer.v1.UpdateDataSourceDefinitionRequest, - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition> - getUpdateDataSourceDefinitionMethod() { - return getUpdateDataSourceDefinitionMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.cloud.bigquery.datatransfer.v1.UpdateDataSourceDefinitionRequest, - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition> - getUpdateDataSourceDefinitionMethodHelper() { - io.grpc.MethodDescriptor< - com.google.cloud.bigquery.datatransfer.v1.UpdateDataSourceDefinitionRequest, - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition> - getUpdateDataSourceDefinitionMethod; - if ((getUpdateDataSourceDefinitionMethod = - DataSourceServiceGrpc.getUpdateDataSourceDefinitionMethod) - == null) { - synchronized (DataSourceServiceGrpc.class) { - if ((getUpdateDataSourceDefinitionMethod = - DataSourceServiceGrpc.getUpdateDataSourceDefinitionMethod) - == null) { - DataSourceServiceGrpc.getUpdateDataSourceDefinitionMethod = - getUpdateDataSourceDefinitionMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName( - "google.cloud.bigquery.datatransfer.v1.DataSourceService", - "UpdateDataSourceDefinition")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.bigquery.datatransfer.v1 - .UpdateDataSourceDefinitionRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition - .getDefaultInstance())) - .setSchemaDescriptor( - new DataSourceServiceMethodDescriptorSupplier( - "UpdateDataSourceDefinition")) - .build(); - } - } - } - return getUpdateDataSourceDefinitionMethod; - } - - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getDeleteDataSourceDefinitionMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.cloud.bigquery.datatransfer.v1.DeleteDataSourceDefinitionRequest, - com.google.protobuf.Empty> - METHOD_DELETE_DATA_SOURCE_DEFINITION = getDeleteDataSourceDefinitionMethodHelper(); - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.bigquery.datatransfer.v1.DeleteDataSourceDefinitionRequest, - com.google.protobuf.Empty> - getDeleteDataSourceDefinitionMethod; - - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - public static io.grpc.MethodDescriptor< - com.google.cloud.bigquery.datatransfer.v1.DeleteDataSourceDefinitionRequest, - com.google.protobuf.Empty> - getDeleteDataSourceDefinitionMethod() { - return getDeleteDataSourceDefinitionMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.cloud.bigquery.datatransfer.v1.DeleteDataSourceDefinitionRequest, - com.google.protobuf.Empty> - getDeleteDataSourceDefinitionMethodHelper() { - io.grpc.MethodDescriptor< - com.google.cloud.bigquery.datatransfer.v1.DeleteDataSourceDefinitionRequest, - com.google.protobuf.Empty> - getDeleteDataSourceDefinitionMethod; - if ((getDeleteDataSourceDefinitionMethod = - DataSourceServiceGrpc.getDeleteDataSourceDefinitionMethod) - == null) { - synchronized (DataSourceServiceGrpc.class) { - if ((getDeleteDataSourceDefinitionMethod = - DataSourceServiceGrpc.getDeleteDataSourceDefinitionMethod) - == null) { - DataSourceServiceGrpc.getDeleteDataSourceDefinitionMethod = - getDeleteDataSourceDefinitionMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName( - "google.cloud.bigquery.datatransfer.v1.DataSourceService", - "DeleteDataSourceDefinition")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.bigquery.datatransfer.v1 - .DeleteDataSourceDefinitionRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protobuf.Empty.getDefaultInstance())) - .setSchemaDescriptor( - new DataSourceServiceMethodDescriptorSupplier( - "DeleteDataSourceDefinition")) - .build(); - } - } - } - return getDeleteDataSourceDefinitionMethod; - } - - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getGetDataSourceDefinitionMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.cloud.bigquery.datatransfer.v1.GetDataSourceDefinitionRequest, - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition> - METHOD_GET_DATA_SOURCE_DEFINITION = getGetDataSourceDefinitionMethodHelper(); - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.bigquery.datatransfer.v1.GetDataSourceDefinitionRequest, - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition> - getGetDataSourceDefinitionMethod; - - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - public static io.grpc.MethodDescriptor< - com.google.cloud.bigquery.datatransfer.v1.GetDataSourceDefinitionRequest, - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition> - getGetDataSourceDefinitionMethod() { - return getGetDataSourceDefinitionMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.cloud.bigquery.datatransfer.v1.GetDataSourceDefinitionRequest, - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition> - getGetDataSourceDefinitionMethodHelper() { - io.grpc.MethodDescriptor< - com.google.cloud.bigquery.datatransfer.v1.GetDataSourceDefinitionRequest, - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition> - getGetDataSourceDefinitionMethod; - if ((getGetDataSourceDefinitionMethod = DataSourceServiceGrpc.getGetDataSourceDefinitionMethod) - == null) { - synchronized (DataSourceServiceGrpc.class) { - if ((getGetDataSourceDefinitionMethod = - DataSourceServiceGrpc.getGetDataSourceDefinitionMethod) - == null) { - DataSourceServiceGrpc.getGetDataSourceDefinitionMethod = - getGetDataSourceDefinitionMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName( - "google.cloud.bigquery.datatransfer.v1.DataSourceService", - "GetDataSourceDefinition")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.bigquery.datatransfer.v1 - .GetDataSourceDefinitionRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition - .getDefaultInstance())) - .setSchemaDescriptor( - new DataSourceServiceMethodDescriptorSupplier("GetDataSourceDefinition")) - .build(); - } - } - } - return getGetDataSourceDefinitionMethod; - } - - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getListDataSourceDefinitionsMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsRequest, - com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsResponse> - METHOD_LIST_DATA_SOURCE_DEFINITIONS = getListDataSourceDefinitionsMethodHelper(); - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsRequest, - com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsResponse> - getListDataSourceDefinitionsMethod; - - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - public static io.grpc.MethodDescriptor< - com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsRequest, - com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsResponse> - getListDataSourceDefinitionsMethod() { - return getListDataSourceDefinitionsMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsRequest, - com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsResponse> - getListDataSourceDefinitionsMethodHelper() { - io.grpc.MethodDescriptor< - com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsRequest, - com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsResponse> - getListDataSourceDefinitionsMethod; - if ((getListDataSourceDefinitionsMethod = - DataSourceServiceGrpc.getListDataSourceDefinitionsMethod) - == null) { - synchronized (DataSourceServiceGrpc.class) { - if ((getListDataSourceDefinitionsMethod = - DataSourceServiceGrpc.getListDataSourceDefinitionsMethod) - == null) { - DataSourceServiceGrpc.getListDataSourceDefinitionsMethod = - getListDataSourceDefinitionsMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName( - "google.cloud.bigquery.datatransfer.v1.DataSourceService", - "ListDataSourceDefinitions")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.bigquery.datatransfer.v1 - .ListDataSourceDefinitionsRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.bigquery.datatransfer.v1 - .ListDataSourceDefinitionsResponse.getDefaultInstance())) - .setSchemaDescriptor( - new DataSourceServiceMethodDescriptorSupplier( - "ListDataSourceDefinitions")) - .build(); - } - } - } - return getListDataSourceDefinitionsMethod; - } - - /** Creates a new async stub that supports all call types for the service */ - public static DataSourceServiceStub newStub(io.grpc.Channel channel) { - return new DataSourceServiceStub(channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static DataSourceServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { - return new DataSourceServiceBlockingStub(channel); - } - - /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ - public static DataSourceServiceFutureStub newFutureStub(io.grpc.Channel channel) { - return new DataSourceServiceFutureStub(channel); - } - - /** - * - * - *
-   * The Google BigQuery Data Transfer API allows BigQuery users to
-   * configure transfer of their data from other Google Products into BigQuery.
-   * This service exposes methods that should be used by data source backend.
-   * 
- */ - public abstract static class DataSourceServiceImplBase implements io.grpc.BindableService { - - /** - * - * - *
-     * Update a transfer run. If successful, resets
-     * data_source.update_deadline_seconds timer.
-     * 
- */ - public void updateTransferRun( - com.google.cloud.bigquery.datatransfer.v1.UpdateTransferRunRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - asyncUnimplementedUnaryCall(getUpdateTransferRunMethodHelper(), responseObserver); - } - - /** - * - * - *
-     * Log messages for a transfer run. If successful (at least 1 message), resets
-     * data_source.update_deadline_seconds timer.
-     * 
- */ - public void logTransferRunMessages( - com.google.cloud.bigquery.datatransfer.v1.LogTransferRunMessagesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getLogTransferRunMessagesMethodHelper(), responseObserver); - } - - /** - * - * - *
-     * Notify the Data Transfer Service that data is ready for loading.
-     * The Data Transfer Service will start and monitor multiple BigQuery Load
-     * jobs for a transfer run. Monitored jobs will be automatically retried
-     * and produce log messages when starting and finishing a job.
-     * Can be called multiple times for the same transfer run.
-     * 
- */ - public void startBigQueryJobs( - com.google.cloud.bigquery.datatransfer.v1.StartBigQueryJobsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getStartBigQueryJobsMethodHelper(), responseObserver); - } - - /** - * - * - *
-     * Notify the Data Transfer Service that the data source is done processing
-     * the run. No more status updates or requests to start/monitor jobs will be
-     * accepted. The run will be finalized by the Data Transfer Service when all
-     * monitored jobs are completed.
-     * Does not need to be called if the run is set to FAILED.
-     * 
- */ - public void finishRun( - com.google.cloud.bigquery.datatransfer.v1.FinishRunRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getFinishRunMethodHelper(), responseObserver); - } - - /** - * - * - *
-     * Creates a data source definition.  Calling this method will automatically
-     * use your credentials to create the following Google Cloud resources in
-     * YOUR Google Cloud project.
-     * 1. OAuth client
-     * 2. Pub/Sub Topics and Subscriptions in each supported_location_ids. e.g.,
-     * projects/{project_id}/{topics|subscriptions}/bigquerydatatransfer.{data_source_id}.{location_id}.run
-     * The field data_source.client_id should be left empty in the input request,
-     * as the API will create a new OAuth client on behalf of the caller. On the
-     * other hand data_source.scopes usually need to be set when there are OAuth
-     * scopes that need to be granted by end users.
-     * 3. We need a longer deadline due to the 60 seconds SLO from Pub/Sub admin
-     * Operations. This also applies to update and delete data source definition.
-     * 
- */ - public void createDataSourceDefinition( - com.google.cloud.bigquery.datatransfer.v1.CreateDataSourceDefinitionRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - asyncUnimplementedUnaryCall(getCreateDataSourceDefinitionMethodHelper(), responseObserver); - } - - /** - * - * - *
-     * Updates an existing data source definition. If changing
-     * supported_location_ids, triggers same effects as mentioned in "Create a
-     * data source definition."
-     * 
- */ - public void updateDataSourceDefinition( - com.google.cloud.bigquery.datatransfer.v1.UpdateDataSourceDefinitionRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - asyncUnimplementedUnaryCall(getUpdateDataSourceDefinitionMethodHelper(), responseObserver); - } - - /** - * - * - *
-     * Deletes a data source definition, all of the transfer configs associated
-     * with this data source definition (if any) must be deleted first by the user
-     * in ALL regions, in order to delete the data source definition.
-     * This method is primarily meant for deleting data sources created during
-     * testing stage.
-     * If the data source is referenced by transfer configs in the region
-     * specified in the request URL, the method will fail immediately. If in the
-     * current region (e.g., US) it's not used by any transfer configs, but in
-     * another region (e.g., EU) it is, then although the method will succeed in
-     * region US, but it will fail when the deletion operation is replicated to
-     * region EU. And eventually, the system will replicate the data source
-     * definition back from EU to US, in order to bring all regions to
-     * consistency. The final effect is that the data source appears to be
-     * 'undeleted' in the US region.
-     * 
- */ - public void deleteDataSourceDefinition( - com.google.cloud.bigquery.datatransfer.v1.DeleteDataSourceDefinitionRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getDeleteDataSourceDefinitionMethodHelper(), responseObserver); - } - - /** - * - * - *
-     * Retrieves an existing data source definition.
-     * 
- */ - public void getDataSourceDefinition( - com.google.cloud.bigquery.datatransfer.v1.GetDataSourceDefinitionRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - asyncUnimplementedUnaryCall(getGetDataSourceDefinitionMethodHelper(), responseObserver); - } - - /** - * - * - *
-     * Lists supported data source definitions.
-     * 
- */ - public void listDataSourceDefinitions( - com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsRequest request, - io.grpc.stub.StreamObserver< - com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsResponse> - responseObserver) { - asyncUnimplementedUnaryCall(getListDataSourceDefinitionsMethodHelper(), responseObserver); - } - - @java.lang.Override - public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getUpdateTransferRunMethodHelper(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.bigquery.datatransfer.v1.UpdateTransferRunRequest, - com.google.cloud.bigquery.datatransfer.v1.TransferRun>( - this, METHODID_UPDATE_TRANSFER_RUN))) - .addMethod( - getLogTransferRunMessagesMethodHelper(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.bigquery.datatransfer.v1.LogTransferRunMessagesRequest, - com.google.protobuf.Empty>(this, METHODID_LOG_TRANSFER_RUN_MESSAGES))) - .addMethod( - getStartBigQueryJobsMethodHelper(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.bigquery.datatransfer.v1.StartBigQueryJobsRequest, - com.google.protobuf.Empty>(this, METHODID_START_BIG_QUERY_JOBS))) - .addMethod( - getFinishRunMethodHelper(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.bigquery.datatransfer.v1.FinishRunRequest, - com.google.protobuf.Empty>(this, METHODID_FINISH_RUN))) - .addMethod( - getCreateDataSourceDefinitionMethodHelper(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.bigquery.datatransfer.v1.CreateDataSourceDefinitionRequest, - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition>( - this, METHODID_CREATE_DATA_SOURCE_DEFINITION))) - .addMethod( - getUpdateDataSourceDefinitionMethodHelper(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.bigquery.datatransfer.v1.UpdateDataSourceDefinitionRequest, - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition>( - this, METHODID_UPDATE_DATA_SOURCE_DEFINITION))) - .addMethod( - getDeleteDataSourceDefinitionMethodHelper(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.bigquery.datatransfer.v1.DeleteDataSourceDefinitionRequest, - com.google.protobuf.Empty>(this, METHODID_DELETE_DATA_SOURCE_DEFINITION))) - .addMethod( - getGetDataSourceDefinitionMethodHelper(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.bigquery.datatransfer.v1.GetDataSourceDefinitionRequest, - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition>( - this, METHODID_GET_DATA_SOURCE_DEFINITION))) - .addMethod( - getListDataSourceDefinitionsMethodHelper(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsRequest, - com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsResponse>( - this, METHODID_LIST_DATA_SOURCE_DEFINITIONS))) - .build(); - } - } - - /** - * - * - *
-   * The Google BigQuery Data Transfer API allows BigQuery users to
-   * configure transfer of their data from other Google Products into BigQuery.
-   * This service exposes methods that should be used by data source backend.
-   * 
- */ - public static final class DataSourceServiceStub - extends io.grpc.stub.AbstractStub { - private DataSourceServiceStub(io.grpc.Channel channel) { - super(channel); - } - - private DataSourceServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected DataSourceServiceStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new DataSourceServiceStub(channel, callOptions); - } - - /** - * - * - *
-     * Update a transfer run. If successful, resets
-     * data_source.update_deadline_seconds timer.
-     * 
- */ - public void updateTransferRun( - com.google.cloud.bigquery.datatransfer.v1.UpdateTransferRunRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - asyncUnaryCall( - getChannel().newCall(getUpdateTransferRunMethodHelper(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Log messages for a transfer run. If successful (at least 1 message), resets
-     * data_source.update_deadline_seconds timer.
-     * 
- */ - public void logTransferRunMessages( - com.google.cloud.bigquery.datatransfer.v1.LogTransferRunMessagesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnaryCall( - getChannel().newCall(getLogTransferRunMessagesMethodHelper(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Notify the Data Transfer Service that data is ready for loading.
-     * The Data Transfer Service will start and monitor multiple BigQuery Load
-     * jobs for a transfer run. Monitored jobs will be automatically retried
-     * and produce log messages when starting and finishing a job.
-     * Can be called multiple times for the same transfer run.
-     * 
- */ - public void startBigQueryJobs( - com.google.cloud.bigquery.datatransfer.v1.StartBigQueryJobsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnaryCall( - getChannel().newCall(getStartBigQueryJobsMethodHelper(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Notify the Data Transfer Service that the data source is done processing
-     * the run. No more status updates or requests to start/monitor jobs will be
-     * accepted. The run will be finalized by the Data Transfer Service when all
-     * monitored jobs are completed.
-     * Does not need to be called if the run is set to FAILED.
-     * 
- */ - public void finishRun( - com.google.cloud.bigquery.datatransfer.v1.FinishRunRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnaryCall( - getChannel().newCall(getFinishRunMethodHelper(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Creates a data source definition.  Calling this method will automatically
-     * use your credentials to create the following Google Cloud resources in
-     * YOUR Google Cloud project.
-     * 1. OAuth client
-     * 2. Pub/Sub Topics and Subscriptions in each supported_location_ids. e.g.,
-     * projects/{project_id}/{topics|subscriptions}/bigquerydatatransfer.{data_source_id}.{location_id}.run
-     * The field data_source.client_id should be left empty in the input request,
-     * as the API will create a new OAuth client on behalf of the caller. On the
-     * other hand data_source.scopes usually need to be set when there are OAuth
-     * scopes that need to be granted by end users.
-     * 3. We need a longer deadline due to the 60 seconds SLO from Pub/Sub admin
-     * Operations. This also applies to update and delete data source definition.
-     * 
- */ - public void createDataSourceDefinition( - com.google.cloud.bigquery.datatransfer.v1.CreateDataSourceDefinitionRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - asyncUnaryCall( - getChannel().newCall(getCreateDataSourceDefinitionMethodHelper(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Updates an existing data source definition. If changing
-     * supported_location_ids, triggers same effects as mentioned in "Create a
-     * data source definition."
-     * 
- */ - public void updateDataSourceDefinition( - com.google.cloud.bigquery.datatransfer.v1.UpdateDataSourceDefinitionRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - asyncUnaryCall( - getChannel().newCall(getUpdateDataSourceDefinitionMethodHelper(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Deletes a data source definition, all of the transfer configs associated
-     * with this data source definition (if any) must be deleted first by the user
-     * in ALL regions, in order to delete the data source definition.
-     * This method is primarily meant for deleting data sources created during
-     * testing stage.
-     * If the data source is referenced by transfer configs in the region
-     * specified in the request URL, the method will fail immediately. If in the
-     * current region (e.g., US) it's not used by any transfer configs, but in
-     * another region (e.g., EU) it is, then although the method will succeed in
-     * region US, but it will fail when the deletion operation is replicated to
-     * region EU. And eventually, the system will replicate the data source
-     * definition back from EU to US, in order to bring all regions to
-     * consistency. The final effect is that the data source appears to be
-     * 'undeleted' in the US region.
-     * 
- */ - public void deleteDataSourceDefinition( - com.google.cloud.bigquery.datatransfer.v1.DeleteDataSourceDefinitionRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnaryCall( - getChannel().newCall(getDeleteDataSourceDefinitionMethodHelper(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Retrieves an existing data source definition.
-     * 
- */ - public void getDataSourceDefinition( - com.google.cloud.bigquery.datatransfer.v1.GetDataSourceDefinitionRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - asyncUnaryCall( - getChannel().newCall(getGetDataSourceDefinitionMethodHelper(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Lists supported data source definitions.
-     * 
- */ - public void listDataSourceDefinitions( - com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsRequest request, - io.grpc.stub.StreamObserver< - com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsResponse> - responseObserver) { - asyncUnaryCall( - getChannel().newCall(getListDataSourceDefinitionsMethodHelper(), getCallOptions()), - request, - responseObserver); - } - } - - /** - * - * - *
-   * The Google BigQuery Data Transfer API allows BigQuery users to
-   * configure transfer of their data from other Google Products into BigQuery.
-   * This service exposes methods that should be used by data source backend.
-   * 
- */ - public static final class DataSourceServiceBlockingStub - extends io.grpc.stub.AbstractStub { - private DataSourceServiceBlockingStub(io.grpc.Channel channel) { - super(channel); - } - - private DataSourceServiceBlockingStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected DataSourceServiceBlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new DataSourceServiceBlockingStub(channel, callOptions); - } - - /** - * - * - *
-     * Update a transfer run. If successful, resets
-     * data_source.update_deadline_seconds timer.
-     * 
- */ - public com.google.cloud.bigquery.datatransfer.v1.TransferRun updateTransferRun( - com.google.cloud.bigquery.datatransfer.v1.UpdateTransferRunRequest request) { - return blockingUnaryCall( - getChannel(), getUpdateTransferRunMethodHelper(), getCallOptions(), request); - } - - /** - * - * - *
-     * Log messages for a transfer run. If successful (at least 1 message), resets
-     * data_source.update_deadline_seconds timer.
-     * 
- */ - public com.google.protobuf.Empty logTransferRunMessages( - com.google.cloud.bigquery.datatransfer.v1.LogTransferRunMessagesRequest request) { - return blockingUnaryCall( - getChannel(), getLogTransferRunMessagesMethodHelper(), getCallOptions(), request); - } - - /** - * - * - *
-     * Notify the Data Transfer Service that data is ready for loading.
-     * The Data Transfer Service will start and monitor multiple BigQuery Load
-     * jobs for a transfer run. Monitored jobs will be automatically retried
-     * and produce log messages when starting and finishing a job.
-     * Can be called multiple times for the same transfer run.
-     * 
- */ - public com.google.protobuf.Empty startBigQueryJobs( - com.google.cloud.bigquery.datatransfer.v1.StartBigQueryJobsRequest request) { - return blockingUnaryCall( - getChannel(), getStartBigQueryJobsMethodHelper(), getCallOptions(), request); - } - - /** - * - * - *
-     * Notify the Data Transfer Service that the data source is done processing
-     * the run. No more status updates or requests to start/monitor jobs will be
-     * accepted. The run will be finalized by the Data Transfer Service when all
-     * monitored jobs are completed.
-     * Does not need to be called if the run is set to FAILED.
-     * 
- */ - public com.google.protobuf.Empty finishRun( - com.google.cloud.bigquery.datatransfer.v1.FinishRunRequest request) { - return blockingUnaryCall(getChannel(), getFinishRunMethodHelper(), getCallOptions(), request); - } - - /** - * - * - *
-     * Creates a data source definition.  Calling this method will automatically
-     * use your credentials to create the following Google Cloud resources in
-     * YOUR Google Cloud project.
-     * 1. OAuth client
-     * 2. Pub/Sub Topics and Subscriptions in each supported_location_ids. e.g.,
-     * projects/{project_id}/{topics|subscriptions}/bigquerydatatransfer.{data_source_id}.{location_id}.run
-     * The field data_source.client_id should be left empty in the input request,
-     * as the API will create a new OAuth client on behalf of the caller. On the
-     * other hand data_source.scopes usually need to be set when there are OAuth
-     * scopes that need to be granted by end users.
-     * 3. We need a longer deadline due to the 60 seconds SLO from Pub/Sub admin
-     * Operations. This also applies to update and delete data source definition.
-     * 
- */ - public com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition - createDataSourceDefinition( - com.google.cloud.bigquery.datatransfer.v1.CreateDataSourceDefinitionRequest request) { - return blockingUnaryCall( - getChannel(), getCreateDataSourceDefinitionMethodHelper(), getCallOptions(), request); - } - - /** - * - * - *
-     * Updates an existing data source definition. If changing
-     * supported_location_ids, triggers same effects as mentioned in "Create a
-     * data source definition."
-     * 
- */ - public com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition - updateDataSourceDefinition( - com.google.cloud.bigquery.datatransfer.v1.UpdateDataSourceDefinitionRequest request) { - return blockingUnaryCall( - getChannel(), getUpdateDataSourceDefinitionMethodHelper(), getCallOptions(), request); - } - - /** - * - * - *
-     * Deletes a data source definition, all of the transfer configs associated
-     * with this data source definition (if any) must be deleted first by the user
-     * in ALL regions, in order to delete the data source definition.
-     * This method is primarily meant for deleting data sources created during
-     * testing stage.
-     * If the data source is referenced by transfer configs in the region
-     * specified in the request URL, the method will fail immediately. If in the
-     * current region (e.g., US) it's not used by any transfer configs, but in
-     * another region (e.g., EU) it is, then although the method will succeed in
-     * region US, but it will fail when the deletion operation is replicated to
-     * region EU. And eventually, the system will replicate the data source
-     * definition back from EU to US, in order to bring all regions to
-     * consistency. The final effect is that the data source appears to be
-     * 'undeleted' in the US region.
-     * 
- */ - public com.google.protobuf.Empty deleteDataSourceDefinition( - com.google.cloud.bigquery.datatransfer.v1.DeleteDataSourceDefinitionRequest request) { - return blockingUnaryCall( - getChannel(), getDeleteDataSourceDefinitionMethodHelper(), getCallOptions(), request); - } - - /** - * - * - *
-     * Retrieves an existing data source definition.
-     * 
- */ - public com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition getDataSourceDefinition( - com.google.cloud.bigquery.datatransfer.v1.GetDataSourceDefinitionRequest request) { - return blockingUnaryCall( - getChannel(), getGetDataSourceDefinitionMethodHelper(), getCallOptions(), request); - } - - /** - * - * - *
-     * Lists supported data source definitions.
-     * 
- */ - public com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsResponse - listDataSourceDefinitions( - com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsRequest request) { - return blockingUnaryCall( - getChannel(), getListDataSourceDefinitionsMethodHelper(), getCallOptions(), request); - } - } - - /** - * - * - *
-   * The Google BigQuery Data Transfer API allows BigQuery users to
-   * configure transfer of their data from other Google Products into BigQuery.
-   * This service exposes methods that should be used by data source backend.
-   * 
- */ - public static final class DataSourceServiceFutureStub - extends io.grpc.stub.AbstractStub { - private DataSourceServiceFutureStub(io.grpc.Channel channel) { - super(channel); - } - - private DataSourceServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected DataSourceServiceFutureStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new DataSourceServiceFutureStub(channel, callOptions); - } - - /** - * - * - *
-     * Update a transfer run. If successful, resets
-     * data_source.update_deadline_seconds timer.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.bigquery.datatransfer.v1.TransferRun> - updateTransferRun( - com.google.cloud.bigquery.datatransfer.v1.UpdateTransferRunRequest request) { - return futureUnaryCall( - getChannel().newCall(getUpdateTransferRunMethodHelper(), getCallOptions()), request); - } - - /** - * - * - *
-     * Log messages for a transfer run. If successful (at least 1 message), resets
-     * data_source.update_deadline_seconds timer.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - logTransferRunMessages( - com.google.cloud.bigquery.datatransfer.v1.LogTransferRunMessagesRequest request) { - return futureUnaryCall( - getChannel().newCall(getLogTransferRunMessagesMethodHelper(), getCallOptions()), request); - } - - /** - * - * - *
-     * Notify the Data Transfer Service that data is ready for loading.
-     * The Data Transfer Service will start and monitor multiple BigQuery Load
-     * jobs for a transfer run. Monitored jobs will be automatically retried
-     * and produce log messages when starting and finishing a job.
-     * Can be called multiple times for the same transfer run.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - startBigQueryJobs( - com.google.cloud.bigquery.datatransfer.v1.StartBigQueryJobsRequest request) { - return futureUnaryCall( - getChannel().newCall(getStartBigQueryJobsMethodHelper(), getCallOptions()), request); - } - - /** - * - * - *
-     * Notify the Data Transfer Service that the data source is done processing
-     * the run. No more status updates or requests to start/monitor jobs will be
-     * accepted. The run will be finalized by the Data Transfer Service when all
-     * monitored jobs are completed.
-     * Does not need to be called if the run is set to FAILED.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture finishRun( - com.google.cloud.bigquery.datatransfer.v1.FinishRunRequest request) { - return futureUnaryCall( - getChannel().newCall(getFinishRunMethodHelper(), getCallOptions()), request); - } - - /** - * - * - *
-     * Creates a data source definition.  Calling this method will automatically
-     * use your credentials to create the following Google Cloud resources in
-     * YOUR Google Cloud project.
-     * 1. OAuth client
-     * 2. Pub/Sub Topics and Subscriptions in each supported_location_ids. e.g.,
-     * projects/{project_id}/{topics|subscriptions}/bigquerydatatransfer.{data_source_id}.{location_id}.run
-     * The field data_source.client_id should be left empty in the input request,
-     * as the API will create a new OAuth client on behalf of the caller. On the
-     * other hand data_source.scopes usually need to be set when there are OAuth
-     * scopes that need to be granted by end users.
-     * 3. We need a longer deadline due to the 60 seconds SLO from Pub/Sub admin
-     * Operations. This also applies to update and delete data source definition.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition> - createDataSourceDefinition( - com.google.cloud.bigquery.datatransfer.v1.CreateDataSourceDefinitionRequest request) { - return futureUnaryCall( - getChannel().newCall(getCreateDataSourceDefinitionMethodHelper(), getCallOptions()), - request); - } - - /** - * - * - *
-     * Updates an existing data source definition. If changing
-     * supported_location_ids, triggers same effects as mentioned in "Create a
-     * data source definition."
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition> - updateDataSourceDefinition( - com.google.cloud.bigquery.datatransfer.v1.UpdateDataSourceDefinitionRequest request) { - return futureUnaryCall( - getChannel().newCall(getUpdateDataSourceDefinitionMethodHelper(), getCallOptions()), - request); - } - - /** - * - * - *
-     * Deletes a data source definition, all of the transfer configs associated
-     * with this data source definition (if any) must be deleted first by the user
-     * in ALL regions, in order to delete the data source definition.
-     * This method is primarily meant for deleting data sources created during
-     * testing stage.
-     * If the data source is referenced by transfer configs in the region
-     * specified in the request URL, the method will fail immediately. If in the
-     * current region (e.g., US) it's not used by any transfer configs, but in
-     * another region (e.g., EU) it is, then although the method will succeed in
-     * region US, but it will fail when the deletion operation is replicated to
-     * region EU. And eventually, the system will replicate the data source
-     * definition back from EU to US, in order to bring all regions to
-     * consistency. The final effect is that the data source appears to be
-     * 'undeleted' in the US region.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - deleteDataSourceDefinition( - com.google.cloud.bigquery.datatransfer.v1.DeleteDataSourceDefinitionRequest request) { - return futureUnaryCall( - getChannel().newCall(getDeleteDataSourceDefinitionMethodHelper(), getCallOptions()), - request); - } - - /** - * - * - *
-     * Retrieves an existing data source definition.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition> - getDataSourceDefinition( - com.google.cloud.bigquery.datatransfer.v1.GetDataSourceDefinitionRequest request) { - return futureUnaryCall( - getChannel().newCall(getGetDataSourceDefinitionMethodHelper(), getCallOptions()), - request); - } - - /** - * - * - *
-     * Lists supported data source definitions.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsResponse> - listDataSourceDefinitions( - com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsRequest request) { - return futureUnaryCall( - getChannel().newCall(getListDataSourceDefinitionsMethodHelper(), getCallOptions()), - request); - } - } - - private static final int METHODID_UPDATE_TRANSFER_RUN = 0; - private static final int METHODID_LOG_TRANSFER_RUN_MESSAGES = 1; - private static final int METHODID_START_BIG_QUERY_JOBS = 2; - private static final int METHODID_FINISH_RUN = 3; - private static final int METHODID_CREATE_DATA_SOURCE_DEFINITION = 4; - private static final int METHODID_UPDATE_DATA_SOURCE_DEFINITION = 5; - private static final int METHODID_DELETE_DATA_SOURCE_DEFINITION = 6; - private static final int METHODID_GET_DATA_SOURCE_DEFINITION = 7; - private static final int METHODID_LIST_DATA_SOURCE_DEFINITIONS = 8; - - 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 DataSourceServiceImplBase serviceImpl; - private final int methodId; - - MethodHandlers(DataSourceServiceImplBase 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_UPDATE_TRANSFER_RUN: - serviceImpl.updateTransferRun( - (com.google.cloud.bigquery.datatransfer.v1.UpdateTransferRunRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_LOG_TRANSFER_RUN_MESSAGES: - serviceImpl.logTransferRunMessages( - (com.google.cloud.bigquery.datatransfer.v1.LogTransferRunMessagesRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_START_BIG_QUERY_JOBS: - serviceImpl.startBigQueryJobs( - (com.google.cloud.bigquery.datatransfer.v1.StartBigQueryJobsRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_FINISH_RUN: - serviceImpl.finishRun( - (com.google.cloud.bigquery.datatransfer.v1.FinishRunRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_CREATE_DATA_SOURCE_DEFINITION: - serviceImpl.createDataSourceDefinition( - (com.google.cloud.bigquery.datatransfer.v1.CreateDataSourceDefinitionRequest) request, - (io.grpc.stub.StreamObserver< - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition>) - responseObserver); - break; - case METHODID_UPDATE_DATA_SOURCE_DEFINITION: - serviceImpl.updateDataSourceDefinition( - (com.google.cloud.bigquery.datatransfer.v1.UpdateDataSourceDefinitionRequest) request, - (io.grpc.stub.StreamObserver< - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition>) - responseObserver); - break; - case METHODID_DELETE_DATA_SOURCE_DEFINITION: - serviceImpl.deleteDataSourceDefinition( - (com.google.cloud.bigquery.datatransfer.v1.DeleteDataSourceDefinitionRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_DATA_SOURCE_DEFINITION: - serviceImpl.getDataSourceDefinition( - (com.google.cloud.bigquery.datatransfer.v1.GetDataSourceDefinitionRequest) request, - (io.grpc.stub.StreamObserver< - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition>) - responseObserver); - break; - case METHODID_LIST_DATA_SOURCE_DEFINITIONS: - serviceImpl.listDataSourceDefinitions( - (com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsRequest) request, - (io.grpc.stub.StreamObserver< - com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsResponse>) - 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 DataSourceServiceBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, - io.grpc.protobuf.ProtoServiceDescriptorSupplier { - DataSourceServiceBaseDescriptorSupplier() {} - - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto.getDescriptor(); - } - - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("DataSourceService"); - } - } - - private static final class DataSourceServiceFileDescriptorSupplier - extends DataSourceServiceBaseDescriptorSupplier { - DataSourceServiceFileDescriptorSupplier() {} - } - - private static final class DataSourceServiceMethodDescriptorSupplier - extends DataSourceServiceBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; - - DataSourceServiceMethodDescriptorSupplier(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 (DataSourceServiceGrpc.class) { - result = serviceDescriptor; - if (result == null) { - serviceDescriptor = - result = - io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new DataSourceServiceFileDescriptorSupplier()) - .addMethod(getUpdateTransferRunMethodHelper()) - .addMethod(getLogTransferRunMessagesMethodHelper()) - .addMethod(getStartBigQueryJobsMethodHelper()) - .addMethod(getFinishRunMethodHelper()) - .addMethod(getCreateDataSourceDefinitionMethodHelper()) - .addMethod(getUpdateDataSourceDefinitionMethodHelper()) - .addMethod(getDeleteDataSourceDefinitionMethodHelper()) - .addMethod(getGetDataSourceDefinitionMethodHelper()) - .addMethod(getListDataSourceDefinitionsMethodHelper()) - .build(); - } - } - } - return result; - } -} diff --git a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/CreateDataSourceDefinitionRequest.java b/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/CreateDataSourceDefinitionRequest.java deleted file mode 100644 index 83ce0401c432..000000000000 --- a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/CreateDataSourceDefinitionRequest.java +++ /dev/null @@ -1,935 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/bigquery/datatransfer/v1/datasource.proto - -package com.google.cloud.bigquery.datatransfer.v1; - -/** - * - * - *
- * Represents the request of the CreateDataSourceDefinition method.
- * 
- * - * Protobuf type {@code google.cloud.bigquery.datatransfer.v1.CreateDataSourceDefinitionRequest} - */ -public final class CreateDataSourceDefinitionRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.bigquery.datatransfer.v1.CreateDataSourceDefinitionRequest) - CreateDataSourceDefinitionRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use CreateDataSourceDefinitionRequest.newBuilder() to construct. - private CreateDataSourceDefinitionRequest( - com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private CreateDataSourceDefinitionRequest() { - parent_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private CreateDataSourceDefinitionRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: - { - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition.Builder subBuilder = - null; - if (dataSourceDefinition_ != null) { - subBuilder = dataSourceDefinition_.toBuilder(); - } - dataSourceDefinition_ = - input.readMessage( - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(dataSourceDefinition_); - dataSourceDefinition_ = 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.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_CreateDataSourceDefinitionRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_CreateDataSourceDefinitionRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.datatransfer.v1.CreateDataSourceDefinitionRequest.class, - com.google.cloud.bigquery.datatransfer.v1.CreateDataSourceDefinitionRequest.Builder - .class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - * - * - *
-   * The BigQuery project id for which data source definition is associated.
-   * Must be in the form: `projects/{project_id}/locations/{location_id}`
-   * 
- * - * string parent = 1; - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - * - * - *
-   * The BigQuery project id for which data source definition is associated.
-   * Must be in the form: `projects/{project_id}/locations/{location_id}`
-   * 
- * - * string parent = 1; - */ - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DATA_SOURCE_DEFINITION_FIELD_NUMBER = 2; - private com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition dataSourceDefinition_; - /** - * - * - *
-   * Data source definition.
-   * 
- * - * .google.cloud.bigquery.datatransfer.v1.DataSourceDefinition data_source_definition = 2; - * - */ - public boolean hasDataSourceDefinition() { - return dataSourceDefinition_ != null; - } - /** - * - * - *
-   * Data source definition.
-   * 
- * - * .google.cloud.bigquery.datatransfer.v1.DataSourceDefinition data_source_definition = 2; - * - */ - public com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition getDataSourceDefinition() { - return dataSourceDefinition_ == null - ? com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition.getDefaultInstance() - : dataSourceDefinition_; - } - /** - * - * - *
-   * Data source definition.
-   * 
- * - * .google.cloud.bigquery.datatransfer.v1.DataSourceDefinition data_source_definition = 2; - * - */ - public com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinitionOrBuilder - getDataSourceDefinitionOrBuilder() { - return getDataSourceDefinition(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (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 (dataSourceDefinition_ != null) { - output.writeMessage(2, getDataSourceDefinition()); - } - 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 (dataSourceDefinition_ != null) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDataSourceDefinition()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof com.google.cloud.bigquery.datatransfer.v1.CreateDataSourceDefinitionRequest)) { - return super.equals(obj); - } - com.google.cloud.bigquery.datatransfer.v1.CreateDataSourceDefinitionRequest other = - (com.google.cloud.bigquery.datatransfer.v1.CreateDataSourceDefinitionRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (hasDataSourceDefinition() != other.hasDataSourceDefinition()) return false; - if (hasDataSourceDefinition()) { - if (!getDataSourceDefinition().equals(other.getDataSourceDefinition())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - 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 (hasDataSourceDefinition()) { - hash = (37 * hash) + DATA_SOURCE_DEFINITION_FIELD_NUMBER; - hash = (53 * hash) + getDataSourceDefinition().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.bigquery.datatransfer.v1.CreateDataSourceDefinitionRequest - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.datatransfer.v1.CreateDataSourceDefinitionRequest - parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.CreateDataSourceDefinitionRequest - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.datatransfer.v1.CreateDataSourceDefinitionRequest - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.CreateDataSourceDefinitionRequest - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.datatransfer.v1.CreateDataSourceDefinitionRequest - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.CreateDataSourceDefinitionRequest - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.datatransfer.v1.CreateDataSourceDefinitionRequest - parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.CreateDataSourceDefinitionRequest - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.datatransfer.v1.CreateDataSourceDefinitionRequest - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.CreateDataSourceDefinitionRequest - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.datatransfer.v1.CreateDataSourceDefinitionRequest - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.bigquery.datatransfer.v1.CreateDataSourceDefinitionRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Represents the request of the CreateDataSourceDefinition method.
-   * 
- * - * Protobuf type {@code google.cloud.bigquery.datatransfer.v1.CreateDataSourceDefinitionRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.bigquery.datatransfer.v1.CreateDataSourceDefinitionRequest) - com.google.cloud.bigquery.datatransfer.v1.CreateDataSourceDefinitionRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_CreateDataSourceDefinitionRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_CreateDataSourceDefinitionRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.datatransfer.v1.CreateDataSourceDefinitionRequest.class, - com.google.cloud.bigquery.datatransfer.v1.CreateDataSourceDefinitionRequest.Builder - .class); - } - - // Construct using - // com.google.cloud.bigquery.datatransfer.v1.CreateDataSourceDefinitionRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.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 (dataSourceDefinitionBuilder_ == null) { - dataSourceDefinition_ = null; - } else { - dataSourceDefinition_ = null; - dataSourceDefinitionBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_CreateDataSourceDefinitionRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.bigquery.datatransfer.v1.CreateDataSourceDefinitionRequest - getDefaultInstanceForType() { - return com.google.cloud.bigquery.datatransfer.v1.CreateDataSourceDefinitionRequest - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.bigquery.datatransfer.v1.CreateDataSourceDefinitionRequest build() { - com.google.cloud.bigquery.datatransfer.v1.CreateDataSourceDefinitionRequest result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.bigquery.datatransfer.v1.CreateDataSourceDefinitionRequest - buildPartial() { - com.google.cloud.bigquery.datatransfer.v1.CreateDataSourceDefinitionRequest result = - new com.google.cloud.bigquery.datatransfer.v1.CreateDataSourceDefinitionRequest(this); - result.parent_ = parent_; - if (dataSourceDefinitionBuilder_ == null) { - result.dataSourceDefinition_ = dataSourceDefinition_; - } else { - result.dataSourceDefinition_ = dataSourceDefinitionBuilder_.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.bigquery.datatransfer.v1.CreateDataSourceDefinitionRequest) { - return mergeFrom( - (com.google.cloud.bigquery.datatransfer.v1.CreateDataSourceDefinitionRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.bigquery.datatransfer.v1.CreateDataSourceDefinitionRequest other) { - if (other - == com.google.cloud.bigquery.datatransfer.v1.CreateDataSourceDefinitionRequest - .getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.hasDataSourceDefinition()) { - mergeDataSourceDefinition(other.getDataSourceDefinition()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.bigquery.datatransfer.v1.CreateDataSourceDefinitionRequest parsedMessage = - null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.bigquery.datatransfer.v1.CreateDataSourceDefinitionRequest) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - * - * - *
-     * The BigQuery project id for which data source definition is associated.
-     * Must be in the form: `projects/{project_id}/locations/{location_id}`
-     * 
- * - * string parent = 1; - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * The BigQuery project id for which data source definition is associated.
-     * Must be in the form: `projects/{project_id}/locations/{location_id}`
-     * 
- * - * string parent = 1; - */ - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * The BigQuery project id for which data source definition is associated.
-     * Must be in the form: `projects/{project_id}/locations/{location_id}`
-     * 
- * - * string parent = 1; - */ - public Builder setParent(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * The BigQuery project id for which data source definition is associated.
-     * Must be in the form: `projects/{project_id}/locations/{location_id}`
-     * 
- * - * string parent = 1; - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - * - * - *
-     * The BigQuery project id for which data source definition is associated.
-     * Must be in the form: `projects/{project_id}/locations/{location_id}`
-     * 
- * - * string parent = 1; - */ - public Builder setParentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition dataSourceDefinition_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition, - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition.Builder, - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinitionOrBuilder> - dataSourceDefinitionBuilder_; - /** - * - * - *
-     * Data source definition.
-     * 
- * - * .google.cloud.bigquery.datatransfer.v1.DataSourceDefinition data_source_definition = 2; - * - */ - public boolean hasDataSourceDefinition() { - return dataSourceDefinitionBuilder_ != null || dataSourceDefinition_ != null; - } - /** - * - * - *
-     * Data source definition.
-     * 
- * - * .google.cloud.bigquery.datatransfer.v1.DataSourceDefinition data_source_definition = 2; - * - */ - public com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition - getDataSourceDefinition() { - if (dataSourceDefinitionBuilder_ == null) { - return dataSourceDefinition_ == null - ? com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition.getDefaultInstance() - : dataSourceDefinition_; - } else { - return dataSourceDefinitionBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Data source definition.
-     * 
- * - * .google.cloud.bigquery.datatransfer.v1.DataSourceDefinition data_source_definition = 2; - * - */ - public Builder setDataSourceDefinition( - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition value) { - if (dataSourceDefinitionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - dataSourceDefinition_ = value; - onChanged(); - } else { - dataSourceDefinitionBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Data source definition.
-     * 
- * - * .google.cloud.bigquery.datatransfer.v1.DataSourceDefinition data_source_definition = 2; - * - */ - public Builder setDataSourceDefinition( - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition.Builder builderForValue) { - if (dataSourceDefinitionBuilder_ == null) { - dataSourceDefinition_ = builderForValue.build(); - onChanged(); - } else { - dataSourceDefinitionBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Data source definition.
-     * 
- * - * .google.cloud.bigquery.datatransfer.v1.DataSourceDefinition data_source_definition = 2; - * - */ - public Builder mergeDataSourceDefinition( - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition value) { - if (dataSourceDefinitionBuilder_ == null) { - if (dataSourceDefinition_ != null) { - dataSourceDefinition_ = - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition.newBuilder( - dataSourceDefinition_) - .mergeFrom(value) - .buildPartial(); - } else { - dataSourceDefinition_ = value; - } - onChanged(); - } else { - dataSourceDefinitionBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Data source definition.
-     * 
- * - * .google.cloud.bigquery.datatransfer.v1.DataSourceDefinition data_source_definition = 2; - * - */ - public Builder clearDataSourceDefinition() { - if (dataSourceDefinitionBuilder_ == null) { - dataSourceDefinition_ = null; - onChanged(); - } else { - dataSourceDefinition_ = null; - dataSourceDefinitionBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Data source definition.
-     * 
- * - * .google.cloud.bigquery.datatransfer.v1.DataSourceDefinition data_source_definition = 2; - * - */ - public com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition.Builder - getDataSourceDefinitionBuilder() { - - onChanged(); - return getDataSourceDefinitionFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Data source definition.
-     * 
- * - * .google.cloud.bigquery.datatransfer.v1.DataSourceDefinition data_source_definition = 2; - * - */ - public com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinitionOrBuilder - getDataSourceDefinitionOrBuilder() { - if (dataSourceDefinitionBuilder_ != null) { - return dataSourceDefinitionBuilder_.getMessageOrBuilder(); - } else { - return dataSourceDefinition_ == null - ? com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition.getDefaultInstance() - : dataSourceDefinition_; - } - } - /** - * - * - *
-     * Data source definition.
-     * 
- * - * .google.cloud.bigquery.datatransfer.v1.DataSourceDefinition data_source_definition = 2; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition, - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition.Builder, - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinitionOrBuilder> - getDataSourceDefinitionFieldBuilder() { - if (dataSourceDefinitionBuilder_ == null) { - dataSourceDefinitionBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition, - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition.Builder, - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinitionOrBuilder>( - getDataSourceDefinition(), getParentForChildren(), isClean()); - dataSourceDefinition_ = null; - } - return dataSourceDefinitionBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.bigquery.datatransfer.v1.CreateDataSourceDefinitionRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.bigquery.datatransfer.v1.CreateDataSourceDefinitionRequest) - private static final com.google.cloud.bigquery.datatransfer.v1.CreateDataSourceDefinitionRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.bigquery.datatransfer.v1.CreateDataSourceDefinitionRequest(); - } - - public static com.google.cloud.bigquery.datatransfer.v1.CreateDataSourceDefinitionRequest - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateDataSourceDefinitionRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateDataSourceDefinitionRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.bigquery.datatransfer.v1.CreateDataSourceDefinitionRequest - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/CreateDataSourceDefinitionRequestOrBuilder.java b/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/CreateDataSourceDefinitionRequestOrBuilder.java deleted file mode 100644 index 21efc1f1e5c5..000000000000 --- a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/CreateDataSourceDefinitionRequestOrBuilder.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/bigquery/datatransfer/v1/datasource.proto - -package com.google.cloud.bigquery.datatransfer.v1; - -public interface CreateDataSourceDefinitionRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.bigquery.datatransfer.v1.CreateDataSourceDefinitionRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The BigQuery project id for which data source definition is associated.
-   * Must be in the form: `projects/{project_id}/locations/{location_id}`
-   * 
- * - * string parent = 1; - */ - java.lang.String getParent(); - /** - * - * - *
-   * The BigQuery project id for which data source definition is associated.
-   * Must be in the form: `projects/{project_id}/locations/{location_id}`
-   * 
- * - * string parent = 1; - */ - com.google.protobuf.ByteString getParentBytes(); - - /** - * - * - *
-   * Data source definition.
-   * 
- * - * .google.cloud.bigquery.datatransfer.v1.DataSourceDefinition data_source_definition = 2; - * - */ - boolean hasDataSourceDefinition(); - /** - * - * - *
-   * Data source definition.
-   * 
- * - * .google.cloud.bigquery.datatransfer.v1.DataSourceDefinition data_source_definition = 2; - * - */ - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition getDataSourceDefinition(); - /** - * - * - *
-   * Data source definition.
-   * 
- * - * .google.cloud.bigquery.datatransfer.v1.DataSourceDefinition data_source_definition = 2; - * - */ - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinitionOrBuilder - getDataSourceDefinitionOrBuilder(); -} diff --git a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataSourceDefinition.java b/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataSourceDefinition.java deleted file mode 100644 index 10d92df3585a..000000000000 --- a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataSourceDefinition.java +++ /dev/null @@ -1,2534 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/bigquery/datatransfer/v1/datasource.proto - -package com.google.cloud.bigquery.datatransfer.v1; - -/** - * - * - *
- * Represents the data source definition.
- * 
- * - * Protobuf type {@code google.cloud.bigquery.datatransfer.v1.DataSourceDefinition} - */ -public final class DataSourceDefinition extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.bigquery.datatransfer.v1.DataSourceDefinition) - DataSourceDefinitionOrBuilder { - private static final long serialVersionUID = 0L; - // Use DataSourceDefinition.newBuilder() to construct. - private DataSourceDefinition(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private DataSourceDefinition() { - name_ = ""; - transferRunPubsubTopic_ = ""; - supportEmail_ = ""; - serviceAccount_ = ""; - transferConfigPubsubTopic_ = ""; - supportedLocationIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private DataSourceDefinition( - 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.bigquery.datatransfer.v1.DataSource.Builder subBuilder = null; - if (dataSource_ != null) { - subBuilder = dataSource_.toBuilder(); - } - dataSource_ = - input.readMessage( - com.google.cloud.bigquery.datatransfer.v1.DataSource.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(dataSource_); - dataSource_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - serviceAccount_ = s; - break; - } - case 40: - { - disabled_ = input.readBool(); - break; - } - case 98: - { - java.lang.String s = input.readStringRequireUtf8(); - - transferConfigPubsubTopic_ = s; - break; - } - case 106: - { - java.lang.String s = input.readStringRequireUtf8(); - - transferRunPubsubTopic_ = s; - break; - } - case 130: - { - com.google.protobuf.Duration.Builder subBuilder = null; - if (runTimeOffset_ != null) { - subBuilder = runTimeOffset_.toBuilder(); - } - runTimeOffset_ = - input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(runTimeOffset_); - runTimeOffset_ = subBuilder.buildPartial(); - } - - break; - } - case 170: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 178: - { - java.lang.String s = input.readStringRequireUtf8(); - - supportEmail_ = s; - break; - } - case 186: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000100) != 0)) { - supportedLocationIds_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000100; - } - supportedLocationIds_.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_ & 0x00000100) != 0)) { - supportedLocationIds_ = supportedLocationIds_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_DataSourceDefinition_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_DataSourceDefinition_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition.class, - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition.Builder.class); - } - - private int bitField0_; - public static final int NAME_FIELD_NUMBER = 21; - private volatile java.lang.Object name_; - /** - * - * - *
-   * The resource name of the data source definition.
-   * Data source definition names have the form
-   * `projects/{project_id}/locations/{location}/dataSourceDefinitions/{data_source_id}`.
-   * 
- * - * string name = 21; - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * The resource name of the data source definition.
-   * Data source definition names have the form
-   * `projects/{project_id}/locations/{location}/dataSourceDefinitions/{data_source_id}`.
-   * 
- * - * string name = 21; - */ - 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_SOURCE_FIELD_NUMBER = 1; - private com.google.cloud.bigquery.datatransfer.v1.DataSource dataSource_; - /** - * - * - *
-   * Data source metadata.
-   * 
- * - * .google.cloud.bigquery.datatransfer.v1.DataSource data_source = 1; - */ - public boolean hasDataSource() { - return dataSource_ != null; - } - /** - * - * - *
-   * Data source metadata.
-   * 
- * - * .google.cloud.bigquery.datatransfer.v1.DataSource data_source = 1; - */ - public com.google.cloud.bigquery.datatransfer.v1.DataSource getDataSource() { - return dataSource_ == null - ? com.google.cloud.bigquery.datatransfer.v1.DataSource.getDefaultInstance() - : dataSource_; - } - /** - * - * - *
-   * Data source metadata.
-   * 
- * - * .google.cloud.bigquery.datatransfer.v1.DataSource data_source = 1; - */ - public com.google.cloud.bigquery.datatransfer.v1.DataSourceOrBuilder getDataSourceOrBuilder() { - return getDataSource(); - } - - public static final int TRANSFER_RUN_PUBSUB_TOPIC_FIELD_NUMBER = 13; - private volatile java.lang.Object transferRunPubsubTopic_; - /** - * - * - *
-   * The Pub/Sub topic to be used for broadcasting a message when a transfer run
-   * is created. Both this topic and transfer_config_pubsub_topic can be
-   * set to a custom topic. By default, both topics are auto-generated if none
-   * of them is provided when creating the definition. However, if one topic is
-   * manually set, the other topic has to be manually set as well. The only
-   * difference is that transfer_run_pubsub_topic must be a non-empty Pub/Sub
-   * topic, but transfer_config_pubsub_topic can be set to empty. The comments
-   * about "{location}" for transfer_config_pubsub_topic apply here too.
-   * 
- * - * string transfer_run_pubsub_topic = 13; - */ - public java.lang.String getTransferRunPubsubTopic() { - java.lang.Object ref = transferRunPubsubTopic_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - transferRunPubsubTopic_ = s; - return s; - } - } - /** - * - * - *
-   * The Pub/Sub topic to be used for broadcasting a message when a transfer run
-   * is created. Both this topic and transfer_config_pubsub_topic can be
-   * set to a custom topic. By default, both topics are auto-generated if none
-   * of them is provided when creating the definition. However, if one topic is
-   * manually set, the other topic has to be manually set as well. The only
-   * difference is that transfer_run_pubsub_topic must be a non-empty Pub/Sub
-   * topic, but transfer_config_pubsub_topic can be set to empty. The comments
-   * about "{location}" for transfer_config_pubsub_topic apply here too.
-   * 
- * - * string transfer_run_pubsub_topic = 13; - */ - public com.google.protobuf.ByteString getTransferRunPubsubTopicBytes() { - java.lang.Object ref = transferRunPubsubTopic_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - transferRunPubsubTopic_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int RUN_TIME_OFFSET_FIELD_NUMBER = 16; - private com.google.protobuf.Duration runTimeOffset_; - /** - * - * - *
-   * Duration which should be added to schedule_time to calculate
-   * run_time when job is scheduled. Only applicable for automatically
-   * scheduled transfer runs. Used to start a run early on a data source that
-   * supports continuous data refresh to compensate for unknown timezone
-   * offsets. Use a negative number to start a run late for data sources not
-   * supporting continuous data refresh.
-   * 
- * - * .google.protobuf.Duration run_time_offset = 16; - */ - public boolean hasRunTimeOffset() { - return runTimeOffset_ != null; - } - /** - * - * - *
-   * Duration which should be added to schedule_time to calculate
-   * run_time when job is scheduled. Only applicable for automatically
-   * scheduled transfer runs. Used to start a run early on a data source that
-   * supports continuous data refresh to compensate for unknown timezone
-   * offsets. Use a negative number to start a run late for data sources not
-   * supporting continuous data refresh.
-   * 
- * - * .google.protobuf.Duration run_time_offset = 16; - */ - public com.google.protobuf.Duration getRunTimeOffset() { - return runTimeOffset_ == null - ? com.google.protobuf.Duration.getDefaultInstance() - : runTimeOffset_; - } - /** - * - * - *
-   * Duration which should be added to schedule_time to calculate
-   * run_time when job is scheduled. Only applicable for automatically
-   * scheduled transfer runs. Used to start a run early on a data source that
-   * supports continuous data refresh to compensate for unknown timezone
-   * offsets. Use a negative number to start a run late for data sources not
-   * supporting continuous data refresh.
-   * 
- * - * .google.protobuf.Duration run_time_offset = 16; - */ - public com.google.protobuf.DurationOrBuilder getRunTimeOffsetOrBuilder() { - return getRunTimeOffset(); - } - - public static final int SUPPORT_EMAIL_FIELD_NUMBER = 22; - private volatile java.lang.Object supportEmail_; - /** - * - * - *
-   * Support e-mail address of the OAuth client's Brand, which contains the
-   * consent screen data.
-   * 
- * - * string support_email = 22; - */ - public java.lang.String getSupportEmail() { - java.lang.Object ref = supportEmail_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - supportEmail_ = s; - return s; - } - } - /** - * - * - *
-   * Support e-mail address of the OAuth client's Brand, which contains the
-   * consent screen data.
-   * 
- * - * string support_email = 22; - */ - public com.google.protobuf.ByteString getSupportEmailBytes() { - java.lang.Object ref = supportEmail_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - supportEmail_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SERVICE_ACCOUNT_FIELD_NUMBER = 2; - private volatile java.lang.Object serviceAccount_; - /** - * - * - *
-   * When service account is specified, BigQuery will share created dataset
-   * with the given service account. Also, this service account will be
-   * eligible to perform status updates and message logging for data transfer
-   * runs for the corresponding data_source_id.
-   * 
- * - * string service_account = 2; - */ - public java.lang.String getServiceAccount() { - java.lang.Object ref = serviceAccount_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - serviceAccount_ = s; - return s; - } - } - /** - * - * - *
-   * When service account is specified, BigQuery will share created dataset
-   * with the given service account. Also, this service account will be
-   * eligible to perform status updates and message logging for data transfer
-   * runs for the corresponding data_source_id.
-   * 
- * - * string service_account = 2; - */ - public com.google.protobuf.ByteString getServiceAccountBytes() { - java.lang.Object ref = serviceAccount_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - serviceAccount_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DISABLED_FIELD_NUMBER = 5; - private boolean disabled_; - /** - * - * - *
-   * Is data source disabled? If true, data_source is not visible.
-   * API will also stop returning any data transfer configs and/or runs
-   * associated with the data source. This setting has higher priority
-   * than whitelisted_project_ids.
-   * 
- * - * bool disabled = 5; - */ - public boolean getDisabled() { - return disabled_; - } - - public static final int TRANSFER_CONFIG_PUBSUB_TOPIC_FIELD_NUMBER = 12; - private volatile java.lang.Object transferConfigPubsubTopic_; - /** - * - * - *
-   * The Pub/Sub topic to use for broadcasting a message for transfer config. If
-   * empty, a message will not be broadcasted. Both this topic and
-   * transfer_run_pubsub_topic are auto-generated if none of them is provided
-   * when creating the definition. It is recommended to provide
-   * transfer_config_pubsub_topic if a user-owned transfer_run_pubsub_topic is
-   * provided. Otherwise, it will be set to empty. If "{location}" is found in
-   * the value, then that means, data source wants to handle message separately
-   * for datasets in different regions. We will replace {location} with the
-   * actual dataset location, as the actual topic name. For example,
-   * projects/connector/topics/scheduler-{location} could become
-   * projects/connector/topics/scheduler-us. If "{location}" is not found, then
-   * we will use the input value as topic name.
-   * 
- * - * string transfer_config_pubsub_topic = 12; - */ - public java.lang.String getTransferConfigPubsubTopic() { - java.lang.Object ref = transferConfigPubsubTopic_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - transferConfigPubsubTopic_ = s; - return s; - } - } - /** - * - * - *
-   * The Pub/Sub topic to use for broadcasting a message for transfer config. If
-   * empty, a message will not be broadcasted. Both this topic and
-   * transfer_run_pubsub_topic are auto-generated if none of them is provided
-   * when creating the definition. It is recommended to provide
-   * transfer_config_pubsub_topic if a user-owned transfer_run_pubsub_topic is
-   * provided. Otherwise, it will be set to empty. If "{location}" is found in
-   * the value, then that means, data source wants to handle message separately
-   * for datasets in different regions. We will replace {location} with the
-   * actual dataset location, as the actual topic name. For example,
-   * projects/connector/topics/scheduler-{location} could become
-   * projects/connector/topics/scheduler-us. If "{location}" is not found, then
-   * we will use the input value as topic name.
-   * 
- * - * string transfer_config_pubsub_topic = 12; - */ - public com.google.protobuf.ByteString getTransferConfigPubsubTopicBytes() { - java.lang.Object ref = transferConfigPubsubTopic_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - transferConfigPubsubTopic_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SUPPORTED_LOCATION_IDS_FIELD_NUMBER = 23; - private com.google.protobuf.LazyStringList supportedLocationIds_; - /** - * - * - *
-   * Supported location_ids used for deciding in which locations Pub/Sub topics
-   * need to be created. If custom Pub/Sub topics are used and they contains
-   * '{location}', the location_ids will be used for validating the topics by
-   * replacing the '{location}' with the individual location in the list. The
-   * valid values are the "location_id" field of the response of `GET
-   * https://bigquerydatatransfer.googleapis.com/v1/{name=projects/*}/locations`
-   * In addition, if the data source needs to support all available regions,
-   * supported_location_ids can be set to "global" (a single string element).
-   * When "global" is specified:
-   * 1) the data source implementation is supposed to stage the data in proper
-   * region of the destination dataset;
-   * 2) Data source developer should be aware of the implications (e.g., network
-   * traffic latency, potential charge associated with cross-region traffic,
-   * etc.) of supporting the "global" region;
-   * 
- * - * repeated string supported_location_ids = 23; - */ - public com.google.protobuf.ProtocolStringList getSupportedLocationIdsList() { - return supportedLocationIds_; - } - /** - * - * - *
-   * Supported location_ids used for deciding in which locations Pub/Sub topics
-   * need to be created. If custom Pub/Sub topics are used and they contains
-   * '{location}', the location_ids will be used for validating the topics by
-   * replacing the '{location}' with the individual location in the list. The
-   * valid values are the "location_id" field of the response of `GET
-   * https://bigquerydatatransfer.googleapis.com/v1/{name=projects/*}/locations`
-   * In addition, if the data source needs to support all available regions,
-   * supported_location_ids can be set to "global" (a single string element).
-   * When "global" is specified:
-   * 1) the data source implementation is supposed to stage the data in proper
-   * region of the destination dataset;
-   * 2) Data source developer should be aware of the implications (e.g., network
-   * traffic latency, potential charge associated with cross-region traffic,
-   * etc.) of supporting the "global" region;
-   * 
- * - * repeated string supported_location_ids = 23; - */ - public int getSupportedLocationIdsCount() { - return supportedLocationIds_.size(); - } - /** - * - * - *
-   * Supported location_ids used for deciding in which locations Pub/Sub topics
-   * need to be created. If custom Pub/Sub topics are used and they contains
-   * '{location}', the location_ids will be used for validating the topics by
-   * replacing the '{location}' with the individual location in the list. The
-   * valid values are the "location_id" field of the response of `GET
-   * https://bigquerydatatransfer.googleapis.com/v1/{name=projects/*}/locations`
-   * In addition, if the data source needs to support all available regions,
-   * supported_location_ids can be set to "global" (a single string element).
-   * When "global" is specified:
-   * 1) the data source implementation is supposed to stage the data in proper
-   * region of the destination dataset;
-   * 2) Data source developer should be aware of the implications (e.g., network
-   * traffic latency, potential charge associated with cross-region traffic,
-   * etc.) of supporting the "global" region;
-   * 
- * - * repeated string supported_location_ids = 23; - */ - public java.lang.String getSupportedLocationIds(int index) { - return supportedLocationIds_.get(index); - } - /** - * - * - *
-   * Supported location_ids used for deciding in which locations Pub/Sub topics
-   * need to be created. If custom Pub/Sub topics are used and they contains
-   * '{location}', the location_ids will be used for validating the topics by
-   * replacing the '{location}' with the individual location in the list. The
-   * valid values are the "location_id" field of the response of `GET
-   * https://bigquerydatatransfer.googleapis.com/v1/{name=projects/*}/locations`
-   * In addition, if the data source needs to support all available regions,
-   * supported_location_ids can be set to "global" (a single string element).
-   * When "global" is specified:
-   * 1) the data source implementation is supposed to stage the data in proper
-   * region of the destination dataset;
-   * 2) Data source developer should be aware of the implications (e.g., network
-   * traffic latency, potential charge associated with cross-region traffic,
-   * etc.) of supporting the "global" region;
-   * 
- * - * repeated string supported_location_ids = 23; - */ - public com.google.protobuf.ByteString getSupportedLocationIdsBytes(int index) { - return supportedLocationIds_.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 (dataSource_ != null) { - output.writeMessage(1, getDataSource()); - } - if (!getServiceAccountBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, serviceAccount_); - } - if (disabled_ != false) { - output.writeBool(5, disabled_); - } - if (!getTransferConfigPubsubTopicBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 12, transferConfigPubsubTopic_); - } - if (!getTransferRunPubsubTopicBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 13, transferRunPubsubTopic_); - } - if (runTimeOffset_ != null) { - output.writeMessage(16, getRunTimeOffset()); - } - if (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 21, name_); - } - if (!getSupportEmailBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 22, supportEmail_); - } - for (int i = 0; i < supportedLocationIds_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString( - output, 23, supportedLocationIds_.getRaw(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (dataSource_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getDataSource()); - } - if (!getServiceAccountBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, serviceAccount_); - } - if (disabled_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, disabled_); - } - if (!getTransferConfigPubsubTopicBytes().isEmpty()) { - size += - com.google.protobuf.GeneratedMessageV3.computeStringSize(12, transferConfigPubsubTopic_); - } - if (!getTransferRunPubsubTopicBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, transferRunPubsubTopic_); - } - if (runTimeOffset_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(16, getRunTimeOffset()); - } - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(21, name_); - } - if (!getSupportEmailBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(22, supportEmail_); - } - { - int dataSize = 0; - for (int i = 0; i < supportedLocationIds_.size(); i++) { - dataSize += computeStringSizeNoTag(supportedLocationIds_.getRaw(i)); - } - size += dataSize; - size += 2 * getSupportedLocationIdsList().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.bigquery.datatransfer.v1.DataSourceDefinition)) { - return super.equals(obj); - } - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition other = - (com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition) obj; - - if (!getName().equals(other.getName())) return false; - if (hasDataSource() != other.hasDataSource()) return false; - if (hasDataSource()) { - if (!getDataSource().equals(other.getDataSource())) return false; - } - if (!getTransferRunPubsubTopic().equals(other.getTransferRunPubsubTopic())) return false; - if (hasRunTimeOffset() != other.hasRunTimeOffset()) return false; - if (hasRunTimeOffset()) { - if (!getRunTimeOffset().equals(other.getRunTimeOffset())) return false; - } - if (!getSupportEmail().equals(other.getSupportEmail())) return false; - if (!getServiceAccount().equals(other.getServiceAccount())) return false; - if (getDisabled() != other.getDisabled()) return false; - if (!getTransferConfigPubsubTopic().equals(other.getTransferConfigPubsubTopic())) return false; - if (!getSupportedLocationIdsList().equals(other.getSupportedLocationIdsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - 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 (hasDataSource()) { - hash = (37 * hash) + DATA_SOURCE_FIELD_NUMBER; - hash = (53 * hash) + getDataSource().hashCode(); - } - hash = (37 * hash) + TRANSFER_RUN_PUBSUB_TOPIC_FIELD_NUMBER; - hash = (53 * hash) + getTransferRunPubsubTopic().hashCode(); - if (hasRunTimeOffset()) { - hash = (37 * hash) + RUN_TIME_OFFSET_FIELD_NUMBER; - hash = (53 * hash) + getRunTimeOffset().hashCode(); - } - hash = (37 * hash) + SUPPORT_EMAIL_FIELD_NUMBER; - hash = (53 * hash) + getSupportEmail().hashCode(); - hash = (37 * hash) + SERVICE_ACCOUNT_FIELD_NUMBER; - hash = (53 * hash) + getServiceAccount().hashCode(); - hash = (37 * hash) + DISABLED_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDisabled()); - hash = (37 * hash) + TRANSFER_CONFIG_PUBSUB_TOPIC_FIELD_NUMBER; - hash = (53 * hash) + getTransferConfigPubsubTopic().hashCode(); - if (getSupportedLocationIdsCount() > 0) { - hash = (37 * hash) + SUPPORTED_LOCATION_IDS_FIELD_NUMBER; - hash = (53 * hash) + getSupportedLocationIdsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Represents the data source definition.
-   * 
- * - * Protobuf type {@code google.cloud.bigquery.datatransfer.v1.DataSourceDefinition} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.bigquery.datatransfer.v1.DataSourceDefinition) - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinitionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_DataSourceDefinition_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_DataSourceDefinition_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition.class, - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition.Builder.class); - } - - // Construct using com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.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 (dataSourceBuilder_ == null) { - dataSource_ = null; - } else { - dataSource_ = null; - dataSourceBuilder_ = null; - } - transferRunPubsubTopic_ = ""; - - if (runTimeOffsetBuilder_ == null) { - runTimeOffset_ = null; - } else { - runTimeOffset_ = null; - runTimeOffsetBuilder_ = null; - } - supportEmail_ = ""; - - serviceAccount_ = ""; - - disabled_ = false; - - transferConfigPubsubTopic_ = ""; - - supportedLocationIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000100); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_DataSourceDefinition_descriptor; - } - - @java.lang.Override - public com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition - getDefaultInstanceForType() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition build() { - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition buildPartial() { - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition result = - new com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - result.name_ = name_; - if (dataSourceBuilder_ == null) { - result.dataSource_ = dataSource_; - } else { - result.dataSource_ = dataSourceBuilder_.build(); - } - result.transferRunPubsubTopic_ = transferRunPubsubTopic_; - if (runTimeOffsetBuilder_ == null) { - result.runTimeOffset_ = runTimeOffset_; - } else { - result.runTimeOffset_ = runTimeOffsetBuilder_.build(); - } - result.supportEmail_ = supportEmail_; - result.serviceAccount_ = serviceAccount_; - result.disabled_ = disabled_; - result.transferConfigPubsubTopic_ = transferConfigPubsubTopic_; - if (((bitField0_ & 0x00000100) != 0)) { - supportedLocationIds_ = supportedLocationIds_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000100); - } - result.supportedLocationIds_ = supportedLocationIds_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition) { - return mergeFrom((com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition other) { - if (other - == com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (other.hasDataSource()) { - mergeDataSource(other.getDataSource()); - } - if (!other.getTransferRunPubsubTopic().isEmpty()) { - transferRunPubsubTopic_ = other.transferRunPubsubTopic_; - onChanged(); - } - if (other.hasRunTimeOffset()) { - mergeRunTimeOffset(other.getRunTimeOffset()); - } - if (!other.getSupportEmail().isEmpty()) { - supportEmail_ = other.supportEmail_; - onChanged(); - } - if (!other.getServiceAccount().isEmpty()) { - serviceAccount_ = other.serviceAccount_; - onChanged(); - } - if (other.getDisabled() != false) { - setDisabled(other.getDisabled()); - } - if (!other.getTransferConfigPubsubTopic().isEmpty()) { - transferConfigPubsubTopic_ = other.transferConfigPubsubTopic_; - onChanged(); - } - if (!other.supportedLocationIds_.isEmpty()) { - if (supportedLocationIds_.isEmpty()) { - supportedLocationIds_ = other.supportedLocationIds_; - bitField0_ = (bitField0_ & ~0x00000100); - } else { - ensureSupportedLocationIdsIsMutable(); - supportedLocationIds_.addAll(other.supportedLocationIds_); - } - 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.bigquery.datatransfer.v1.DataSourceDefinition parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * The resource name of the data source definition.
-     * Data source definition names have the form
-     * `projects/{project_id}/locations/{location}/dataSourceDefinitions/{data_source_id}`.
-     * 
- * - * string name = 21; - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * The resource name of the data source definition.
-     * Data source definition names have the form
-     * `projects/{project_id}/locations/{location}/dataSourceDefinitions/{data_source_id}`.
-     * 
- * - * string name = 21; - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * The resource name of the data source definition.
-     * Data source definition names have the form
-     * `projects/{project_id}/locations/{location}/dataSourceDefinitions/{data_source_id}`.
-     * 
- * - * string name = 21; - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * The resource name of the data source definition.
-     * Data source definition names have the form
-     * `projects/{project_id}/locations/{location}/dataSourceDefinitions/{data_source_id}`.
-     * 
- * - * string name = 21; - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * - * - *
-     * The resource name of the data source definition.
-     * Data source definition names have the form
-     * `projects/{project_id}/locations/{location}/dataSourceDefinitions/{data_source_id}`.
-     * 
- * - * string name = 21; - */ - 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.bigquery.datatransfer.v1.DataSource dataSource_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.bigquery.datatransfer.v1.DataSource, - com.google.cloud.bigquery.datatransfer.v1.DataSource.Builder, - com.google.cloud.bigquery.datatransfer.v1.DataSourceOrBuilder> - dataSourceBuilder_; - /** - * - * - *
-     * Data source metadata.
-     * 
- * - * .google.cloud.bigquery.datatransfer.v1.DataSource data_source = 1; - */ - public boolean hasDataSource() { - return dataSourceBuilder_ != null || dataSource_ != null; - } - /** - * - * - *
-     * Data source metadata.
-     * 
- * - * .google.cloud.bigquery.datatransfer.v1.DataSource data_source = 1; - */ - public com.google.cloud.bigquery.datatransfer.v1.DataSource getDataSource() { - if (dataSourceBuilder_ == null) { - return dataSource_ == null - ? com.google.cloud.bigquery.datatransfer.v1.DataSource.getDefaultInstance() - : dataSource_; - } else { - return dataSourceBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Data source metadata.
-     * 
- * - * .google.cloud.bigquery.datatransfer.v1.DataSource data_source = 1; - */ - public Builder setDataSource(com.google.cloud.bigquery.datatransfer.v1.DataSource value) { - if (dataSourceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - dataSource_ = value; - onChanged(); - } else { - dataSourceBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Data source metadata.
-     * 
- * - * .google.cloud.bigquery.datatransfer.v1.DataSource data_source = 1; - */ - public Builder setDataSource( - com.google.cloud.bigquery.datatransfer.v1.DataSource.Builder builderForValue) { - if (dataSourceBuilder_ == null) { - dataSource_ = builderForValue.build(); - onChanged(); - } else { - dataSourceBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Data source metadata.
-     * 
- * - * .google.cloud.bigquery.datatransfer.v1.DataSource data_source = 1; - */ - public Builder mergeDataSource(com.google.cloud.bigquery.datatransfer.v1.DataSource value) { - if (dataSourceBuilder_ == null) { - if (dataSource_ != null) { - dataSource_ = - com.google.cloud.bigquery.datatransfer.v1.DataSource.newBuilder(dataSource_) - .mergeFrom(value) - .buildPartial(); - } else { - dataSource_ = value; - } - onChanged(); - } else { - dataSourceBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Data source metadata.
-     * 
- * - * .google.cloud.bigquery.datatransfer.v1.DataSource data_source = 1; - */ - public Builder clearDataSource() { - if (dataSourceBuilder_ == null) { - dataSource_ = null; - onChanged(); - } else { - dataSource_ = null; - dataSourceBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Data source metadata.
-     * 
- * - * .google.cloud.bigquery.datatransfer.v1.DataSource data_source = 1; - */ - public com.google.cloud.bigquery.datatransfer.v1.DataSource.Builder getDataSourceBuilder() { - - onChanged(); - return getDataSourceFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Data source metadata.
-     * 
- * - * .google.cloud.bigquery.datatransfer.v1.DataSource data_source = 1; - */ - public com.google.cloud.bigquery.datatransfer.v1.DataSourceOrBuilder getDataSourceOrBuilder() { - if (dataSourceBuilder_ != null) { - return dataSourceBuilder_.getMessageOrBuilder(); - } else { - return dataSource_ == null - ? com.google.cloud.bigquery.datatransfer.v1.DataSource.getDefaultInstance() - : dataSource_; - } - } - /** - * - * - *
-     * Data source metadata.
-     * 
- * - * .google.cloud.bigquery.datatransfer.v1.DataSource data_source = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.bigquery.datatransfer.v1.DataSource, - com.google.cloud.bigquery.datatransfer.v1.DataSource.Builder, - com.google.cloud.bigquery.datatransfer.v1.DataSourceOrBuilder> - getDataSourceFieldBuilder() { - if (dataSourceBuilder_ == null) { - dataSourceBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.bigquery.datatransfer.v1.DataSource, - com.google.cloud.bigquery.datatransfer.v1.DataSource.Builder, - com.google.cloud.bigquery.datatransfer.v1.DataSourceOrBuilder>( - getDataSource(), getParentForChildren(), isClean()); - dataSource_ = null; - } - return dataSourceBuilder_; - } - - private java.lang.Object transferRunPubsubTopic_ = ""; - /** - * - * - *
-     * The Pub/Sub topic to be used for broadcasting a message when a transfer run
-     * is created. Both this topic and transfer_config_pubsub_topic can be
-     * set to a custom topic. By default, both topics are auto-generated if none
-     * of them is provided when creating the definition. However, if one topic is
-     * manually set, the other topic has to be manually set as well. The only
-     * difference is that transfer_run_pubsub_topic must be a non-empty Pub/Sub
-     * topic, but transfer_config_pubsub_topic can be set to empty. The comments
-     * about "{location}" for transfer_config_pubsub_topic apply here too.
-     * 
- * - * string transfer_run_pubsub_topic = 13; - */ - public java.lang.String getTransferRunPubsubTopic() { - java.lang.Object ref = transferRunPubsubTopic_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - transferRunPubsubTopic_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * The Pub/Sub topic to be used for broadcasting a message when a transfer run
-     * is created. Both this topic and transfer_config_pubsub_topic can be
-     * set to a custom topic. By default, both topics are auto-generated if none
-     * of them is provided when creating the definition. However, if one topic is
-     * manually set, the other topic has to be manually set as well. The only
-     * difference is that transfer_run_pubsub_topic must be a non-empty Pub/Sub
-     * topic, but transfer_config_pubsub_topic can be set to empty. The comments
-     * about "{location}" for transfer_config_pubsub_topic apply here too.
-     * 
- * - * string transfer_run_pubsub_topic = 13; - */ - public com.google.protobuf.ByteString getTransferRunPubsubTopicBytes() { - java.lang.Object ref = transferRunPubsubTopic_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - transferRunPubsubTopic_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * The Pub/Sub topic to be used for broadcasting a message when a transfer run
-     * is created. Both this topic and transfer_config_pubsub_topic can be
-     * set to a custom topic. By default, both topics are auto-generated if none
-     * of them is provided when creating the definition. However, if one topic is
-     * manually set, the other topic has to be manually set as well. The only
-     * difference is that transfer_run_pubsub_topic must be a non-empty Pub/Sub
-     * topic, but transfer_config_pubsub_topic can be set to empty. The comments
-     * about "{location}" for transfer_config_pubsub_topic apply here too.
-     * 
- * - * string transfer_run_pubsub_topic = 13; - */ - public Builder setTransferRunPubsubTopic(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - transferRunPubsubTopic_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * The Pub/Sub topic to be used for broadcasting a message when a transfer run
-     * is created. Both this topic and transfer_config_pubsub_topic can be
-     * set to a custom topic. By default, both topics are auto-generated if none
-     * of them is provided when creating the definition. However, if one topic is
-     * manually set, the other topic has to be manually set as well. The only
-     * difference is that transfer_run_pubsub_topic must be a non-empty Pub/Sub
-     * topic, but transfer_config_pubsub_topic can be set to empty. The comments
-     * about "{location}" for transfer_config_pubsub_topic apply here too.
-     * 
- * - * string transfer_run_pubsub_topic = 13; - */ - public Builder clearTransferRunPubsubTopic() { - - transferRunPubsubTopic_ = getDefaultInstance().getTransferRunPubsubTopic(); - onChanged(); - return this; - } - /** - * - * - *
-     * The Pub/Sub topic to be used for broadcasting a message when a transfer run
-     * is created. Both this topic and transfer_config_pubsub_topic can be
-     * set to a custom topic. By default, both topics are auto-generated if none
-     * of them is provided when creating the definition. However, if one topic is
-     * manually set, the other topic has to be manually set as well. The only
-     * difference is that transfer_run_pubsub_topic must be a non-empty Pub/Sub
-     * topic, but transfer_config_pubsub_topic can be set to empty. The comments
-     * about "{location}" for transfer_config_pubsub_topic apply here too.
-     * 
- * - * string transfer_run_pubsub_topic = 13; - */ - public Builder setTransferRunPubsubTopicBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - transferRunPubsubTopic_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.Duration runTimeOffset_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Duration, - com.google.protobuf.Duration.Builder, - com.google.protobuf.DurationOrBuilder> - runTimeOffsetBuilder_; - /** - * - * - *
-     * Duration which should be added to schedule_time to calculate
-     * run_time when job is scheduled. Only applicable for automatically
-     * scheduled transfer runs. Used to start a run early on a data source that
-     * supports continuous data refresh to compensate for unknown timezone
-     * offsets. Use a negative number to start a run late for data sources not
-     * supporting continuous data refresh.
-     * 
- * - * .google.protobuf.Duration run_time_offset = 16; - */ - public boolean hasRunTimeOffset() { - return runTimeOffsetBuilder_ != null || runTimeOffset_ != null; - } - /** - * - * - *
-     * Duration which should be added to schedule_time to calculate
-     * run_time when job is scheduled. Only applicable for automatically
-     * scheduled transfer runs. Used to start a run early on a data source that
-     * supports continuous data refresh to compensate for unknown timezone
-     * offsets. Use a negative number to start a run late for data sources not
-     * supporting continuous data refresh.
-     * 
- * - * .google.protobuf.Duration run_time_offset = 16; - */ - public com.google.protobuf.Duration getRunTimeOffset() { - if (runTimeOffsetBuilder_ == null) { - return runTimeOffset_ == null - ? com.google.protobuf.Duration.getDefaultInstance() - : runTimeOffset_; - } else { - return runTimeOffsetBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Duration which should be added to schedule_time to calculate
-     * run_time when job is scheduled. Only applicable for automatically
-     * scheduled transfer runs. Used to start a run early on a data source that
-     * supports continuous data refresh to compensate for unknown timezone
-     * offsets. Use a negative number to start a run late for data sources not
-     * supporting continuous data refresh.
-     * 
- * - * .google.protobuf.Duration run_time_offset = 16; - */ - public Builder setRunTimeOffset(com.google.protobuf.Duration value) { - if (runTimeOffsetBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - runTimeOffset_ = value; - onChanged(); - } else { - runTimeOffsetBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Duration which should be added to schedule_time to calculate
-     * run_time when job is scheduled. Only applicable for automatically
-     * scheduled transfer runs. Used to start a run early on a data source that
-     * supports continuous data refresh to compensate for unknown timezone
-     * offsets. Use a negative number to start a run late for data sources not
-     * supporting continuous data refresh.
-     * 
- * - * .google.protobuf.Duration run_time_offset = 16; - */ - public Builder setRunTimeOffset(com.google.protobuf.Duration.Builder builderForValue) { - if (runTimeOffsetBuilder_ == null) { - runTimeOffset_ = builderForValue.build(); - onChanged(); - } else { - runTimeOffsetBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Duration which should be added to schedule_time to calculate
-     * run_time when job is scheduled. Only applicable for automatically
-     * scheduled transfer runs. Used to start a run early on a data source that
-     * supports continuous data refresh to compensate for unknown timezone
-     * offsets. Use a negative number to start a run late for data sources not
-     * supporting continuous data refresh.
-     * 
- * - * .google.protobuf.Duration run_time_offset = 16; - */ - public Builder mergeRunTimeOffset(com.google.protobuf.Duration value) { - if (runTimeOffsetBuilder_ == null) { - if (runTimeOffset_ != null) { - runTimeOffset_ = - com.google.protobuf.Duration.newBuilder(runTimeOffset_) - .mergeFrom(value) - .buildPartial(); - } else { - runTimeOffset_ = value; - } - onChanged(); - } else { - runTimeOffsetBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Duration which should be added to schedule_time to calculate
-     * run_time when job is scheduled. Only applicable for automatically
-     * scheduled transfer runs. Used to start a run early on a data source that
-     * supports continuous data refresh to compensate for unknown timezone
-     * offsets. Use a negative number to start a run late for data sources not
-     * supporting continuous data refresh.
-     * 
- * - * .google.protobuf.Duration run_time_offset = 16; - */ - public Builder clearRunTimeOffset() { - if (runTimeOffsetBuilder_ == null) { - runTimeOffset_ = null; - onChanged(); - } else { - runTimeOffset_ = null; - runTimeOffsetBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Duration which should be added to schedule_time to calculate
-     * run_time when job is scheduled. Only applicable for automatically
-     * scheduled transfer runs. Used to start a run early on a data source that
-     * supports continuous data refresh to compensate for unknown timezone
-     * offsets. Use a negative number to start a run late for data sources not
-     * supporting continuous data refresh.
-     * 
- * - * .google.protobuf.Duration run_time_offset = 16; - */ - public com.google.protobuf.Duration.Builder getRunTimeOffsetBuilder() { - - onChanged(); - return getRunTimeOffsetFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Duration which should be added to schedule_time to calculate
-     * run_time when job is scheduled. Only applicable for automatically
-     * scheduled transfer runs. Used to start a run early on a data source that
-     * supports continuous data refresh to compensate for unknown timezone
-     * offsets. Use a negative number to start a run late for data sources not
-     * supporting continuous data refresh.
-     * 
- * - * .google.protobuf.Duration run_time_offset = 16; - */ - public com.google.protobuf.DurationOrBuilder getRunTimeOffsetOrBuilder() { - if (runTimeOffsetBuilder_ != null) { - return runTimeOffsetBuilder_.getMessageOrBuilder(); - } else { - return runTimeOffset_ == null - ? com.google.protobuf.Duration.getDefaultInstance() - : runTimeOffset_; - } - } - /** - * - * - *
-     * Duration which should be added to schedule_time to calculate
-     * run_time when job is scheduled. Only applicable for automatically
-     * scheduled transfer runs. Used to start a run early on a data source that
-     * supports continuous data refresh to compensate for unknown timezone
-     * offsets. Use a negative number to start a run late for data sources not
-     * supporting continuous data refresh.
-     * 
- * - * .google.protobuf.Duration run_time_offset = 16; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Duration, - com.google.protobuf.Duration.Builder, - com.google.protobuf.DurationOrBuilder> - getRunTimeOffsetFieldBuilder() { - if (runTimeOffsetBuilder_ == null) { - runTimeOffsetBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Duration, - com.google.protobuf.Duration.Builder, - com.google.protobuf.DurationOrBuilder>( - getRunTimeOffset(), getParentForChildren(), isClean()); - runTimeOffset_ = null; - } - return runTimeOffsetBuilder_; - } - - private java.lang.Object supportEmail_ = ""; - /** - * - * - *
-     * Support e-mail address of the OAuth client's Brand, which contains the
-     * consent screen data.
-     * 
- * - * string support_email = 22; - */ - public java.lang.String getSupportEmail() { - java.lang.Object ref = supportEmail_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - supportEmail_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Support e-mail address of the OAuth client's Brand, which contains the
-     * consent screen data.
-     * 
- * - * string support_email = 22; - */ - public com.google.protobuf.ByteString getSupportEmailBytes() { - java.lang.Object ref = supportEmail_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - supportEmail_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Support e-mail address of the OAuth client's Brand, which contains the
-     * consent screen data.
-     * 
- * - * string support_email = 22; - */ - public Builder setSupportEmail(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - supportEmail_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Support e-mail address of the OAuth client's Brand, which contains the
-     * consent screen data.
-     * 
- * - * string support_email = 22; - */ - public Builder clearSupportEmail() { - - supportEmail_ = getDefaultInstance().getSupportEmail(); - onChanged(); - return this; - } - /** - * - * - *
-     * Support e-mail address of the OAuth client's Brand, which contains the
-     * consent screen data.
-     * 
- * - * string support_email = 22; - */ - public Builder setSupportEmailBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - supportEmail_ = value; - onChanged(); - return this; - } - - private java.lang.Object serviceAccount_ = ""; - /** - * - * - *
-     * When service account is specified, BigQuery will share created dataset
-     * with the given service account. Also, this service account will be
-     * eligible to perform status updates and message logging for data transfer
-     * runs for the corresponding data_source_id.
-     * 
- * - * string service_account = 2; - */ - public java.lang.String getServiceAccount() { - java.lang.Object ref = serviceAccount_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - serviceAccount_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * When service account is specified, BigQuery will share created dataset
-     * with the given service account. Also, this service account will be
-     * eligible to perform status updates and message logging for data transfer
-     * runs for the corresponding data_source_id.
-     * 
- * - * string service_account = 2; - */ - public com.google.protobuf.ByteString getServiceAccountBytes() { - java.lang.Object ref = serviceAccount_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - serviceAccount_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * When service account is specified, BigQuery will share created dataset
-     * with the given service account. Also, this service account will be
-     * eligible to perform status updates and message logging for data transfer
-     * runs for the corresponding data_source_id.
-     * 
- * - * string service_account = 2; - */ - public Builder setServiceAccount(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - serviceAccount_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * When service account is specified, BigQuery will share created dataset
-     * with the given service account. Also, this service account will be
-     * eligible to perform status updates and message logging for data transfer
-     * runs for the corresponding data_source_id.
-     * 
- * - * string service_account = 2; - */ - public Builder clearServiceAccount() { - - serviceAccount_ = getDefaultInstance().getServiceAccount(); - onChanged(); - return this; - } - /** - * - * - *
-     * When service account is specified, BigQuery will share created dataset
-     * with the given service account. Also, this service account will be
-     * eligible to perform status updates and message logging for data transfer
-     * runs for the corresponding data_source_id.
-     * 
- * - * string service_account = 2; - */ - public Builder setServiceAccountBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - serviceAccount_ = value; - onChanged(); - return this; - } - - private boolean disabled_; - /** - * - * - *
-     * Is data source disabled? If true, data_source is not visible.
-     * API will also stop returning any data transfer configs and/or runs
-     * associated with the data source. This setting has higher priority
-     * than whitelisted_project_ids.
-     * 
- * - * bool disabled = 5; - */ - public boolean getDisabled() { - return disabled_; - } - /** - * - * - *
-     * Is data source disabled? If true, data_source is not visible.
-     * API will also stop returning any data transfer configs and/or runs
-     * associated with the data source. This setting has higher priority
-     * than whitelisted_project_ids.
-     * 
- * - * bool disabled = 5; - */ - public Builder setDisabled(boolean value) { - - disabled_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Is data source disabled? If true, data_source is not visible.
-     * API will also stop returning any data transfer configs and/or runs
-     * associated with the data source. This setting has higher priority
-     * than whitelisted_project_ids.
-     * 
- * - * bool disabled = 5; - */ - public Builder clearDisabled() { - - disabled_ = false; - onChanged(); - return this; - } - - private java.lang.Object transferConfigPubsubTopic_ = ""; - /** - * - * - *
-     * The Pub/Sub topic to use for broadcasting a message for transfer config. If
-     * empty, a message will not be broadcasted. Both this topic and
-     * transfer_run_pubsub_topic are auto-generated if none of them is provided
-     * when creating the definition. It is recommended to provide
-     * transfer_config_pubsub_topic if a user-owned transfer_run_pubsub_topic is
-     * provided. Otherwise, it will be set to empty. If "{location}" is found in
-     * the value, then that means, data source wants to handle message separately
-     * for datasets in different regions. We will replace {location} with the
-     * actual dataset location, as the actual topic name. For example,
-     * projects/connector/topics/scheduler-{location} could become
-     * projects/connector/topics/scheduler-us. If "{location}" is not found, then
-     * we will use the input value as topic name.
-     * 
- * - * string transfer_config_pubsub_topic = 12; - */ - public java.lang.String getTransferConfigPubsubTopic() { - java.lang.Object ref = transferConfigPubsubTopic_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - transferConfigPubsubTopic_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * The Pub/Sub topic to use for broadcasting a message for transfer config. If
-     * empty, a message will not be broadcasted. Both this topic and
-     * transfer_run_pubsub_topic are auto-generated if none of them is provided
-     * when creating the definition. It is recommended to provide
-     * transfer_config_pubsub_topic if a user-owned transfer_run_pubsub_topic is
-     * provided. Otherwise, it will be set to empty. If "{location}" is found in
-     * the value, then that means, data source wants to handle message separately
-     * for datasets in different regions. We will replace {location} with the
-     * actual dataset location, as the actual topic name. For example,
-     * projects/connector/topics/scheduler-{location} could become
-     * projects/connector/topics/scheduler-us. If "{location}" is not found, then
-     * we will use the input value as topic name.
-     * 
- * - * string transfer_config_pubsub_topic = 12; - */ - public com.google.protobuf.ByteString getTransferConfigPubsubTopicBytes() { - java.lang.Object ref = transferConfigPubsubTopic_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - transferConfigPubsubTopic_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * The Pub/Sub topic to use for broadcasting a message for transfer config. If
-     * empty, a message will not be broadcasted. Both this topic and
-     * transfer_run_pubsub_topic are auto-generated if none of them is provided
-     * when creating the definition. It is recommended to provide
-     * transfer_config_pubsub_topic if a user-owned transfer_run_pubsub_topic is
-     * provided. Otherwise, it will be set to empty. If "{location}" is found in
-     * the value, then that means, data source wants to handle message separately
-     * for datasets in different regions. We will replace {location} with the
-     * actual dataset location, as the actual topic name. For example,
-     * projects/connector/topics/scheduler-{location} could become
-     * projects/connector/topics/scheduler-us. If "{location}" is not found, then
-     * we will use the input value as topic name.
-     * 
- * - * string transfer_config_pubsub_topic = 12; - */ - public Builder setTransferConfigPubsubTopic(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - transferConfigPubsubTopic_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * The Pub/Sub topic to use for broadcasting a message for transfer config. If
-     * empty, a message will not be broadcasted. Both this topic and
-     * transfer_run_pubsub_topic are auto-generated if none of them is provided
-     * when creating the definition. It is recommended to provide
-     * transfer_config_pubsub_topic if a user-owned transfer_run_pubsub_topic is
-     * provided. Otherwise, it will be set to empty. If "{location}" is found in
-     * the value, then that means, data source wants to handle message separately
-     * for datasets in different regions. We will replace {location} with the
-     * actual dataset location, as the actual topic name. For example,
-     * projects/connector/topics/scheduler-{location} could become
-     * projects/connector/topics/scheduler-us. If "{location}" is not found, then
-     * we will use the input value as topic name.
-     * 
- * - * string transfer_config_pubsub_topic = 12; - */ - public Builder clearTransferConfigPubsubTopic() { - - transferConfigPubsubTopic_ = getDefaultInstance().getTransferConfigPubsubTopic(); - onChanged(); - return this; - } - /** - * - * - *
-     * The Pub/Sub topic to use for broadcasting a message for transfer config. If
-     * empty, a message will not be broadcasted. Both this topic and
-     * transfer_run_pubsub_topic are auto-generated if none of them is provided
-     * when creating the definition. It is recommended to provide
-     * transfer_config_pubsub_topic if a user-owned transfer_run_pubsub_topic is
-     * provided. Otherwise, it will be set to empty. If "{location}" is found in
-     * the value, then that means, data source wants to handle message separately
-     * for datasets in different regions. We will replace {location} with the
-     * actual dataset location, as the actual topic name. For example,
-     * projects/connector/topics/scheduler-{location} could become
-     * projects/connector/topics/scheduler-us. If "{location}" is not found, then
-     * we will use the input value as topic name.
-     * 
- * - * string transfer_config_pubsub_topic = 12; - */ - public Builder setTransferConfigPubsubTopicBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - transferConfigPubsubTopic_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList supportedLocationIds_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureSupportedLocationIdsIsMutable() { - if (!((bitField0_ & 0x00000100) != 0)) { - supportedLocationIds_ = new com.google.protobuf.LazyStringArrayList(supportedLocationIds_); - bitField0_ |= 0x00000100; - } - } - /** - * - * - *
-     * Supported location_ids used for deciding in which locations Pub/Sub topics
-     * need to be created. If custom Pub/Sub topics are used and they contains
-     * '{location}', the location_ids will be used for validating the topics by
-     * replacing the '{location}' with the individual location in the list. The
-     * valid values are the "location_id" field of the response of `GET
-     * https://bigquerydatatransfer.googleapis.com/v1/{name=projects/*}/locations`
-     * In addition, if the data source needs to support all available regions,
-     * supported_location_ids can be set to "global" (a single string element).
-     * When "global" is specified:
-     * 1) the data source implementation is supposed to stage the data in proper
-     * region of the destination dataset;
-     * 2) Data source developer should be aware of the implications (e.g., network
-     * traffic latency, potential charge associated with cross-region traffic,
-     * etc.) of supporting the "global" region;
-     * 
- * - * repeated string supported_location_ids = 23; - */ - public com.google.protobuf.ProtocolStringList getSupportedLocationIdsList() { - return supportedLocationIds_.getUnmodifiableView(); - } - /** - * - * - *
-     * Supported location_ids used for deciding in which locations Pub/Sub topics
-     * need to be created. If custom Pub/Sub topics are used and they contains
-     * '{location}', the location_ids will be used for validating the topics by
-     * replacing the '{location}' with the individual location in the list. The
-     * valid values are the "location_id" field of the response of `GET
-     * https://bigquerydatatransfer.googleapis.com/v1/{name=projects/*}/locations`
-     * In addition, if the data source needs to support all available regions,
-     * supported_location_ids can be set to "global" (a single string element).
-     * When "global" is specified:
-     * 1) the data source implementation is supposed to stage the data in proper
-     * region of the destination dataset;
-     * 2) Data source developer should be aware of the implications (e.g., network
-     * traffic latency, potential charge associated with cross-region traffic,
-     * etc.) of supporting the "global" region;
-     * 
- * - * repeated string supported_location_ids = 23; - */ - public int getSupportedLocationIdsCount() { - return supportedLocationIds_.size(); - } - /** - * - * - *
-     * Supported location_ids used for deciding in which locations Pub/Sub topics
-     * need to be created. If custom Pub/Sub topics are used and they contains
-     * '{location}', the location_ids will be used for validating the topics by
-     * replacing the '{location}' with the individual location in the list. The
-     * valid values are the "location_id" field of the response of `GET
-     * https://bigquerydatatransfer.googleapis.com/v1/{name=projects/*}/locations`
-     * In addition, if the data source needs to support all available regions,
-     * supported_location_ids can be set to "global" (a single string element).
-     * When "global" is specified:
-     * 1) the data source implementation is supposed to stage the data in proper
-     * region of the destination dataset;
-     * 2) Data source developer should be aware of the implications (e.g., network
-     * traffic latency, potential charge associated with cross-region traffic,
-     * etc.) of supporting the "global" region;
-     * 
- * - * repeated string supported_location_ids = 23; - */ - public java.lang.String getSupportedLocationIds(int index) { - return supportedLocationIds_.get(index); - } - /** - * - * - *
-     * Supported location_ids used for deciding in which locations Pub/Sub topics
-     * need to be created. If custom Pub/Sub topics are used and they contains
-     * '{location}', the location_ids will be used for validating the topics by
-     * replacing the '{location}' with the individual location in the list. The
-     * valid values are the "location_id" field of the response of `GET
-     * https://bigquerydatatransfer.googleapis.com/v1/{name=projects/*}/locations`
-     * In addition, if the data source needs to support all available regions,
-     * supported_location_ids can be set to "global" (a single string element).
-     * When "global" is specified:
-     * 1) the data source implementation is supposed to stage the data in proper
-     * region of the destination dataset;
-     * 2) Data source developer should be aware of the implications (e.g., network
-     * traffic latency, potential charge associated with cross-region traffic,
-     * etc.) of supporting the "global" region;
-     * 
- * - * repeated string supported_location_ids = 23; - */ - public com.google.protobuf.ByteString getSupportedLocationIdsBytes(int index) { - return supportedLocationIds_.getByteString(index); - } - /** - * - * - *
-     * Supported location_ids used for deciding in which locations Pub/Sub topics
-     * need to be created. If custom Pub/Sub topics are used and they contains
-     * '{location}', the location_ids will be used for validating the topics by
-     * replacing the '{location}' with the individual location in the list. The
-     * valid values are the "location_id" field of the response of `GET
-     * https://bigquerydatatransfer.googleapis.com/v1/{name=projects/*}/locations`
-     * In addition, if the data source needs to support all available regions,
-     * supported_location_ids can be set to "global" (a single string element).
-     * When "global" is specified:
-     * 1) the data source implementation is supposed to stage the data in proper
-     * region of the destination dataset;
-     * 2) Data source developer should be aware of the implications (e.g., network
-     * traffic latency, potential charge associated with cross-region traffic,
-     * etc.) of supporting the "global" region;
-     * 
- * - * repeated string supported_location_ids = 23; - */ - public Builder setSupportedLocationIds(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureSupportedLocationIdsIsMutable(); - supportedLocationIds_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Supported location_ids used for deciding in which locations Pub/Sub topics
-     * need to be created. If custom Pub/Sub topics are used and they contains
-     * '{location}', the location_ids will be used for validating the topics by
-     * replacing the '{location}' with the individual location in the list. The
-     * valid values are the "location_id" field of the response of `GET
-     * https://bigquerydatatransfer.googleapis.com/v1/{name=projects/*}/locations`
-     * In addition, if the data source needs to support all available regions,
-     * supported_location_ids can be set to "global" (a single string element).
-     * When "global" is specified:
-     * 1) the data source implementation is supposed to stage the data in proper
-     * region of the destination dataset;
-     * 2) Data source developer should be aware of the implications (e.g., network
-     * traffic latency, potential charge associated with cross-region traffic,
-     * etc.) of supporting the "global" region;
-     * 
- * - * repeated string supported_location_ids = 23; - */ - public Builder addSupportedLocationIds(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureSupportedLocationIdsIsMutable(); - supportedLocationIds_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Supported location_ids used for deciding in which locations Pub/Sub topics
-     * need to be created. If custom Pub/Sub topics are used and they contains
-     * '{location}', the location_ids will be used for validating the topics by
-     * replacing the '{location}' with the individual location in the list. The
-     * valid values are the "location_id" field of the response of `GET
-     * https://bigquerydatatransfer.googleapis.com/v1/{name=projects/*}/locations`
-     * In addition, if the data source needs to support all available regions,
-     * supported_location_ids can be set to "global" (a single string element).
-     * When "global" is specified:
-     * 1) the data source implementation is supposed to stage the data in proper
-     * region of the destination dataset;
-     * 2) Data source developer should be aware of the implications (e.g., network
-     * traffic latency, potential charge associated with cross-region traffic,
-     * etc.) of supporting the "global" region;
-     * 
- * - * repeated string supported_location_ids = 23; - */ - public Builder addAllSupportedLocationIds(java.lang.Iterable values) { - ensureSupportedLocationIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, supportedLocationIds_); - onChanged(); - return this; - } - /** - * - * - *
-     * Supported location_ids used for deciding in which locations Pub/Sub topics
-     * need to be created. If custom Pub/Sub topics are used and they contains
-     * '{location}', the location_ids will be used for validating the topics by
-     * replacing the '{location}' with the individual location in the list. The
-     * valid values are the "location_id" field of the response of `GET
-     * https://bigquerydatatransfer.googleapis.com/v1/{name=projects/*}/locations`
-     * In addition, if the data source needs to support all available regions,
-     * supported_location_ids can be set to "global" (a single string element).
-     * When "global" is specified:
-     * 1) the data source implementation is supposed to stage the data in proper
-     * region of the destination dataset;
-     * 2) Data source developer should be aware of the implications (e.g., network
-     * traffic latency, potential charge associated with cross-region traffic,
-     * etc.) of supporting the "global" region;
-     * 
- * - * repeated string supported_location_ids = 23; - */ - public Builder clearSupportedLocationIds() { - supportedLocationIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000100); - onChanged(); - return this; - } - /** - * - * - *
-     * Supported location_ids used for deciding in which locations Pub/Sub topics
-     * need to be created. If custom Pub/Sub topics are used and they contains
-     * '{location}', the location_ids will be used for validating the topics by
-     * replacing the '{location}' with the individual location in the list. The
-     * valid values are the "location_id" field of the response of `GET
-     * https://bigquerydatatransfer.googleapis.com/v1/{name=projects/*}/locations`
-     * In addition, if the data source needs to support all available regions,
-     * supported_location_ids can be set to "global" (a single string element).
-     * When "global" is specified:
-     * 1) the data source implementation is supposed to stage the data in proper
-     * region of the destination dataset;
-     * 2) Data source developer should be aware of the implications (e.g., network
-     * traffic latency, potential charge associated with cross-region traffic,
-     * etc.) of supporting the "global" region;
-     * 
- * - * repeated string supported_location_ids = 23; - */ - public Builder addSupportedLocationIdsBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureSupportedLocationIdsIsMutable(); - supportedLocationIds_.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.bigquery.datatransfer.v1.DataSourceDefinition) - } - - // @@protoc_insertion_point(class_scope:google.cloud.bigquery.datatransfer.v1.DataSourceDefinition) - private static final com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition(); - } - - public static com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DataSourceDefinition parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DataSourceDefinition(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataSourceDefinitionOrBuilder.java b/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataSourceDefinitionOrBuilder.java deleted file mode 100644 index 4306d503d57f..000000000000 --- a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataSourceDefinitionOrBuilder.java +++ /dev/null @@ -1,362 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/bigquery/datatransfer/v1/datasource.proto - -package com.google.cloud.bigquery.datatransfer.v1; - -public interface DataSourceDefinitionOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.bigquery.datatransfer.v1.DataSourceDefinition) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The resource name of the data source definition.
-   * Data source definition names have the form
-   * `projects/{project_id}/locations/{location}/dataSourceDefinitions/{data_source_id}`.
-   * 
- * - * string name = 21; - */ - java.lang.String getName(); - /** - * - * - *
-   * The resource name of the data source definition.
-   * Data source definition names have the form
-   * `projects/{project_id}/locations/{location}/dataSourceDefinitions/{data_source_id}`.
-   * 
- * - * string name = 21; - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * Data source metadata.
-   * 
- * - * .google.cloud.bigquery.datatransfer.v1.DataSource data_source = 1; - */ - boolean hasDataSource(); - /** - * - * - *
-   * Data source metadata.
-   * 
- * - * .google.cloud.bigquery.datatransfer.v1.DataSource data_source = 1; - */ - com.google.cloud.bigquery.datatransfer.v1.DataSource getDataSource(); - /** - * - * - *
-   * Data source metadata.
-   * 
- * - * .google.cloud.bigquery.datatransfer.v1.DataSource data_source = 1; - */ - com.google.cloud.bigquery.datatransfer.v1.DataSourceOrBuilder getDataSourceOrBuilder(); - - /** - * - * - *
-   * The Pub/Sub topic to be used for broadcasting a message when a transfer run
-   * is created. Both this topic and transfer_config_pubsub_topic can be
-   * set to a custom topic. By default, both topics are auto-generated if none
-   * of them is provided when creating the definition. However, if one topic is
-   * manually set, the other topic has to be manually set as well. The only
-   * difference is that transfer_run_pubsub_topic must be a non-empty Pub/Sub
-   * topic, but transfer_config_pubsub_topic can be set to empty. The comments
-   * about "{location}" for transfer_config_pubsub_topic apply here too.
-   * 
- * - * string transfer_run_pubsub_topic = 13; - */ - java.lang.String getTransferRunPubsubTopic(); - /** - * - * - *
-   * The Pub/Sub topic to be used for broadcasting a message when a transfer run
-   * is created. Both this topic and transfer_config_pubsub_topic can be
-   * set to a custom topic. By default, both topics are auto-generated if none
-   * of them is provided when creating the definition. However, if one topic is
-   * manually set, the other topic has to be manually set as well. The only
-   * difference is that transfer_run_pubsub_topic must be a non-empty Pub/Sub
-   * topic, but transfer_config_pubsub_topic can be set to empty. The comments
-   * about "{location}" for transfer_config_pubsub_topic apply here too.
-   * 
- * - * string transfer_run_pubsub_topic = 13; - */ - com.google.protobuf.ByteString getTransferRunPubsubTopicBytes(); - - /** - * - * - *
-   * Duration which should be added to schedule_time to calculate
-   * run_time when job is scheduled. Only applicable for automatically
-   * scheduled transfer runs. Used to start a run early on a data source that
-   * supports continuous data refresh to compensate for unknown timezone
-   * offsets. Use a negative number to start a run late for data sources not
-   * supporting continuous data refresh.
-   * 
- * - * .google.protobuf.Duration run_time_offset = 16; - */ - boolean hasRunTimeOffset(); - /** - * - * - *
-   * Duration which should be added to schedule_time to calculate
-   * run_time when job is scheduled. Only applicable for automatically
-   * scheduled transfer runs. Used to start a run early on a data source that
-   * supports continuous data refresh to compensate for unknown timezone
-   * offsets. Use a negative number to start a run late for data sources not
-   * supporting continuous data refresh.
-   * 
- * - * .google.protobuf.Duration run_time_offset = 16; - */ - com.google.protobuf.Duration getRunTimeOffset(); - /** - * - * - *
-   * Duration which should be added to schedule_time to calculate
-   * run_time when job is scheduled. Only applicable for automatically
-   * scheduled transfer runs. Used to start a run early on a data source that
-   * supports continuous data refresh to compensate for unknown timezone
-   * offsets. Use a negative number to start a run late for data sources not
-   * supporting continuous data refresh.
-   * 
- * - * .google.protobuf.Duration run_time_offset = 16; - */ - com.google.protobuf.DurationOrBuilder getRunTimeOffsetOrBuilder(); - - /** - * - * - *
-   * Support e-mail address of the OAuth client's Brand, which contains the
-   * consent screen data.
-   * 
- * - * string support_email = 22; - */ - java.lang.String getSupportEmail(); - /** - * - * - *
-   * Support e-mail address of the OAuth client's Brand, which contains the
-   * consent screen data.
-   * 
- * - * string support_email = 22; - */ - com.google.protobuf.ByteString getSupportEmailBytes(); - - /** - * - * - *
-   * When service account is specified, BigQuery will share created dataset
-   * with the given service account. Also, this service account will be
-   * eligible to perform status updates and message logging for data transfer
-   * runs for the corresponding data_source_id.
-   * 
- * - * string service_account = 2; - */ - java.lang.String getServiceAccount(); - /** - * - * - *
-   * When service account is specified, BigQuery will share created dataset
-   * with the given service account. Also, this service account will be
-   * eligible to perform status updates and message logging for data transfer
-   * runs for the corresponding data_source_id.
-   * 
- * - * string service_account = 2; - */ - com.google.protobuf.ByteString getServiceAccountBytes(); - - /** - * - * - *
-   * Is data source disabled? If true, data_source is not visible.
-   * API will also stop returning any data transfer configs and/or runs
-   * associated with the data source. This setting has higher priority
-   * than whitelisted_project_ids.
-   * 
- * - * bool disabled = 5; - */ - boolean getDisabled(); - - /** - * - * - *
-   * The Pub/Sub topic to use for broadcasting a message for transfer config. If
-   * empty, a message will not be broadcasted. Both this topic and
-   * transfer_run_pubsub_topic are auto-generated if none of them is provided
-   * when creating the definition. It is recommended to provide
-   * transfer_config_pubsub_topic if a user-owned transfer_run_pubsub_topic is
-   * provided. Otherwise, it will be set to empty. If "{location}" is found in
-   * the value, then that means, data source wants to handle message separately
-   * for datasets in different regions. We will replace {location} with the
-   * actual dataset location, as the actual topic name. For example,
-   * projects/connector/topics/scheduler-{location} could become
-   * projects/connector/topics/scheduler-us. If "{location}" is not found, then
-   * we will use the input value as topic name.
-   * 
- * - * string transfer_config_pubsub_topic = 12; - */ - java.lang.String getTransferConfigPubsubTopic(); - /** - * - * - *
-   * The Pub/Sub topic to use for broadcasting a message for transfer config. If
-   * empty, a message will not be broadcasted. Both this topic and
-   * transfer_run_pubsub_topic are auto-generated if none of them is provided
-   * when creating the definition. It is recommended to provide
-   * transfer_config_pubsub_topic if a user-owned transfer_run_pubsub_topic is
-   * provided. Otherwise, it will be set to empty. If "{location}" is found in
-   * the value, then that means, data source wants to handle message separately
-   * for datasets in different regions. We will replace {location} with the
-   * actual dataset location, as the actual topic name. For example,
-   * projects/connector/topics/scheduler-{location} could become
-   * projects/connector/topics/scheduler-us. If "{location}" is not found, then
-   * we will use the input value as topic name.
-   * 
- * - * string transfer_config_pubsub_topic = 12; - */ - com.google.protobuf.ByteString getTransferConfigPubsubTopicBytes(); - - /** - * - * - *
-   * Supported location_ids used for deciding in which locations Pub/Sub topics
-   * need to be created. If custom Pub/Sub topics are used and they contains
-   * '{location}', the location_ids will be used for validating the topics by
-   * replacing the '{location}' with the individual location in the list. The
-   * valid values are the "location_id" field of the response of `GET
-   * https://bigquerydatatransfer.googleapis.com/v1/{name=projects/*}/locations`
-   * In addition, if the data source needs to support all available regions,
-   * supported_location_ids can be set to "global" (a single string element).
-   * When "global" is specified:
-   * 1) the data source implementation is supposed to stage the data in proper
-   * region of the destination dataset;
-   * 2) Data source developer should be aware of the implications (e.g., network
-   * traffic latency, potential charge associated with cross-region traffic,
-   * etc.) of supporting the "global" region;
-   * 
- * - * repeated string supported_location_ids = 23; - */ - java.util.List getSupportedLocationIdsList(); - /** - * - * - *
-   * Supported location_ids used for deciding in which locations Pub/Sub topics
-   * need to be created. If custom Pub/Sub topics are used and they contains
-   * '{location}', the location_ids will be used for validating the topics by
-   * replacing the '{location}' with the individual location in the list. The
-   * valid values are the "location_id" field of the response of `GET
-   * https://bigquerydatatransfer.googleapis.com/v1/{name=projects/*}/locations`
-   * In addition, if the data source needs to support all available regions,
-   * supported_location_ids can be set to "global" (a single string element).
-   * When "global" is specified:
-   * 1) the data source implementation is supposed to stage the data in proper
-   * region of the destination dataset;
-   * 2) Data source developer should be aware of the implications (e.g., network
-   * traffic latency, potential charge associated with cross-region traffic,
-   * etc.) of supporting the "global" region;
-   * 
- * - * repeated string supported_location_ids = 23; - */ - int getSupportedLocationIdsCount(); - /** - * - * - *
-   * Supported location_ids used for deciding in which locations Pub/Sub topics
-   * need to be created. If custom Pub/Sub topics are used and they contains
-   * '{location}', the location_ids will be used for validating the topics by
-   * replacing the '{location}' with the individual location in the list. The
-   * valid values are the "location_id" field of the response of `GET
-   * https://bigquerydatatransfer.googleapis.com/v1/{name=projects/*}/locations`
-   * In addition, if the data source needs to support all available regions,
-   * supported_location_ids can be set to "global" (a single string element).
-   * When "global" is specified:
-   * 1) the data source implementation is supposed to stage the data in proper
-   * region of the destination dataset;
-   * 2) Data source developer should be aware of the implications (e.g., network
-   * traffic latency, potential charge associated with cross-region traffic,
-   * etc.) of supporting the "global" region;
-   * 
- * - * repeated string supported_location_ids = 23; - */ - java.lang.String getSupportedLocationIds(int index); - /** - * - * - *
-   * Supported location_ids used for deciding in which locations Pub/Sub topics
-   * need to be created. If custom Pub/Sub topics are used and they contains
-   * '{location}', the location_ids will be used for validating the topics by
-   * replacing the '{location}' with the individual location in the list. The
-   * valid values are the "location_id" field of the response of `GET
-   * https://bigquerydatatransfer.googleapis.com/v1/{name=projects/*}/locations`
-   * In addition, if the data source needs to support all available regions,
-   * supported_location_ids can be set to "global" (a single string element).
-   * When "global" is specified:
-   * 1) the data source implementation is supposed to stage the data in proper
-   * region of the destination dataset;
-   * 2) Data source developer should be aware of the implications (e.g., network
-   * traffic latency, potential charge associated with cross-region traffic,
-   * etc.) of supporting the "global" region;
-   * 
- * - * repeated string supported_location_ids = 23; - */ - com.google.protobuf.ByteString getSupportedLocationIdsBytes(int index); -} diff --git a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataSourceNames.java b/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataSourceNames.java deleted file mode 100644 index 4fb66adef1d0..000000000000 --- a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataSourceNames.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.bigquery.datatransfer.v1; - -/** - * AUTO-GENERATED DOCUMENTATION AND CLASS - * - * @deprecated This resource name class will be removed in the next major version. - */ -@javax.annotation.Generated("by GAPIC protoc plugin") -@Deprecated -public class DataSourceNames { - private DataSourceNames() {} - - public static DataSourceName parse(String resourceNameString) { - if (ProjectDataSourceName.isParsableFrom(resourceNameString)) { - return ProjectDataSourceName.parse(resourceNameString); - } - if (LocationDataSourceName.isParsableFrom(resourceNameString)) { - return LocationDataSourceName.parse(resourceNameString); - } - return UntypedDataSourceName.parse(resourceNameString); - } -} diff --git a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataSourceProto.java b/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataSourceProto.java deleted file mode 100644 index 4543b6071154..000000000000 --- a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataSourceProto.java +++ /dev/null @@ -1,458 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/bigquery/datatransfer/v1/datasource.proto - -package com.google.cloud.bigquery.datatransfer.v1; - -public final class DataSourceProto { - private DataSourceProto() {} - - 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_bigquery_datatransfer_v1_ImportedDataInfo_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_bigquery_datatransfer_v1_ImportedDataInfo_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_bigquery_datatransfer_v1_ImportedDataInfo_FieldSchema_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_bigquery_datatransfer_v1_ImportedDataInfo_FieldSchema_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_bigquery_datatransfer_v1_ImportedDataInfo_RecordSchema_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_bigquery_datatransfer_v1_ImportedDataInfo_RecordSchema_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_bigquery_datatransfer_v1_ImportedDataInfo_TableDefinition_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_bigquery_datatransfer_v1_ImportedDataInfo_TableDefinition_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_bigquery_datatransfer_v1_ImportedDataInfo_TableDefinition_CsvOptions_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_bigquery_datatransfer_v1_ImportedDataInfo_TableDefinition_CsvOptions_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_bigquery_datatransfer_v1_UpdateTransferRunRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_bigquery_datatransfer_v1_UpdateTransferRunRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_bigquery_datatransfer_v1_LogTransferRunMessagesRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_bigquery_datatransfer_v1_LogTransferRunMessagesRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_bigquery_datatransfer_v1_StartBigQueryJobsRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_bigquery_datatransfer_v1_StartBigQueryJobsRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_bigquery_datatransfer_v1_FinishRunRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_bigquery_datatransfer_v1_FinishRunRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_bigquery_datatransfer_v1_CreateDataSourceDefinitionRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_bigquery_datatransfer_v1_CreateDataSourceDefinitionRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_bigquery_datatransfer_v1_UpdateDataSourceDefinitionRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_bigquery_datatransfer_v1_UpdateDataSourceDefinitionRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_bigquery_datatransfer_v1_DeleteDataSourceDefinitionRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_bigquery_datatransfer_v1_DeleteDataSourceDefinitionRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_bigquery_datatransfer_v1_GetDataSourceDefinitionRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_bigquery_datatransfer_v1_GetDataSourceDefinitionRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_bigquery_datatransfer_v1_ListDataSourceDefinitionsRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_bigquery_datatransfer_v1_ListDataSourceDefinitionsRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_bigquery_datatransfer_v1_ListDataSourceDefinitionsResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_bigquery_datatransfer_v1_ListDataSourceDefinitionsResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_bigquery_datatransfer_v1_DataSourceDefinition_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_bigquery_datatransfer_v1_DataSourceDefinition_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { - return descriptor; - } - - private static com.google.protobuf.Descriptors.FileDescriptor descriptor; - - static { - java.lang.String[] descriptorData = { - "\n6google/cloud/bigquery/datatransfer/v1/" - + "datasource.proto\022%google.cloud.bigquery." - + "datatransfer.v1\032\034google/api/annotations." - + "proto\0328google/cloud/bigquery/datatransfe" - + "r/v1/datatransfer.proto\0324google/cloud/bi" - + "gquery/datatransfer/v1/transfer.proto\032\036g" - + "oogle/protobuf/duration.proto\032\033google/pr" - + "otobuf/empty.proto\032 google/protobuf/fiel" - + "d_mask.proto\032\037google/protobuf/timestamp." - + "proto\032\036google/protobuf/wrappers.proto\032\027g" - + "oogle/api/client.proto\"\236\016\n\020ImportedDataI" - + "nfo\022\013\n\003sql\030\001 \001(\t\022\034\n\024destination_table_id" - + "\030\002 \001(\t\022%\n\035destination_table_description\030" - + "\n \001(\t\022[\n\ntable_defs\030\003 \003(\0132G.google.cloud" - + ".bigquery.datatransfer.v1.ImportedDataIn" - + "fo.TableDefinition\022\036\n\026user_defined_funct" - + "ions\030\004 \003(\t\022R\n\021write_disposition\030\006 \001(\01627." - + "google.cloud.bigquery.datatransfer.v1.Wr" - + "iteDisposition\032\255\003\n\013FieldSchema\022\022\n\nfield_" - + "name\030\001 \001(\t\022V\n\004type\030\002 \001(\0162H.google.cloud." - + "bigquery.datatransfer.v1.ImportedDataInf" - + "o.FieldSchema.Type\022\023\n\013is_repeated\030\003 \001(\010\022" - + "\023\n\013description\030\004 \001(\t\022T\n\006schema\030\005 \001(\0132D.g" - + "oogle.cloud.bigquery.datatransfer.v1.Imp" - + "ortedDataInfo.RecordSchema\"\261\001\n\004Type\022\024\n\020T" - + "YPE_UNSPECIFIED\020\000\022\n\n\006STRING\020\001\022\013\n\007INTEGER" - + "\020\002\022\t\n\005FLOAT\020\003\022\n\n\006RECORD\020\004\022\t\n\005BYTES\020\005\022\013\n\007" - + "BOOLEAN\020\006\022\r\n\tTIMESTAMP\020\007\022\010\n\004DATE\020\010\022\010\n\004TI" - + "ME\020\t\022\014\n\010DATETIME\020\n\022\013\n\007NUMERIC\020\013\022\r\n\tGEOGR" - + "APHY\020\014\032c\n\014RecordSchema\022S\n\006fields\030\001 \003(\0132C" - + ".google.cloud.bigquery.datatransfer.v1.I" - + "mportedDataInfo.FieldSchema\032\221\006\n\017TableDef" - + "inition\022\020\n\010table_id\030\001 \001(\t\022\023\n\013source_uris" - + "\030\002 \003(\t\022N\n\006format\030\003 \001(\0162>.google.cloud.bi" - + "gquery.datatransfer.v1.ImportedDataInfo." - + "Format\022\027\n\017max_bad_records\030\004 \001(\005\022R\n\010encod" - + "ing\030\005 \001(\0162@.google.cloud.bigquery.datatr" - + "ansfer.v1.ImportedDataInfo.Encoding\022g\n\013c" - + "sv_options\030\006 \001(\0132R.google.cloud.bigquery" - + ".datatransfer.v1.ImportedDataInfo.TableD" - + "efinition.CsvOptions\022T\n\006schema\030\007 \001(\0132D.g" - + "oogle.cloud.bigquery.datatransfer.v1.Imp" - + "ortedDataInfo.RecordSchema\0229\n\025ignore_unk" - + "nown_values\030\n \001(\0132\032.google.protobuf.Bool" - + "Value\032\237\002\n\nCsvOptions\0225\n\017field_delimiter\030" - + "\001 \001(\0132\034.google.protobuf.StringValue\0229\n\025a" - + "llow_quoted_newlines\030\002 \001(\0132\032.google.prot" - + "obuf.BoolValue\0220\n\nquote_char\030\003 \001(\0132\034.goo" - + "gle.protobuf.StringValue\0226\n\021skip_leading" - + "_rows\030\004 \001(\0132\033.google.protobuf.Int64Value" - + "\0225\n\021allow_jagged_rows\030\005 \001(\0132\032.google.pro" - + "tobuf.BoolValue\"~\n\006Format\022\026\n\022FORMAT_UNSP" - + "ECIFIED\020\000\022\007\n\003CSV\020\001\022\010\n\004JSON\020\002\022\010\n\004AVRO\020\003\022\014" - + "\n\010RECORDIO\020\004\022\014\n\010COLUMNIO\020\005\022\r\n\tCAPACITOR\020" - + "\006\022\013\n\007PARQUET\020\007\022\007\n\003ORC\020\010\">\n\010Encoding\022\030\n\024E" - + "NCODING_UNSPECIFIED\020\000\022\016\n\nISO_8859_1\020\001\022\010\n" - + "\004UTF8\020\002\"\225\001\n\030UpdateTransferRunRequest\022H\n\014" - + "transfer_run\030\001 \001(\01322.google.cloud.bigque" - + "ry.datatransfer.v1.TransferRun\022/\n\013update" - + "_mask\030\002 \001(\0132\032.google.protobuf.FieldMask\"" - + "\200\001\n\035LogTransferRunMessagesRequest\022\014\n\004nam" - + "e\030\001 \001(\t\022Q\n\021transfer_messages\030\002 \003(\01326.goo" - + "gle.cloud.bigquery.datatransfer.v1.Trans" - + "ferMessage\"\253\001\n\030StartBigQueryJobsRequest\022" - + "\014\n\004name\030\001 \001(\t\022N\n\rimported_data\030\002 \003(\01327.g" - + "oogle.cloud.bigquery.datatransfer.v1.Imp" - + "ortedDataInfo\022\030\n\020user_credentials\030\003 \001(\014\022" - + "\027\n\017max_parallelism\030\010 \001(\005\" \n\020FinishRunReq" - + "uest\022\014\n\004name\030\001 \001(\t\"\220\001\n!CreateDataSourceD" - + "efinitionRequest\022\016\n\006parent\030\001 \001(\t\022[\n\026data" - + "_source_definition\030\002 \001(\0132;.google.cloud." - + "bigquery.datatransfer.v1.DataSourceDefin" - + "ition\"\261\001\n!UpdateDataSourceDefinitionRequ" - + "est\022[\n\026data_source_definition\030\001 \001(\0132;.go" - + "ogle.cloud.bigquery.datatransfer.v1.Data" - + "SourceDefinition\022/\n\013update_mask\030\002 \001(\0132\032." - + "google.protobuf.FieldMask\"1\n!DeleteDataS" - + "ourceDefinitionRequest\022\014\n\004name\030\001 \001(\t\".\n\036" - + "GetDataSourceDefinitionRequest\022\014\n\004name\030\001" - + " \001(\t\"Y\n ListDataSourceDefinitionsRequest" - + "\022\016\n\006parent\030\001 \001(\t\022\022\n\npage_token\030\002 \001(\t\022\021\n\t" - + "page_size\030\003 \001(\005\"\232\001\n!ListDataSourceDefini" - + "tionsResponse\022\\\n\027data_source_definitions" - + "\030\001 \003(\0132;.google.cloud.bigquery.datatrans" - + "fer.v1.DataSourceDefinition\022\027\n\017next_page" - + "_token\030\002 \001(\t\"\313\002\n\024DataSourceDefinition\022\014\n" - + "\004name\030\025 \001(\t\022F\n\013data_source\030\001 \001(\01321.googl" - + "e.cloud.bigquery.datatransfer.v1.DataSou" - + "rce\022!\n\031transfer_run_pubsub_topic\030\r \001(\t\0222" - + "\n\017run_time_offset\030\020 \001(\0132\031.google.protobu" - + "f.Duration\022\025\n\rsupport_email\030\026 \001(\t\022\027\n\017ser" - + "vice_account\030\002 \001(\t\022\020\n\010disabled\030\005 \001(\010\022$\n\034" - + "transfer_config_pubsub_topic\030\014 \001(\t\022\036\n\026su" - + "pported_location_ids\030\027 \003(\t*[\n\020WriteDispo" - + "sition\022!\n\035WRITE_DISPOSITION_UNSPECIFIED\020" - + "\000\022\022\n\016WRITE_TRUNCATE\020\001\022\020\n\014WRITE_APPEND\020\0022" - + "\235\020\n\021DataSourceService\022\347\001\n\021UpdateTransfer" - + "Run\022?.google.cloud.bigquery.datatransfer" - + ".v1.UpdateTransferRunRequest\0322.google.cl" - + "oud.bigquery.datatransfer.v1.TransferRun" - + "\"]\202\323\344\223\002W2G/v1/{transfer_run.name=project" - + "s/*/locations/*/transferConfigs/*/runs/*" - + "}:\014transfer_run\022\311\001\n\026LogTransferRunMessag" - + "es\022D.google.cloud.bigquery.datatransfer." - + "v1.LogTransferRunMessagesRequest\032\026.googl" - + "e.protobuf.Empty\"Q\202\323\344\223\002K\"F/v1/{name=proj" - + "ects/*/locations/*/transferConfigs/*/run" - + "s/*}:logMessages:\001*\022\305\001\n\021StartBigQueryJob" - + "s\022?.google.cloud.bigquery.datatransfer.v" - + "1.StartBigQueryJobsRequest\032\026.google.prot" - + "obuf.Empty\"W\202\323\344\223\002Q\"L/v1/{name=projects/*" - + "/locations/*/transferConfigs/*/runs/*}:s" - + "tartBigQueryJobs:\001*\022\255\001\n\tFinishRun\0227.goog" - + "le.cloud.bigquery.datatransfer.v1.Finish" - + "RunRequest\032\026.google.protobuf.Empty\"O\202\323\344\223" - + "\002I\"D/v1/{name=projects/*/locations/*/tra" - + "nsferConfigs/*/runs/*}:finishRun:\001*\022\376\001\n\032" - + "CreateDataSourceDefinition\022H.google.clou" - + "d.bigquery.datatransfer.v1.CreateDataSou" - + "rceDefinitionRequest\032;.google.cloud.bigq" - + "uery.datatransfer.v1.DataSourceDefinitio" - + "n\"Y\202\323\344\223\002S\"9/v1/{parent=projects/*/locati" - + "ons/*}/dataSourceDefinitions:\026data_sourc" - + "e_definition\022\225\002\n\032UpdateDataSourceDefinit" - + "ion\022H.google.cloud.bigquery.datatransfer" - + ".v1.UpdateDataSourceDefinitionRequest\032;." - + "google.cloud.bigquery.datatransfer.v1.Da" - + "taSourceDefinition\"p\202\323\344\223\002j2P/v1/{data_so" - + "urce_definition.name=projects/*/location" - + "s/*/dataSourceDefinitions/*}:\026data_sourc" - + "e_definition\022\301\001\n\032DeleteDataSourceDefinit" - + "ion\022H.google.cloud.bigquery.datatransfer" - + ".v1.DeleteDataSourceDefinitionRequest\032\026." - + "google.protobuf.Empty\"A\202\323\344\223\002;*9/v1/{name" - + "=projects/*/locations/*/dataSourceDefini" - + "tions/*}\022\340\001\n\027GetDataSourceDefinition\022E.g" - + "oogle.cloud.bigquery.datatransfer.v1.Get" - + "DataSourceDefinitionRequest\032;.google.clo" - + "ud.bigquery.datatransfer.v1.DataSourceDe" - + "finition\"A\202\323\344\223\002;\0229/v1/{name=projects/*/l" - + "ocations/*/dataSourceDefinitions/*}\022\361\001\n\031" - + "ListDataSourceDefinitions\022G.google.cloud" - + ".bigquery.datatransfer.v1.ListDataSource" - + "DefinitionsRequest\032H.google.cloud.bigque" - + "ry.datatransfer.v1.ListDataSourceDefinit" - + "ionsResponse\"A\202\323\344\223\002;\0229/v1/{parent=projec" - + "ts/*/locations/*}/dataSourceDefinitions\032" - + "&\312A#bigquerydatatransfer.googleapis.comB" - + "\341\001\n)com.google.cloud.bigquery.datatransf" - + "er.v1B\017DataSourceProtoP\001ZQgoogle.golang." - + "org/genproto/googleapis/cloud/bigquery/d" - + "atatransfer/v1;datatransfer\252\002%Google.Clo" - + "ud.BigQuery.DataTransfer.V1\312\002%Google\\Clo" - + "ud\\BigQuery\\DataTransfer\\V1b\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), - com.google.cloud.bigquery.datatransfer.v1.DataTransferProto.getDescriptor(), - com.google.cloud.bigquery.datatransfer.v1.TransferProto.getDescriptor(), - com.google.protobuf.DurationProto.getDescriptor(), - com.google.protobuf.EmptyProto.getDescriptor(), - com.google.protobuf.FieldMaskProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - com.google.protobuf.WrappersProto.getDescriptor(), - com.google.api.ClientProto.getDescriptor(), - }, - assigner); - internal_static_google_cloud_bigquery_datatransfer_v1_ImportedDataInfo_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_bigquery_datatransfer_v1_ImportedDataInfo_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_bigquery_datatransfer_v1_ImportedDataInfo_descriptor, - new java.lang.String[] { - "Sql", - "DestinationTableId", - "DestinationTableDescription", - "TableDefs", - "UserDefinedFunctions", - "WriteDisposition", - }); - internal_static_google_cloud_bigquery_datatransfer_v1_ImportedDataInfo_FieldSchema_descriptor = - internal_static_google_cloud_bigquery_datatransfer_v1_ImportedDataInfo_descriptor - .getNestedTypes() - .get(0); - internal_static_google_cloud_bigquery_datatransfer_v1_ImportedDataInfo_FieldSchema_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_bigquery_datatransfer_v1_ImportedDataInfo_FieldSchema_descriptor, - new java.lang.String[] { - "FieldName", "Type", "IsRepeated", "Description", "Schema", - }); - internal_static_google_cloud_bigquery_datatransfer_v1_ImportedDataInfo_RecordSchema_descriptor = - internal_static_google_cloud_bigquery_datatransfer_v1_ImportedDataInfo_descriptor - .getNestedTypes() - .get(1); - internal_static_google_cloud_bigquery_datatransfer_v1_ImportedDataInfo_RecordSchema_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_bigquery_datatransfer_v1_ImportedDataInfo_RecordSchema_descriptor, - new java.lang.String[] { - "Fields", - }); - internal_static_google_cloud_bigquery_datatransfer_v1_ImportedDataInfo_TableDefinition_descriptor = - internal_static_google_cloud_bigquery_datatransfer_v1_ImportedDataInfo_descriptor - .getNestedTypes() - .get(2); - internal_static_google_cloud_bigquery_datatransfer_v1_ImportedDataInfo_TableDefinition_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_bigquery_datatransfer_v1_ImportedDataInfo_TableDefinition_descriptor, - new java.lang.String[] { - "TableId", - "SourceUris", - "Format", - "MaxBadRecords", - "Encoding", - "CsvOptions", - "Schema", - "IgnoreUnknownValues", - }); - internal_static_google_cloud_bigquery_datatransfer_v1_ImportedDataInfo_TableDefinition_CsvOptions_descriptor = - internal_static_google_cloud_bigquery_datatransfer_v1_ImportedDataInfo_TableDefinition_descriptor - .getNestedTypes() - .get(0); - internal_static_google_cloud_bigquery_datatransfer_v1_ImportedDataInfo_TableDefinition_CsvOptions_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_bigquery_datatransfer_v1_ImportedDataInfo_TableDefinition_CsvOptions_descriptor, - new java.lang.String[] { - "FieldDelimiter", - "AllowQuotedNewlines", - "QuoteChar", - "SkipLeadingRows", - "AllowJaggedRows", - }); - internal_static_google_cloud_bigquery_datatransfer_v1_UpdateTransferRunRequest_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_bigquery_datatransfer_v1_UpdateTransferRunRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_bigquery_datatransfer_v1_UpdateTransferRunRequest_descriptor, - new java.lang.String[] { - "TransferRun", "UpdateMask", - }); - internal_static_google_cloud_bigquery_datatransfer_v1_LogTransferRunMessagesRequest_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_bigquery_datatransfer_v1_LogTransferRunMessagesRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_bigquery_datatransfer_v1_LogTransferRunMessagesRequest_descriptor, - new java.lang.String[] { - "Name", "TransferMessages", - }); - internal_static_google_cloud_bigquery_datatransfer_v1_StartBigQueryJobsRequest_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_cloud_bigquery_datatransfer_v1_StartBigQueryJobsRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_bigquery_datatransfer_v1_StartBigQueryJobsRequest_descriptor, - new java.lang.String[] { - "Name", "ImportedData", "UserCredentials", "MaxParallelism", - }); - internal_static_google_cloud_bigquery_datatransfer_v1_FinishRunRequest_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_google_cloud_bigquery_datatransfer_v1_FinishRunRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_bigquery_datatransfer_v1_FinishRunRequest_descriptor, - new java.lang.String[] { - "Name", - }); - internal_static_google_cloud_bigquery_datatransfer_v1_CreateDataSourceDefinitionRequest_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_google_cloud_bigquery_datatransfer_v1_CreateDataSourceDefinitionRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_bigquery_datatransfer_v1_CreateDataSourceDefinitionRequest_descriptor, - new java.lang.String[] { - "Parent", "DataSourceDefinition", - }); - internal_static_google_cloud_bigquery_datatransfer_v1_UpdateDataSourceDefinitionRequest_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_google_cloud_bigquery_datatransfer_v1_UpdateDataSourceDefinitionRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_bigquery_datatransfer_v1_UpdateDataSourceDefinitionRequest_descriptor, - new java.lang.String[] { - "DataSourceDefinition", "UpdateMask", - }); - internal_static_google_cloud_bigquery_datatransfer_v1_DeleteDataSourceDefinitionRequest_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_google_cloud_bigquery_datatransfer_v1_DeleteDataSourceDefinitionRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_bigquery_datatransfer_v1_DeleteDataSourceDefinitionRequest_descriptor, - new java.lang.String[] { - "Name", - }); - internal_static_google_cloud_bigquery_datatransfer_v1_GetDataSourceDefinitionRequest_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_google_cloud_bigquery_datatransfer_v1_GetDataSourceDefinitionRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_bigquery_datatransfer_v1_GetDataSourceDefinitionRequest_descriptor, - new java.lang.String[] { - "Name", - }); - internal_static_google_cloud_bigquery_datatransfer_v1_ListDataSourceDefinitionsRequest_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_google_cloud_bigquery_datatransfer_v1_ListDataSourceDefinitionsRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_bigquery_datatransfer_v1_ListDataSourceDefinitionsRequest_descriptor, - new java.lang.String[] { - "Parent", "PageToken", "PageSize", - }); - internal_static_google_cloud_bigquery_datatransfer_v1_ListDataSourceDefinitionsResponse_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_google_cloud_bigquery_datatransfer_v1_ListDataSourceDefinitionsResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_bigquery_datatransfer_v1_ListDataSourceDefinitionsResponse_descriptor, - new java.lang.String[] { - "DataSourceDefinitions", "NextPageToken", - }); - internal_static_google_cloud_bigquery_datatransfer_v1_DataSourceDefinition_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_google_cloud_bigquery_datatransfer_v1_DataSourceDefinition_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_bigquery_datatransfer_v1_DataSourceDefinition_descriptor, - new java.lang.String[] { - "Name", - "DataSource", - "TransferRunPubsubTopic", - "RunTimeOffset", - "SupportEmail", - "ServiceAccount", - "Disabled", - "TransferConfigPubsubTopic", - "SupportedLocationIds", - }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.ClientProto.defaultHost); - registry.add(com.google.api.AnnotationsProto.http); - com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( - descriptor, registry); - com.google.api.AnnotationsProto.getDescriptor(); - com.google.cloud.bigquery.datatransfer.v1.DataTransferProto.getDescriptor(); - com.google.cloud.bigquery.datatransfer.v1.TransferProto.getDescriptor(); - com.google.protobuf.DurationProto.getDescriptor(); - com.google.protobuf.EmptyProto.getDescriptor(); - com.google.protobuf.FieldMaskProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - com.google.protobuf.WrappersProto.getDescriptor(); - com.google.api.ClientProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DeleteDataSourceDefinitionRequest.java b/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DeleteDataSourceDefinitionRequest.java deleted file mode 100644 index e0404c2bf86b..000000000000 --- a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DeleteDataSourceDefinitionRequest.java +++ /dev/null @@ -1,650 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/bigquery/datatransfer/v1/datasource.proto - -package com.google.cloud.bigquery.datatransfer.v1; - -/** - * - * - *
- * Represents the request of the DeleteDataSourceDefinition method. All transfer
- * configs associated with the data source must be deleted first, before the
- * data source can be deleted.
- * 
- * - * Protobuf type {@code google.cloud.bigquery.datatransfer.v1.DeleteDataSourceDefinitionRequest} - */ -public final class DeleteDataSourceDefinitionRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.bigquery.datatransfer.v1.DeleteDataSourceDefinitionRequest) - DeleteDataSourceDefinitionRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use DeleteDataSourceDefinitionRequest.newBuilder() to construct. - private DeleteDataSourceDefinitionRequest( - com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private DeleteDataSourceDefinitionRequest() { - name_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private DeleteDataSourceDefinitionRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_DeleteDataSourceDefinitionRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_DeleteDataSourceDefinitionRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.datatransfer.v1.DeleteDataSourceDefinitionRequest.class, - com.google.cloud.bigquery.datatransfer.v1.DeleteDataSourceDefinitionRequest.Builder - .class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * The field will contain name of the resource requested, for example:
-   * `projects/{project_id}/locations/{location_id}/dataSourceDefinitions/{data_source_id}`
-   * 
- * - * string name = 1; - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * The field will contain name of the resource requested, for example:
-   * `projects/{project_id}/locations/{location_id}/dataSourceDefinitions/{data_source_id}`
-   * 
- * - * string name = 1; - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (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.bigquery.datatransfer.v1.DeleteDataSourceDefinitionRequest)) { - return super.equals(obj); - } - com.google.cloud.bigquery.datatransfer.v1.DeleteDataSourceDefinitionRequest other = - (com.google.cloud.bigquery.datatransfer.v1.DeleteDataSourceDefinitionRequest) 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.bigquery.datatransfer.v1.DeleteDataSourceDefinitionRequest - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.datatransfer.v1.DeleteDataSourceDefinitionRequest - parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.DeleteDataSourceDefinitionRequest - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.datatransfer.v1.DeleteDataSourceDefinitionRequest - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.DeleteDataSourceDefinitionRequest - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.datatransfer.v1.DeleteDataSourceDefinitionRequest - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.DeleteDataSourceDefinitionRequest - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.datatransfer.v1.DeleteDataSourceDefinitionRequest - parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.DeleteDataSourceDefinitionRequest - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.datatransfer.v1.DeleteDataSourceDefinitionRequest - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.DeleteDataSourceDefinitionRequest - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.datatransfer.v1.DeleteDataSourceDefinitionRequest - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.bigquery.datatransfer.v1.DeleteDataSourceDefinitionRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Represents the request of the DeleteDataSourceDefinition method. All transfer
-   * configs associated with the data source must be deleted first, before the
-   * data source can be deleted.
-   * 
- * - * Protobuf type {@code google.cloud.bigquery.datatransfer.v1.DeleteDataSourceDefinitionRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.bigquery.datatransfer.v1.DeleteDataSourceDefinitionRequest) - com.google.cloud.bigquery.datatransfer.v1.DeleteDataSourceDefinitionRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_DeleteDataSourceDefinitionRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_DeleteDataSourceDefinitionRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.datatransfer.v1.DeleteDataSourceDefinitionRequest.class, - com.google.cloud.bigquery.datatransfer.v1.DeleteDataSourceDefinitionRequest.Builder - .class); - } - - // Construct using - // com.google.cloud.bigquery.datatransfer.v1.DeleteDataSourceDefinitionRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.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.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_DeleteDataSourceDefinitionRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.bigquery.datatransfer.v1.DeleteDataSourceDefinitionRequest - getDefaultInstanceForType() { - return com.google.cloud.bigquery.datatransfer.v1.DeleteDataSourceDefinitionRequest - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.bigquery.datatransfer.v1.DeleteDataSourceDefinitionRequest build() { - com.google.cloud.bigquery.datatransfer.v1.DeleteDataSourceDefinitionRequest result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.bigquery.datatransfer.v1.DeleteDataSourceDefinitionRequest - buildPartial() { - com.google.cloud.bigquery.datatransfer.v1.DeleteDataSourceDefinitionRequest result = - new com.google.cloud.bigquery.datatransfer.v1.DeleteDataSourceDefinitionRequest(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.bigquery.datatransfer.v1.DeleteDataSourceDefinitionRequest) { - return mergeFrom( - (com.google.cloud.bigquery.datatransfer.v1.DeleteDataSourceDefinitionRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.bigquery.datatransfer.v1.DeleteDataSourceDefinitionRequest other) { - if (other - == com.google.cloud.bigquery.datatransfer.v1.DeleteDataSourceDefinitionRequest - .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.bigquery.datatransfer.v1.DeleteDataSourceDefinitionRequest parsedMessage = - null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.bigquery.datatransfer.v1.DeleteDataSourceDefinitionRequest) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * The field will contain name of the resource requested, for example:
-     * `projects/{project_id}/locations/{location_id}/dataSourceDefinitions/{data_source_id}`
-     * 
- * - * string name = 1; - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * The field will contain name of the resource requested, for example:
-     * `projects/{project_id}/locations/{location_id}/dataSourceDefinitions/{data_source_id}`
-     * 
- * - * string name = 1; - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * The field will contain name of the resource requested, for example:
-     * `projects/{project_id}/locations/{location_id}/dataSourceDefinitions/{data_source_id}`
-     * 
- * - * string name = 1; - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * The field will contain name of the resource requested, for example:
-     * `projects/{project_id}/locations/{location_id}/dataSourceDefinitions/{data_source_id}`
-     * 
- * - * string name = 1; - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * - * - *
-     * The field will contain name of the resource requested, for example:
-     * `projects/{project_id}/locations/{location_id}/dataSourceDefinitions/{data_source_id}`
-     * 
- * - * string name = 1; - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.bigquery.datatransfer.v1.DeleteDataSourceDefinitionRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.bigquery.datatransfer.v1.DeleteDataSourceDefinitionRequest) - private static final com.google.cloud.bigquery.datatransfer.v1.DeleteDataSourceDefinitionRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.bigquery.datatransfer.v1.DeleteDataSourceDefinitionRequest(); - } - - public static com.google.cloud.bigquery.datatransfer.v1.DeleteDataSourceDefinitionRequest - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteDataSourceDefinitionRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteDataSourceDefinitionRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.bigquery.datatransfer.v1.DeleteDataSourceDefinitionRequest - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DeleteDataSourceDefinitionRequestOrBuilder.java b/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DeleteDataSourceDefinitionRequestOrBuilder.java deleted file mode 100644 index 06ae7ab9a036..000000000000 --- a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DeleteDataSourceDefinitionRequestOrBuilder.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/bigquery/datatransfer/v1/datasource.proto - -package com.google.cloud.bigquery.datatransfer.v1; - -public interface DeleteDataSourceDefinitionRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.bigquery.datatransfer.v1.DeleteDataSourceDefinitionRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The field will contain name of the resource requested, for example:
-   * `projects/{project_id}/locations/{location_id}/dataSourceDefinitions/{data_source_id}`
-   * 
- * - * string name = 1; - */ - java.lang.String getName(); - /** - * - * - *
-   * The field will contain name of the resource requested, for example:
-   * `projects/{project_id}/locations/{location_id}/dataSourceDefinitions/{data_source_id}`
-   * 
- * - * string name = 1; - */ - com.google.protobuf.ByteString getNameBytes(); -} diff --git a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/FinishRunRequest.java b/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/FinishRunRequest.java deleted file mode 100644 index f4a817eda7d0..000000000000 --- a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/FinishRunRequest.java +++ /dev/null @@ -1,621 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/bigquery/datatransfer/v1/datasource.proto - -package com.google.cloud.bigquery.datatransfer.v1; - -/** - * - * - *
- * A request to finish a run.
- * 
- * - * Protobuf type {@code google.cloud.bigquery.datatransfer.v1.FinishRunRequest} - */ -public final class FinishRunRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.bigquery.datatransfer.v1.FinishRunRequest) - FinishRunRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use FinishRunRequest.newBuilder() to construct. - private FinishRunRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private FinishRunRequest() { - name_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private FinishRunRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_FinishRunRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_FinishRunRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.datatransfer.v1.FinishRunRequest.class, - com.google.cloud.bigquery.datatransfer.v1.FinishRunRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Name of the resource in the form:
-   * "projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}"
-   * 
- * - * string name = 1; - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Name of the resource in the form:
-   * "projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}"
-   * 
- * - * string name = 1; - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (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.bigquery.datatransfer.v1.FinishRunRequest)) { - return super.equals(obj); - } - com.google.cloud.bigquery.datatransfer.v1.FinishRunRequest other = - (com.google.cloud.bigquery.datatransfer.v1.FinishRunRequest) 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.bigquery.datatransfer.v1.FinishRunRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.datatransfer.v1.FinishRunRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.FinishRunRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.datatransfer.v1.FinishRunRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.FinishRunRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.datatransfer.v1.FinishRunRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.FinishRunRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.datatransfer.v1.FinishRunRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.FinishRunRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.datatransfer.v1.FinishRunRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.FinishRunRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.datatransfer.v1.FinishRunRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.bigquery.datatransfer.v1.FinishRunRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 request to finish a run.
-   * 
- * - * Protobuf type {@code google.cloud.bigquery.datatransfer.v1.FinishRunRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.bigquery.datatransfer.v1.FinishRunRequest) - com.google.cloud.bigquery.datatransfer.v1.FinishRunRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_FinishRunRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_FinishRunRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.datatransfer.v1.FinishRunRequest.class, - com.google.cloud.bigquery.datatransfer.v1.FinishRunRequest.Builder.class); - } - - // Construct using com.google.cloud.bigquery.datatransfer.v1.FinishRunRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.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.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_FinishRunRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.bigquery.datatransfer.v1.FinishRunRequest getDefaultInstanceForType() { - return com.google.cloud.bigquery.datatransfer.v1.FinishRunRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.bigquery.datatransfer.v1.FinishRunRequest build() { - com.google.cloud.bigquery.datatransfer.v1.FinishRunRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.bigquery.datatransfer.v1.FinishRunRequest buildPartial() { - com.google.cloud.bigquery.datatransfer.v1.FinishRunRequest result = - new com.google.cloud.bigquery.datatransfer.v1.FinishRunRequest(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.bigquery.datatransfer.v1.FinishRunRequest) { - return mergeFrom((com.google.cloud.bigquery.datatransfer.v1.FinishRunRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.bigquery.datatransfer.v1.FinishRunRequest other) { - if (other == com.google.cloud.bigquery.datatransfer.v1.FinishRunRequest.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.bigquery.datatransfer.v1.FinishRunRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.bigquery.datatransfer.v1.FinishRunRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Name of the resource in the form:
-     * "projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}"
-     * 
- * - * string name = 1; - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Name of the resource in the form:
-     * "projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}"
-     * 
- * - * string name = 1; - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Name of the resource in the form:
-     * "projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}"
-     * 
- * - * string name = 1; - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Name of the resource in the form:
-     * "projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}"
-     * 
- * - * string name = 1; - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Name of the resource in the form:
-     * "projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}"
-     * 
- * - * string name = 1; - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.bigquery.datatransfer.v1.FinishRunRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.bigquery.datatransfer.v1.FinishRunRequest) - private static final com.google.cloud.bigquery.datatransfer.v1.FinishRunRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.bigquery.datatransfer.v1.FinishRunRequest(); - } - - public static com.google.cloud.bigquery.datatransfer.v1.FinishRunRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public FinishRunRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new FinishRunRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.bigquery.datatransfer.v1.FinishRunRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/FinishRunRequestOrBuilder.java b/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/FinishRunRequestOrBuilder.java deleted file mode 100644 index 429930d0f8ad..000000000000 --- a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/FinishRunRequestOrBuilder.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/bigquery/datatransfer/v1/datasource.proto - -package com.google.cloud.bigquery.datatransfer.v1; - -public interface FinishRunRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.bigquery.datatransfer.v1.FinishRunRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Name of the resource in the form:
-   * "projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}"
-   * 
- * - * string name = 1; - */ - java.lang.String getName(); - /** - * - * - *
-   * Name of the resource in the form:
-   * "projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}"
-   * 
- * - * string name = 1; - */ - com.google.protobuf.ByteString getNameBytes(); -} diff --git a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/GetDataSourceDefinitionRequest.java b/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/GetDataSourceDefinitionRequest.java deleted file mode 100644 index 1744e902f292..000000000000 --- a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/GetDataSourceDefinitionRequest.java +++ /dev/null @@ -1,631 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/bigquery/datatransfer/v1/datasource.proto - -package com.google.cloud.bigquery.datatransfer.v1; - -/** - * - * - *
- * Represents the request of the GetDataSourceDefinition method.
- * 
- * - * Protobuf type {@code google.cloud.bigquery.datatransfer.v1.GetDataSourceDefinitionRequest} - */ -public final class GetDataSourceDefinitionRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.bigquery.datatransfer.v1.GetDataSourceDefinitionRequest) - GetDataSourceDefinitionRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetDataSourceDefinitionRequest.newBuilder() to construct. - private GetDataSourceDefinitionRequest( - com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private GetDataSourceDefinitionRequest() { - name_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private GetDataSourceDefinitionRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_GetDataSourceDefinitionRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_GetDataSourceDefinitionRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.datatransfer.v1.GetDataSourceDefinitionRequest.class, - com.google.cloud.bigquery.datatransfer.v1.GetDataSourceDefinitionRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * The field will contain name of the resource requested.
-   * 
- * - * string name = 1; - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * The field will contain name of the resource requested.
-   * 
- * - * string name = 1; - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof com.google.cloud.bigquery.datatransfer.v1.GetDataSourceDefinitionRequest)) { - return super.equals(obj); - } - com.google.cloud.bigquery.datatransfer.v1.GetDataSourceDefinitionRequest other = - (com.google.cloud.bigquery.datatransfer.v1.GetDataSourceDefinitionRequest) 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.bigquery.datatransfer.v1.GetDataSourceDefinitionRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.datatransfer.v1.GetDataSourceDefinitionRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.GetDataSourceDefinitionRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.datatransfer.v1.GetDataSourceDefinitionRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.GetDataSourceDefinitionRequest parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.datatransfer.v1.GetDataSourceDefinitionRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.GetDataSourceDefinitionRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.datatransfer.v1.GetDataSourceDefinitionRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.GetDataSourceDefinitionRequest - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.datatransfer.v1.GetDataSourceDefinitionRequest - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.GetDataSourceDefinitionRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.datatransfer.v1.GetDataSourceDefinitionRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.bigquery.datatransfer.v1.GetDataSourceDefinitionRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Represents the request of the GetDataSourceDefinition method.
-   * 
- * - * Protobuf type {@code google.cloud.bigquery.datatransfer.v1.GetDataSourceDefinitionRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.bigquery.datatransfer.v1.GetDataSourceDefinitionRequest) - com.google.cloud.bigquery.datatransfer.v1.GetDataSourceDefinitionRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_GetDataSourceDefinitionRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_GetDataSourceDefinitionRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.datatransfer.v1.GetDataSourceDefinitionRequest.class, - com.google.cloud.bigquery.datatransfer.v1.GetDataSourceDefinitionRequest.Builder - .class); - } - - // Construct using - // com.google.cloud.bigquery.datatransfer.v1.GetDataSourceDefinitionRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.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.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_GetDataSourceDefinitionRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.bigquery.datatransfer.v1.GetDataSourceDefinitionRequest - getDefaultInstanceForType() { - return com.google.cloud.bigquery.datatransfer.v1.GetDataSourceDefinitionRequest - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.bigquery.datatransfer.v1.GetDataSourceDefinitionRequest build() { - com.google.cloud.bigquery.datatransfer.v1.GetDataSourceDefinitionRequest result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.bigquery.datatransfer.v1.GetDataSourceDefinitionRequest buildPartial() { - com.google.cloud.bigquery.datatransfer.v1.GetDataSourceDefinitionRequest result = - new com.google.cloud.bigquery.datatransfer.v1.GetDataSourceDefinitionRequest(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.bigquery.datatransfer.v1.GetDataSourceDefinitionRequest) { - return mergeFrom( - (com.google.cloud.bigquery.datatransfer.v1.GetDataSourceDefinitionRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.bigquery.datatransfer.v1.GetDataSourceDefinitionRequest other) { - if (other - == com.google.cloud.bigquery.datatransfer.v1.GetDataSourceDefinitionRequest - .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.bigquery.datatransfer.v1.GetDataSourceDefinitionRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.bigquery.datatransfer.v1.GetDataSourceDefinitionRequest) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * The field will contain name of the resource requested.
-     * 
- * - * string name = 1; - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * The field will contain name of the resource requested.
-     * 
- * - * string name = 1; - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * The field will contain name of the resource requested.
-     * 
- * - * string name = 1; - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * The field will contain name of the resource requested.
-     * 
- * - * string name = 1; - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * - * - *
-     * The field will contain name of the resource requested.
-     * 
- * - * string name = 1; - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.bigquery.datatransfer.v1.GetDataSourceDefinitionRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.bigquery.datatransfer.v1.GetDataSourceDefinitionRequest) - private static final com.google.cloud.bigquery.datatransfer.v1.GetDataSourceDefinitionRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.bigquery.datatransfer.v1.GetDataSourceDefinitionRequest(); - } - - public static com.google.cloud.bigquery.datatransfer.v1.GetDataSourceDefinitionRequest - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetDataSourceDefinitionRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GetDataSourceDefinitionRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.bigquery.datatransfer.v1.GetDataSourceDefinitionRequest - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/GetDataSourceDefinitionRequestOrBuilder.java b/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/GetDataSourceDefinitionRequestOrBuilder.java deleted file mode 100644 index 50a90f6b7710..000000000000 --- a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/GetDataSourceDefinitionRequestOrBuilder.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/bigquery/datatransfer/v1/datasource.proto - -package com.google.cloud.bigquery.datatransfer.v1; - -public interface GetDataSourceDefinitionRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.bigquery.datatransfer.v1.GetDataSourceDefinitionRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The field will contain name of the resource requested.
-   * 
- * - * string name = 1; - */ - java.lang.String getName(); - /** - * - * - *
-   * The field will contain name of the resource requested.
-   * 
- * - * string name = 1; - */ - com.google.protobuf.ByteString getNameBytes(); -} diff --git a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ImportedDataInfo.java b/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ImportedDataInfo.java deleted file mode 100644 index 32e6173fd29f..000000000000 --- a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ImportedDataInfo.java +++ /dev/null @@ -1,9754 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/bigquery/datatransfer/v1/datasource.proto - -package com.google.cloud.bigquery.datatransfer.v1; - -/** - * - * - *
- * Describes data which should be imported.
- * 
- * - * Protobuf type {@code google.cloud.bigquery.datatransfer.v1.ImportedDataInfo} - */ -public final class ImportedDataInfo extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.bigquery.datatransfer.v1.ImportedDataInfo) - ImportedDataInfoOrBuilder { - private static final long serialVersionUID = 0L; - // Use ImportedDataInfo.newBuilder() to construct. - private ImportedDataInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ImportedDataInfo() { - sql_ = ""; - destinationTableId_ = ""; - destinationTableDescription_ = ""; - tableDefs_ = java.util.Collections.emptyList(); - userDefinedFunctions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - writeDisposition_ = 0; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ImportedDataInfo( - 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(); - - sql_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - destinationTableId_ = s; - break; - } - case 26: - { - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - tableDefs_ = - new java.util.ArrayList< - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo - .TableDefinition>(); - mutable_bitField0_ |= 0x00000008; - } - tableDefs_.add( - input.readMessage( - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition - .parser(), - extensionRegistry)); - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000010) != 0)) { - userDefinedFunctions_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000010; - } - userDefinedFunctions_.add(s); - break; - } - case 48: - { - int rawValue = input.readEnum(); - - writeDisposition_ = rawValue; - break; - } - case 82: - { - java.lang.String s = input.readStringRequireUtf8(); - - destinationTableDescription_ = 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_ & 0x00000008) != 0)) { - tableDefs_ = java.util.Collections.unmodifiableList(tableDefs_); - } - if (((mutable_bitField0_ & 0x00000010) != 0)) { - userDefinedFunctions_ = userDefinedFunctions_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_ImportedDataInfo_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_ImportedDataInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.class, - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.Builder.class); - } - - /** - * - * - *
-   * Data format.
-   * 
- * - * Protobuf enum {@code google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.Format} - */ - public enum Format implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * Unspecified format. In this case, we have to infer the format from the
-     * data source.
-     * 
- * - * FORMAT_UNSPECIFIED = 0; - */ - FORMAT_UNSPECIFIED(0), - /** - * - * - *
-     * CSV format.
-     * 
- * - * CSV = 1; - */ - CSV(1), - /** - * - * - *
-     * Newline-delimited JSON.
-     * 
- * - * JSON = 2; - */ - JSON(2), - /** - * - * - *
-     * Avro format. See http://avro.apache.org .
-     * 
- * - * AVRO = 3; - */ - AVRO(3), - /** - * - * - *
-     * RecordIO.
-     * 
- * - * RECORDIO = 4; - */ - RECORDIO(4), - /** - * - * - *
-     * ColumnIO.
-     * 
- * - * COLUMNIO = 5; - */ - COLUMNIO(5), - /** - * - * - *
-     * Capacitor.
-     * 
- * - * CAPACITOR = 6; - */ - CAPACITOR(6), - /** - * - * - *
-     * Parquet format. See https://parquet.apache.org .
-     * 
- * - * PARQUET = 7; - */ - PARQUET(7), - /** - * - * - *
-     * ORC format. See https://orc.apache.org .
-     * 
- * - * ORC = 8; - */ - ORC(8), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * Unspecified format. In this case, we have to infer the format from the
-     * data source.
-     * 
- * - * FORMAT_UNSPECIFIED = 0; - */ - public static final int FORMAT_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * CSV format.
-     * 
- * - * CSV = 1; - */ - public static final int CSV_VALUE = 1; - /** - * - * - *
-     * Newline-delimited JSON.
-     * 
- * - * JSON = 2; - */ - public static final int JSON_VALUE = 2; - /** - * - * - *
-     * Avro format. See http://avro.apache.org .
-     * 
- * - * AVRO = 3; - */ - public static final int AVRO_VALUE = 3; - /** - * - * - *
-     * RecordIO.
-     * 
- * - * RECORDIO = 4; - */ - public static final int RECORDIO_VALUE = 4; - /** - * - * - *
-     * ColumnIO.
-     * 
- * - * COLUMNIO = 5; - */ - public static final int COLUMNIO_VALUE = 5; - /** - * - * - *
-     * Capacitor.
-     * 
- * - * CAPACITOR = 6; - */ - public static final int CAPACITOR_VALUE = 6; - /** - * - * - *
-     * Parquet format. See https://parquet.apache.org .
-     * 
- * - * PARQUET = 7; - */ - public static final int PARQUET_VALUE = 7; - /** - * - * - *
-     * ORC format. See https://orc.apache.org .
-     * 
- * - * ORC = 8; - */ - public static final int ORC_VALUE = 8; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** @deprecated Use {@link #forNumber(int)} instead. */ - @java.lang.Deprecated - public static Format valueOf(int value) { - return forNumber(value); - } - - public static Format forNumber(int value) { - switch (value) { - case 0: - return FORMAT_UNSPECIFIED; - case 1: - return CSV; - case 2: - return JSON; - case 3: - return AVRO; - case 4: - return RECORDIO; - case 5: - return COLUMNIO; - case 6: - return CAPACITOR; - case 7: - return PARQUET; - case 8: - return ORC; - 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 Format findValueByNumber(int number) { - return Format.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.bigquery.datatransfer.v1.ImportedDataInfo.getDescriptor() - .getEnumTypes() - .get(0); - } - - private static final Format[] VALUES = values(); - - public static Format 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 Format(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.Format) - } - - /** - * - * - *
-   * Encoding of input data in CSV/JSON format.
-   * 
- * - * Protobuf enum {@code google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.Encoding} - */ - public enum Encoding implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * Default encoding (UTF8).
-     * 
- * - * ENCODING_UNSPECIFIED = 0; - */ - ENCODING_UNSPECIFIED(0), - /** - * - * - *
-     * ISO_8859_1 encoding.
-     * 
- * - * ISO_8859_1 = 1; - */ - ISO_8859_1(1), - /** - * - * - *
-     * UTF8 encoding.
-     * 
- * - * UTF8 = 2; - */ - UTF8(2), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * Default encoding (UTF8).
-     * 
- * - * ENCODING_UNSPECIFIED = 0; - */ - public static final int ENCODING_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * ISO_8859_1 encoding.
-     * 
- * - * ISO_8859_1 = 1; - */ - public static final int ISO_8859_1_VALUE = 1; - /** - * - * - *
-     * UTF8 encoding.
-     * 
- * - * UTF8 = 2; - */ - public static final int UTF8_VALUE = 2; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** @deprecated Use {@link #forNumber(int)} instead. */ - @java.lang.Deprecated - public static Encoding valueOf(int value) { - return forNumber(value); - } - - public static Encoding forNumber(int value) { - switch (value) { - case 0: - return ENCODING_UNSPECIFIED; - case 1: - return ISO_8859_1; - case 2: - return UTF8; - 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 Encoding findValueByNumber(int number) { - return Encoding.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.bigquery.datatransfer.v1.ImportedDataInfo.getDescriptor() - .getEnumTypes() - .get(1); - } - - private static final Encoding[] VALUES = values(); - - public static Encoding 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 Encoding(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.Encoding) - } - - public interface FieldSchemaOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * Field name. Matches: [A-Za-z_][A-Za-z_0-9]{0,127}
-     * 
- * - * string field_name = 1; - */ - java.lang.String getFieldName(); - /** - * - * - *
-     * Field name. Matches: [A-Za-z_][A-Za-z_0-9]{0,127}
-     * 
- * - * string field_name = 1; - */ - com.google.protobuf.ByteString getFieldNameBytes(); - - /** - * - * - *
-     * Field type
-     * 
- * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema.Type type = 2; - * - */ - int getTypeValue(); - /** - * - * - *
-     * Field type
-     * 
- * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema.Type type = 2; - * - */ - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema.Type getType(); - - /** - * - * - *
-     * Is field repeated.
-     * 
- * - * bool is_repeated = 3; - */ - boolean getIsRepeated(); - - /** - * - * - *
-     * Description for this field.
-     * 
- * - * string description = 4; - */ - java.lang.String getDescription(); - /** - * - * - *
-     * Description for this field.
-     * 
- * - * string description = 4; - */ - com.google.protobuf.ByteString getDescriptionBytes(); - - /** - * - * - *
-     * Present iff type == RECORD.
-     * 
- * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema schema = 5; - */ - boolean hasSchema(); - /** - * - * - *
-     * Present iff type == RECORD.
-     * 
- * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema schema = 5; - */ - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema getSchema(); - /** - * - * - *
-     * Present iff type == RECORD.
-     * 
- * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema schema = 5; - */ - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchemaOrBuilder - getSchemaOrBuilder(); - } - /** - * - * - *
-   * Defines schema of a field in the imported data.
-   * 
- * - * Protobuf type {@code google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema} - */ - public static final class FieldSchema extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema) - FieldSchemaOrBuilder { - private static final long serialVersionUID = 0L; - // Use FieldSchema.newBuilder() to construct. - private FieldSchema(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private FieldSchema() { - fieldName_ = ""; - type_ = 0; - description_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private FieldSchema( - 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(); - - fieldName_ = s; - break; - } - case 16: - { - int rawValue = input.readEnum(); - - type_ = rawValue; - break; - } - case 24: - { - isRepeated_ = input.readBool(); - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - case 42: - { - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema.Builder - subBuilder = null; - if (schema_ != null) { - subBuilder = schema_.toBuilder(); - } - schema_ = - input.readMessage( - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(schema_); - schema_ = 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.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_ImportedDataInfo_FieldSchema_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_ImportedDataInfo_FieldSchema_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema.class, - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema.Builder.class); - } - - /** - * - * - *
-     * LINT.IfChange
-     * Field type.
-     * 
- * - * Protobuf enum {@code google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema.Type} - */ - public enum Type implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-       * Illegal value.
-       * 
- * - * TYPE_UNSPECIFIED = 0; - */ - TYPE_UNSPECIFIED(0), - /** - * - * - *
-       * 64K, UTF8.
-       * 
- * - * STRING = 1; - */ - STRING(1), - /** - * - * - *
-       * 64-bit signed.
-       * 
- * - * INTEGER = 2; - */ - INTEGER(2), - /** - * - * - *
-       * 64-bit IEEE floating point.
-       * 
- * - * FLOAT = 3; - */ - FLOAT(3), - /** - * - * - *
-       * Aggregate type.
-       * 
- * - * RECORD = 4; - */ - RECORD(4), - /** - * - * - *
-       * 64K, Binary.
-       * 
- * - * BYTES = 5; - */ - BYTES(5), - /** - * - * - *
-       * 2-valued.
-       * 
- * - * BOOLEAN = 6; - */ - BOOLEAN(6), - /** - * - * - *
-       * 64-bit signed usec since UTC epoch.
-       * 
- * - * TIMESTAMP = 7; - */ - TIMESTAMP(7), - /** - * - * - *
-       * Civil date - Year, Month, Day.
-       * 
- * - * DATE = 8; - */ - DATE(8), - /** - * - * - *
-       * Civil time - Hour, Minute, Second, Microseconds.
-       * 
- * - * TIME = 9; - */ - TIME(9), - /** - * - * - *
-       * Combination of civil date and civil time.
-       * 
- * - * DATETIME = 10; - */ - DATETIME(10), - /** - * - * - *
-       * Numeric type with 38 decimal digits of precision and 9 decimal digits
-       * of scale.
-       * 
- * - * NUMERIC = 11; - */ - NUMERIC(11), - /** - * - * - *
-       * Geography object (go/googlesql_geography).
-       * 
- * - * GEOGRAPHY = 12; - */ - GEOGRAPHY(12), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-       * Illegal value.
-       * 
- * - * TYPE_UNSPECIFIED = 0; - */ - public static final int TYPE_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-       * 64K, UTF8.
-       * 
- * - * STRING = 1; - */ - public static final int STRING_VALUE = 1; - /** - * - * - *
-       * 64-bit signed.
-       * 
- * - * INTEGER = 2; - */ - public static final int INTEGER_VALUE = 2; - /** - * - * - *
-       * 64-bit IEEE floating point.
-       * 
- * - * FLOAT = 3; - */ - public static final int FLOAT_VALUE = 3; - /** - * - * - *
-       * Aggregate type.
-       * 
- * - * RECORD = 4; - */ - public static final int RECORD_VALUE = 4; - /** - * - * - *
-       * 64K, Binary.
-       * 
- * - * BYTES = 5; - */ - public static final int BYTES_VALUE = 5; - /** - * - * - *
-       * 2-valued.
-       * 
- * - * BOOLEAN = 6; - */ - public static final int BOOLEAN_VALUE = 6; - /** - * - * - *
-       * 64-bit signed usec since UTC epoch.
-       * 
- * - * TIMESTAMP = 7; - */ - public static final int TIMESTAMP_VALUE = 7; - /** - * - * - *
-       * Civil date - Year, Month, Day.
-       * 
- * - * DATE = 8; - */ - public static final int DATE_VALUE = 8; - /** - * - * - *
-       * Civil time - Hour, Minute, Second, Microseconds.
-       * 
- * - * TIME = 9; - */ - public static final int TIME_VALUE = 9; - /** - * - * - *
-       * Combination of civil date and civil time.
-       * 
- * - * DATETIME = 10; - */ - public static final int DATETIME_VALUE = 10; - /** - * - * - *
-       * Numeric type with 38 decimal digits of precision and 9 decimal digits
-       * of scale.
-       * 
- * - * NUMERIC = 11; - */ - public static final int NUMERIC_VALUE = 11; - /** - * - * - *
-       * Geography object (go/googlesql_geography).
-       * 
- * - * GEOGRAPHY = 12; - */ - public static final int GEOGRAPHY_VALUE = 12; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** @deprecated Use {@link #forNumber(int)} instead. */ - @java.lang.Deprecated - public static Type valueOf(int value) { - return forNumber(value); - } - - public static Type forNumber(int value) { - switch (value) { - case 0: - return TYPE_UNSPECIFIED; - case 1: - return STRING; - case 2: - return INTEGER; - case 3: - return FLOAT; - case 4: - return RECORD; - case 5: - return BYTES; - case 6: - return BOOLEAN; - case 7: - return TIMESTAMP; - case 8: - return DATE; - case 9: - return TIME; - case 10: - return DATETIME; - case 11: - return NUMERIC; - case 12: - return GEOGRAPHY; - 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 Type findValueByNumber(int number) { - return Type.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.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema - .getDescriptor() - .getEnumTypes() - .get(0); - } - - private static final Type[] VALUES = values(); - - public static Type 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 Type(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema.Type) - } - - public static final int FIELD_NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object fieldName_; - /** - * - * - *
-     * Field name. Matches: [A-Za-z_][A-Za-z_0-9]{0,127}
-     * 
- * - * string field_name = 1; - */ - public java.lang.String getFieldName() { - java.lang.Object ref = fieldName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - fieldName_ = s; - return s; - } - } - /** - * - * - *
-     * Field name. Matches: [A-Za-z_][A-Za-z_0-9]{0,127}
-     * 
- * - * string field_name = 1; - */ - public com.google.protobuf.ByteString getFieldNameBytes() { - java.lang.Object ref = fieldName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - fieldName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TYPE_FIELD_NUMBER = 2; - private int type_; - /** - * - * - *
-     * Field type
-     * 
- * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema.Type type = 2; - * - */ - public int getTypeValue() { - return type_; - } - /** - * - * - *
-     * Field type
-     * 
- * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema.Type type = 2; - * - */ - public com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema.Type getType() { - @SuppressWarnings("deprecation") - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema.Type result = - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema.Type.valueOf( - type_); - return result == null - ? com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema.Type.UNRECOGNIZED - : result; - } - - public static final int IS_REPEATED_FIELD_NUMBER = 3; - private boolean isRepeated_; - /** - * - * - *
-     * Is field repeated.
-     * 
- * - * bool is_repeated = 3; - */ - public boolean getIsRepeated() { - return isRepeated_; - } - - public static final int DESCRIPTION_FIELD_NUMBER = 4; - private volatile java.lang.Object description_; - /** - * - * - *
-     * Description for this field.
-     * 
- * - * string description = 4; - */ - 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; - } - } - /** - * - * - *
-     * Description for this field.
-     * 
- * - * string description = 4; - */ - 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 SCHEMA_FIELD_NUMBER = 5; - private com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema schema_; - /** - * - * - *
-     * Present iff type == RECORD.
-     * 
- * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema schema = 5; - */ - public boolean hasSchema() { - return schema_ != null; - } - /** - * - * - *
-     * Present iff type == RECORD.
-     * 
- * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema schema = 5; - */ - public com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema getSchema() { - return schema_ == null - ? com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema - .getDefaultInstance() - : schema_; - } - /** - * - * - *
-     * Present iff type == RECORD.
-     * 
- * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema schema = 5; - */ - public com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchemaOrBuilder - getSchemaOrBuilder() { - return getSchema(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getFieldNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, fieldName_); - } - if (type_ - != com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema.Type - .TYPE_UNSPECIFIED - .getNumber()) { - output.writeEnum(2, type_); - } - if (isRepeated_ != false) { - output.writeBool(3, isRepeated_); - } - if (!getDescriptionBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, description_); - } - if (schema_ != null) { - output.writeMessage(5, getSchema()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getFieldNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, fieldName_); - } - if (type_ - != com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema.Type - .TYPE_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, type_); - } - if (isRepeated_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, isRepeated_); - } - if (!getDescriptionBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, description_); - } - if (schema_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getSchema()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema)) { - return super.equals(obj); - } - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema other = - (com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema) obj; - - if (!getFieldName().equals(other.getFieldName())) return false; - if (type_ != other.type_) return false; - if (getIsRepeated() != other.getIsRepeated()) return false; - if (!getDescription().equals(other.getDescription())) return false; - if (hasSchema() != other.hasSchema()) return false; - if (hasSchema()) { - if (!getSchema().equals(other.getSchema())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + FIELD_NAME_FIELD_NUMBER; - hash = (53 * hash) + getFieldName().hashCode(); - hash = (37 * hash) + TYPE_FIELD_NUMBER; - hash = (53 * hash) + type_; - hash = (37 * hash) + IS_REPEATED_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsRepeated()); - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - if (hasSchema()) { - hash = (37 * hash) + SCHEMA_FIELD_NUMBER; - hash = (53 * hash) + getSchema().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-     * Defines schema of a field in the imported data.
-     * 
- * - * Protobuf type {@code google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema) - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchemaOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_ImportedDataInfo_FieldSchema_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_ImportedDataInfo_FieldSchema_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema.class, - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema.Builder - .class); - } - - // Construct using - // com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - fieldName_ = ""; - - type_ = 0; - - isRepeated_ = false; - - description_ = ""; - - if (schemaBuilder_ == null) { - schema_ = null; - } else { - schema_ = null; - schemaBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_ImportedDataInfo_FieldSchema_descriptor; - } - - @java.lang.Override - public com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema - getDefaultInstanceForType() { - return com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema build() { - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema buildPartial() { - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema result = - new com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema(this); - result.fieldName_ = fieldName_; - result.type_ = type_; - result.isRepeated_ = isRepeated_; - result.description_ = description_; - if (schemaBuilder_ == null) { - result.schema_ = schema_; - } else { - result.schema_ = schemaBuilder_.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.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema) { - return mergeFrom( - (com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema other) { - if (other - == com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema - .getDefaultInstance()) return this; - if (!other.getFieldName().isEmpty()) { - fieldName_ = other.fieldName_; - onChanged(); - } - if (other.type_ != 0) { - setTypeValue(other.getTypeValue()); - } - if (other.getIsRepeated() != false) { - setIsRepeated(other.getIsRepeated()); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - if (other.hasSchema()) { - mergeSchema(other.getSchema()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object fieldName_ = ""; - /** - * - * - *
-       * Field name. Matches: [A-Za-z_][A-Za-z_0-9]{0,127}
-       * 
- * - * string field_name = 1; - */ - public java.lang.String getFieldName() { - java.lang.Object ref = fieldName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - fieldName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-       * Field name. Matches: [A-Za-z_][A-Za-z_0-9]{0,127}
-       * 
- * - * string field_name = 1; - */ - public com.google.protobuf.ByteString getFieldNameBytes() { - java.lang.Object ref = fieldName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - fieldName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-       * Field name. Matches: [A-Za-z_][A-Za-z_0-9]{0,127}
-       * 
- * - * string field_name = 1; - */ - public Builder setFieldName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - fieldName_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * Field name. Matches: [A-Za-z_][A-Za-z_0-9]{0,127}
-       * 
- * - * string field_name = 1; - */ - public Builder clearFieldName() { - - fieldName_ = getDefaultInstance().getFieldName(); - onChanged(); - return this; - } - /** - * - * - *
-       * Field name. Matches: [A-Za-z_][A-Za-z_0-9]{0,127}
-       * 
- * - * string field_name = 1; - */ - public Builder setFieldNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - fieldName_ = value; - onChanged(); - return this; - } - - private int type_ = 0; - /** - * - * - *
-       * Field type
-       * 
- * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema.Type type = 2; - * - */ - public int getTypeValue() { - return type_; - } - /** - * - * - *
-       * Field type
-       * 
- * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema.Type type = 2; - * - */ - public Builder setTypeValue(int value) { - type_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * Field type
-       * 
- * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema.Type type = 2; - * - */ - public com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema.Type getType() { - @SuppressWarnings("deprecation") - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema.Type result = - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema.Type.valueOf( - type_); - return result == null - ? com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema.Type - .UNRECOGNIZED - : result; - } - /** - * - * - *
-       * Field type
-       * 
- * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema.Type type = 2; - * - */ - public Builder setType( - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema.Type value) { - if (value == null) { - throw new NullPointerException(); - } - - type_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-       * Field type
-       * 
- * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema.Type type = 2; - * - */ - public Builder clearType() { - - type_ = 0; - onChanged(); - return this; - } - - private boolean isRepeated_; - /** - * - * - *
-       * Is field repeated.
-       * 
- * - * bool is_repeated = 3; - */ - public boolean getIsRepeated() { - return isRepeated_; - } - /** - * - * - *
-       * Is field repeated.
-       * 
- * - * bool is_repeated = 3; - */ - public Builder setIsRepeated(boolean value) { - - isRepeated_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * Is field repeated.
-       * 
- * - * bool is_repeated = 3; - */ - public Builder clearIsRepeated() { - - isRepeated_ = false; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - * - * - *
-       * Description for this field.
-       * 
- * - * string description = 4; - */ - 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; - } - } - /** - * - * - *
-       * Description for this field.
-       * 
- * - * string description = 4; - */ - 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; - } - } - /** - * - * - *
-       * Description for this field.
-       * 
- * - * string description = 4; - */ - public Builder setDescription(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - description_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * Description for this field.
-       * 
- * - * string description = 4; - */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - * - * - *
-       * Description for this field.
-       * 
- * - * string description = 4; - */ - public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - description_ = value; - onChanged(); - return this; - } - - private com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema schema_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema, - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema.Builder, - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchemaOrBuilder> - schemaBuilder_; - /** - * - * - *
-       * Present iff type == RECORD.
-       * 
- * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema schema = 5; - * - */ - public boolean hasSchema() { - return schemaBuilder_ != null || schema_ != null; - } - /** - * - * - *
-       * Present iff type == RECORD.
-       * 
- * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema schema = 5; - * - */ - public com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema getSchema() { - if (schemaBuilder_ == null) { - return schema_ == null - ? com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema - .getDefaultInstance() - : schema_; - } else { - return schemaBuilder_.getMessage(); - } - } - /** - * - * - *
-       * Present iff type == RECORD.
-       * 
- * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema schema = 5; - * - */ - public Builder setSchema( - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema value) { - if (schemaBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - schema_ = value; - onChanged(); - } else { - schemaBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-       * Present iff type == RECORD.
-       * 
- * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema schema = 5; - * - */ - public Builder setSchema( - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema.Builder - builderForValue) { - if (schemaBuilder_ == null) { - schema_ = builderForValue.build(); - onChanged(); - } else { - schemaBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-       * Present iff type == RECORD.
-       * 
- * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema schema = 5; - * - */ - public Builder mergeSchema( - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema value) { - if (schemaBuilder_ == null) { - if (schema_ != null) { - schema_ = - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema.newBuilder( - schema_) - .mergeFrom(value) - .buildPartial(); - } else { - schema_ = value; - } - onChanged(); - } else { - schemaBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-       * Present iff type == RECORD.
-       * 
- * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema schema = 5; - * - */ - public Builder clearSchema() { - if (schemaBuilder_ == null) { - schema_ = null; - onChanged(); - } else { - schema_ = null; - schemaBuilder_ = null; - } - - return this; - } - /** - * - * - *
-       * Present iff type == RECORD.
-       * 
- * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema schema = 5; - * - */ - public com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema.Builder - getSchemaBuilder() { - - onChanged(); - return getSchemaFieldBuilder().getBuilder(); - } - /** - * - * - *
-       * Present iff type == RECORD.
-       * 
- * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema schema = 5; - * - */ - public com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchemaOrBuilder - getSchemaOrBuilder() { - if (schemaBuilder_ != null) { - return schemaBuilder_.getMessageOrBuilder(); - } else { - return schema_ == null - ? com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema - .getDefaultInstance() - : schema_; - } - } - /** - * - * - *
-       * Present iff type == RECORD.
-       * 
- * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema schema = 5; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema, - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema.Builder, - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchemaOrBuilder> - getSchemaFieldBuilder() { - if (schemaBuilder_ == null) { - schemaBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema, - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema.Builder, - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchemaOrBuilder>( - getSchema(), getParentForChildren(), isClean()); - schema_ = null; - } - return schemaBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema) - } - - // @@protoc_insertion_point(class_scope:google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema) - private static final com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema(); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public FieldSchema parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new FieldSchema(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public interface RecordSchemaOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * One field per column in the record.
-     * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema fields = 1; - * - */ - java.util.List - getFieldsList(); - /** - * - * - *
-     * One field per column in the record.
-     * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema fields = 1; - * - */ - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema getFields(int index); - /** - * - * - *
-     * One field per column in the record.
-     * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema fields = 1; - * - */ - int getFieldsCount(); - /** - * - * - *
-     * One field per column in the record.
-     * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema fields = 1; - * - */ - java.util.List< - ? extends - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchemaOrBuilder> - getFieldsOrBuilderList(); - /** - * - * - *
-     * One field per column in the record.
-     * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema fields = 1; - * - */ - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchemaOrBuilder - getFieldsOrBuilder(int index); - } - /** - * - * - *
-   * Describes schema of the data to be ingested.
-   * 
- * - * Protobuf type {@code google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema} - */ - public static final class RecordSchema extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema) - RecordSchemaOrBuilder { - private static final long serialVersionUID = 0L; - // Use RecordSchema.newBuilder() to construct. - private RecordSchema(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private RecordSchema() { - fields_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private RecordSchema( - 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_ = - new java.util.ArrayList< - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema>(); - mutable_bitField0_ |= 0x00000001; - } - fields_.add( - input.readMessage( - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema - .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)) { - fields_ = java.util.Collections.unmodifiableList(fields_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_ImportedDataInfo_RecordSchema_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_ImportedDataInfo_RecordSchema_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema.class, - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema.Builder - .class); - } - - public static final int FIELDS_FIELD_NUMBER = 1; - private java.util.List - fields_; - /** - * - * - *
-     * One field per column in the record.
-     * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema fields = 1; - * - */ - public java.util.List - getFieldsList() { - return fields_; - } - /** - * - * - *
-     * One field per column in the record.
-     * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema fields = 1; - * - */ - public java.util.List< - ? extends - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchemaOrBuilder> - getFieldsOrBuilderList() { - return fields_; - } - /** - * - * - *
-     * One field per column in the record.
-     * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema fields = 1; - * - */ - public int getFieldsCount() { - return fields_.size(); - } - /** - * - * - *
-     * One field per column in the record.
-     * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema fields = 1; - * - */ - public com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema getFields( - int index) { - return fields_.get(index); - } - /** - * - * - *
-     * One field per column in the record.
-     * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema fields = 1; - * - */ - public com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchemaOrBuilder - getFieldsOrBuilder(int index) { - return fields_.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 < fields_.size(); i++) { - output.writeMessage(1, fields_.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 < fields_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, fields_.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.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema)) { - return super.equals(obj); - } - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema other = - (com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema) obj; - - if (!getFieldsList().equals(other.getFieldsList())) return false; - if (!unknownFields.equals(other.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 (getFieldsCount() > 0) { - hash = (37 * hash) + FIELDS_FIELD_NUMBER; - hash = (53 * hash) + getFieldsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 schema of the data to be ingested.
-     * 
- * - * Protobuf type {@code google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema) - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchemaOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_ImportedDataInfo_RecordSchema_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_ImportedDataInfo_RecordSchema_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema.class, - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema.Builder - .class); - } - - // Construct using - // com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getFieldsFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (fieldsBuilder_ == null) { - fields_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - fieldsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_ImportedDataInfo_RecordSchema_descriptor; - } - - @java.lang.Override - public com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema - getDefaultInstanceForType() { - return com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema build() { - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema - buildPartial() { - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema result = - new com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema(this); - int from_bitField0_ = bitField0_; - if (fieldsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - fields_ = java.util.Collections.unmodifiableList(fields_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.fields_ = fields_; - } else { - result.fields_ = fieldsBuilder_.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.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema) { - return mergeFrom( - (com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema other) { - if (other - == com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema - .getDefaultInstance()) return this; - if (fieldsBuilder_ == null) { - if (!other.fields_.isEmpty()) { - if (fields_.isEmpty()) { - fields_ = other.fields_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureFieldsIsMutable(); - fields_.addAll(other.fields_); - } - onChanged(); - } - } else { - if (!other.fields_.isEmpty()) { - if (fieldsBuilder_.isEmpty()) { - fieldsBuilder_.dispose(); - fieldsBuilder_ = null; - fields_ = other.fields_; - bitField0_ = (bitField0_ & ~0x00000001); - fieldsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getFieldsFieldBuilder() - : null; - } else { - fieldsBuilder_.addAllMessages(other.fields_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema parsedMessage = - null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.util.List - fields_ = java.util.Collections.emptyList(); - - private void ensureFieldsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - fields_ = - new java.util.ArrayList< - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema>(fields_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema, - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema.Builder, - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchemaOrBuilder> - fieldsBuilder_; - - /** - * - * - *
-       * One field per column in the record.
-       * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema fields = 1; - * - */ - public java.util.List - getFieldsList() { - if (fieldsBuilder_ == null) { - return java.util.Collections.unmodifiableList(fields_); - } else { - return fieldsBuilder_.getMessageList(); - } - } - /** - * - * - *
-       * One field per column in the record.
-       * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema fields = 1; - * - */ - public int getFieldsCount() { - if (fieldsBuilder_ == null) { - return fields_.size(); - } else { - return fieldsBuilder_.getCount(); - } - } - /** - * - * - *
-       * One field per column in the record.
-       * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema fields = 1; - * - */ - public com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema getFields( - int index) { - if (fieldsBuilder_ == null) { - return fields_.get(index); - } else { - return fieldsBuilder_.getMessage(index); - } - } - /** - * - * - *
-       * One field per column in the record.
-       * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema fields = 1; - * - */ - public Builder setFields( - int index, com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema value) { - if (fieldsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFieldsIsMutable(); - fields_.set(index, value); - onChanged(); - } else { - fieldsBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-       * One field per column in the record.
-       * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema fields = 1; - * - */ - public Builder setFields( - int index, - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema.Builder - builderForValue) { - if (fieldsBuilder_ == null) { - ensureFieldsIsMutable(); - fields_.set(index, builderForValue.build()); - onChanged(); - } else { - fieldsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-       * One field per column in the record.
-       * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema fields = 1; - * - */ - public Builder addFields( - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema value) { - if (fieldsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFieldsIsMutable(); - fields_.add(value); - onChanged(); - } else { - fieldsBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-       * One field per column in the record.
-       * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema fields = 1; - * - */ - public Builder addFields( - int index, com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema value) { - if (fieldsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFieldsIsMutable(); - fields_.add(index, value); - onChanged(); - } else { - fieldsBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-       * One field per column in the record.
-       * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema fields = 1; - * - */ - public Builder addFields( - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema.Builder - builderForValue) { - if (fieldsBuilder_ == null) { - ensureFieldsIsMutable(); - fields_.add(builderForValue.build()); - onChanged(); - } else { - fieldsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-       * One field per column in the record.
-       * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema fields = 1; - * - */ - public Builder addFields( - int index, - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema.Builder - builderForValue) { - if (fieldsBuilder_ == null) { - ensureFieldsIsMutable(); - fields_.add(index, builderForValue.build()); - onChanged(); - } else { - fieldsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-       * One field per column in the record.
-       * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema fields = 1; - * - */ - public Builder addAllFields( - java.lang.Iterable< - ? extends com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema> - values) { - if (fieldsBuilder_ == null) { - ensureFieldsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, fields_); - onChanged(); - } else { - fieldsBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-       * One field per column in the record.
-       * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema fields = 1; - * - */ - public Builder clearFields() { - if (fieldsBuilder_ == null) { - fields_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - fieldsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-       * One field per column in the record.
-       * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema fields = 1; - * - */ - public Builder removeFields(int index) { - if (fieldsBuilder_ == null) { - ensureFieldsIsMutable(); - fields_.remove(index); - onChanged(); - } else { - fieldsBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-       * One field per column in the record.
-       * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema fields = 1; - * - */ - public com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema.Builder - getFieldsBuilder(int index) { - return getFieldsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-       * One field per column in the record.
-       * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema fields = 1; - * - */ - public com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchemaOrBuilder - getFieldsOrBuilder(int index) { - if (fieldsBuilder_ == null) { - return fields_.get(index); - } else { - return fieldsBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-       * One field per column in the record.
-       * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema fields = 1; - * - */ - public java.util.List< - ? extends - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchemaOrBuilder> - getFieldsOrBuilderList() { - if (fieldsBuilder_ != null) { - return fieldsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(fields_); - } - } - /** - * - * - *
-       * One field per column in the record.
-       * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema fields = 1; - * - */ - public com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema.Builder - addFieldsBuilder() { - return getFieldsFieldBuilder() - .addBuilder( - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema - .getDefaultInstance()); - } - /** - * - * - *
-       * One field per column in the record.
-       * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema fields = 1; - * - */ - public com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema.Builder - addFieldsBuilder(int index) { - return getFieldsFieldBuilder() - .addBuilder( - index, - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema - .getDefaultInstance()); - } - /** - * - * - *
-       * One field per column in the record.
-       * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema fields = 1; - * - */ - public java.util.List< - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema.Builder> - getFieldsBuilderList() { - return getFieldsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema, - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema.Builder, - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchemaOrBuilder> - getFieldsFieldBuilder() { - if (fieldsBuilder_ == null) { - fieldsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema, - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema.Builder, - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchemaOrBuilder>( - fields_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - fields_ = null; - } - return fieldsBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema) - } - - // @@protoc_insertion_point(class_scope:google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema) - private static final com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema(); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RecordSchema parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new RecordSchema(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public interface TableDefinitionOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * BigQuery table_id (required). This will be used to reference this
-     * table in the query.
-     * 
- * - * string table_id = 1; - */ - java.lang.String getTableId(); - /** - * - * - *
-     * BigQuery table_id (required). This will be used to reference this
-     * table in the query.
-     * 
- * - * string table_id = 1; - */ - com.google.protobuf.ByteString getTableIdBytes(); - - /** - * - * - *
-     * URIs for the data to be imported. All URIs must be from the same storage
-     * system.
-     * 
- * - * repeated string source_uris = 2; - */ - java.util.List getSourceUrisList(); - /** - * - * - *
-     * URIs for the data to be imported. All URIs must be from the same storage
-     * system.
-     * 
- * - * repeated string source_uris = 2; - */ - int getSourceUrisCount(); - /** - * - * - *
-     * URIs for the data to be imported. All URIs must be from the same storage
-     * system.
-     * 
- * - * repeated string source_uris = 2; - */ - java.lang.String getSourceUris(int index); - /** - * - * - *
-     * URIs for the data to be imported. All URIs must be from the same storage
-     * system.
-     * 
- * - * repeated string source_uris = 2; - */ - com.google.protobuf.ByteString getSourceUrisBytes(int index); - - /** - * - * - *
-     * Describes the format of the data in source_uri.
-     * 
- * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.Format format = 3; - */ - int getFormatValue(); - /** - * - * - *
-     * Describes the format of the data in source_uri.
-     * 
- * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.Format format = 3; - */ - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.Format getFormat(); - - /** - * - * - *
-     * Specify the maximum number of bad records that can be ignored.
-     * If bad records exceed this threshold the query is aborted.
-     * 
- * - * int32 max_bad_records = 4; - */ - int getMaxBadRecords(); - - /** - * - * - *
-     * Character encoding of the input when applicable (CSV, JSON).
-     * Defaults to UTF8.
-     * 
- * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.Encoding encoding = 5; - */ - int getEncodingValue(); - /** - * - * - *
-     * Character encoding of the input when applicable (CSV, JSON).
-     * Defaults to UTF8.
-     * 
- * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.Encoding encoding = 5; - */ - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.Encoding getEncoding(); - - /** - * - * - *
-     * CSV specific options.
-     * 
- * - * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition.CsvOptions csv_options = 6; - * - */ - boolean hasCsvOptions(); - /** - * - * - *
-     * CSV specific options.
-     * 
- * - * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition.CsvOptions csv_options = 6; - * - */ - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition.CsvOptions - getCsvOptions(); - /** - * - * - *
-     * CSV specific options.
-     * 
- * - * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition.CsvOptions csv_options = 6; - * - */ - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition.CsvOptionsOrBuilder - getCsvOptionsOrBuilder(); - - /** - * - * - *
-     * Optional schema for the data. When not specified for JSON and CSV formats
-     * we will try to detect it automatically.
-     * 
- * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema schema = 7; - */ - boolean hasSchema(); - /** - * - * - *
-     * Optional schema for the data. When not specified for JSON and CSV formats
-     * we will try to detect it automatically.
-     * 
- * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema schema = 7; - */ - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema getSchema(); - /** - * - * - *
-     * Optional schema for the data. When not specified for JSON and CSV formats
-     * we will try to detect it automatically.
-     * 
- * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema schema = 7; - */ - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchemaOrBuilder - getSchemaOrBuilder(); - - /** - * - * - *
-     * Indicates if extra values that are not represented in the table schema is
-     * allowed.
-     * 
- * - * .google.protobuf.BoolValue ignore_unknown_values = 10; - */ - boolean hasIgnoreUnknownValues(); - /** - * - * - *
-     * Indicates if extra values that are not represented in the table schema is
-     * allowed.
-     * 
- * - * .google.protobuf.BoolValue ignore_unknown_values = 10; - */ - com.google.protobuf.BoolValue getIgnoreUnknownValues(); - /** - * - * - *
-     * Indicates if extra values that are not represented in the table schema is
-     * allowed.
-     * 
- * - * .google.protobuf.BoolValue ignore_unknown_values = 10; - */ - com.google.protobuf.BoolValueOrBuilder getIgnoreUnknownValuesOrBuilder(); - } - /** - * - * - *
-   * External table definition. These tables can be referenced with 'name'
-   * in the query and can be read just like any other table.
-   * 
- * - * Protobuf type {@code google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition} - */ - public static final class TableDefinition extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition) - TableDefinitionOrBuilder { - private static final long serialVersionUID = 0L; - // Use TableDefinition.newBuilder() to construct. - private TableDefinition(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private TableDefinition() { - tableId_ = ""; - sourceUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - format_ = 0; - encoding_ = 0; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private TableDefinition( - 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(); - - tableId_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - sourceUris_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - sourceUris_.add(s); - break; - } - case 24: - { - int rawValue = input.readEnum(); - - format_ = rawValue; - break; - } - case 32: - { - maxBadRecords_ = input.readInt32(); - break; - } - case 40: - { - int rawValue = input.readEnum(); - - encoding_ = rawValue; - break; - } - case 50: - { - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition - .CsvOptions.Builder - subBuilder = null; - if (csvOptions_ != null) { - subBuilder = csvOptions_.toBuilder(); - } - csvOptions_ = - input.readMessage( - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition - .CsvOptions.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(csvOptions_); - csvOptions_ = subBuilder.buildPartial(); - } - - break; - } - case 58: - { - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema.Builder - subBuilder = null; - if (schema_ != null) { - subBuilder = schema_.toBuilder(); - } - schema_ = - input.readMessage( - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(schema_); - schema_ = subBuilder.buildPartial(); - } - - break; - } - case 82: - { - com.google.protobuf.BoolValue.Builder subBuilder = null; - if (ignoreUnknownValues_ != null) { - subBuilder = ignoreUnknownValues_.toBuilder(); - } - ignoreUnknownValues_ = - input.readMessage(com.google.protobuf.BoolValue.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(ignoreUnknownValues_); - ignoreUnknownValues_ = 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_ & 0x00000002) != 0)) { - sourceUris_ = sourceUris_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_ImportedDataInfo_TableDefinition_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_ImportedDataInfo_TableDefinition_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition.class, - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition.Builder - .class); - } - - public interface CsvOptionsOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition.CsvOptions) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-       * The delimiter.  We currently restrict this to U+0001 to U+00FF and
-       * apply additional constraints during validation.
-       * 
- * - * .google.protobuf.StringValue field_delimiter = 1; - */ - boolean hasFieldDelimiter(); - /** - * - * - *
-       * The delimiter.  We currently restrict this to U+0001 to U+00FF and
-       * apply additional constraints during validation.
-       * 
- * - * .google.protobuf.StringValue field_delimiter = 1; - */ - com.google.protobuf.StringValue getFieldDelimiter(); - /** - * - * - *
-       * The delimiter.  We currently restrict this to U+0001 to U+00FF and
-       * apply additional constraints during validation.
-       * 
- * - * .google.protobuf.StringValue field_delimiter = 1; - */ - com.google.protobuf.StringValueOrBuilder getFieldDelimiterOrBuilder(); - - /** - * - * - *
-       * Whether CSV files are allowed to have quoted newlines. If quoted
-       * newlines are allowed, we can't split CSV files.
-       * 
- * - * .google.protobuf.BoolValue allow_quoted_newlines = 2; - */ - boolean hasAllowQuotedNewlines(); - /** - * - * - *
-       * Whether CSV files are allowed to have quoted newlines. If quoted
-       * newlines are allowed, we can't split CSV files.
-       * 
- * - * .google.protobuf.BoolValue allow_quoted_newlines = 2; - */ - com.google.protobuf.BoolValue getAllowQuotedNewlines(); - /** - * - * - *
-       * Whether CSV files are allowed to have quoted newlines. If quoted
-       * newlines are allowed, we can't split CSV files.
-       * 
- * - * .google.protobuf.BoolValue allow_quoted_newlines = 2; - */ - com.google.protobuf.BoolValueOrBuilder getAllowQuotedNewlinesOrBuilder(); - - /** - * - * - *
-       * The quote character.  We currently restrict this to U+0000 to U+00FF
-       * and apply additional constraints during validation. Set to '\0' to
-       * indicate no quote is used.
-       * 
- * - * .google.protobuf.StringValue quote_char = 3; - */ - boolean hasQuoteChar(); - /** - * - * - *
-       * The quote character.  We currently restrict this to U+0000 to U+00FF
-       * and apply additional constraints during validation. Set to '\0' to
-       * indicate no quote is used.
-       * 
- * - * .google.protobuf.StringValue quote_char = 3; - */ - com.google.protobuf.StringValue getQuoteChar(); - /** - * - * - *
-       * The quote character.  We currently restrict this to U+0000 to U+00FF
-       * and apply additional constraints during validation. Set to '\0' to
-       * indicate no quote is used.
-       * 
- * - * .google.protobuf.StringValue quote_char = 3; - */ - com.google.protobuf.StringValueOrBuilder getQuoteCharOrBuilder(); - - /** - * - * - *
-       * Number of leading rows to skip.
-       * 
- * - * .google.protobuf.Int64Value skip_leading_rows = 4; - */ - boolean hasSkipLeadingRows(); - /** - * - * - *
-       * Number of leading rows to skip.
-       * 
- * - * .google.protobuf.Int64Value skip_leading_rows = 4; - */ - com.google.protobuf.Int64Value getSkipLeadingRows(); - /** - * - * - *
-       * Number of leading rows to skip.
-       * 
- * - * .google.protobuf.Int64Value skip_leading_rows = 4; - */ - com.google.protobuf.Int64ValueOrBuilder getSkipLeadingRowsOrBuilder(); - - /** - * - * - *
-       * Accept rows that are missing trailing optional columns.
-       * 
- * - * .google.protobuf.BoolValue allow_jagged_rows = 5; - */ - boolean hasAllowJaggedRows(); - /** - * - * - *
-       * Accept rows that are missing trailing optional columns.
-       * 
- * - * .google.protobuf.BoolValue allow_jagged_rows = 5; - */ - com.google.protobuf.BoolValue getAllowJaggedRows(); - /** - * - * - *
-       * Accept rows that are missing trailing optional columns.
-       * 
- * - * .google.protobuf.BoolValue allow_jagged_rows = 5; - */ - com.google.protobuf.BoolValueOrBuilder getAllowJaggedRowsOrBuilder(); - } - /** - * - * - *
-     * CSV specific options.
-     * 
- * - * Protobuf type {@code - * google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition.CsvOptions} - */ - public static final class CsvOptions extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition.CsvOptions) - CsvOptionsOrBuilder { - private static final long serialVersionUID = 0L; - // Use CsvOptions.newBuilder() to construct. - private CsvOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private CsvOptions() {} - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private CsvOptions( - 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.protobuf.StringValue.Builder subBuilder = null; - if (fieldDelimiter_ != null) { - subBuilder = fieldDelimiter_.toBuilder(); - } - fieldDelimiter_ = - input.readMessage( - com.google.protobuf.StringValue.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(fieldDelimiter_); - fieldDelimiter_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.protobuf.BoolValue.Builder subBuilder = null; - if (allowQuotedNewlines_ != null) { - subBuilder = allowQuotedNewlines_.toBuilder(); - } - allowQuotedNewlines_ = - input.readMessage(com.google.protobuf.BoolValue.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(allowQuotedNewlines_); - allowQuotedNewlines_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - com.google.protobuf.StringValue.Builder subBuilder = null; - if (quoteChar_ != null) { - subBuilder = quoteChar_.toBuilder(); - } - quoteChar_ = - input.readMessage( - com.google.protobuf.StringValue.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(quoteChar_); - quoteChar_ = subBuilder.buildPartial(); - } - - break; - } - case 34: - { - com.google.protobuf.Int64Value.Builder subBuilder = null; - if (skipLeadingRows_ != null) { - subBuilder = skipLeadingRows_.toBuilder(); - } - skipLeadingRows_ = - input.readMessage(com.google.protobuf.Int64Value.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(skipLeadingRows_); - skipLeadingRows_ = subBuilder.buildPartial(); - } - - break; - } - case 42: - { - com.google.protobuf.BoolValue.Builder subBuilder = null; - if (allowJaggedRows_ != null) { - subBuilder = allowJaggedRows_.toBuilder(); - } - allowJaggedRows_ = - input.readMessage(com.google.protobuf.BoolValue.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(allowJaggedRows_); - allowJaggedRows_ = 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.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_ImportedDataInfo_TableDefinition_CsvOptions_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_ImportedDataInfo_TableDefinition_CsvOptions_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition - .CsvOptions.class, - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition - .CsvOptions.Builder.class); - } - - public static final int FIELD_DELIMITER_FIELD_NUMBER = 1; - private com.google.protobuf.StringValue fieldDelimiter_; - /** - * - * - *
-       * The delimiter.  We currently restrict this to U+0001 to U+00FF and
-       * apply additional constraints during validation.
-       * 
- * - * .google.protobuf.StringValue field_delimiter = 1; - */ - public boolean hasFieldDelimiter() { - return fieldDelimiter_ != null; - } - /** - * - * - *
-       * The delimiter.  We currently restrict this to U+0001 to U+00FF and
-       * apply additional constraints during validation.
-       * 
- * - * .google.protobuf.StringValue field_delimiter = 1; - */ - public com.google.protobuf.StringValue getFieldDelimiter() { - return fieldDelimiter_ == null - ? com.google.protobuf.StringValue.getDefaultInstance() - : fieldDelimiter_; - } - /** - * - * - *
-       * The delimiter.  We currently restrict this to U+0001 to U+00FF and
-       * apply additional constraints during validation.
-       * 
- * - * .google.protobuf.StringValue field_delimiter = 1; - */ - public com.google.protobuf.StringValueOrBuilder getFieldDelimiterOrBuilder() { - return getFieldDelimiter(); - } - - public static final int ALLOW_QUOTED_NEWLINES_FIELD_NUMBER = 2; - private com.google.protobuf.BoolValue allowQuotedNewlines_; - /** - * - * - *
-       * Whether CSV files are allowed to have quoted newlines. If quoted
-       * newlines are allowed, we can't split CSV files.
-       * 
- * - * .google.protobuf.BoolValue allow_quoted_newlines = 2; - */ - public boolean hasAllowQuotedNewlines() { - return allowQuotedNewlines_ != null; - } - /** - * - * - *
-       * Whether CSV files are allowed to have quoted newlines. If quoted
-       * newlines are allowed, we can't split CSV files.
-       * 
- * - * .google.protobuf.BoolValue allow_quoted_newlines = 2; - */ - public com.google.protobuf.BoolValue getAllowQuotedNewlines() { - return allowQuotedNewlines_ == null - ? com.google.protobuf.BoolValue.getDefaultInstance() - : allowQuotedNewlines_; - } - /** - * - * - *
-       * Whether CSV files are allowed to have quoted newlines. If quoted
-       * newlines are allowed, we can't split CSV files.
-       * 
- * - * .google.protobuf.BoolValue allow_quoted_newlines = 2; - */ - public com.google.protobuf.BoolValueOrBuilder getAllowQuotedNewlinesOrBuilder() { - return getAllowQuotedNewlines(); - } - - public static final int QUOTE_CHAR_FIELD_NUMBER = 3; - private com.google.protobuf.StringValue quoteChar_; - /** - * - * - *
-       * The quote character.  We currently restrict this to U+0000 to U+00FF
-       * and apply additional constraints during validation. Set to '\0' to
-       * indicate no quote is used.
-       * 
- * - * .google.protobuf.StringValue quote_char = 3; - */ - public boolean hasQuoteChar() { - return quoteChar_ != null; - } - /** - * - * - *
-       * The quote character.  We currently restrict this to U+0000 to U+00FF
-       * and apply additional constraints during validation. Set to '\0' to
-       * indicate no quote is used.
-       * 
- * - * .google.protobuf.StringValue quote_char = 3; - */ - public com.google.protobuf.StringValue getQuoteChar() { - return quoteChar_ == null - ? com.google.protobuf.StringValue.getDefaultInstance() - : quoteChar_; - } - /** - * - * - *
-       * The quote character.  We currently restrict this to U+0000 to U+00FF
-       * and apply additional constraints during validation. Set to '\0' to
-       * indicate no quote is used.
-       * 
- * - * .google.protobuf.StringValue quote_char = 3; - */ - public com.google.protobuf.StringValueOrBuilder getQuoteCharOrBuilder() { - return getQuoteChar(); - } - - public static final int SKIP_LEADING_ROWS_FIELD_NUMBER = 4; - private com.google.protobuf.Int64Value skipLeadingRows_; - /** - * - * - *
-       * Number of leading rows to skip.
-       * 
- * - * .google.protobuf.Int64Value skip_leading_rows = 4; - */ - public boolean hasSkipLeadingRows() { - return skipLeadingRows_ != null; - } - /** - * - * - *
-       * Number of leading rows to skip.
-       * 
- * - * .google.protobuf.Int64Value skip_leading_rows = 4; - */ - public com.google.protobuf.Int64Value getSkipLeadingRows() { - return skipLeadingRows_ == null - ? com.google.protobuf.Int64Value.getDefaultInstance() - : skipLeadingRows_; - } - /** - * - * - *
-       * Number of leading rows to skip.
-       * 
- * - * .google.protobuf.Int64Value skip_leading_rows = 4; - */ - public com.google.protobuf.Int64ValueOrBuilder getSkipLeadingRowsOrBuilder() { - return getSkipLeadingRows(); - } - - public static final int ALLOW_JAGGED_ROWS_FIELD_NUMBER = 5; - private com.google.protobuf.BoolValue allowJaggedRows_; - /** - * - * - *
-       * Accept rows that are missing trailing optional columns.
-       * 
- * - * .google.protobuf.BoolValue allow_jagged_rows = 5; - */ - public boolean hasAllowJaggedRows() { - return allowJaggedRows_ != null; - } - /** - * - * - *
-       * Accept rows that are missing trailing optional columns.
-       * 
- * - * .google.protobuf.BoolValue allow_jagged_rows = 5; - */ - public com.google.protobuf.BoolValue getAllowJaggedRows() { - return allowJaggedRows_ == null - ? com.google.protobuf.BoolValue.getDefaultInstance() - : allowJaggedRows_; - } - /** - * - * - *
-       * Accept rows that are missing trailing optional columns.
-       * 
- * - * .google.protobuf.BoolValue allow_jagged_rows = 5; - */ - public com.google.protobuf.BoolValueOrBuilder getAllowJaggedRowsOrBuilder() { - return getAllowJaggedRows(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (fieldDelimiter_ != null) { - output.writeMessage(1, getFieldDelimiter()); - } - if (allowQuotedNewlines_ != null) { - output.writeMessage(2, getAllowQuotedNewlines()); - } - if (quoteChar_ != null) { - output.writeMessage(3, getQuoteChar()); - } - if (skipLeadingRows_ != null) { - output.writeMessage(4, getSkipLeadingRows()); - } - if (allowJaggedRows_ != null) { - output.writeMessage(5, getAllowJaggedRows()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (fieldDelimiter_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getFieldDelimiter()); - } - if (allowQuotedNewlines_ != null) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(2, getAllowQuotedNewlines()); - } - if (quoteChar_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getQuoteChar()); - } - if (skipLeadingRows_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getSkipLeadingRows()); - } - if (allowJaggedRows_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getAllowJaggedRows()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition - .CsvOptions)) { - return super.equals(obj); - } - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition.CsvOptions - other = - (com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition - .CsvOptions) - obj; - - if (hasFieldDelimiter() != other.hasFieldDelimiter()) return false; - if (hasFieldDelimiter()) { - if (!getFieldDelimiter().equals(other.getFieldDelimiter())) return false; - } - if (hasAllowQuotedNewlines() != other.hasAllowQuotedNewlines()) return false; - if (hasAllowQuotedNewlines()) { - if (!getAllowQuotedNewlines().equals(other.getAllowQuotedNewlines())) return false; - } - if (hasQuoteChar() != other.hasQuoteChar()) return false; - if (hasQuoteChar()) { - if (!getQuoteChar().equals(other.getQuoteChar())) return false; - } - if (hasSkipLeadingRows() != other.hasSkipLeadingRows()) return false; - if (hasSkipLeadingRows()) { - if (!getSkipLeadingRows().equals(other.getSkipLeadingRows())) return false; - } - if (hasAllowJaggedRows() != other.hasAllowJaggedRows()) return false; - if (hasAllowJaggedRows()) { - if (!getAllowJaggedRows().equals(other.getAllowJaggedRows())) return false; - } - if (!unknownFields.equals(other.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 (hasFieldDelimiter()) { - hash = (37 * hash) + FIELD_DELIMITER_FIELD_NUMBER; - hash = (53 * hash) + getFieldDelimiter().hashCode(); - } - if (hasAllowQuotedNewlines()) { - hash = (37 * hash) + ALLOW_QUOTED_NEWLINES_FIELD_NUMBER; - hash = (53 * hash) + getAllowQuotedNewlines().hashCode(); - } - if (hasQuoteChar()) { - hash = (37 * hash) + QUOTE_CHAR_FIELD_NUMBER; - hash = (53 * hash) + getQuoteChar().hashCode(); - } - if (hasSkipLeadingRows()) { - hash = (37 * hash) + SKIP_LEADING_ROWS_FIELD_NUMBER; - hash = (53 * hash) + getSkipLeadingRows().hashCode(); - } - if (hasAllowJaggedRows()) { - hash = (37 * hash) + ALLOW_JAGGED_ROWS_FIELD_NUMBER; - hash = (53 * hash) + getAllowJaggedRows().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition - .CsvOptions - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition - .CsvOptions - parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition - .CsvOptions - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition - .CsvOptions - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition - .CsvOptions - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition - .CsvOptions - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition - .CsvOptions - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition - .CsvOptions - parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition - .CsvOptions - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition - .CsvOptions - parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition - .CsvOptions - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition - .CsvOptions - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition.CsvOptions - prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-       * CSV specific options.
-       * 
- * - * Protobuf type {@code - * google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition.CsvOptions} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition.CsvOptions) - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition - .CsvOptionsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_ImportedDataInfo_TableDefinition_CsvOptions_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_ImportedDataInfo_TableDefinition_CsvOptions_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition - .CsvOptions.class, - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition - .CsvOptions.Builder.class); - } - - // Construct using - // com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition.CsvOptions.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.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 (fieldDelimiterBuilder_ == null) { - fieldDelimiter_ = null; - } else { - fieldDelimiter_ = null; - fieldDelimiterBuilder_ = null; - } - if (allowQuotedNewlinesBuilder_ == null) { - allowQuotedNewlines_ = null; - } else { - allowQuotedNewlines_ = null; - allowQuotedNewlinesBuilder_ = null; - } - if (quoteCharBuilder_ == null) { - quoteChar_ = null; - } else { - quoteChar_ = null; - quoteCharBuilder_ = null; - } - if (skipLeadingRowsBuilder_ == null) { - skipLeadingRows_ = null; - } else { - skipLeadingRows_ = null; - skipLeadingRowsBuilder_ = null; - } - if (allowJaggedRowsBuilder_ == null) { - allowJaggedRows_ = null; - } else { - allowJaggedRows_ = null; - allowJaggedRowsBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_ImportedDataInfo_TableDefinition_CsvOptions_descriptor; - } - - @java.lang.Override - public com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition.CsvOptions - getDefaultInstanceForType() { - return com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition - .CsvOptions.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition.CsvOptions - build() { - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition.CsvOptions - result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition.CsvOptions - buildPartial() { - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition.CsvOptions - result = - new com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition - .CsvOptions(this); - if (fieldDelimiterBuilder_ == null) { - result.fieldDelimiter_ = fieldDelimiter_; - } else { - result.fieldDelimiter_ = fieldDelimiterBuilder_.build(); - } - if (allowQuotedNewlinesBuilder_ == null) { - result.allowQuotedNewlines_ = allowQuotedNewlines_; - } else { - result.allowQuotedNewlines_ = allowQuotedNewlinesBuilder_.build(); - } - if (quoteCharBuilder_ == null) { - result.quoteChar_ = quoteChar_; - } else { - result.quoteChar_ = quoteCharBuilder_.build(); - } - if (skipLeadingRowsBuilder_ == null) { - result.skipLeadingRows_ = skipLeadingRows_; - } else { - result.skipLeadingRows_ = skipLeadingRowsBuilder_.build(); - } - if (allowJaggedRowsBuilder_ == null) { - result.allowJaggedRows_ = allowJaggedRows_; - } else { - result.allowJaggedRows_ = allowJaggedRowsBuilder_.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.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition - .CsvOptions) { - return mergeFrom( - (com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition - .CsvOptions) - other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition.CsvOptions - other) { - if (other - == com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition - .CsvOptions.getDefaultInstance()) return this; - if (other.hasFieldDelimiter()) { - mergeFieldDelimiter(other.getFieldDelimiter()); - } - if (other.hasAllowQuotedNewlines()) { - mergeAllowQuotedNewlines(other.getAllowQuotedNewlines()); - } - if (other.hasQuoteChar()) { - mergeQuoteChar(other.getQuoteChar()); - } - if (other.hasSkipLeadingRows()) { - mergeSkipLeadingRows(other.getSkipLeadingRows()); - } - if (other.hasAllowJaggedRows()) { - mergeAllowJaggedRows(other.getAllowJaggedRows()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition.CsvOptions - parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition - .CsvOptions) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.protobuf.StringValue fieldDelimiter_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.StringValue, - com.google.protobuf.StringValue.Builder, - com.google.protobuf.StringValueOrBuilder> - fieldDelimiterBuilder_; - /** - * - * - *
-         * The delimiter.  We currently restrict this to U+0001 to U+00FF and
-         * apply additional constraints during validation.
-         * 
- * - * .google.protobuf.StringValue field_delimiter = 1; - */ - public boolean hasFieldDelimiter() { - return fieldDelimiterBuilder_ != null || fieldDelimiter_ != null; - } - /** - * - * - *
-         * The delimiter.  We currently restrict this to U+0001 to U+00FF and
-         * apply additional constraints during validation.
-         * 
- * - * .google.protobuf.StringValue field_delimiter = 1; - */ - public com.google.protobuf.StringValue getFieldDelimiter() { - if (fieldDelimiterBuilder_ == null) { - return fieldDelimiter_ == null - ? com.google.protobuf.StringValue.getDefaultInstance() - : fieldDelimiter_; - } else { - return fieldDelimiterBuilder_.getMessage(); - } - } - /** - * - * - *
-         * The delimiter.  We currently restrict this to U+0001 to U+00FF and
-         * apply additional constraints during validation.
-         * 
- * - * .google.protobuf.StringValue field_delimiter = 1; - */ - public Builder setFieldDelimiter(com.google.protobuf.StringValue value) { - if (fieldDelimiterBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - fieldDelimiter_ = value; - onChanged(); - } else { - fieldDelimiterBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-         * The delimiter.  We currently restrict this to U+0001 to U+00FF and
-         * apply additional constraints during validation.
-         * 
- * - * .google.protobuf.StringValue field_delimiter = 1; - */ - public Builder setFieldDelimiter(com.google.protobuf.StringValue.Builder builderForValue) { - if (fieldDelimiterBuilder_ == null) { - fieldDelimiter_ = builderForValue.build(); - onChanged(); - } else { - fieldDelimiterBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-         * The delimiter.  We currently restrict this to U+0001 to U+00FF and
-         * apply additional constraints during validation.
-         * 
- * - * .google.protobuf.StringValue field_delimiter = 1; - */ - public Builder mergeFieldDelimiter(com.google.protobuf.StringValue value) { - if (fieldDelimiterBuilder_ == null) { - if (fieldDelimiter_ != null) { - fieldDelimiter_ = - com.google.protobuf.StringValue.newBuilder(fieldDelimiter_) - .mergeFrom(value) - .buildPartial(); - } else { - fieldDelimiter_ = value; - } - onChanged(); - } else { - fieldDelimiterBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-         * The delimiter.  We currently restrict this to U+0001 to U+00FF and
-         * apply additional constraints during validation.
-         * 
- * - * .google.protobuf.StringValue field_delimiter = 1; - */ - public Builder clearFieldDelimiter() { - if (fieldDelimiterBuilder_ == null) { - fieldDelimiter_ = null; - onChanged(); - } else { - fieldDelimiter_ = null; - fieldDelimiterBuilder_ = null; - } - - return this; - } - /** - * - * - *
-         * The delimiter.  We currently restrict this to U+0001 to U+00FF and
-         * apply additional constraints during validation.
-         * 
- * - * .google.protobuf.StringValue field_delimiter = 1; - */ - public com.google.protobuf.StringValue.Builder getFieldDelimiterBuilder() { - - onChanged(); - return getFieldDelimiterFieldBuilder().getBuilder(); - } - /** - * - * - *
-         * The delimiter.  We currently restrict this to U+0001 to U+00FF and
-         * apply additional constraints during validation.
-         * 
- * - * .google.protobuf.StringValue field_delimiter = 1; - */ - public com.google.protobuf.StringValueOrBuilder getFieldDelimiterOrBuilder() { - if (fieldDelimiterBuilder_ != null) { - return fieldDelimiterBuilder_.getMessageOrBuilder(); - } else { - return fieldDelimiter_ == null - ? com.google.protobuf.StringValue.getDefaultInstance() - : fieldDelimiter_; - } - } - /** - * - * - *
-         * The delimiter.  We currently restrict this to U+0001 to U+00FF and
-         * apply additional constraints during validation.
-         * 
- * - * .google.protobuf.StringValue field_delimiter = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.StringValue, - com.google.protobuf.StringValue.Builder, - com.google.protobuf.StringValueOrBuilder> - getFieldDelimiterFieldBuilder() { - if (fieldDelimiterBuilder_ == null) { - fieldDelimiterBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.StringValue, - com.google.protobuf.StringValue.Builder, - com.google.protobuf.StringValueOrBuilder>( - getFieldDelimiter(), getParentForChildren(), isClean()); - fieldDelimiter_ = null; - } - return fieldDelimiterBuilder_; - } - - private com.google.protobuf.BoolValue allowQuotedNewlines_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.BoolValue, - com.google.protobuf.BoolValue.Builder, - com.google.protobuf.BoolValueOrBuilder> - allowQuotedNewlinesBuilder_; - /** - * - * - *
-         * Whether CSV files are allowed to have quoted newlines. If quoted
-         * newlines are allowed, we can't split CSV files.
-         * 
- * - * .google.protobuf.BoolValue allow_quoted_newlines = 2; - */ - public boolean hasAllowQuotedNewlines() { - return allowQuotedNewlinesBuilder_ != null || allowQuotedNewlines_ != null; - } - /** - * - * - *
-         * Whether CSV files are allowed to have quoted newlines. If quoted
-         * newlines are allowed, we can't split CSV files.
-         * 
- * - * .google.protobuf.BoolValue allow_quoted_newlines = 2; - */ - public com.google.protobuf.BoolValue getAllowQuotedNewlines() { - if (allowQuotedNewlinesBuilder_ == null) { - return allowQuotedNewlines_ == null - ? com.google.protobuf.BoolValue.getDefaultInstance() - : allowQuotedNewlines_; - } else { - return allowQuotedNewlinesBuilder_.getMessage(); - } - } - /** - * - * - *
-         * Whether CSV files are allowed to have quoted newlines. If quoted
-         * newlines are allowed, we can't split CSV files.
-         * 
- * - * .google.protobuf.BoolValue allow_quoted_newlines = 2; - */ - public Builder setAllowQuotedNewlines(com.google.protobuf.BoolValue value) { - if (allowQuotedNewlinesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - allowQuotedNewlines_ = value; - onChanged(); - } else { - allowQuotedNewlinesBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-         * Whether CSV files are allowed to have quoted newlines. If quoted
-         * newlines are allowed, we can't split CSV files.
-         * 
- * - * .google.protobuf.BoolValue allow_quoted_newlines = 2; - */ - public Builder setAllowQuotedNewlines( - com.google.protobuf.BoolValue.Builder builderForValue) { - if (allowQuotedNewlinesBuilder_ == null) { - allowQuotedNewlines_ = builderForValue.build(); - onChanged(); - } else { - allowQuotedNewlinesBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-         * Whether CSV files are allowed to have quoted newlines. If quoted
-         * newlines are allowed, we can't split CSV files.
-         * 
- * - * .google.protobuf.BoolValue allow_quoted_newlines = 2; - */ - public Builder mergeAllowQuotedNewlines(com.google.protobuf.BoolValue value) { - if (allowQuotedNewlinesBuilder_ == null) { - if (allowQuotedNewlines_ != null) { - allowQuotedNewlines_ = - com.google.protobuf.BoolValue.newBuilder(allowQuotedNewlines_) - .mergeFrom(value) - .buildPartial(); - } else { - allowQuotedNewlines_ = value; - } - onChanged(); - } else { - allowQuotedNewlinesBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-         * Whether CSV files are allowed to have quoted newlines. If quoted
-         * newlines are allowed, we can't split CSV files.
-         * 
- * - * .google.protobuf.BoolValue allow_quoted_newlines = 2; - */ - public Builder clearAllowQuotedNewlines() { - if (allowQuotedNewlinesBuilder_ == null) { - allowQuotedNewlines_ = null; - onChanged(); - } else { - allowQuotedNewlines_ = null; - allowQuotedNewlinesBuilder_ = null; - } - - return this; - } - /** - * - * - *
-         * Whether CSV files are allowed to have quoted newlines. If quoted
-         * newlines are allowed, we can't split CSV files.
-         * 
- * - * .google.protobuf.BoolValue allow_quoted_newlines = 2; - */ - public com.google.protobuf.BoolValue.Builder getAllowQuotedNewlinesBuilder() { - - onChanged(); - return getAllowQuotedNewlinesFieldBuilder().getBuilder(); - } - /** - * - * - *
-         * Whether CSV files are allowed to have quoted newlines. If quoted
-         * newlines are allowed, we can't split CSV files.
-         * 
- * - * .google.protobuf.BoolValue allow_quoted_newlines = 2; - */ - public com.google.protobuf.BoolValueOrBuilder getAllowQuotedNewlinesOrBuilder() { - if (allowQuotedNewlinesBuilder_ != null) { - return allowQuotedNewlinesBuilder_.getMessageOrBuilder(); - } else { - return allowQuotedNewlines_ == null - ? com.google.protobuf.BoolValue.getDefaultInstance() - : allowQuotedNewlines_; - } - } - /** - * - * - *
-         * Whether CSV files are allowed to have quoted newlines. If quoted
-         * newlines are allowed, we can't split CSV files.
-         * 
- * - * .google.protobuf.BoolValue allow_quoted_newlines = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.BoolValue, - com.google.protobuf.BoolValue.Builder, - com.google.protobuf.BoolValueOrBuilder> - getAllowQuotedNewlinesFieldBuilder() { - if (allowQuotedNewlinesBuilder_ == null) { - allowQuotedNewlinesBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.BoolValue, - com.google.protobuf.BoolValue.Builder, - com.google.protobuf.BoolValueOrBuilder>( - getAllowQuotedNewlines(), getParentForChildren(), isClean()); - allowQuotedNewlines_ = null; - } - return allowQuotedNewlinesBuilder_; - } - - private com.google.protobuf.StringValue quoteChar_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.StringValue, - com.google.protobuf.StringValue.Builder, - com.google.protobuf.StringValueOrBuilder> - quoteCharBuilder_; - /** - * - * - *
-         * The quote character.  We currently restrict this to U+0000 to U+00FF
-         * and apply additional constraints during validation. Set to '\0' to
-         * indicate no quote is used.
-         * 
- * - * .google.protobuf.StringValue quote_char = 3; - */ - public boolean hasQuoteChar() { - return quoteCharBuilder_ != null || quoteChar_ != null; - } - /** - * - * - *
-         * The quote character.  We currently restrict this to U+0000 to U+00FF
-         * and apply additional constraints during validation. Set to '\0' to
-         * indicate no quote is used.
-         * 
- * - * .google.protobuf.StringValue quote_char = 3; - */ - public com.google.protobuf.StringValue getQuoteChar() { - if (quoteCharBuilder_ == null) { - return quoteChar_ == null - ? com.google.protobuf.StringValue.getDefaultInstance() - : quoteChar_; - } else { - return quoteCharBuilder_.getMessage(); - } - } - /** - * - * - *
-         * The quote character.  We currently restrict this to U+0000 to U+00FF
-         * and apply additional constraints during validation. Set to '\0' to
-         * indicate no quote is used.
-         * 
- * - * .google.protobuf.StringValue quote_char = 3; - */ - public Builder setQuoteChar(com.google.protobuf.StringValue value) { - if (quoteCharBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - quoteChar_ = value; - onChanged(); - } else { - quoteCharBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-         * The quote character.  We currently restrict this to U+0000 to U+00FF
-         * and apply additional constraints during validation. Set to '\0' to
-         * indicate no quote is used.
-         * 
- * - * .google.protobuf.StringValue quote_char = 3; - */ - public Builder setQuoteChar(com.google.protobuf.StringValue.Builder builderForValue) { - if (quoteCharBuilder_ == null) { - quoteChar_ = builderForValue.build(); - onChanged(); - } else { - quoteCharBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-         * The quote character.  We currently restrict this to U+0000 to U+00FF
-         * and apply additional constraints during validation. Set to '\0' to
-         * indicate no quote is used.
-         * 
- * - * .google.protobuf.StringValue quote_char = 3; - */ - public Builder mergeQuoteChar(com.google.protobuf.StringValue value) { - if (quoteCharBuilder_ == null) { - if (quoteChar_ != null) { - quoteChar_ = - com.google.protobuf.StringValue.newBuilder(quoteChar_) - .mergeFrom(value) - .buildPartial(); - } else { - quoteChar_ = value; - } - onChanged(); - } else { - quoteCharBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-         * The quote character.  We currently restrict this to U+0000 to U+00FF
-         * and apply additional constraints during validation. Set to '\0' to
-         * indicate no quote is used.
-         * 
- * - * .google.protobuf.StringValue quote_char = 3; - */ - public Builder clearQuoteChar() { - if (quoteCharBuilder_ == null) { - quoteChar_ = null; - onChanged(); - } else { - quoteChar_ = null; - quoteCharBuilder_ = null; - } - - return this; - } - /** - * - * - *
-         * The quote character.  We currently restrict this to U+0000 to U+00FF
-         * and apply additional constraints during validation. Set to '\0' to
-         * indicate no quote is used.
-         * 
- * - * .google.protobuf.StringValue quote_char = 3; - */ - public com.google.protobuf.StringValue.Builder getQuoteCharBuilder() { - - onChanged(); - return getQuoteCharFieldBuilder().getBuilder(); - } - /** - * - * - *
-         * The quote character.  We currently restrict this to U+0000 to U+00FF
-         * and apply additional constraints during validation. Set to '\0' to
-         * indicate no quote is used.
-         * 
- * - * .google.protobuf.StringValue quote_char = 3; - */ - public com.google.protobuf.StringValueOrBuilder getQuoteCharOrBuilder() { - if (quoteCharBuilder_ != null) { - return quoteCharBuilder_.getMessageOrBuilder(); - } else { - return quoteChar_ == null - ? com.google.protobuf.StringValue.getDefaultInstance() - : quoteChar_; - } - } - /** - * - * - *
-         * The quote character.  We currently restrict this to U+0000 to U+00FF
-         * and apply additional constraints during validation. Set to '\0' to
-         * indicate no quote is used.
-         * 
- * - * .google.protobuf.StringValue quote_char = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.StringValue, - com.google.protobuf.StringValue.Builder, - com.google.protobuf.StringValueOrBuilder> - getQuoteCharFieldBuilder() { - if (quoteCharBuilder_ == null) { - quoteCharBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.StringValue, - com.google.protobuf.StringValue.Builder, - com.google.protobuf.StringValueOrBuilder>( - getQuoteChar(), getParentForChildren(), isClean()); - quoteChar_ = null; - } - return quoteCharBuilder_; - } - - private com.google.protobuf.Int64Value skipLeadingRows_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Int64Value, - com.google.protobuf.Int64Value.Builder, - com.google.protobuf.Int64ValueOrBuilder> - skipLeadingRowsBuilder_; - /** - * - * - *
-         * Number of leading rows to skip.
-         * 
- * - * .google.protobuf.Int64Value skip_leading_rows = 4; - */ - public boolean hasSkipLeadingRows() { - return skipLeadingRowsBuilder_ != null || skipLeadingRows_ != null; - } - /** - * - * - *
-         * Number of leading rows to skip.
-         * 
- * - * .google.protobuf.Int64Value skip_leading_rows = 4; - */ - public com.google.protobuf.Int64Value getSkipLeadingRows() { - if (skipLeadingRowsBuilder_ == null) { - return skipLeadingRows_ == null - ? com.google.protobuf.Int64Value.getDefaultInstance() - : skipLeadingRows_; - } else { - return skipLeadingRowsBuilder_.getMessage(); - } - } - /** - * - * - *
-         * Number of leading rows to skip.
-         * 
- * - * .google.protobuf.Int64Value skip_leading_rows = 4; - */ - public Builder setSkipLeadingRows(com.google.protobuf.Int64Value value) { - if (skipLeadingRowsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - skipLeadingRows_ = value; - onChanged(); - } else { - skipLeadingRowsBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-         * Number of leading rows to skip.
-         * 
- * - * .google.protobuf.Int64Value skip_leading_rows = 4; - */ - public Builder setSkipLeadingRows(com.google.protobuf.Int64Value.Builder builderForValue) { - if (skipLeadingRowsBuilder_ == null) { - skipLeadingRows_ = builderForValue.build(); - onChanged(); - } else { - skipLeadingRowsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-         * Number of leading rows to skip.
-         * 
- * - * .google.protobuf.Int64Value skip_leading_rows = 4; - */ - public Builder mergeSkipLeadingRows(com.google.protobuf.Int64Value value) { - if (skipLeadingRowsBuilder_ == null) { - if (skipLeadingRows_ != null) { - skipLeadingRows_ = - com.google.protobuf.Int64Value.newBuilder(skipLeadingRows_) - .mergeFrom(value) - .buildPartial(); - } else { - skipLeadingRows_ = value; - } - onChanged(); - } else { - skipLeadingRowsBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-         * Number of leading rows to skip.
-         * 
- * - * .google.protobuf.Int64Value skip_leading_rows = 4; - */ - public Builder clearSkipLeadingRows() { - if (skipLeadingRowsBuilder_ == null) { - skipLeadingRows_ = null; - onChanged(); - } else { - skipLeadingRows_ = null; - skipLeadingRowsBuilder_ = null; - } - - return this; - } - /** - * - * - *
-         * Number of leading rows to skip.
-         * 
- * - * .google.protobuf.Int64Value skip_leading_rows = 4; - */ - public com.google.protobuf.Int64Value.Builder getSkipLeadingRowsBuilder() { - - onChanged(); - return getSkipLeadingRowsFieldBuilder().getBuilder(); - } - /** - * - * - *
-         * Number of leading rows to skip.
-         * 
- * - * .google.protobuf.Int64Value skip_leading_rows = 4; - */ - public com.google.protobuf.Int64ValueOrBuilder getSkipLeadingRowsOrBuilder() { - if (skipLeadingRowsBuilder_ != null) { - return skipLeadingRowsBuilder_.getMessageOrBuilder(); - } else { - return skipLeadingRows_ == null - ? com.google.protobuf.Int64Value.getDefaultInstance() - : skipLeadingRows_; - } - } - /** - * - * - *
-         * Number of leading rows to skip.
-         * 
- * - * .google.protobuf.Int64Value skip_leading_rows = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Int64Value, - com.google.protobuf.Int64Value.Builder, - com.google.protobuf.Int64ValueOrBuilder> - getSkipLeadingRowsFieldBuilder() { - if (skipLeadingRowsBuilder_ == null) { - skipLeadingRowsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Int64Value, - com.google.protobuf.Int64Value.Builder, - com.google.protobuf.Int64ValueOrBuilder>( - getSkipLeadingRows(), getParentForChildren(), isClean()); - skipLeadingRows_ = null; - } - return skipLeadingRowsBuilder_; - } - - private com.google.protobuf.BoolValue allowJaggedRows_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.BoolValue, - com.google.protobuf.BoolValue.Builder, - com.google.protobuf.BoolValueOrBuilder> - allowJaggedRowsBuilder_; - /** - * - * - *
-         * Accept rows that are missing trailing optional columns.
-         * 
- * - * .google.protobuf.BoolValue allow_jagged_rows = 5; - */ - public boolean hasAllowJaggedRows() { - return allowJaggedRowsBuilder_ != null || allowJaggedRows_ != null; - } - /** - * - * - *
-         * Accept rows that are missing trailing optional columns.
-         * 
- * - * .google.protobuf.BoolValue allow_jagged_rows = 5; - */ - public com.google.protobuf.BoolValue getAllowJaggedRows() { - if (allowJaggedRowsBuilder_ == null) { - return allowJaggedRows_ == null - ? com.google.protobuf.BoolValue.getDefaultInstance() - : allowJaggedRows_; - } else { - return allowJaggedRowsBuilder_.getMessage(); - } - } - /** - * - * - *
-         * Accept rows that are missing trailing optional columns.
-         * 
- * - * .google.protobuf.BoolValue allow_jagged_rows = 5; - */ - public Builder setAllowJaggedRows(com.google.protobuf.BoolValue value) { - if (allowJaggedRowsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - allowJaggedRows_ = value; - onChanged(); - } else { - allowJaggedRowsBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-         * Accept rows that are missing trailing optional columns.
-         * 
- * - * .google.protobuf.BoolValue allow_jagged_rows = 5; - */ - public Builder setAllowJaggedRows(com.google.protobuf.BoolValue.Builder builderForValue) { - if (allowJaggedRowsBuilder_ == null) { - allowJaggedRows_ = builderForValue.build(); - onChanged(); - } else { - allowJaggedRowsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-         * Accept rows that are missing trailing optional columns.
-         * 
- * - * .google.protobuf.BoolValue allow_jagged_rows = 5; - */ - public Builder mergeAllowJaggedRows(com.google.protobuf.BoolValue value) { - if (allowJaggedRowsBuilder_ == null) { - if (allowJaggedRows_ != null) { - allowJaggedRows_ = - com.google.protobuf.BoolValue.newBuilder(allowJaggedRows_) - .mergeFrom(value) - .buildPartial(); - } else { - allowJaggedRows_ = value; - } - onChanged(); - } else { - allowJaggedRowsBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-         * Accept rows that are missing trailing optional columns.
-         * 
- * - * .google.protobuf.BoolValue allow_jagged_rows = 5; - */ - public Builder clearAllowJaggedRows() { - if (allowJaggedRowsBuilder_ == null) { - allowJaggedRows_ = null; - onChanged(); - } else { - allowJaggedRows_ = null; - allowJaggedRowsBuilder_ = null; - } - - return this; - } - /** - * - * - *
-         * Accept rows that are missing trailing optional columns.
-         * 
- * - * .google.protobuf.BoolValue allow_jagged_rows = 5; - */ - public com.google.protobuf.BoolValue.Builder getAllowJaggedRowsBuilder() { - - onChanged(); - return getAllowJaggedRowsFieldBuilder().getBuilder(); - } - /** - * - * - *
-         * Accept rows that are missing trailing optional columns.
-         * 
- * - * .google.protobuf.BoolValue allow_jagged_rows = 5; - */ - public com.google.protobuf.BoolValueOrBuilder getAllowJaggedRowsOrBuilder() { - if (allowJaggedRowsBuilder_ != null) { - return allowJaggedRowsBuilder_.getMessageOrBuilder(); - } else { - return allowJaggedRows_ == null - ? com.google.protobuf.BoolValue.getDefaultInstance() - : allowJaggedRows_; - } - } - /** - * - * - *
-         * Accept rows that are missing trailing optional columns.
-         * 
- * - * .google.protobuf.BoolValue allow_jagged_rows = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.BoolValue, - com.google.protobuf.BoolValue.Builder, - com.google.protobuf.BoolValueOrBuilder> - getAllowJaggedRowsFieldBuilder() { - if (allowJaggedRowsBuilder_ == null) { - allowJaggedRowsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.BoolValue, - com.google.protobuf.BoolValue.Builder, - com.google.protobuf.BoolValueOrBuilder>( - getAllowJaggedRows(), getParentForChildren(), isClean()); - allowJaggedRows_ = null; - } - return allowJaggedRowsBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition.CsvOptions) - } - - // @@protoc_insertion_point(class_scope:google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition.CsvOptions) - private static final com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo - .TableDefinition.CsvOptions - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition - .CsvOptions(); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition - .CsvOptions - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CsvOptions parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CsvOptions(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition.CsvOptions - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - private int bitField0_; - public static final int TABLE_ID_FIELD_NUMBER = 1; - private volatile java.lang.Object tableId_; - /** - * - * - *
-     * BigQuery table_id (required). This will be used to reference this
-     * table in the query.
-     * 
- * - * string table_id = 1; - */ - public java.lang.String getTableId() { - java.lang.Object ref = tableId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - tableId_ = s; - return s; - } - } - /** - * - * - *
-     * BigQuery table_id (required). This will be used to reference this
-     * table in the query.
-     * 
- * - * string table_id = 1; - */ - public com.google.protobuf.ByteString getTableIdBytes() { - java.lang.Object ref = tableId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - tableId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SOURCE_URIS_FIELD_NUMBER = 2; - private com.google.protobuf.LazyStringList sourceUris_; - /** - * - * - *
-     * URIs for the data to be imported. All URIs must be from the same storage
-     * system.
-     * 
- * - * repeated string source_uris = 2; - */ - public com.google.protobuf.ProtocolStringList getSourceUrisList() { - return sourceUris_; - } - /** - * - * - *
-     * URIs for the data to be imported. All URIs must be from the same storage
-     * system.
-     * 
- * - * repeated string source_uris = 2; - */ - public int getSourceUrisCount() { - return sourceUris_.size(); - } - /** - * - * - *
-     * URIs for the data to be imported. All URIs must be from the same storage
-     * system.
-     * 
- * - * repeated string source_uris = 2; - */ - public java.lang.String getSourceUris(int index) { - return sourceUris_.get(index); - } - /** - * - * - *
-     * URIs for the data to be imported. All URIs must be from the same storage
-     * system.
-     * 
- * - * repeated string source_uris = 2; - */ - public com.google.protobuf.ByteString getSourceUrisBytes(int index) { - return sourceUris_.getByteString(index); - } - - public static final int FORMAT_FIELD_NUMBER = 3; - private int format_; - /** - * - * - *
-     * Describes the format of the data in source_uri.
-     * 
- * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.Format format = 3; - */ - public int getFormatValue() { - return format_; - } - /** - * - * - *
-     * Describes the format of the data in source_uri.
-     * 
- * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.Format format = 3; - */ - public com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.Format getFormat() { - @SuppressWarnings("deprecation") - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.Format result = - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.Format.valueOf(format_); - return result == null - ? com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.Format.UNRECOGNIZED - : result; - } - - public static final int MAX_BAD_RECORDS_FIELD_NUMBER = 4; - private int maxBadRecords_; - /** - * - * - *
-     * Specify the maximum number of bad records that can be ignored.
-     * If bad records exceed this threshold the query is aborted.
-     * 
- * - * int32 max_bad_records = 4; - */ - public int getMaxBadRecords() { - return maxBadRecords_; - } - - public static final int ENCODING_FIELD_NUMBER = 5; - private int encoding_; - /** - * - * - *
-     * Character encoding of the input when applicable (CSV, JSON).
-     * Defaults to UTF8.
-     * 
- * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.Encoding encoding = 5; - */ - public int getEncodingValue() { - return encoding_; - } - /** - * - * - *
-     * Character encoding of the input when applicable (CSV, JSON).
-     * Defaults to UTF8.
-     * 
- * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.Encoding encoding = 5; - */ - public com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.Encoding getEncoding() { - @SuppressWarnings("deprecation") - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.Encoding result = - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.Encoding.valueOf(encoding_); - return result == null - ? com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.Encoding.UNRECOGNIZED - : result; - } - - public static final int CSV_OPTIONS_FIELD_NUMBER = 6; - private com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition.CsvOptions - csvOptions_; - /** - * - * - *
-     * CSV specific options.
-     * 
- * - * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition.CsvOptions csv_options = 6; - * - */ - public boolean hasCsvOptions() { - return csvOptions_ != null; - } - /** - * - * - *
-     * CSV specific options.
-     * 
- * - * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition.CsvOptions csv_options = 6; - * - */ - public com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition.CsvOptions - getCsvOptions() { - return csvOptions_ == null - ? com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition.CsvOptions - .getDefaultInstance() - : csvOptions_; - } - /** - * - * - *
-     * CSV specific options.
-     * 
- * - * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition.CsvOptions csv_options = 6; - * - */ - public com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition - .CsvOptionsOrBuilder - getCsvOptionsOrBuilder() { - return getCsvOptions(); - } - - public static final int SCHEMA_FIELD_NUMBER = 7; - private com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema schema_; - /** - * - * - *
-     * Optional schema for the data. When not specified for JSON and CSV formats
-     * we will try to detect it automatically.
-     * 
- * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema schema = 7; - */ - public boolean hasSchema() { - return schema_ != null; - } - /** - * - * - *
-     * Optional schema for the data. When not specified for JSON and CSV formats
-     * we will try to detect it automatically.
-     * 
- * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema schema = 7; - */ - public com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema getSchema() { - return schema_ == null - ? com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema - .getDefaultInstance() - : schema_; - } - /** - * - * - *
-     * Optional schema for the data. When not specified for JSON and CSV formats
-     * we will try to detect it automatically.
-     * 
- * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema schema = 7; - */ - public com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchemaOrBuilder - getSchemaOrBuilder() { - return getSchema(); - } - - public static final int IGNORE_UNKNOWN_VALUES_FIELD_NUMBER = 10; - private com.google.protobuf.BoolValue ignoreUnknownValues_; - /** - * - * - *
-     * Indicates if extra values that are not represented in the table schema is
-     * allowed.
-     * 
- * - * .google.protobuf.BoolValue ignore_unknown_values = 10; - */ - public boolean hasIgnoreUnknownValues() { - return ignoreUnknownValues_ != null; - } - /** - * - * - *
-     * Indicates if extra values that are not represented in the table schema is
-     * allowed.
-     * 
- * - * .google.protobuf.BoolValue ignore_unknown_values = 10; - */ - public com.google.protobuf.BoolValue getIgnoreUnknownValues() { - return ignoreUnknownValues_ == null - ? com.google.protobuf.BoolValue.getDefaultInstance() - : ignoreUnknownValues_; - } - /** - * - * - *
-     * Indicates if extra values that are not represented in the table schema is
-     * allowed.
-     * 
- * - * .google.protobuf.BoolValue ignore_unknown_values = 10; - */ - public com.google.protobuf.BoolValueOrBuilder getIgnoreUnknownValuesOrBuilder() { - return getIgnoreUnknownValues(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getTableIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, tableId_); - } - for (int i = 0; i < sourceUris_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, sourceUris_.getRaw(i)); - } - if (format_ - != com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.Format.FORMAT_UNSPECIFIED - .getNumber()) { - output.writeEnum(3, format_); - } - if (maxBadRecords_ != 0) { - output.writeInt32(4, maxBadRecords_); - } - if (encoding_ - != com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.Encoding - .ENCODING_UNSPECIFIED - .getNumber()) { - output.writeEnum(5, encoding_); - } - if (csvOptions_ != null) { - output.writeMessage(6, getCsvOptions()); - } - if (schema_ != null) { - output.writeMessage(7, getSchema()); - } - if (ignoreUnknownValues_ != null) { - output.writeMessage(10, getIgnoreUnknownValues()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getTableIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, tableId_); - } - { - int dataSize = 0; - for (int i = 0; i < sourceUris_.size(); i++) { - dataSize += computeStringSizeNoTag(sourceUris_.getRaw(i)); - } - size += dataSize; - size += 1 * getSourceUrisList().size(); - } - if (format_ - != com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.Format.FORMAT_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, format_); - } - if (maxBadRecords_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, maxBadRecords_); - } - if (encoding_ - != com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.Encoding - .ENCODING_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, encoding_); - } - if (csvOptions_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getCsvOptions()); - } - if (schema_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getSchema()); - } - if (ignoreUnknownValues_ != null) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(10, getIgnoreUnknownValues()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition)) { - return super.equals(obj); - } - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition other = - (com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition) obj; - - if (!getTableId().equals(other.getTableId())) return false; - if (!getSourceUrisList().equals(other.getSourceUrisList())) return false; - if (format_ != other.format_) return false; - if (getMaxBadRecords() != other.getMaxBadRecords()) return false; - if (encoding_ != other.encoding_) return false; - if (hasCsvOptions() != other.hasCsvOptions()) return false; - if (hasCsvOptions()) { - if (!getCsvOptions().equals(other.getCsvOptions())) return false; - } - if (hasSchema() != other.hasSchema()) return false; - if (hasSchema()) { - if (!getSchema().equals(other.getSchema())) return false; - } - if (hasIgnoreUnknownValues() != other.hasIgnoreUnknownValues()) return false; - if (hasIgnoreUnknownValues()) { - if (!getIgnoreUnknownValues().equals(other.getIgnoreUnknownValues())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + TABLE_ID_FIELD_NUMBER; - hash = (53 * hash) + getTableId().hashCode(); - if (getSourceUrisCount() > 0) { - hash = (37 * hash) + SOURCE_URIS_FIELD_NUMBER; - hash = (53 * hash) + getSourceUrisList().hashCode(); - } - hash = (37 * hash) + FORMAT_FIELD_NUMBER; - hash = (53 * hash) + format_; - hash = (37 * hash) + MAX_BAD_RECORDS_FIELD_NUMBER; - hash = (53 * hash) + getMaxBadRecords(); - hash = (37 * hash) + ENCODING_FIELD_NUMBER; - hash = (53 * hash) + encoding_; - if (hasCsvOptions()) { - hash = (37 * hash) + CSV_OPTIONS_FIELD_NUMBER; - hash = (53 * hash) + getCsvOptions().hashCode(); - } - if (hasSchema()) { - hash = (37 * hash) + SCHEMA_FIELD_NUMBER; - hash = (53 * hash) + getSchema().hashCode(); - } - if (hasIgnoreUnknownValues()) { - hash = (37 * hash) + IGNORE_UNKNOWN_VALUES_FIELD_NUMBER; - hash = (53 * hash) + getIgnoreUnknownValues().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition - parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition - parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-     * External table definition. These tables can be referenced with 'name'
-     * in the query and can be read just like any other table.
-     * 
- * - * Protobuf type {@code google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition) - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinitionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_ImportedDataInfo_TableDefinition_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_ImportedDataInfo_TableDefinition_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition.class, - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition.Builder - .class); - } - - // Construct using - // com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - tableId_ = ""; - - sourceUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - format_ = 0; - - maxBadRecords_ = 0; - - encoding_ = 0; - - if (csvOptionsBuilder_ == null) { - csvOptions_ = null; - } else { - csvOptions_ = null; - csvOptionsBuilder_ = null; - } - if (schemaBuilder_ == null) { - schema_ = null; - } else { - schema_ = null; - schemaBuilder_ = null; - } - if (ignoreUnknownValuesBuilder_ == null) { - ignoreUnknownValues_ = null; - } else { - ignoreUnknownValues_ = null; - ignoreUnknownValuesBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_ImportedDataInfo_TableDefinition_descriptor; - } - - @java.lang.Override - public com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition - getDefaultInstanceForType() { - return com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition build() { - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition - buildPartial() { - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition result = - new com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - result.tableId_ = tableId_; - if (((bitField0_ & 0x00000002) != 0)) { - sourceUris_ = sourceUris_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.sourceUris_ = sourceUris_; - result.format_ = format_; - result.maxBadRecords_ = maxBadRecords_; - result.encoding_ = encoding_; - if (csvOptionsBuilder_ == null) { - result.csvOptions_ = csvOptions_; - } else { - result.csvOptions_ = csvOptionsBuilder_.build(); - } - if (schemaBuilder_ == null) { - result.schema_ = schema_; - } else { - result.schema_ = schemaBuilder_.build(); - } - if (ignoreUnknownValuesBuilder_ == null) { - result.ignoreUnknownValues_ = ignoreUnknownValues_; - } else { - result.ignoreUnknownValues_ = ignoreUnknownValuesBuilder_.build(); - } - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition) { - return mergeFrom( - (com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition other) { - if (other - == com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition - .getDefaultInstance()) return this; - if (!other.getTableId().isEmpty()) { - tableId_ = other.tableId_; - onChanged(); - } - if (!other.sourceUris_.isEmpty()) { - if (sourceUris_.isEmpty()) { - sourceUris_ = other.sourceUris_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureSourceUrisIsMutable(); - sourceUris_.addAll(other.sourceUris_); - } - onChanged(); - } - if (other.format_ != 0) { - setFormatValue(other.getFormatValue()); - } - if (other.getMaxBadRecords() != 0) { - setMaxBadRecords(other.getMaxBadRecords()); - } - if (other.encoding_ != 0) { - setEncodingValue(other.getEncodingValue()); - } - if (other.hasCsvOptions()) { - mergeCsvOptions(other.getCsvOptions()); - } - if (other.hasSchema()) { - mergeSchema(other.getSchema()); - } - if (other.hasIgnoreUnknownValues()) { - mergeIgnoreUnknownValues(other.getIgnoreUnknownValues()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition parsedMessage = - null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.lang.Object tableId_ = ""; - /** - * - * - *
-       * BigQuery table_id (required). This will be used to reference this
-       * table in the query.
-       * 
- * - * string table_id = 1; - */ - public java.lang.String getTableId() { - java.lang.Object ref = tableId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - tableId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-       * BigQuery table_id (required). This will be used to reference this
-       * table in the query.
-       * 
- * - * string table_id = 1; - */ - public com.google.protobuf.ByteString getTableIdBytes() { - java.lang.Object ref = tableId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - tableId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-       * BigQuery table_id (required). This will be used to reference this
-       * table in the query.
-       * 
- * - * string table_id = 1; - */ - public Builder setTableId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - tableId_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * BigQuery table_id (required). This will be used to reference this
-       * table in the query.
-       * 
- * - * string table_id = 1; - */ - public Builder clearTableId() { - - tableId_ = getDefaultInstance().getTableId(); - onChanged(); - return this; - } - /** - * - * - *
-       * BigQuery table_id (required). This will be used to reference this
-       * table in the query.
-       * 
- * - * string table_id = 1; - */ - public Builder setTableIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - tableId_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList sourceUris_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureSourceUrisIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - sourceUris_ = new com.google.protobuf.LazyStringArrayList(sourceUris_); - bitField0_ |= 0x00000002; - } - } - /** - * - * - *
-       * URIs for the data to be imported. All URIs must be from the same storage
-       * system.
-       * 
- * - * repeated string source_uris = 2; - */ - public com.google.protobuf.ProtocolStringList getSourceUrisList() { - return sourceUris_.getUnmodifiableView(); - } - /** - * - * - *
-       * URIs for the data to be imported. All URIs must be from the same storage
-       * system.
-       * 
- * - * repeated string source_uris = 2; - */ - public int getSourceUrisCount() { - return sourceUris_.size(); - } - /** - * - * - *
-       * URIs for the data to be imported. All URIs must be from the same storage
-       * system.
-       * 
- * - * repeated string source_uris = 2; - */ - public java.lang.String getSourceUris(int index) { - return sourceUris_.get(index); - } - /** - * - * - *
-       * URIs for the data to be imported. All URIs must be from the same storage
-       * system.
-       * 
- * - * repeated string source_uris = 2; - */ - public com.google.protobuf.ByteString getSourceUrisBytes(int index) { - return sourceUris_.getByteString(index); - } - /** - * - * - *
-       * URIs for the data to be imported. All URIs must be from the same storage
-       * system.
-       * 
- * - * repeated string source_uris = 2; - */ - public Builder setSourceUris(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureSourceUrisIsMutable(); - sourceUris_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-       * URIs for the data to be imported. All URIs must be from the same storage
-       * system.
-       * 
- * - * repeated string source_uris = 2; - */ - public Builder addSourceUris(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureSourceUrisIsMutable(); - sourceUris_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-       * URIs for the data to be imported. All URIs must be from the same storage
-       * system.
-       * 
- * - * repeated string source_uris = 2; - */ - public Builder addAllSourceUris(java.lang.Iterable values) { - ensureSourceUrisIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, sourceUris_); - onChanged(); - return this; - } - /** - * - * - *
-       * URIs for the data to be imported. All URIs must be from the same storage
-       * system.
-       * 
- * - * repeated string source_uris = 2; - */ - public Builder clearSourceUris() { - sourceUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-       * URIs for the data to be imported. All URIs must be from the same storage
-       * system.
-       * 
- * - * repeated string source_uris = 2; - */ - public Builder addSourceUrisBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureSourceUrisIsMutable(); - sourceUris_.add(value); - onChanged(); - return this; - } - - private int format_ = 0; - /** - * - * - *
-       * Describes the format of the data in source_uri.
-       * 
- * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.Format format = 3; - */ - public int getFormatValue() { - return format_; - } - /** - * - * - *
-       * Describes the format of the data in source_uri.
-       * 
- * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.Format format = 3; - */ - public Builder setFormatValue(int value) { - format_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * Describes the format of the data in source_uri.
-       * 
- * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.Format format = 3; - */ - public com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.Format getFormat() { - @SuppressWarnings("deprecation") - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.Format result = - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.Format.valueOf(format_); - return result == null - ? com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.Format.UNRECOGNIZED - : result; - } - /** - * - * - *
-       * Describes the format of the data in source_uri.
-       * 
- * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.Format format = 3; - */ - public Builder setFormat( - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.Format value) { - if (value == null) { - throw new NullPointerException(); - } - - format_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-       * Describes the format of the data in source_uri.
-       * 
- * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.Format format = 3; - */ - public Builder clearFormat() { - - format_ = 0; - onChanged(); - return this; - } - - private int maxBadRecords_; - /** - * - * - *
-       * Specify the maximum number of bad records that can be ignored.
-       * If bad records exceed this threshold the query is aborted.
-       * 
- * - * int32 max_bad_records = 4; - */ - public int getMaxBadRecords() { - return maxBadRecords_; - } - /** - * - * - *
-       * Specify the maximum number of bad records that can be ignored.
-       * If bad records exceed this threshold the query is aborted.
-       * 
- * - * int32 max_bad_records = 4; - */ - public Builder setMaxBadRecords(int value) { - - maxBadRecords_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * Specify the maximum number of bad records that can be ignored.
-       * If bad records exceed this threshold the query is aborted.
-       * 
- * - * int32 max_bad_records = 4; - */ - public Builder clearMaxBadRecords() { - - maxBadRecords_ = 0; - onChanged(); - return this; - } - - private int encoding_ = 0; - /** - * - * - *
-       * Character encoding of the input when applicable (CSV, JSON).
-       * Defaults to UTF8.
-       * 
- * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.Encoding encoding = 5; - */ - public int getEncodingValue() { - return encoding_; - } - /** - * - * - *
-       * Character encoding of the input when applicable (CSV, JSON).
-       * Defaults to UTF8.
-       * 
- * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.Encoding encoding = 5; - */ - public Builder setEncodingValue(int value) { - encoding_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * Character encoding of the input when applicable (CSV, JSON).
-       * Defaults to UTF8.
-       * 
- * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.Encoding encoding = 5; - */ - public com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.Encoding getEncoding() { - @SuppressWarnings("deprecation") - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.Encoding result = - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.Encoding.valueOf(encoding_); - return result == null - ? com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.Encoding.UNRECOGNIZED - : result; - } - /** - * - * - *
-       * Character encoding of the input when applicable (CSV, JSON).
-       * Defaults to UTF8.
-       * 
- * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.Encoding encoding = 5; - */ - public Builder setEncoding( - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.Encoding value) { - if (value == null) { - throw new NullPointerException(); - } - - encoding_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-       * Character encoding of the input when applicable (CSV, JSON).
-       * Defaults to UTF8.
-       * 
- * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.Encoding encoding = 5; - */ - public Builder clearEncoding() { - - encoding_ = 0; - onChanged(); - return this; - } - - private com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition.CsvOptions - csvOptions_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition.CsvOptions, - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition.CsvOptions - .Builder, - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition - .CsvOptionsOrBuilder> - csvOptionsBuilder_; - /** - * - * - *
-       * CSV specific options.
-       * 
- * - * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition.CsvOptions csv_options = 6; - * - */ - public boolean hasCsvOptions() { - return csvOptionsBuilder_ != null || csvOptions_ != null; - } - /** - * - * - *
-       * CSV specific options.
-       * 
- * - * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition.CsvOptions csv_options = 6; - * - */ - public com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition.CsvOptions - getCsvOptions() { - if (csvOptionsBuilder_ == null) { - return csvOptions_ == null - ? com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition - .CsvOptions.getDefaultInstance() - : csvOptions_; - } else { - return csvOptionsBuilder_.getMessage(); - } - } - /** - * - * - *
-       * CSV specific options.
-       * 
- * - * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition.CsvOptions csv_options = 6; - * - */ - public Builder setCsvOptions( - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition.CsvOptions - value) { - if (csvOptionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - csvOptions_ = value; - onChanged(); - } else { - csvOptionsBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-       * CSV specific options.
-       * 
- * - * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition.CsvOptions csv_options = 6; - * - */ - public Builder setCsvOptions( - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition.CsvOptions - .Builder - builderForValue) { - if (csvOptionsBuilder_ == null) { - csvOptions_ = builderForValue.build(); - onChanged(); - } else { - csvOptionsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-       * CSV specific options.
-       * 
- * - * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition.CsvOptions csv_options = 6; - * - */ - public Builder mergeCsvOptions( - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition.CsvOptions - value) { - if (csvOptionsBuilder_ == null) { - if (csvOptions_ != null) { - csvOptions_ = - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition - .CsvOptions.newBuilder(csvOptions_) - .mergeFrom(value) - .buildPartial(); - } else { - csvOptions_ = value; - } - onChanged(); - } else { - csvOptionsBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-       * CSV specific options.
-       * 
- * - * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition.CsvOptions csv_options = 6; - * - */ - public Builder clearCsvOptions() { - if (csvOptionsBuilder_ == null) { - csvOptions_ = null; - onChanged(); - } else { - csvOptions_ = null; - csvOptionsBuilder_ = null; - } - - return this; - } - /** - * - * - *
-       * CSV specific options.
-       * 
- * - * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition.CsvOptions csv_options = 6; - * - */ - public com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition.CsvOptions - .Builder - getCsvOptionsBuilder() { - - onChanged(); - return getCsvOptionsFieldBuilder().getBuilder(); - } - /** - * - * - *
-       * CSV specific options.
-       * 
- * - * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition.CsvOptions csv_options = 6; - * - */ - public com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition - .CsvOptionsOrBuilder - getCsvOptionsOrBuilder() { - if (csvOptionsBuilder_ != null) { - return csvOptionsBuilder_.getMessageOrBuilder(); - } else { - return csvOptions_ == null - ? com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition - .CsvOptions.getDefaultInstance() - : csvOptions_; - } - } - /** - * - * - *
-       * CSV specific options.
-       * 
- * - * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition.CsvOptions csv_options = 6; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition.CsvOptions, - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition.CsvOptions - .Builder, - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition - .CsvOptionsOrBuilder> - getCsvOptionsFieldBuilder() { - if (csvOptionsBuilder_ == null) { - csvOptionsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition - .CsvOptions, - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition - .CsvOptions.Builder, - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition - .CsvOptionsOrBuilder>(getCsvOptions(), getParentForChildren(), isClean()); - csvOptions_ = null; - } - return csvOptionsBuilder_; - } - - private com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema schema_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema, - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema.Builder, - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchemaOrBuilder> - schemaBuilder_; - /** - * - * - *
-       * Optional schema for the data. When not specified for JSON and CSV formats
-       * we will try to detect it automatically.
-       * 
- * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema schema = 7; - * - */ - public boolean hasSchema() { - return schemaBuilder_ != null || schema_ != null; - } - /** - * - * - *
-       * Optional schema for the data. When not specified for JSON and CSV formats
-       * we will try to detect it automatically.
-       * 
- * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema schema = 7; - * - */ - public com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema getSchema() { - if (schemaBuilder_ == null) { - return schema_ == null - ? com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema - .getDefaultInstance() - : schema_; - } else { - return schemaBuilder_.getMessage(); - } - } - /** - * - * - *
-       * Optional schema for the data. When not specified for JSON and CSV formats
-       * we will try to detect it automatically.
-       * 
- * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema schema = 7; - * - */ - public Builder setSchema( - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema value) { - if (schemaBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - schema_ = value; - onChanged(); - } else { - schemaBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-       * Optional schema for the data. When not specified for JSON and CSV formats
-       * we will try to detect it automatically.
-       * 
- * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema schema = 7; - * - */ - public Builder setSchema( - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema.Builder - builderForValue) { - if (schemaBuilder_ == null) { - schema_ = builderForValue.build(); - onChanged(); - } else { - schemaBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-       * Optional schema for the data. When not specified for JSON and CSV formats
-       * we will try to detect it automatically.
-       * 
- * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema schema = 7; - * - */ - public Builder mergeSchema( - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema value) { - if (schemaBuilder_ == null) { - if (schema_ != null) { - schema_ = - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema.newBuilder( - schema_) - .mergeFrom(value) - .buildPartial(); - } else { - schema_ = value; - } - onChanged(); - } else { - schemaBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-       * Optional schema for the data. When not specified for JSON and CSV formats
-       * we will try to detect it automatically.
-       * 
- * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema schema = 7; - * - */ - public Builder clearSchema() { - if (schemaBuilder_ == null) { - schema_ = null; - onChanged(); - } else { - schema_ = null; - schemaBuilder_ = null; - } - - return this; - } - /** - * - * - *
-       * Optional schema for the data. When not specified for JSON and CSV formats
-       * we will try to detect it automatically.
-       * 
- * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema schema = 7; - * - */ - public com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema.Builder - getSchemaBuilder() { - - onChanged(); - return getSchemaFieldBuilder().getBuilder(); - } - /** - * - * - *
-       * Optional schema for the data. When not specified for JSON and CSV formats
-       * we will try to detect it automatically.
-       * 
- * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema schema = 7; - * - */ - public com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchemaOrBuilder - getSchemaOrBuilder() { - if (schemaBuilder_ != null) { - return schemaBuilder_.getMessageOrBuilder(); - } else { - return schema_ == null - ? com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema - .getDefaultInstance() - : schema_; - } - } - /** - * - * - *
-       * Optional schema for the data. When not specified for JSON and CSV formats
-       * we will try to detect it automatically.
-       * 
- * - * .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema schema = 7; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema, - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema.Builder, - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchemaOrBuilder> - getSchemaFieldBuilder() { - if (schemaBuilder_ == null) { - schemaBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema, - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema.Builder, - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchemaOrBuilder>( - getSchema(), getParentForChildren(), isClean()); - schema_ = null; - } - return schemaBuilder_; - } - - private com.google.protobuf.BoolValue ignoreUnknownValues_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.BoolValue, - com.google.protobuf.BoolValue.Builder, - com.google.protobuf.BoolValueOrBuilder> - ignoreUnknownValuesBuilder_; - /** - * - * - *
-       * Indicates if extra values that are not represented in the table schema is
-       * allowed.
-       * 
- * - * .google.protobuf.BoolValue ignore_unknown_values = 10; - */ - public boolean hasIgnoreUnknownValues() { - return ignoreUnknownValuesBuilder_ != null || ignoreUnknownValues_ != null; - } - /** - * - * - *
-       * Indicates if extra values that are not represented in the table schema is
-       * allowed.
-       * 
- * - * .google.protobuf.BoolValue ignore_unknown_values = 10; - */ - public com.google.protobuf.BoolValue getIgnoreUnknownValues() { - if (ignoreUnknownValuesBuilder_ == null) { - return ignoreUnknownValues_ == null - ? com.google.protobuf.BoolValue.getDefaultInstance() - : ignoreUnknownValues_; - } else { - return ignoreUnknownValuesBuilder_.getMessage(); - } - } - /** - * - * - *
-       * Indicates if extra values that are not represented in the table schema is
-       * allowed.
-       * 
- * - * .google.protobuf.BoolValue ignore_unknown_values = 10; - */ - public Builder setIgnoreUnknownValues(com.google.protobuf.BoolValue value) { - if (ignoreUnknownValuesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ignoreUnknownValues_ = value; - onChanged(); - } else { - ignoreUnknownValuesBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-       * Indicates if extra values that are not represented in the table schema is
-       * allowed.
-       * 
- * - * .google.protobuf.BoolValue ignore_unknown_values = 10; - */ - public Builder setIgnoreUnknownValues(com.google.protobuf.BoolValue.Builder builderForValue) { - if (ignoreUnknownValuesBuilder_ == null) { - ignoreUnknownValues_ = builderForValue.build(); - onChanged(); - } else { - ignoreUnknownValuesBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-       * Indicates if extra values that are not represented in the table schema is
-       * allowed.
-       * 
- * - * .google.protobuf.BoolValue ignore_unknown_values = 10; - */ - public Builder mergeIgnoreUnknownValues(com.google.protobuf.BoolValue value) { - if (ignoreUnknownValuesBuilder_ == null) { - if (ignoreUnknownValues_ != null) { - ignoreUnknownValues_ = - com.google.protobuf.BoolValue.newBuilder(ignoreUnknownValues_) - .mergeFrom(value) - .buildPartial(); - } else { - ignoreUnknownValues_ = value; - } - onChanged(); - } else { - ignoreUnknownValuesBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-       * Indicates if extra values that are not represented in the table schema is
-       * allowed.
-       * 
- * - * .google.protobuf.BoolValue ignore_unknown_values = 10; - */ - public Builder clearIgnoreUnknownValues() { - if (ignoreUnknownValuesBuilder_ == null) { - ignoreUnknownValues_ = null; - onChanged(); - } else { - ignoreUnknownValues_ = null; - ignoreUnknownValuesBuilder_ = null; - } - - return this; - } - /** - * - * - *
-       * Indicates if extra values that are not represented in the table schema is
-       * allowed.
-       * 
- * - * .google.protobuf.BoolValue ignore_unknown_values = 10; - */ - public com.google.protobuf.BoolValue.Builder getIgnoreUnknownValuesBuilder() { - - onChanged(); - return getIgnoreUnknownValuesFieldBuilder().getBuilder(); - } - /** - * - * - *
-       * Indicates if extra values that are not represented in the table schema is
-       * allowed.
-       * 
- * - * .google.protobuf.BoolValue ignore_unknown_values = 10; - */ - public com.google.protobuf.BoolValueOrBuilder getIgnoreUnknownValuesOrBuilder() { - if (ignoreUnknownValuesBuilder_ != null) { - return ignoreUnknownValuesBuilder_.getMessageOrBuilder(); - } else { - return ignoreUnknownValues_ == null - ? com.google.protobuf.BoolValue.getDefaultInstance() - : ignoreUnknownValues_; - } - } - /** - * - * - *
-       * Indicates if extra values that are not represented in the table schema is
-       * allowed.
-       * 
- * - * .google.protobuf.BoolValue ignore_unknown_values = 10; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.BoolValue, - com.google.protobuf.BoolValue.Builder, - com.google.protobuf.BoolValueOrBuilder> - getIgnoreUnknownValuesFieldBuilder() { - if (ignoreUnknownValuesBuilder_ == null) { - ignoreUnknownValuesBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.BoolValue, - com.google.protobuf.BoolValue.Builder, - com.google.protobuf.BoolValueOrBuilder>( - getIgnoreUnknownValues(), getParentForChildren(), isClean()); - ignoreUnknownValues_ = null; - } - return ignoreUnknownValuesBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition) - } - - // @@protoc_insertion_point(class_scope:google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition) - private static final com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition(); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TableDefinition parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TableDefinition(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - private int bitField0_; - public static final int SQL_FIELD_NUMBER = 1; - private volatile java.lang.Object sql_; - /** - * - * - *
-   * SQL query to run. When empty, API checks that there is only one
-   * table_def specified and loads this table. Only Standard SQL queries
-   * are accepted. Legacy SQL is not allowed.
-   * 
- * - * string sql = 1; - */ - public java.lang.String getSql() { - java.lang.Object ref = sql_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - sql_ = s; - return s; - } - } - /** - * - * - *
-   * SQL query to run. When empty, API checks that there is only one
-   * table_def specified and loads this table. Only Standard SQL queries
-   * are accepted. Legacy SQL is not allowed.
-   * 
- * - * string sql = 1; - */ - public com.google.protobuf.ByteString getSqlBytes() { - java.lang.Object ref = sql_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - sql_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DESTINATION_TABLE_ID_FIELD_NUMBER = 2; - private volatile java.lang.Object destinationTableId_; - /** - * - * - *
-   * Table where results should be written.
-   * 
- * - * string destination_table_id = 2; - */ - public java.lang.String getDestinationTableId() { - java.lang.Object ref = destinationTableId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - destinationTableId_ = s; - return s; - } - } - /** - * - * - *
-   * Table where results should be written.
-   * 
- * - * string destination_table_id = 2; - */ - public com.google.protobuf.ByteString getDestinationTableIdBytes() { - java.lang.Object ref = destinationTableId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - destinationTableId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DESTINATION_TABLE_DESCRIPTION_FIELD_NUMBER = 10; - private volatile java.lang.Object destinationTableDescription_; - /** - * - * - *
-   * The description of a destination table. This can be several sentences
-   * or paragraphs describing the table contents in detail.
-   * 
- * - * string destination_table_description = 10; - */ - public java.lang.String getDestinationTableDescription() { - java.lang.Object ref = destinationTableDescription_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - destinationTableDescription_ = s; - return s; - } - } - /** - * - * - *
-   * The description of a destination table. This can be several sentences
-   * or paragraphs describing the table contents in detail.
-   * 
- * - * string destination_table_description = 10; - */ - public com.google.protobuf.ByteString getDestinationTableDescriptionBytes() { - java.lang.Object ref = destinationTableDescription_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - destinationTableDescription_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TABLE_DEFS_FIELD_NUMBER = 3; - private java.util.List - tableDefs_; - /** - * - * - *
-   * When used WITHOUT the "sql" parameter, describes the schema of the
-   * destination table.
-   * When used WITH the "sql" parameter, describes tables with data stored
-   * outside of BigQuery.
-   * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition table_defs = 3; - * - */ - public java.util.List - getTableDefsList() { - return tableDefs_; - } - /** - * - * - *
-   * When used WITHOUT the "sql" parameter, describes the schema of the
-   * destination table.
-   * When used WITH the "sql" parameter, describes tables with data stored
-   * outside of BigQuery.
-   * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition table_defs = 3; - * - */ - public java.util.List< - ? extends - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinitionOrBuilder> - getTableDefsOrBuilderList() { - return tableDefs_; - } - /** - * - * - *
-   * When used WITHOUT the "sql" parameter, describes the schema of the
-   * destination table.
-   * When used WITH the "sql" parameter, describes tables with data stored
-   * outside of BigQuery.
-   * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition table_defs = 3; - * - */ - public int getTableDefsCount() { - return tableDefs_.size(); - } - /** - * - * - *
-   * When used WITHOUT the "sql" parameter, describes the schema of the
-   * destination table.
-   * When used WITH the "sql" parameter, describes tables with data stored
-   * outside of BigQuery.
-   * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition table_defs = 3; - * - */ - public com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition getTableDefs( - int index) { - return tableDefs_.get(index); - } - /** - * - * - *
-   * When used WITHOUT the "sql" parameter, describes the schema of the
-   * destination table.
-   * When used WITH the "sql" parameter, describes tables with data stored
-   * outside of BigQuery.
-   * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition table_defs = 3; - * - */ - public com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinitionOrBuilder - getTableDefsOrBuilder(int index) { - return tableDefs_.get(index); - } - - public static final int USER_DEFINED_FUNCTIONS_FIELD_NUMBER = 4; - private com.google.protobuf.LazyStringList userDefinedFunctions_; - /** - * - * - *
-   * Inline code for User-defined function resources.
-   * Ignored when "sql" parameter is empty.
-   * 
- * - * repeated string user_defined_functions = 4; - */ - public com.google.protobuf.ProtocolStringList getUserDefinedFunctionsList() { - return userDefinedFunctions_; - } - /** - * - * - *
-   * Inline code for User-defined function resources.
-   * Ignored when "sql" parameter is empty.
-   * 
- * - * repeated string user_defined_functions = 4; - */ - public int getUserDefinedFunctionsCount() { - return userDefinedFunctions_.size(); - } - /** - * - * - *
-   * Inline code for User-defined function resources.
-   * Ignored when "sql" parameter is empty.
-   * 
- * - * repeated string user_defined_functions = 4; - */ - public java.lang.String getUserDefinedFunctions(int index) { - return userDefinedFunctions_.get(index); - } - /** - * - * - *
-   * Inline code for User-defined function resources.
-   * Ignored when "sql" parameter is empty.
-   * 
- * - * repeated string user_defined_functions = 4; - */ - public com.google.protobuf.ByteString getUserDefinedFunctionsBytes(int index) { - return userDefinedFunctions_.getByteString(index); - } - - public static final int WRITE_DISPOSITION_FIELD_NUMBER = 6; - private int writeDisposition_; - /** - * - * - *
-   * Specifies the action if the destination table already exists.
-   * 
- * - * .google.cloud.bigquery.datatransfer.v1.WriteDisposition write_disposition = 6; - */ - public int getWriteDispositionValue() { - return writeDisposition_; - } - /** - * - * - *
-   * Specifies the action if the destination table already exists.
-   * 
- * - * .google.cloud.bigquery.datatransfer.v1.WriteDisposition write_disposition = 6; - */ - public com.google.cloud.bigquery.datatransfer.v1.WriteDisposition getWriteDisposition() { - @SuppressWarnings("deprecation") - com.google.cloud.bigquery.datatransfer.v1.WriteDisposition result = - com.google.cloud.bigquery.datatransfer.v1.WriteDisposition.valueOf(writeDisposition_); - return result == null - ? com.google.cloud.bigquery.datatransfer.v1.WriteDisposition.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 (!getSqlBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, sql_); - } - if (!getDestinationTableIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, destinationTableId_); - } - for (int i = 0; i < tableDefs_.size(); i++) { - output.writeMessage(3, tableDefs_.get(i)); - } - for (int i = 0; i < userDefinedFunctions_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString( - output, 4, userDefinedFunctions_.getRaw(i)); - } - if (writeDisposition_ - != com.google.cloud.bigquery.datatransfer.v1.WriteDisposition.WRITE_DISPOSITION_UNSPECIFIED - .getNumber()) { - output.writeEnum(6, writeDisposition_); - } - if (!getDestinationTableDescriptionBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 10, destinationTableDescription_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getSqlBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, sql_); - } - if (!getDestinationTableIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, destinationTableId_); - } - for (int i = 0; i < tableDefs_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, tableDefs_.get(i)); - } - { - int dataSize = 0; - for (int i = 0; i < userDefinedFunctions_.size(); i++) { - dataSize += computeStringSizeNoTag(userDefinedFunctions_.getRaw(i)); - } - size += dataSize; - size += 1 * getUserDefinedFunctionsList().size(); - } - if (writeDisposition_ - != com.google.cloud.bigquery.datatransfer.v1.WriteDisposition.WRITE_DISPOSITION_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, writeDisposition_); - } - if (!getDestinationTableDescriptionBytes().isEmpty()) { - size += - com.google.protobuf.GeneratedMessageV3.computeStringSize( - 10, destinationTableDescription_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo)) { - return super.equals(obj); - } - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo other = - (com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo) obj; - - if (!getSql().equals(other.getSql())) return false; - if (!getDestinationTableId().equals(other.getDestinationTableId())) return false; - if (!getDestinationTableDescription().equals(other.getDestinationTableDescription())) - return false; - if (!getTableDefsList().equals(other.getTableDefsList())) return false; - if (!getUserDefinedFunctionsList().equals(other.getUserDefinedFunctionsList())) return false; - if (writeDisposition_ != other.writeDisposition_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + SQL_FIELD_NUMBER; - hash = (53 * hash) + getSql().hashCode(); - hash = (37 * hash) + DESTINATION_TABLE_ID_FIELD_NUMBER; - hash = (53 * hash) + getDestinationTableId().hashCode(); - hash = (37 * hash) + DESTINATION_TABLE_DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDestinationTableDescription().hashCode(); - if (getTableDefsCount() > 0) { - hash = (37 * hash) + TABLE_DEFS_FIELD_NUMBER; - hash = (53 * hash) + getTableDefsList().hashCode(); - } - if (getUserDefinedFunctionsCount() > 0) { - hash = (37 * hash) + USER_DEFINED_FUNCTIONS_FIELD_NUMBER; - hash = (53 * hash) + getUserDefinedFunctionsList().hashCode(); - } - hash = (37 * hash) + WRITE_DISPOSITION_FIELD_NUMBER; - hash = (53 * hash) + writeDisposition_; - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 data which should be imported.
-   * 
- * - * Protobuf type {@code google.cloud.bigquery.datatransfer.v1.ImportedDataInfo} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.bigquery.datatransfer.v1.ImportedDataInfo) - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_ImportedDataInfo_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_ImportedDataInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.class, - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.Builder.class); - } - - // Construct using com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getTableDefsFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - sql_ = ""; - - destinationTableId_ = ""; - - destinationTableDescription_ = ""; - - if (tableDefsBuilder_ == null) { - tableDefs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - } else { - tableDefsBuilder_.clear(); - } - userDefinedFunctions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000010); - writeDisposition_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_ImportedDataInfo_descriptor; - } - - @java.lang.Override - public com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo getDefaultInstanceForType() { - return com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo build() { - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo buildPartial() { - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo result = - new com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - result.sql_ = sql_; - result.destinationTableId_ = destinationTableId_; - result.destinationTableDescription_ = destinationTableDescription_; - if (tableDefsBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0)) { - tableDefs_ = java.util.Collections.unmodifiableList(tableDefs_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.tableDefs_ = tableDefs_; - } else { - result.tableDefs_ = tableDefsBuilder_.build(); - } - if (((bitField0_ & 0x00000010) != 0)) { - userDefinedFunctions_ = userDefinedFunctions_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000010); - } - result.userDefinedFunctions_ = userDefinedFunctions_; - result.writeDisposition_ = writeDisposition_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo) { - return mergeFrom((com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo other) { - if (other == com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.getDefaultInstance()) - return this; - if (!other.getSql().isEmpty()) { - sql_ = other.sql_; - onChanged(); - } - if (!other.getDestinationTableId().isEmpty()) { - destinationTableId_ = other.destinationTableId_; - onChanged(); - } - if (!other.getDestinationTableDescription().isEmpty()) { - destinationTableDescription_ = other.destinationTableDescription_; - onChanged(); - } - if (tableDefsBuilder_ == null) { - if (!other.tableDefs_.isEmpty()) { - if (tableDefs_.isEmpty()) { - tableDefs_ = other.tableDefs_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureTableDefsIsMutable(); - tableDefs_.addAll(other.tableDefs_); - } - onChanged(); - } - } else { - if (!other.tableDefs_.isEmpty()) { - if (tableDefsBuilder_.isEmpty()) { - tableDefsBuilder_.dispose(); - tableDefsBuilder_ = null; - tableDefs_ = other.tableDefs_; - bitField0_ = (bitField0_ & ~0x00000008); - tableDefsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getTableDefsFieldBuilder() - : null; - } else { - tableDefsBuilder_.addAllMessages(other.tableDefs_); - } - } - } - if (!other.userDefinedFunctions_.isEmpty()) { - if (userDefinedFunctions_.isEmpty()) { - userDefinedFunctions_ = other.userDefinedFunctions_; - bitField0_ = (bitField0_ & ~0x00000010); - } else { - ensureUserDefinedFunctionsIsMutable(); - userDefinedFunctions_.addAll(other.userDefinedFunctions_); - } - onChanged(); - } - if (other.writeDisposition_ != 0) { - setWriteDispositionValue(other.getWriteDispositionValue()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.lang.Object sql_ = ""; - /** - * - * - *
-     * SQL query to run. When empty, API checks that there is only one
-     * table_def specified and loads this table. Only Standard SQL queries
-     * are accepted. Legacy SQL is not allowed.
-     * 
- * - * string sql = 1; - */ - public java.lang.String getSql() { - java.lang.Object ref = sql_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - sql_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * SQL query to run. When empty, API checks that there is only one
-     * table_def specified and loads this table. Only Standard SQL queries
-     * are accepted. Legacy SQL is not allowed.
-     * 
- * - * string sql = 1; - */ - public com.google.protobuf.ByteString getSqlBytes() { - java.lang.Object ref = sql_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - sql_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * SQL query to run. When empty, API checks that there is only one
-     * table_def specified and loads this table. Only Standard SQL queries
-     * are accepted. Legacy SQL is not allowed.
-     * 
- * - * string sql = 1; - */ - public Builder setSql(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - sql_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * SQL query to run. When empty, API checks that there is only one
-     * table_def specified and loads this table. Only Standard SQL queries
-     * are accepted. Legacy SQL is not allowed.
-     * 
- * - * string sql = 1; - */ - public Builder clearSql() { - - sql_ = getDefaultInstance().getSql(); - onChanged(); - return this; - } - /** - * - * - *
-     * SQL query to run. When empty, API checks that there is only one
-     * table_def specified and loads this table. Only Standard SQL queries
-     * are accepted. Legacy SQL is not allowed.
-     * 
- * - * string sql = 1; - */ - public Builder setSqlBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - sql_ = value; - onChanged(); - return this; - } - - private java.lang.Object destinationTableId_ = ""; - /** - * - * - *
-     * Table where results should be written.
-     * 
- * - * string destination_table_id = 2; - */ - public java.lang.String getDestinationTableId() { - java.lang.Object ref = destinationTableId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - destinationTableId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Table where results should be written.
-     * 
- * - * string destination_table_id = 2; - */ - public com.google.protobuf.ByteString getDestinationTableIdBytes() { - java.lang.Object ref = destinationTableId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - destinationTableId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Table where results should be written.
-     * 
- * - * string destination_table_id = 2; - */ - public Builder setDestinationTableId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - destinationTableId_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Table where results should be written.
-     * 
- * - * string destination_table_id = 2; - */ - public Builder clearDestinationTableId() { - - destinationTableId_ = getDefaultInstance().getDestinationTableId(); - onChanged(); - return this; - } - /** - * - * - *
-     * Table where results should be written.
-     * 
- * - * string destination_table_id = 2; - */ - public Builder setDestinationTableIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - destinationTableId_ = value; - onChanged(); - return this; - } - - private java.lang.Object destinationTableDescription_ = ""; - /** - * - * - *
-     * The description of a destination table. This can be several sentences
-     * or paragraphs describing the table contents in detail.
-     * 
- * - * string destination_table_description = 10; - */ - public java.lang.String getDestinationTableDescription() { - java.lang.Object ref = destinationTableDescription_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - destinationTableDescription_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * The description of a destination table. This can be several sentences
-     * or paragraphs describing the table contents in detail.
-     * 
- * - * string destination_table_description = 10; - */ - public com.google.protobuf.ByteString getDestinationTableDescriptionBytes() { - java.lang.Object ref = destinationTableDescription_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - destinationTableDescription_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * The description of a destination table. This can be several sentences
-     * or paragraphs describing the table contents in detail.
-     * 
- * - * string destination_table_description = 10; - */ - public Builder setDestinationTableDescription(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - destinationTableDescription_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * The description of a destination table. This can be several sentences
-     * or paragraphs describing the table contents in detail.
-     * 
- * - * string destination_table_description = 10; - */ - public Builder clearDestinationTableDescription() { - - destinationTableDescription_ = getDefaultInstance().getDestinationTableDescription(); - onChanged(); - return this; - } - /** - * - * - *
-     * The description of a destination table. This can be several sentences
-     * or paragraphs describing the table contents in detail.
-     * 
- * - * string destination_table_description = 10; - */ - public Builder setDestinationTableDescriptionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - destinationTableDescription_ = value; - onChanged(); - return this; - } - - private java.util.List< - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition> - tableDefs_ = java.util.Collections.emptyList(); - - private void ensureTableDefsIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - tableDefs_ = - new java.util.ArrayList< - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition>( - tableDefs_); - bitField0_ |= 0x00000008; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition, - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition.Builder, - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinitionOrBuilder> - tableDefsBuilder_; - - /** - * - * - *
-     * When used WITHOUT the "sql" parameter, describes the schema of the
-     * destination table.
-     * When used WITH the "sql" parameter, describes tables with data stored
-     * outside of BigQuery.
-     * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition table_defs = 3; - * - */ - public java.util.List< - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition> - getTableDefsList() { - if (tableDefsBuilder_ == null) { - return java.util.Collections.unmodifiableList(tableDefs_); - } else { - return tableDefsBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * When used WITHOUT the "sql" parameter, describes the schema of the
-     * destination table.
-     * When used WITH the "sql" parameter, describes tables with data stored
-     * outside of BigQuery.
-     * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition table_defs = 3; - * - */ - public int getTableDefsCount() { - if (tableDefsBuilder_ == null) { - return tableDefs_.size(); - } else { - return tableDefsBuilder_.getCount(); - } - } - /** - * - * - *
-     * When used WITHOUT the "sql" parameter, describes the schema of the
-     * destination table.
-     * When used WITH the "sql" parameter, describes tables with data stored
-     * outside of BigQuery.
-     * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition table_defs = 3; - * - */ - public com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition getTableDefs( - int index) { - if (tableDefsBuilder_ == null) { - return tableDefs_.get(index); - } else { - return tableDefsBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * When used WITHOUT the "sql" parameter, describes the schema of the
-     * destination table.
-     * When used WITH the "sql" parameter, describes tables with data stored
-     * outside of BigQuery.
-     * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition table_defs = 3; - * - */ - public Builder setTableDefs( - int index, - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition value) { - if (tableDefsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTableDefsIsMutable(); - tableDefs_.set(index, value); - onChanged(); - } else { - tableDefsBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * When used WITHOUT the "sql" parameter, describes the schema of the
-     * destination table.
-     * When used WITH the "sql" parameter, describes tables with data stored
-     * outside of BigQuery.
-     * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition table_defs = 3; - * - */ - public Builder setTableDefs( - int index, - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition.Builder - builderForValue) { - if (tableDefsBuilder_ == null) { - ensureTableDefsIsMutable(); - tableDefs_.set(index, builderForValue.build()); - onChanged(); - } else { - tableDefsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * When used WITHOUT the "sql" parameter, describes the schema of the
-     * destination table.
-     * When used WITH the "sql" parameter, describes tables with data stored
-     * outside of BigQuery.
-     * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition table_defs = 3; - * - */ - public Builder addTableDefs( - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition value) { - if (tableDefsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTableDefsIsMutable(); - tableDefs_.add(value); - onChanged(); - } else { - tableDefsBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * When used WITHOUT the "sql" parameter, describes the schema of the
-     * destination table.
-     * When used WITH the "sql" parameter, describes tables with data stored
-     * outside of BigQuery.
-     * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition table_defs = 3; - * - */ - public Builder addTableDefs( - int index, - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition value) { - if (tableDefsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTableDefsIsMutable(); - tableDefs_.add(index, value); - onChanged(); - } else { - tableDefsBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * When used WITHOUT the "sql" parameter, describes the schema of the
-     * destination table.
-     * When used WITH the "sql" parameter, describes tables with data stored
-     * outside of BigQuery.
-     * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition table_defs = 3; - * - */ - public Builder addTableDefs( - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition.Builder - builderForValue) { - if (tableDefsBuilder_ == null) { - ensureTableDefsIsMutable(); - tableDefs_.add(builderForValue.build()); - onChanged(); - } else { - tableDefsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * When used WITHOUT the "sql" parameter, describes the schema of the
-     * destination table.
-     * When used WITH the "sql" parameter, describes tables with data stored
-     * outside of BigQuery.
-     * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition table_defs = 3; - * - */ - public Builder addTableDefs( - int index, - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition.Builder - builderForValue) { - if (tableDefsBuilder_ == null) { - ensureTableDefsIsMutable(); - tableDefs_.add(index, builderForValue.build()); - onChanged(); - } else { - tableDefsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * When used WITHOUT the "sql" parameter, describes the schema of the
-     * destination table.
-     * When used WITH the "sql" parameter, describes tables with data stored
-     * outside of BigQuery.
-     * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition table_defs = 3; - * - */ - public Builder addAllTableDefs( - java.lang.Iterable< - ? extends - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition> - values) { - if (tableDefsBuilder_ == null) { - ensureTableDefsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, tableDefs_); - onChanged(); - } else { - tableDefsBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * When used WITHOUT the "sql" parameter, describes the schema of the
-     * destination table.
-     * When used WITH the "sql" parameter, describes tables with data stored
-     * outside of BigQuery.
-     * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition table_defs = 3; - * - */ - public Builder clearTableDefs() { - if (tableDefsBuilder_ == null) { - tableDefs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - } else { - tableDefsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * When used WITHOUT the "sql" parameter, describes the schema of the
-     * destination table.
-     * When used WITH the "sql" parameter, describes tables with data stored
-     * outside of BigQuery.
-     * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition table_defs = 3; - * - */ - public Builder removeTableDefs(int index) { - if (tableDefsBuilder_ == null) { - ensureTableDefsIsMutable(); - tableDefs_.remove(index); - onChanged(); - } else { - tableDefsBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * When used WITHOUT the "sql" parameter, describes the schema of the
-     * destination table.
-     * When used WITH the "sql" parameter, describes tables with data stored
-     * outside of BigQuery.
-     * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition table_defs = 3; - * - */ - public com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition.Builder - getTableDefsBuilder(int index) { - return getTableDefsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * When used WITHOUT the "sql" parameter, describes the schema of the
-     * destination table.
-     * When used WITH the "sql" parameter, describes tables with data stored
-     * outside of BigQuery.
-     * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition table_defs = 3; - * - */ - public com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinitionOrBuilder - getTableDefsOrBuilder(int index) { - if (tableDefsBuilder_ == null) { - return tableDefs_.get(index); - } else { - return tableDefsBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * When used WITHOUT the "sql" parameter, describes the schema of the
-     * destination table.
-     * When used WITH the "sql" parameter, describes tables with data stored
-     * outside of BigQuery.
-     * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition table_defs = 3; - * - */ - public java.util.List< - ? extends - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinitionOrBuilder> - getTableDefsOrBuilderList() { - if (tableDefsBuilder_ != null) { - return tableDefsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(tableDefs_); - } - } - /** - * - * - *
-     * When used WITHOUT the "sql" parameter, describes the schema of the
-     * destination table.
-     * When used WITH the "sql" parameter, describes tables with data stored
-     * outside of BigQuery.
-     * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition table_defs = 3; - * - */ - public com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition.Builder - addTableDefsBuilder() { - return getTableDefsFieldBuilder() - .addBuilder( - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition - .getDefaultInstance()); - } - /** - * - * - *
-     * When used WITHOUT the "sql" parameter, describes the schema of the
-     * destination table.
-     * When used WITH the "sql" parameter, describes tables with data stored
-     * outside of BigQuery.
-     * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition table_defs = 3; - * - */ - public com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition.Builder - addTableDefsBuilder(int index) { - return getTableDefsFieldBuilder() - .addBuilder( - index, - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition - .getDefaultInstance()); - } - /** - * - * - *
-     * When used WITHOUT the "sql" parameter, describes the schema of the
-     * destination table.
-     * When used WITH the "sql" parameter, describes tables with data stored
-     * outside of BigQuery.
-     * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition table_defs = 3; - * - */ - public java.util.List< - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition.Builder> - getTableDefsBuilderList() { - return getTableDefsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition, - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition.Builder, - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinitionOrBuilder> - getTableDefsFieldBuilder() { - if (tableDefsBuilder_ == null) { - tableDefsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition, - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition.Builder, - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo - .TableDefinitionOrBuilder>( - tableDefs_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); - tableDefs_ = null; - } - return tableDefsBuilder_; - } - - private com.google.protobuf.LazyStringList userDefinedFunctions_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureUserDefinedFunctionsIsMutable() { - if (!((bitField0_ & 0x00000010) != 0)) { - userDefinedFunctions_ = new com.google.protobuf.LazyStringArrayList(userDefinedFunctions_); - bitField0_ |= 0x00000010; - } - } - /** - * - * - *
-     * Inline code for User-defined function resources.
-     * Ignored when "sql" parameter is empty.
-     * 
- * - * repeated string user_defined_functions = 4; - */ - public com.google.protobuf.ProtocolStringList getUserDefinedFunctionsList() { - return userDefinedFunctions_.getUnmodifiableView(); - } - /** - * - * - *
-     * Inline code for User-defined function resources.
-     * Ignored when "sql" parameter is empty.
-     * 
- * - * repeated string user_defined_functions = 4; - */ - public int getUserDefinedFunctionsCount() { - return userDefinedFunctions_.size(); - } - /** - * - * - *
-     * Inline code for User-defined function resources.
-     * Ignored when "sql" parameter is empty.
-     * 
- * - * repeated string user_defined_functions = 4; - */ - public java.lang.String getUserDefinedFunctions(int index) { - return userDefinedFunctions_.get(index); - } - /** - * - * - *
-     * Inline code for User-defined function resources.
-     * Ignored when "sql" parameter is empty.
-     * 
- * - * repeated string user_defined_functions = 4; - */ - public com.google.protobuf.ByteString getUserDefinedFunctionsBytes(int index) { - return userDefinedFunctions_.getByteString(index); - } - /** - * - * - *
-     * Inline code for User-defined function resources.
-     * Ignored when "sql" parameter is empty.
-     * 
- * - * repeated string user_defined_functions = 4; - */ - public Builder setUserDefinedFunctions(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureUserDefinedFunctionsIsMutable(); - userDefinedFunctions_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Inline code for User-defined function resources.
-     * Ignored when "sql" parameter is empty.
-     * 
- * - * repeated string user_defined_functions = 4; - */ - public Builder addUserDefinedFunctions(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureUserDefinedFunctionsIsMutable(); - userDefinedFunctions_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Inline code for User-defined function resources.
-     * Ignored when "sql" parameter is empty.
-     * 
- * - * repeated string user_defined_functions = 4; - */ - public Builder addAllUserDefinedFunctions(java.lang.Iterable values) { - ensureUserDefinedFunctionsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, userDefinedFunctions_); - onChanged(); - return this; - } - /** - * - * - *
-     * Inline code for User-defined function resources.
-     * Ignored when "sql" parameter is empty.
-     * 
- * - * repeated string user_defined_functions = 4; - */ - public Builder clearUserDefinedFunctions() { - userDefinedFunctions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - /** - * - * - *
-     * Inline code for User-defined function resources.
-     * Ignored when "sql" parameter is empty.
-     * 
- * - * repeated string user_defined_functions = 4; - */ - public Builder addUserDefinedFunctionsBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureUserDefinedFunctionsIsMutable(); - userDefinedFunctions_.add(value); - onChanged(); - return this; - } - - private int writeDisposition_ = 0; - /** - * - * - *
-     * Specifies the action if the destination table already exists.
-     * 
- * - * .google.cloud.bigquery.datatransfer.v1.WriteDisposition write_disposition = 6; - */ - public int getWriteDispositionValue() { - return writeDisposition_; - } - /** - * - * - *
-     * Specifies the action if the destination table already exists.
-     * 
- * - * .google.cloud.bigquery.datatransfer.v1.WriteDisposition write_disposition = 6; - */ - public Builder setWriteDispositionValue(int value) { - writeDisposition_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Specifies the action if the destination table already exists.
-     * 
- * - * .google.cloud.bigquery.datatransfer.v1.WriteDisposition write_disposition = 6; - */ - public com.google.cloud.bigquery.datatransfer.v1.WriteDisposition getWriteDisposition() { - @SuppressWarnings("deprecation") - com.google.cloud.bigquery.datatransfer.v1.WriteDisposition result = - com.google.cloud.bigquery.datatransfer.v1.WriteDisposition.valueOf(writeDisposition_); - return result == null - ? com.google.cloud.bigquery.datatransfer.v1.WriteDisposition.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * Specifies the action if the destination table already exists.
-     * 
- * - * .google.cloud.bigquery.datatransfer.v1.WriteDisposition write_disposition = 6; - */ - public Builder setWriteDisposition( - com.google.cloud.bigquery.datatransfer.v1.WriteDisposition value) { - if (value == null) { - throw new NullPointerException(); - } - - writeDisposition_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Specifies the action if the destination table already exists.
-     * 
- * - * .google.cloud.bigquery.datatransfer.v1.WriteDisposition write_disposition = 6; - */ - public Builder clearWriteDisposition() { - - writeDisposition_ = 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.bigquery.datatransfer.v1.ImportedDataInfo) - } - - // @@protoc_insertion_point(class_scope:google.cloud.bigquery.datatransfer.v1.ImportedDataInfo) - private static final com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo(); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ImportedDataInfo parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ImportedDataInfo(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ImportedDataInfoOrBuilder.java b/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ImportedDataInfoOrBuilder.java deleted file mode 100644 index b710652b1433..000000000000 --- a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ImportedDataInfoOrBuilder.java +++ /dev/null @@ -1,242 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/bigquery/datatransfer/v1/datasource.proto - -package com.google.cloud.bigquery.datatransfer.v1; - -public interface ImportedDataInfoOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.bigquery.datatransfer.v1.ImportedDataInfo) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * SQL query to run. When empty, API checks that there is only one
-   * table_def specified and loads this table. Only Standard SQL queries
-   * are accepted. Legacy SQL is not allowed.
-   * 
- * - * string sql = 1; - */ - java.lang.String getSql(); - /** - * - * - *
-   * SQL query to run. When empty, API checks that there is only one
-   * table_def specified and loads this table. Only Standard SQL queries
-   * are accepted. Legacy SQL is not allowed.
-   * 
- * - * string sql = 1; - */ - com.google.protobuf.ByteString getSqlBytes(); - - /** - * - * - *
-   * Table where results should be written.
-   * 
- * - * string destination_table_id = 2; - */ - java.lang.String getDestinationTableId(); - /** - * - * - *
-   * Table where results should be written.
-   * 
- * - * string destination_table_id = 2; - */ - com.google.protobuf.ByteString getDestinationTableIdBytes(); - - /** - * - * - *
-   * The description of a destination table. This can be several sentences
-   * or paragraphs describing the table contents in detail.
-   * 
- * - * string destination_table_description = 10; - */ - java.lang.String getDestinationTableDescription(); - /** - * - * - *
-   * The description of a destination table. This can be several sentences
-   * or paragraphs describing the table contents in detail.
-   * 
- * - * string destination_table_description = 10; - */ - com.google.protobuf.ByteString getDestinationTableDescriptionBytes(); - - /** - * - * - *
-   * When used WITHOUT the "sql" parameter, describes the schema of the
-   * destination table.
-   * When used WITH the "sql" parameter, describes tables with data stored
-   * outside of BigQuery.
-   * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition table_defs = 3; - * - */ - java.util.List - getTableDefsList(); - /** - * - * - *
-   * When used WITHOUT the "sql" parameter, describes the schema of the
-   * destination table.
-   * When used WITH the "sql" parameter, describes tables with data stored
-   * outside of BigQuery.
-   * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition table_defs = 3; - * - */ - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition getTableDefs( - int index); - /** - * - * - *
-   * When used WITHOUT the "sql" parameter, describes the schema of the
-   * destination table.
-   * When used WITH the "sql" parameter, describes tables with data stored
-   * outside of BigQuery.
-   * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition table_defs = 3; - * - */ - int getTableDefsCount(); - /** - * - * - *
-   * When used WITHOUT the "sql" parameter, describes the schema of the
-   * destination table.
-   * When used WITH the "sql" parameter, describes tables with data stored
-   * outside of BigQuery.
-   * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition table_defs = 3; - * - */ - java.util.List< - ? extends - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinitionOrBuilder> - getTableDefsOrBuilderList(); - /** - * - * - *
-   * When used WITHOUT the "sql" parameter, describes the schema of the
-   * destination table.
-   * When used WITH the "sql" parameter, describes tables with data stored
-   * outside of BigQuery.
-   * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinition table_defs = 3; - * - */ - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.TableDefinitionOrBuilder - getTableDefsOrBuilder(int index); - - /** - * - * - *
-   * Inline code for User-defined function resources.
-   * Ignored when "sql" parameter is empty.
-   * 
- * - * repeated string user_defined_functions = 4; - */ - java.util.List getUserDefinedFunctionsList(); - /** - * - * - *
-   * Inline code for User-defined function resources.
-   * Ignored when "sql" parameter is empty.
-   * 
- * - * repeated string user_defined_functions = 4; - */ - int getUserDefinedFunctionsCount(); - /** - * - * - *
-   * Inline code for User-defined function resources.
-   * Ignored when "sql" parameter is empty.
-   * 
- * - * repeated string user_defined_functions = 4; - */ - java.lang.String getUserDefinedFunctions(int index); - /** - * - * - *
-   * Inline code for User-defined function resources.
-   * Ignored when "sql" parameter is empty.
-   * 
- * - * repeated string user_defined_functions = 4; - */ - com.google.protobuf.ByteString getUserDefinedFunctionsBytes(int index); - - /** - * - * - *
-   * Specifies the action if the destination table already exists.
-   * 
- * - * .google.cloud.bigquery.datatransfer.v1.WriteDisposition write_disposition = 6; - */ - int getWriteDispositionValue(); - /** - * - * - *
-   * Specifies the action if the destination table already exists.
-   * 
- * - * .google.cloud.bigquery.datatransfer.v1.WriteDisposition write_disposition = 6; - */ - com.google.cloud.bigquery.datatransfer.v1.WriteDisposition getWriteDisposition(); -} diff --git a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListDataSourceDefinitionsRequest.java b/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListDataSourceDefinitionsRequest.java deleted file mode 100644 index 97fe354e4df2..000000000000 --- a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListDataSourceDefinitionsRequest.java +++ /dev/null @@ -1,914 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/bigquery/datatransfer/v1/datasource.proto - -package com.google.cloud.bigquery.datatransfer.v1; - -/** - * - * - *
- * Represents the request of the ListDataSourceDefinitions method.
- * 
- * - * Protobuf type {@code google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsRequest} - */ -public final class ListDataSourceDefinitionsRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsRequest) - ListDataSourceDefinitionsRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListDataSourceDefinitionsRequest.newBuilder() to construct. - private ListDataSourceDefinitionsRequest( - com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListDataSourceDefinitionsRequest() { - parent_ = ""; - pageToken_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ListDataSourceDefinitionsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - case 24: - { - pageSize_ = 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.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_ListDataSourceDefinitionsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_ListDataSourceDefinitionsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsRequest.class, - com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsRequest.Builder - .class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - * - * - *
-   * The BigQuery project id for which data sources should be returned.
-   * Must be in the form: `projects/{project_id}/locations/{location_id}`
-   * 
- * - * string parent = 1; - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - * - * - *
-   * The BigQuery project id for which data sources should be returned.
-   * Must be in the form: `projects/{project_id}/locations/{location_id}`
-   * 
- * - * string parent = 1; - */ - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 2; - private volatile java.lang.Object pageToken_; - /** - * - * - *
-   * Pagination token, which can be used to request a specific page
-   * of `ListDataSourceDefinitionsRequest` list results. For multiple-page
-   * results, `ListDataSourceDefinitionsResponse` outputs a `next_page` token,
-   * which can be used as the `page_token` value to request the next page of
-   * the list results.
-   * 
- * - * string page_token = 2; - */ - 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; - } - } - /** - * - * - *
-   * Pagination token, which can be used to request a specific page
-   * of `ListDataSourceDefinitionsRequest` list results. For multiple-page
-   * results, `ListDataSourceDefinitionsResponse` outputs a `next_page` token,
-   * which can be used as the `page_token` value to request the next page of
-   * the list results.
-   * 
- * - * string page_token = 2; - */ - public com.google.protobuf.ByteString getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 3; - private int pageSize_; - /** - * - * - *
-   * Page size. The default page size is the maximum value of 1000 results.
-   * 
- * - * int32 page_size = 3; - */ - public int getPageSize() { - return pageSize_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (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 (!getPageTokenBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, pageToken_); - } - if (pageSize_ != 0) { - output.writeInt32(3, pageSize_); - } - 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 (!getPageTokenBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, pageToken_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsRequest)) { - return super.equals(obj); - } - com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsRequest other = - (com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (!getPageToken().equals(other.getPageToken())) return false; - if (getPageSize() != other.getPageSize()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getPageToken().hashCode(); - hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getPageSize(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsRequest - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsRequest - parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsRequest - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsRequest - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsRequest - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsRequest - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsRequest - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsRequest - parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsRequest - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsRequest - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsRequest - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsRequest - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Represents the request of the ListDataSourceDefinitions method.
-   * 
- * - * Protobuf type {@code google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsRequest) - com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_ListDataSourceDefinitionsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_ListDataSourceDefinitionsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsRequest.class, - com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsRequest.Builder - .class); - } - - // Construct using - // com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.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_ = ""; - - pageToken_ = ""; - - pageSize_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_ListDataSourceDefinitionsRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsRequest - getDefaultInstanceForType() { - return com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsRequest - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsRequest build() { - com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsRequest result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsRequest - buildPartial() { - com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsRequest result = - new com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsRequest(this); - result.parent_ = parent_; - result.pageToken_ = pageToken_; - result.pageSize_ = pageSize_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsRequest) { - return mergeFrom( - (com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsRequest other) { - if (other - == com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsRequest - .getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsRequest parsedMessage = - null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsRequest) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - * - * - *
-     * The BigQuery project id for which data sources should be returned.
-     * Must be in the form: `projects/{project_id}/locations/{location_id}`
-     * 
- * - * string parent = 1; - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * The BigQuery project id for which data sources should be returned.
-     * Must be in the form: `projects/{project_id}/locations/{location_id}`
-     * 
- * - * string parent = 1; - */ - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * The BigQuery project id for which data sources should be returned.
-     * Must be in the form: `projects/{project_id}/locations/{location_id}`
-     * 
- * - * string parent = 1; - */ - public Builder setParent(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * The BigQuery project id for which data sources should be returned.
-     * Must be in the form: `projects/{project_id}/locations/{location_id}`
-     * 
- * - * string parent = 1; - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - * - * - *
-     * The BigQuery project id for which data sources should be returned.
-     * Must be in the form: `projects/{project_id}/locations/{location_id}`
-     * 
- * - * string parent = 1; - */ - public Builder setParentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - * - * - *
-     * Pagination token, which can be used to request a specific page
-     * of `ListDataSourceDefinitionsRequest` list results. For multiple-page
-     * results, `ListDataSourceDefinitionsResponse` outputs a `next_page` token,
-     * which can be used as the `page_token` value to request the next page of
-     * the list results.
-     * 
- * - * string page_token = 2; - */ - 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; - } - } - /** - * - * - *
-     * Pagination token, which can be used to request a specific page
-     * of `ListDataSourceDefinitionsRequest` list results. For multiple-page
-     * results, `ListDataSourceDefinitionsResponse` outputs a `next_page` token,
-     * which can be used as the `page_token` value to request the next page of
-     * the list results.
-     * 
- * - * string page_token = 2; - */ - 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; - } - } - /** - * - * - *
-     * Pagination token, which can be used to request a specific page
-     * of `ListDataSourceDefinitionsRequest` list results. For multiple-page
-     * results, `ListDataSourceDefinitionsResponse` outputs a `next_page` token,
-     * which can be used as the `page_token` value to request the next page of
-     * the list results.
-     * 
- * - * string page_token = 2; - */ - public Builder setPageToken(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - pageToken_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Pagination token, which can be used to request a specific page
-     * of `ListDataSourceDefinitionsRequest` list results. For multiple-page
-     * results, `ListDataSourceDefinitionsResponse` outputs a `next_page` token,
-     * which can be used as the `page_token` value to request the next page of
-     * the list results.
-     * 
- * - * string page_token = 2; - */ - public Builder clearPageToken() { - - pageToken_ = getDefaultInstance().getPageToken(); - onChanged(); - return this; - } - /** - * - * - *
-     * Pagination token, which can be used to request a specific page
-     * of `ListDataSourceDefinitionsRequest` list results. For multiple-page
-     * results, `ListDataSourceDefinitionsResponse` outputs a `next_page` token,
-     * which can be used as the `page_token` value to request the next page of
-     * the list results.
-     * 
- * - * string page_token = 2; - */ - public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - pageToken_ = value; - onChanged(); - return this; - } - - private int pageSize_; - /** - * - * - *
-     * Page size. The default page size is the maximum value of 1000 results.
-     * 
- * - * int32 page_size = 3; - */ - public int getPageSize() { - return pageSize_; - } - /** - * - * - *
-     * Page size. The default page size is the maximum value of 1000 results.
-     * 
- * - * int32 page_size = 3; - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Page size. The default page size is the maximum value of 1000 results.
-     * 
- * - * int32 page_size = 3; - */ - public Builder clearPageSize() { - - pageSize_ = 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.bigquery.datatransfer.v1.ListDataSourceDefinitionsRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsRequest) - private static final com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsRequest(); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsRequest - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListDataSourceDefinitionsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListDataSourceDefinitionsRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsRequest - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListDataSourceDefinitionsRequestOrBuilder.java b/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListDataSourceDefinitionsRequestOrBuilder.java deleted file mode 100644 index 70927742bc0d..000000000000 --- a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListDataSourceDefinitionsRequestOrBuilder.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/bigquery/datatransfer/v1/datasource.proto - -package com.google.cloud.bigquery.datatransfer.v1; - -public interface ListDataSourceDefinitionsRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The BigQuery project id for which data sources should be returned.
-   * Must be in the form: `projects/{project_id}/locations/{location_id}`
-   * 
- * - * string parent = 1; - */ - java.lang.String getParent(); - /** - * - * - *
-   * The BigQuery project id for which data sources should be returned.
-   * Must be in the form: `projects/{project_id}/locations/{location_id}`
-   * 
- * - * string parent = 1; - */ - com.google.protobuf.ByteString getParentBytes(); - - /** - * - * - *
-   * Pagination token, which can be used to request a specific page
-   * of `ListDataSourceDefinitionsRequest` list results. For multiple-page
-   * results, `ListDataSourceDefinitionsResponse` outputs a `next_page` token,
-   * which can be used as the `page_token` value to request the next page of
-   * the list results.
-   * 
- * - * string page_token = 2; - */ - java.lang.String getPageToken(); - /** - * - * - *
-   * Pagination token, which can be used to request a specific page
-   * of `ListDataSourceDefinitionsRequest` list results. For multiple-page
-   * results, `ListDataSourceDefinitionsResponse` outputs a `next_page` token,
-   * which can be used as the `page_token` value to request the next page of
-   * the list results.
-   * 
- * - * string page_token = 2; - */ - com.google.protobuf.ByteString getPageTokenBytes(); - - /** - * - * - *
-   * Page size. The default page size is the maximum value of 1000 results.
-   * 
- * - * int32 page_size = 3; - */ - int getPageSize(); -} diff --git a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListDataSourceDefinitionsResponse.java b/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListDataSourceDefinitionsResponse.java deleted file mode 100644 index 2c07b2cb9743..000000000000 --- a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListDataSourceDefinitionsResponse.java +++ /dev/null @@ -1,1227 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/bigquery/datatransfer/v1/datasource.proto - -package com.google.cloud.bigquery.datatransfer.v1; - -/** - * - * - *
- * Returns a list of supported data source definitions.
- * 
- * - * Protobuf type {@code google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsResponse} - */ -public final class ListDataSourceDefinitionsResponse extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsResponse) - ListDataSourceDefinitionsResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListDataSourceDefinitionsResponse.newBuilder() to construct. - private ListDataSourceDefinitionsResponse( - com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListDataSourceDefinitionsResponse() { - dataSourceDefinitions_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ListDataSourceDefinitionsResponse( - 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)) { - dataSourceDefinitions_ = - new java.util.ArrayList< - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition>(); - mutable_bitField0_ |= 0x00000001; - } - dataSourceDefinitions_.add( - input.readMessage( - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition.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)) { - dataSourceDefinitions_ = java.util.Collections.unmodifiableList(dataSourceDefinitions_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_ListDataSourceDefinitionsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_ListDataSourceDefinitionsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsResponse.class, - com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsResponse.Builder - .class); - } - - private int bitField0_; - public static final int DATA_SOURCE_DEFINITIONS_FIELD_NUMBER = 1; - private java.util.List - dataSourceDefinitions_; - /** - * - * - *
-   * List of supported data source definitions.
-   * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.DataSourceDefinition data_source_definitions = 1; - * - */ - public java.util.List - getDataSourceDefinitionsList() { - return dataSourceDefinitions_; - } - /** - * - * - *
-   * List of supported data source definitions.
-   * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.DataSourceDefinition data_source_definitions = 1; - * - */ - public java.util.List< - ? extends com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinitionOrBuilder> - getDataSourceDefinitionsOrBuilderList() { - return dataSourceDefinitions_; - } - /** - * - * - *
-   * List of supported data source definitions.
-   * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.DataSourceDefinition data_source_definitions = 1; - * - */ - public int getDataSourceDefinitionsCount() { - return dataSourceDefinitions_.size(); - } - /** - * - * - *
-   * List of supported data source definitions.
-   * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.DataSourceDefinition data_source_definitions = 1; - * - */ - public com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition getDataSourceDefinitions( - int index) { - return dataSourceDefinitions_.get(index); - } - /** - * - * - *
-   * List of supported data source definitions.
-   * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.DataSourceDefinition data_source_definitions = 1; - * - */ - public com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinitionOrBuilder - getDataSourceDefinitionsOrBuilder(int index) { - return dataSourceDefinitions_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - private volatile java.lang.Object nextPageToken_; - /** - * - * - *
-   * Output only. The next-pagination token. For multiple-page list results,
-   * this token can be used as the
-   * `ListDataSourceDefinitionsRequest.page_token`
-   * to request the next page of the list results.
-   * 
- * - * string next_page_token = 2; - */ - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. The next-pagination token. For multiple-page list results,
-   * this token can be used as the
-   * `ListDataSourceDefinitionsRequest.page_token`
-   * to request the next page of the list results.
-   * 
- * - * string next_page_token = 2; - */ - public com.google.protobuf.ByteString getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < dataSourceDefinitions_.size(); i++) { - output.writeMessage(1, dataSourceDefinitions_.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 < dataSourceDefinitions_.size(); i++) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 1, dataSourceDefinitions_.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.bigquery.datatransfer.v1.ListDataSourceDefinitionsResponse)) { - return super.equals(obj); - } - com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsResponse other = - (com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsResponse) obj; - - if (!getDataSourceDefinitionsList().equals(other.getDataSourceDefinitionsList())) 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 (getDataSourceDefinitionsCount() > 0) { - hash = (37 * hash) + DATA_SOURCE_DEFINITIONS_FIELD_NUMBER; - hash = (53 * hash) + getDataSourceDefinitionsList().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.bigquery.datatransfer.v1.ListDataSourceDefinitionsResponse - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsResponse - parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsResponse - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsResponse - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsResponse - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsResponse - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsResponse - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsResponse - parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsResponse - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsResponse - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsResponse - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsResponse - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Returns a list of supported data source definitions.
-   * 
- * - * Protobuf type {@code google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsResponse) - com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_ListDataSourceDefinitionsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_ListDataSourceDefinitionsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsResponse.class, - com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsResponse.Builder - .class); - } - - // Construct using - // com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getDataSourceDefinitionsFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (dataSourceDefinitionsBuilder_ == null) { - dataSourceDefinitions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - dataSourceDefinitionsBuilder_.clear(); - } - nextPageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_ListDataSourceDefinitionsResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsResponse - getDefaultInstanceForType() { - return com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsResponse - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsResponse build() { - com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsResponse result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsResponse - buildPartial() { - com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsResponse result = - new com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsResponse(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (dataSourceDefinitionsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - dataSourceDefinitions_ = java.util.Collections.unmodifiableList(dataSourceDefinitions_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.dataSourceDefinitions_ = dataSourceDefinitions_; - } else { - result.dataSourceDefinitions_ = dataSourceDefinitionsBuilder_.build(); - } - result.nextPageToken_ = nextPageToken_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsResponse) { - return mergeFrom( - (com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsResponse other) { - if (other - == com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsResponse - .getDefaultInstance()) return this; - if (dataSourceDefinitionsBuilder_ == null) { - if (!other.dataSourceDefinitions_.isEmpty()) { - if (dataSourceDefinitions_.isEmpty()) { - dataSourceDefinitions_ = other.dataSourceDefinitions_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureDataSourceDefinitionsIsMutable(); - dataSourceDefinitions_.addAll(other.dataSourceDefinitions_); - } - onChanged(); - } - } else { - if (!other.dataSourceDefinitions_.isEmpty()) { - if (dataSourceDefinitionsBuilder_.isEmpty()) { - dataSourceDefinitionsBuilder_.dispose(); - dataSourceDefinitionsBuilder_ = null; - dataSourceDefinitions_ = other.dataSourceDefinitions_; - bitField0_ = (bitField0_ & ~0x00000001); - dataSourceDefinitionsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getDataSourceDefinitionsFieldBuilder() - : null; - } else { - dataSourceDefinitionsBuilder_.addAllMessages(other.dataSourceDefinitions_); - } - } - } - 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.bigquery.datatransfer.v1.ListDataSourceDefinitionsResponse parsedMessage = - null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsResponse) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.util.List - dataSourceDefinitions_ = java.util.Collections.emptyList(); - - private void ensureDataSourceDefinitionsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - dataSourceDefinitions_ = - new java.util.ArrayList( - dataSourceDefinitions_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition, - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition.Builder, - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinitionOrBuilder> - dataSourceDefinitionsBuilder_; - - /** - * - * - *
-     * List of supported data source definitions.
-     * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.DataSourceDefinition data_source_definitions = 1; - * - */ - public java.util.List - getDataSourceDefinitionsList() { - if (dataSourceDefinitionsBuilder_ == null) { - return java.util.Collections.unmodifiableList(dataSourceDefinitions_); - } else { - return dataSourceDefinitionsBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * List of supported data source definitions.
-     * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.DataSourceDefinition data_source_definitions = 1; - * - */ - public int getDataSourceDefinitionsCount() { - if (dataSourceDefinitionsBuilder_ == null) { - return dataSourceDefinitions_.size(); - } else { - return dataSourceDefinitionsBuilder_.getCount(); - } - } - /** - * - * - *
-     * List of supported data source definitions.
-     * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.DataSourceDefinition data_source_definitions = 1; - * - */ - public com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition getDataSourceDefinitions( - int index) { - if (dataSourceDefinitionsBuilder_ == null) { - return dataSourceDefinitions_.get(index); - } else { - return dataSourceDefinitionsBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * List of supported data source definitions.
-     * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.DataSourceDefinition data_source_definitions = 1; - * - */ - public Builder setDataSourceDefinitions( - int index, com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition value) { - if (dataSourceDefinitionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDataSourceDefinitionsIsMutable(); - dataSourceDefinitions_.set(index, value); - onChanged(); - } else { - dataSourceDefinitionsBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * List of supported data source definitions.
-     * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.DataSourceDefinition data_source_definitions = 1; - * - */ - public Builder setDataSourceDefinitions( - int index, - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition.Builder builderForValue) { - if (dataSourceDefinitionsBuilder_ == null) { - ensureDataSourceDefinitionsIsMutable(); - dataSourceDefinitions_.set(index, builderForValue.build()); - onChanged(); - } else { - dataSourceDefinitionsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * List of supported data source definitions.
-     * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.DataSourceDefinition data_source_definitions = 1; - * - */ - public Builder addDataSourceDefinitions( - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition value) { - if (dataSourceDefinitionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDataSourceDefinitionsIsMutable(); - dataSourceDefinitions_.add(value); - onChanged(); - } else { - dataSourceDefinitionsBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * List of supported data source definitions.
-     * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.DataSourceDefinition data_source_definitions = 1; - * - */ - public Builder addDataSourceDefinitions( - int index, com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition value) { - if (dataSourceDefinitionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDataSourceDefinitionsIsMutable(); - dataSourceDefinitions_.add(index, value); - onChanged(); - } else { - dataSourceDefinitionsBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * List of supported data source definitions.
-     * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.DataSourceDefinition data_source_definitions = 1; - * - */ - public Builder addDataSourceDefinitions( - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition.Builder builderForValue) { - if (dataSourceDefinitionsBuilder_ == null) { - ensureDataSourceDefinitionsIsMutable(); - dataSourceDefinitions_.add(builderForValue.build()); - onChanged(); - } else { - dataSourceDefinitionsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * List of supported data source definitions.
-     * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.DataSourceDefinition data_source_definitions = 1; - * - */ - public Builder addDataSourceDefinitions( - int index, - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition.Builder builderForValue) { - if (dataSourceDefinitionsBuilder_ == null) { - ensureDataSourceDefinitionsIsMutable(); - dataSourceDefinitions_.add(index, builderForValue.build()); - onChanged(); - } else { - dataSourceDefinitionsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * List of supported data source definitions.
-     * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.DataSourceDefinition data_source_definitions = 1; - * - */ - public Builder addAllDataSourceDefinitions( - java.lang.Iterable - values) { - if (dataSourceDefinitionsBuilder_ == null) { - ensureDataSourceDefinitionsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dataSourceDefinitions_); - onChanged(); - } else { - dataSourceDefinitionsBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * List of supported data source definitions.
-     * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.DataSourceDefinition data_source_definitions = 1; - * - */ - public Builder clearDataSourceDefinitions() { - if (dataSourceDefinitionsBuilder_ == null) { - dataSourceDefinitions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - dataSourceDefinitionsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * List of supported data source definitions.
-     * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.DataSourceDefinition data_source_definitions = 1; - * - */ - public Builder removeDataSourceDefinitions(int index) { - if (dataSourceDefinitionsBuilder_ == null) { - ensureDataSourceDefinitionsIsMutable(); - dataSourceDefinitions_.remove(index); - onChanged(); - } else { - dataSourceDefinitionsBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * List of supported data source definitions.
-     * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.DataSourceDefinition data_source_definitions = 1; - * - */ - public com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition.Builder - getDataSourceDefinitionsBuilder(int index) { - return getDataSourceDefinitionsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * List of supported data source definitions.
-     * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.DataSourceDefinition data_source_definitions = 1; - * - */ - public com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinitionOrBuilder - getDataSourceDefinitionsOrBuilder(int index) { - if (dataSourceDefinitionsBuilder_ == null) { - return dataSourceDefinitions_.get(index); - } else { - return dataSourceDefinitionsBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * List of supported data source definitions.
-     * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.DataSourceDefinition data_source_definitions = 1; - * - */ - public java.util.List< - ? extends com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinitionOrBuilder> - getDataSourceDefinitionsOrBuilderList() { - if (dataSourceDefinitionsBuilder_ != null) { - return dataSourceDefinitionsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(dataSourceDefinitions_); - } - } - /** - * - * - *
-     * List of supported data source definitions.
-     * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.DataSourceDefinition data_source_definitions = 1; - * - */ - public com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition.Builder - addDataSourceDefinitionsBuilder() { - return getDataSourceDefinitionsFieldBuilder() - .addBuilder( - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition.getDefaultInstance()); - } - /** - * - * - *
-     * List of supported data source definitions.
-     * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.DataSourceDefinition data_source_definitions = 1; - * - */ - public com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition.Builder - addDataSourceDefinitionsBuilder(int index) { - return getDataSourceDefinitionsFieldBuilder() - .addBuilder( - index, - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition.getDefaultInstance()); - } - /** - * - * - *
-     * List of supported data source definitions.
-     * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.DataSourceDefinition data_source_definitions = 1; - * - */ - public java.util.List - getDataSourceDefinitionsBuilderList() { - return getDataSourceDefinitionsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition, - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition.Builder, - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinitionOrBuilder> - getDataSourceDefinitionsFieldBuilder() { - if (dataSourceDefinitionsBuilder_ == null) { - dataSourceDefinitionsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition, - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition.Builder, - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinitionOrBuilder>( - dataSourceDefinitions_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - dataSourceDefinitions_ = null; - } - return dataSourceDefinitionsBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - * - * - *
-     * Output only. The next-pagination token. For multiple-page list results,
-     * this token can be used as the
-     * `ListDataSourceDefinitionsRequest.page_token`
-     * to request the next page of the list results.
-     * 
- * - * string next_page_token = 2; - */ - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. The next-pagination token. For multiple-page list results,
-     * this token can be used as the
-     * `ListDataSourceDefinitionsRequest.page_token`
-     * to request the next page of the list results.
-     * 
- * - * string next_page_token = 2; - */ - public com.google.protobuf.ByteString getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. The next-pagination token. For multiple-page list results,
-     * this token can be used as the
-     * `ListDataSourceDefinitionsRequest.page_token`
-     * to request the next page of the list results.
-     * 
- * - * string next_page_token = 2; - */ - public Builder setNextPageToken(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - nextPageToken_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The next-pagination token. For multiple-page list results,
-     * this token can be used as the
-     * `ListDataSourceDefinitionsRequest.page_token`
-     * to request the next page of the list results.
-     * 
- * - * string next_page_token = 2; - */ - public Builder clearNextPageToken() { - - nextPageToken_ = getDefaultInstance().getNextPageToken(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The next-pagination token. For multiple-page list results,
-     * this token can be used as the
-     * `ListDataSourceDefinitionsRequest.page_token`
-     * to request the next page of the list results.
-     * 
- * - * string next_page_token = 2; - */ - public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - nextPageToken_ = value; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsResponse) - private static final com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsResponse - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsResponse(); - } - - public static com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsResponse - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListDataSourceDefinitionsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListDataSourceDefinitionsResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsResponse - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListDataSourceDefinitionsResponseOrBuilder.java b/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListDataSourceDefinitionsResponseOrBuilder.java deleted file mode 100644 index 22123101c1d3..000000000000 --- a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListDataSourceDefinitionsResponseOrBuilder.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/bigquery/datatransfer/v1/datasource.proto - -package com.google.cloud.bigquery.datatransfer.v1; - -public interface ListDataSourceDefinitionsResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.bigquery.datatransfer.v1.ListDataSourceDefinitionsResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * List of supported data source definitions.
-   * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.DataSourceDefinition data_source_definitions = 1; - * - */ - java.util.List - getDataSourceDefinitionsList(); - /** - * - * - *
-   * List of supported data source definitions.
-   * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.DataSourceDefinition data_source_definitions = 1; - * - */ - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition getDataSourceDefinitions( - int index); - /** - * - * - *
-   * List of supported data source definitions.
-   * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.DataSourceDefinition data_source_definitions = 1; - * - */ - int getDataSourceDefinitionsCount(); - /** - * - * - *
-   * List of supported data source definitions.
-   * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.DataSourceDefinition data_source_definitions = 1; - * - */ - java.util.List - getDataSourceDefinitionsOrBuilderList(); - /** - * - * - *
-   * List of supported data source definitions.
-   * 
- * - * - * repeated .google.cloud.bigquery.datatransfer.v1.DataSourceDefinition data_source_definitions = 1; - * - */ - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinitionOrBuilder - getDataSourceDefinitionsOrBuilder(int index); - - /** - * - * - *
-   * Output only. The next-pagination token. For multiple-page list results,
-   * this token can be used as the
-   * `ListDataSourceDefinitionsRequest.page_token`
-   * to request the next page of the list results.
-   * 
- * - * string next_page_token = 2; - */ - java.lang.String getNextPageToken(); - /** - * - * - *
-   * Output only. The next-pagination token. For multiple-page list results,
-   * this token can be used as the
-   * `ListDataSourceDefinitionsRequest.page_token`
-   * to request the next page of the list results.
-   * 
- * - * string next_page_token = 2; - */ - com.google.protobuf.ByteString getNextPageTokenBytes(); -} diff --git a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/LocationDataSourceName.java b/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/LocationDataSourceName.java deleted file mode 100644 index b49ac613b194..000000000000 --- a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/LocationDataSourceName.java +++ /dev/null @@ -1,215 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.bigquery.datatransfer.v1; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -/** - * AUTO-GENERATED DOCUMENTATION AND CLASS - * - * @deprecated This resource name class will be removed in the next major version. - */ -@javax.annotation.Generated("by GAPIC protoc plugin") -@Deprecated -public class LocationDataSourceName extends DataSourceName { - - private static final PathTemplate PATH_TEMPLATE = - PathTemplate.createWithoutUrlEncoding( - "projects/{project}/locations/{location}/dataSources/{data_source}"); - - private volatile Map fieldValuesMap; - - private final String project; - private final String location; - private final String dataSource; - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getDataSource() { - return dataSource; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - private LocationDataSourceName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - dataSource = Preconditions.checkNotNull(builder.getDataSource()); - } - - public static LocationDataSourceName of(String project, String location, String dataSource) { - return newBuilder().setProject(project).setLocation(location).setDataSource(dataSource).build(); - } - - public static String format(String project, String location, String dataSource) { - return newBuilder() - .setProject(project) - .setLocation(location) - .setDataSource(dataSource) - .build() - .toString(); - } - - public static LocationDataSourceName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PATH_TEMPLATE.validatedMatch( - formattedString, "LocationDataSourceName.parse: formattedString not in valid format"); - return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("data_source")); - } - - 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 (LocationDataSourceName 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("dataSource", dataSource); - 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, "data_source", dataSource); - } - - /** Builder for LocationDataSourceName. */ - public static class Builder extends DataSourceName.Builder { - - private String project; - private String location; - private String dataSource; - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getDataSource() { - return dataSource; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setLocation(String location) { - this.location = location; - return this; - } - - public Builder setDataSource(String dataSource) { - this.dataSource = dataSource; - return this; - } - - private Builder() {} - - private Builder(LocationDataSourceName locationDataSourceName) { - project = locationDataSourceName.project; - location = locationDataSourceName.location; - dataSource = locationDataSourceName.dataSource; - } - - public LocationDataSourceName build() { - return new LocationDataSourceName(this); - } - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof LocationDataSourceName) { - LocationDataSourceName that = (LocationDataSourceName) o; - return (this.project.equals(that.project)) - && (this.location.equals(that.location)) - && (this.dataSource.equals(that.dataSource)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= project.hashCode(); - h *= 1000003; - h ^= location.hashCode(); - h *= 1000003; - h ^= dataSource.hashCode(); - return h; - } -} diff --git a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/LocationRunName.java b/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/LocationRunName.java deleted file mode 100644 index 18caf25e597c..000000000000 --- a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/LocationRunName.java +++ /dev/null @@ -1,247 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.bigquery.datatransfer.v1; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -/** - * AUTO-GENERATED DOCUMENTATION AND CLASS - * - * @deprecated This resource name class will be removed in the next major version. - */ -@javax.annotation.Generated("by GAPIC protoc plugin") -@Deprecated -public class LocationRunName extends RunName { - - private static final PathTemplate PATH_TEMPLATE = - PathTemplate.createWithoutUrlEncoding( - "projects/{project}/locations/{location}/transferConfigs/{transfer_config}/runs/{run}"); - - private volatile Map fieldValuesMap; - - private final String project; - private final String location; - private final String transferConfig; - private final String run; - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getTransferConfig() { - return transferConfig; - } - - public String getRun() { - return run; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - private LocationRunName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - transferConfig = Preconditions.checkNotNull(builder.getTransferConfig()); - run = Preconditions.checkNotNull(builder.getRun()); - } - - public static LocationRunName of( - String project, String location, String transferConfig, String run) { - return newBuilder() - .setProject(project) - .setLocation(location) - .setTransferConfig(transferConfig) - .setRun(run) - .build(); - } - - public static String format(String project, String location, String transferConfig, String run) { - return newBuilder() - .setProject(project) - .setLocation(location) - .setTransferConfig(transferConfig) - .setRun(run) - .build() - .toString(); - } - - public static LocationRunName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PATH_TEMPLATE.validatedMatch( - formattedString, "LocationRunName.parse: formattedString not in valid format"); - return of( - matchMap.get("project"), - matchMap.get("location"), - matchMap.get("transfer_config"), - matchMap.get("run")); - } - - 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 (LocationRunName 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("transferConfig", transferConfig); - fieldMapBuilder.put("run", run); - 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, "transfer_config", transferConfig, "run", run); - } - - /** Builder for LocationRunName. */ - public static class Builder extends RunName.Builder { - - private String project; - private String location; - private String transferConfig; - private String run; - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getTransferConfig() { - return transferConfig; - } - - public String getRun() { - return run; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setLocation(String location) { - this.location = location; - return this; - } - - public Builder setTransferConfig(String transferConfig) { - this.transferConfig = transferConfig; - return this; - } - - public Builder setRun(String run) { - this.run = run; - return this; - } - - private Builder() {} - - private Builder(LocationRunName locationRunName) { - project = locationRunName.project; - location = locationRunName.location; - transferConfig = locationRunName.transferConfig; - run = locationRunName.run; - } - - public LocationRunName build() { - return new LocationRunName(this); - } - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof LocationRunName) { - LocationRunName that = (LocationRunName) o; - return (this.project.equals(that.project)) - && (this.location.equals(that.location)) - && (this.transferConfig.equals(that.transferConfig)) - && (this.run.equals(that.run)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= project.hashCode(); - h *= 1000003; - h ^= location.hashCode(); - h *= 1000003; - h ^= transferConfig.hashCode(); - h *= 1000003; - h ^= run.hashCode(); - return h; - } -} diff --git a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/LocationTransferConfigName.java b/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/LocationTransferConfigName.java deleted file mode 100644 index efce0a130b12..000000000000 --- a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/LocationTransferConfigName.java +++ /dev/null @@ -1,221 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.bigquery.datatransfer.v1; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -/** - * AUTO-GENERATED DOCUMENTATION AND CLASS - * - * @deprecated This resource name class will be removed in the next major version. - */ -@javax.annotation.Generated("by GAPIC protoc plugin") -@Deprecated -public class LocationTransferConfigName extends TransferConfigName { - - private static final PathTemplate PATH_TEMPLATE = - PathTemplate.createWithoutUrlEncoding( - "projects/{project}/locations/{location}/transferConfigs/{transfer_config}"); - - private volatile Map fieldValuesMap; - - private final String project; - private final String location; - private final String transferConfig; - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getTransferConfig() { - return transferConfig; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - private LocationTransferConfigName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - transferConfig = Preconditions.checkNotNull(builder.getTransferConfig()); - } - - public static LocationTransferConfigName of( - String project, String location, String transferConfig) { - return newBuilder() - .setProject(project) - .setLocation(location) - .setTransferConfig(transferConfig) - .build(); - } - - public static String format(String project, String location, String transferConfig) { - return newBuilder() - .setProject(project) - .setLocation(location) - .setTransferConfig(transferConfig) - .build() - .toString(); - } - - public static LocationTransferConfigName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PATH_TEMPLATE.validatedMatch( - formattedString, - "LocationTransferConfigName.parse: formattedString not in valid format"); - return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("transfer_config")); - } - - 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 (LocationTransferConfigName 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("transferConfig", transferConfig); - 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, "transfer_config", transferConfig); - } - - /** Builder for LocationTransferConfigName. */ - public static class Builder extends TransferConfigName.Builder { - - private String project; - private String location; - private String transferConfig; - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getTransferConfig() { - return transferConfig; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setLocation(String location) { - this.location = location; - return this; - } - - public Builder setTransferConfig(String transferConfig) { - this.transferConfig = transferConfig; - return this; - } - - private Builder() {} - - private Builder(LocationTransferConfigName locationTransferConfigName) { - project = locationTransferConfigName.project; - location = locationTransferConfigName.location; - transferConfig = locationTransferConfigName.transferConfig; - } - - public LocationTransferConfigName build() { - return new LocationTransferConfigName(this); - } - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof LocationTransferConfigName) { - LocationTransferConfigName that = (LocationTransferConfigName) o; - return (this.project.equals(that.project)) - && (this.location.equals(that.location)) - && (this.transferConfig.equals(that.transferConfig)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= project.hashCode(); - h *= 1000003; - h ^= location.hashCode(); - h *= 1000003; - h ^= transferConfig.hashCode(); - return h; - } -} diff --git a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/LogTransferRunMessagesRequest.java b/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/LogTransferRunMessagesRequest.java deleted file mode 100644 index e0aa9cd0cc87..000000000000 --- a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/LogTransferRunMessagesRequest.java +++ /dev/null @@ -1,1177 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/bigquery/datatransfer/v1/datasource.proto - -package com.google.cloud.bigquery.datatransfer.v1; - -/** - * - * - *
- * A request to add transfer status messages to the run.
- * 
- * - * Protobuf type {@code google.cloud.bigquery.datatransfer.v1.LogTransferRunMessagesRequest} - */ -public final class LogTransferRunMessagesRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.bigquery.datatransfer.v1.LogTransferRunMessagesRequest) - LogTransferRunMessagesRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use LogTransferRunMessagesRequest.newBuilder() to construct. - private LogTransferRunMessagesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private LogTransferRunMessagesRequest() { - name_ = ""; - transferMessages_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private LogTransferRunMessagesRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - transferMessages_ = - new java.util.ArrayList< - com.google.cloud.bigquery.datatransfer.v1.TransferMessage>(); - mutable_bitField0_ |= 0x00000002; - } - transferMessages_.add( - input.readMessage( - com.google.cloud.bigquery.datatransfer.v1.TransferMessage.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_ & 0x00000002) != 0)) { - transferMessages_ = java.util.Collections.unmodifiableList(transferMessages_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_LogTransferRunMessagesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_LogTransferRunMessagesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.datatransfer.v1.LogTransferRunMessagesRequest.class, - com.google.cloud.bigquery.datatransfer.v1.LogTransferRunMessagesRequest.Builder.class); - } - - private int bitField0_; - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Name of the resource in the form:
-   * "projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}"
-   * 
- * - * string name = 1; - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Name of the resource in the form:
-   * "projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}"
-   * 
- * - * string name = 1; - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TRANSFER_MESSAGES_FIELD_NUMBER = 2; - private java.util.List - transferMessages_; - /** - * - * - *
-   * Messages to append.
-   * 
- * - * repeated .google.cloud.bigquery.datatransfer.v1.TransferMessage transfer_messages = 2; - * - */ - public java.util.List - getTransferMessagesList() { - return transferMessages_; - } - /** - * - * - *
-   * Messages to append.
-   * 
- * - * repeated .google.cloud.bigquery.datatransfer.v1.TransferMessage transfer_messages = 2; - * - */ - public java.util.List< - ? extends com.google.cloud.bigquery.datatransfer.v1.TransferMessageOrBuilder> - getTransferMessagesOrBuilderList() { - return transferMessages_; - } - /** - * - * - *
-   * Messages to append.
-   * 
- * - * repeated .google.cloud.bigquery.datatransfer.v1.TransferMessage transfer_messages = 2; - * - */ - public int getTransferMessagesCount() { - return transferMessages_.size(); - } - /** - * - * - *
-   * Messages to append.
-   * 
- * - * repeated .google.cloud.bigquery.datatransfer.v1.TransferMessage transfer_messages = 2; - * - */ - public com.google.cloud.bigquery.datatransfer.v1.TransferMessage getTransferMessages(int index) { - return transferMessages_.get(index); - } - /** - * - * - *
-   * Messages to append.
-   * 
- * - * repeated .google.cloud.bigquery.datatransfer.v1.TransferMessage transfer_messages = 2; - * - */ - public com.google.cloud.bigquery.datatransfer.v1.TransferMessageOrBuilder - getTransferMessagesOrBuilder(int index) { - return transferMessages_.get(index); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - for (int i = 0; i < transferMessages_.size(); i++) { - output.writeMessage(2, transferMessages_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - for (int i = 0; i < transferMessages_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, transferMessages_.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.bigquery.datatransfer.v1.LogTransferRunMessagesRequest)) { - return super.equals(obj); - } - com.google.cloud.bigquery.datatransfer.v1.LogTransferRunMessagesRequest other = - (com.google.cloud.bigquery.datatransfer.v1.LogTransferRunMessagesRequest) obj; - - if (!getName().equals(other.getName())) return false; - if (!getTransferMessagesList().equals(other.getTransferMessagesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - 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 (getTransferMessagesCount() > 0) { - hash = (37 * hash) + TRANSFER_MESSAGES_FIELD_NUMBER; - hash = (53 * hash) + getTransferMessagesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.bigquery.datatransfer.v1.LogTransferRunMessagesRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.datatransfer.v1.LogTransferRunMessagesRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.LogTransferRunMessagesRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.datatransfer.v1.LogTransferRunMessagesRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.LogTransferRunMessagesRequest parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.datatransfer.v1.LogTransferRunMessagesRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.LogTransferRunMessagesRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.datatransfer.v1.LogTransferRunMessagesRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.LogTransferRunMessagesRequest - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.datatransfer.v1.LogTransferRunMessagesRequest - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.LogTransferRunMessagesRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.datatransfer.v1.LogTransferRunMessagesRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.bigquery.datatransfer.v1.LogTransferRunMessagesRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 request to add transfer status messages to the run.
-   * 
- * - * Protobuf type {@code google.cloud.bigquery.datatransfer.v1.LogTransferRunMessagesRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.bigquery.datatransfer.v1.LogTransferRunMessagesRequest) - com.google.cloud.bigquery.datatransfer.v1.LogTransferRunMessagesRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_LogTransferRunMessagesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_LogTransferRunMessagesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.datatransfer.v1.LogTransferRunMessagesRequest.class, - com.google.cloud.bigquery.datatransfer.v1.LogTransferRunMessagesRequest.Builder - .class); - } - - // Construct using - // com.google.cloud.bigquery.datatransfer.v1.LogTransferRunMessagesRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getTransferMessagesFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - if (transferMessagesBuilder_ == null) { - transferMessages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - transferMessagesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_LogTransferRunMessagesRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.bigquery.datatransfer.v1.LogTransferRunMessagesRequest - getDefaultInstanceForType() { - return com.google.cloud.bigquery.datatransfer.v1.LogTransferRunMessagesRequest - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.bigquery.datatransfer.v1.LogTransferRunMessagesRequest build() { - com.google.cloud.bigquery.datatransfer.v1.LogTransferRunMessagesRequest result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.bigquery.datatransfer.v1.LogTransferRunMessagesRequest buildPartial() { - com.google.cloud.bigquery.datatransfer.v1.LogTransferRunMessagesRequest result = - new com.google.cloud.bigquery.datatransfer.v1.LogTransferRunMessagesRequest(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - result.name_ = name_; - if (transferMessagesBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - transferMessages_ = java.util.Collections.unmodifiableList(transferMessages_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.transferMessages_ = transferMessages_; - } else { - result.transferMessages_ = transferMessagesBuilder_.build(); - } - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof com.google.cloud.bigquery.datatransfer.v1.LogTransferRunMessagesRequest) { - return mergeFrom( - (com.google.cloud.bigquery.datatransfer.v1.LogTransferRunMessagesRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.bigquery.datatransfer.v1.LogTransferRunMessagesRequest other) { - if (other - == com.google.cloud.bigquery.datatransfer.v1.LogTransferRunMessagesRequest - .getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (transferMessagesBuilder_ == null) { - if (!other.transferMessages_.isEmpty()) { - if (transferMessages_.isEmpty()) { - transferMessages_ = other.transferMessages_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureTransferMessagesIsMutable(); - transferMessages_.addAll(other.transferMessages_); - } - onChanged(); - } - } else { - if (!other.transferMessages_.isEmpty()) { - if (transferMessagesBuilder_.isEmpty()) { - transferMessagesBuilder_.dispose(); - transferMessagesBuilder_ = null; - transferMessages_ = other.transferMessages_; - bitField0_ = (bitField0_ & ~0x00000002); - transferMessagesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getTransferMessagesFieldBuilder() - : null; - } else { - transferMessagesBuilder_.addAllMessages(other.transferMessages_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.bigquery.datatransfer.v1.LogTransferRunMessagesRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.bigquery.datatransfer.v1.LogTransferRunMessagesRequest) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Name of the resource in the form:
-     * "projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}"
-     * 
- * - * string name = 1; - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Name of the resource in the form:
-     * "projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}"
-     * 
- * - * string name = 1; - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Name of the resource in the form:
-     * "projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}"
-     * 
- * - * string name = 1; - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Name of the resource in the form:
-     * "projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}"
-     * 
- * - * string name = 1; - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Name of the resource in the form:
-     * "projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}"
-     * 
- * - * string name = 1; - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.util.List - transferMessages_ = java.util.Collections.emptyList(); - - private void ensureTransferMessagesIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - transferMessages_ = - new java.util.ArrayList( - transferMessages_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.bigquery.datatransfer.v1.TransferMessage, - com.google.cloud.bigquery.datatransfer.v1.TransferMessage.Builder, - com.google.cloud.bigquery.datatransfer.v1.TransferMessageOrBuilder> - transferMessagesBuilder_; - - /** - * - * - *
-     * Messages to append.
-     * 
- * - * repeated .google.cloud.bigquery.datatransfer.v1.TransferMessage transfer_messages = 2; - * - */ - public java.util.List - getTransferMessagesList() { - if (transferMessagesBuilder_ == null) { - return java.util.Collections.unmodifiableList(transferMessages_); - } else { - return transferMessagesBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * Messages to append.
-     * 
- * - * repeated .google.cloud.bigquery.datatransfer.v1.TransferMessage transfer_messages = 2; - * - */ - public int getTransferMessagesCount() { - if (transferMessagesBuilder_ == null) { - return transferMessages_.size(); - } else { - return transferMessagesBuilder_.getCount(); - } - } - /** - * - * - *
-     * Messages to append.
-     * 
- * - * repeated .google.cloud.bigquery.datatransfer.v1.TransferMessage transfer_messages = 2; - * - */ - public com.google.cloud.bigquery.datatransfer.v1.TransferMessage getTransferMessages( - int index) { - if (transferMessagesBuilder_ == null) { - return transferMessages_.get(index); - } else { - return transferMessagesBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * Messages to append.
-     * 
- * - * repeated .google.cloud.bigquery.datatransfer.v1.TransferMessage transfer_messages = 2; - * - */ - public Builder setTransferMessages( - int index, com.google.cloud.bigquery.datatransfer.v1.TransferMessage value) { - if (transferMessagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTransferMessagesIsMutable(); - transferMessages_.set(index, value); - onChanged(); - } else { - transferMessagesBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Messages to append.
-     * 
- * - * repeated .google.cloud.bigquery.datatransfer.v1.TransferMessage transfer_messages = 2; - * - */ - public Builder setTransferMessages( - int index, - com.google.cloud.bigquery.datatransfer.v1.TransferMessage.Builder builderForValue) { - if (transferMessagesBuilder_ == null) { - ensureTransferMessagesIsMutable(); - transferMessages_.set(index, builderForValue.build()); - onChanged(); - } else { - transferMessagesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Messages to append.
-     * 
- * - * repeated .google.cloud.bigquery.datatransfer.v1.TransferMessage transfer_messages = 2; - * - */ - public Builder addTransferMessages( - com.google.cloud.bigquery.datatransfer.v1.TransferMessage value) { - if (transferMessagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTransferMessagesIsMutable(); - transferMessages_.add(value); - onChanged(); - } else { - transferMessagesBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * Messages to append.
-     * 
- * - * repeated .google.cloud.bigquery.datatransfer.v1.TransferMessage transfer_messages = 2; - * - */ - public Builder addTransferMessages( - int index, com.google.cloud.bigquery.datatransfer.v1.TransferMessage value) { - if (transferMessagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTransferMessagesIsMutable(); - transferMessages_.add(index, value); - onChanged(); - } else { - transferMessagesBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Messages to append.
-     * 
- * - * repeated .google.cloud.bigquery.datatransfer.v1.TransferMessage transfer_messages = 2; - * - */ - public Builder addTransferMessages( - com.google.cloud.bigquery.datatransfer.v1.TransferMessage.Builder builderForValue) { - if (transferMessagesBuilder_ == null) { - ensureTransferMessagesIsMutable(); - transferMessages_.add(builderForValue.build()); - onChanged(); - } else { - transferMessagesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Messages to append.
-     * 
- * - * repeated .google.cloud.bigquery.datatransfer.v1.TransferMessage transfer_messages = 2; - * - */ - public Builder addTransferMessages( - int index, - com.google.cloud.bigquery.datatransfer.v1.TransferMessage.Builder builderForValue) { - if (transferMessagesBuilder_ == null) { - ensureTransferMessagesIsMutable(); - transferMessages_.add(index, builderForValue.build()); - onChanged(); - } else { - transferMessagesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Messages to append.
-     * 
- * - * repeated .google.cloud.bigquery.datatransfer.v1.TransferMessage transfer_messages = 2; - * - */ - public Builder addAllTransferMessages( - java.lang.Iterable - values) { - if (transferMessagesBuilder_ == null) { - ensureTransferMessagesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, transferMessages_); - onChanged(); - } else { - transferMessagesBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * Messages to append.
-     * 
- * - * repeated .google.cloud.bigquery.datatransfer.v1.TransferMessage transfer_messages = 2; - * - */ - public Builder clearTransferMessages() { - if (transferMessagesBuilder_ == null) { - transferMessages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - transferMessagesBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Messages to append.
-     * 
- * - * repeated .google.cloud.bigquery.datatransfer.v1.TransferMessage transfer_messages = 2; - * - */ - public Builder removeTransferMessages(int index) { - if (transferMessagesBuilder_ == null) { - ensureTransferMessagesIsMutable(); - transferMessages_.remove(index); - onChanged(); - } else { - transferMessagesBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * Messages to append.
-     * 
- * - * repeated .google.cloud.bigquery.datatransfer.v1.TransferMessage transfer_messages = 2; - * - */ - public com.google.cloud.bigquery.datatransfer.v1.TransferMessage.Builder - getTransferMessagesBuilder(int index) { - return getTransferMessagesFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * Messages to append.
-     * 
- * - * repeated .google.cloud.bigquery.datatransfer.v1.TransferMessage transfer_messages = 2; - * - */ - public com.google.cloud.bigquery.datatransfer.v1.TransferMessageOrBuilder - getTransferMessagesOrBuilder(int index) { - if (transferMessagesBuilder_ == null) { - return transferMessages_.get(index); - } else { - return transferMessagesBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * Messages to append.
-     * 
- * - * repeated .google.cloud.bigquery.datatransfer.v1.TransferMessage transfer_messages = 2; - * - */ - public java.util.List< - ? extends com.google.cloud.bigquery.datatransfer.v1.TransferMessageOrBuilder> - getTransferMessagesOrBuilderList() { - if (transferMessagesBuilder_ != null) { - return transferMessagesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(transferMessages_); - } - } - /** - * - * - *
-     * Messages to append.
-     * 
- * - * repeated .google.cloud.bigquery.datatransfer.v1.TransferMessage transfer_messages = 2; - * - */ - public com.google.cloud.bigquery.datatransfer.v1.TransferMessage.Builder - addTransferMessagesBuilder() { - return getTransferMessagesFieldBuilder() - .addBuilder( - com.google.cloud.bigquery.datatransfer.v1.TransferMessage.getDefaultInstance()); - } - /** - * - * - *
-     * Messages to append.
-     * 
- * - * repeated .google.cloud.bigquery.datatransfer.v1.TransferMessage transfer_messages = 2; - * - */ - public com.google.cloud.bigquery.datatransfer.v1.TransferMessage.Builder - addTransferMessagesBuilder(int index) { - return getTransferMessagesFieldBuilder() - .addBuilder( - index, - com.google.cloud.bigquery.datatransfer.v1.TransferMessage.getDefaultInstance()); - } - /** - * - * - *
-     * Messages to append.
-     * 
- * - * repeated .google.cloud.bigquery.datatransfer.v1.TransferMessage transfer_messages = 2; - * - */ - public java.util.List - getTransferMessagesBuilderList() { - return getTransferMessagesFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.bigquery.datatransfer.v1.TransferMessage, - com.google.cloud.bigquery.datatransfer.v1.TransferMessage.Builder, - com.google.cloud.bigquery.datatransfer.v1.TransferMessageOrBuilder> - getTransferMessagesFieldBuilder() { - if (transferMessagesBuilder_ == null) { - transferMessagesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.bigquery.datatransfer.v1.TransferMessage, - com.google.cloud.bigquery.datatransfer.v1.TransferMessage.Builder, - com.google.cloud.bigquery.datatransfer.v1.TransferMessageOrBuilder>( - transferMessages_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - transferMessages_ = null; - } - return transferMessagesBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.bigquery.datatransfer.v1.LogTransferRunMessagesRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.bigquery.datatransfer.v1.LogTransferRunMessagesRequest) - private static final com.google.cloud.bigquery.datatransfer.v1.LogTransferRunMessagesRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.bigquery.datatransfer.v1.LogTransferRunMessagesRequest(); - } - - public static com.google.cloud.bigquery.datatransfer.v1.LogTransferRunMessagesRequest - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public LogTransferRunMessagesRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new LogTransferRunMessagesRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.bigquery.datatransfer.v1.LogTransferRunMessagesRequest - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/LogTransferRunMessagesRequestOrBuilder.java b/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/LogTransferRunMessagesRequestOrBuilder.java deleted file mode 100644 index 9fc59cb8d969..000000000000 --- a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/LogTransferRunMessagesRequestOrBuilder.java +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/bigquery/datatransfer/v1/datasource.proto - -package com.google.cloud.bigquery.datatransfer.v1; - -public interface LogTransferRunMessagesRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.bigquery.datatransfer.v1.LogTransferRunMessagesRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Name of the resource in the form:
-   * "projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}"
-   * 
- * - * string name = 1; - */ - java.lang.String getName(); - /** - * - * - *
-   * Name of the resource in the form:
-   * "projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}"
-   * 
- * - * string name = 1; - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * Messages to append.
-   * 
- * - * repeated .google.cloud.bigquery.datatransfer.v1.TransferMessage transfer_messages = 2; - * - */ - java.util.List - getTransferMessagesList(); - /** - * - * - *
-   * Messages to append.
-   * 
- * - * repeated .google.cloud.bigquery.datatransfer.v1.TransferMessage transfer_messages = 2; - * - */ - com.google.cloud.bigquery.datatransfer.v1.TransferMessage getTransferMessages(int index); - /** - * - * - *
-   * Messages to append.
-   * 
- * - * repeated .google.cloud.bigquery.datatransfer.v1.TransferMessage transfer_messages = 2; - * - */ - int getTransferMessagesCount(); - /** - * - * - *
-   * Messages to append.
-   * 
- * - * repeated .google.cloud.bigquery.datatransfer.v1.TransferMessage transfer_messages = 2; - * - */ - java.util.List - getTransferMessagesOrBuilderList(); - /** - * - * - *
-   * Messages to append.
-   * 
- * - * repeated .google.cloud.bigquery.datatransfer.v1.TransferMessage transfer_messages = 2; - * - */ - com.google.cloud.bigquery.datatransfer.v1.TransferMessageOrBuilder getTransferMessagesOrBuilder( - int index); -} diff --git a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ProjectDataSourceName.java b/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ProjectDataSourceName.java deleted file mode 100644 index 716b5f7b7bd2..000000000000 --- a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ProjectDataSourceName.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.bigquery.datatransfer.v1; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -/** - * AUTO-GENERATED DOCUMENTATION AND CLASS - * - * @deprecated This resource name class will be removed in the next major version. - */ -@javax.annotation.Generated("by GAPIC protoc plugin") -@Deprecated -public class ProjectDataSourceName extends DataSourceName { - - private static final PathTemplate PATH_TEMPLATE = - PathTemplate.createWithoutUrlEncoding("projects/{project}/dataSources/{data_source}"); - - private volatile Map fieldValuesMap; - - private final String project; - private final String dataSource; - - public String getProject() { - return project; - } - - public String getDataSource() { - return dataSource; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - private ProjectDataSourceName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - dataSource = Preconditions.checkNotNull(builder.getDataSource()); - } - - public static ProjectDataSourceName of(String project, String dataSource) { - return newBuilder().setProject(project).setDataSource(dataSource).build(); - } - - public static String format(String project, String dataSource) { - return newBuilder().setProject(project).setDataSource(dataSource).build().toString(); - } - - public static ProjectDataSourceName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PATH_TEMPLATE.validatedMatch( - formattedString, "ProjectDataSourceName.parse: formattedString not in valid format"); - return of(matchMap.get("project"), matchMap.get("data_source")); - } - - 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 (ProjectDataSourceName 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("dataSource", dataSource); - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PATH_TEMPLATE.instantiate("project", project, "data_source", dataSource); - } - - /** Builder for ProjectDataSourceName. */ - public static class Builder extends DataSourceName.Builder { - - private String project; - private String dataSource; - - public String getProject() { - return project; - } - - public String getDataSource() { - return dataSource; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setDataSource(String dataSource) { - this.dataSource = dataSource; - return this; - } - - private Builder() {} - - private Builder(ProjectDataSourceName projectDataSourceName) { - project = projectDataSourceName.project; - dataSource = projectDataSourceName.dataSource; - } - - public ProjectDataSourceName build() { - return new ProjectDataSourceName(this); - } - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof ProjectDataSourceName) { - ProjectDataSourceName that = (ProjectDataSourceName) o; - return (this.project.equals(that.project)) && (this.dataSource.equals(that.dataSource)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= project.hashCode(); - h *= 1000003; - h ^= dataSource.hashCode(); - return h; - } -} diff --git a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ProjectRunName.java b/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ProjectRunName.java deleted file mode 100644 index 0a1686765064..000000000000 --- a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ProjectRunName.java +++ /dev/null @@ -1,215 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.bigquery.datatransfer.v1; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -/** - * AUTO-GENERATED DOCUMENTATION AND CLASS - * - * @deprecated This resource name class will be removed in the next major version. - */ -@javax.annotation.Generated("by GAPIC protoc plugin") -@Deprecated -public class ProjectRunName extends RunName { - - private static final PathTemplate PATH_TEMPLATE = - PathTemplate.createWithoutUrlEncoding( - "projects/{project}/transferConfigs/{transfer_config}/runs/{run}"); - - private volatile Map fieldValuesMap; - - private final String project; - private final String transferConfig; - private final String run; - - public String getProject() { - return project; - } - - public String getTransferConfig() { - return transferConfig; - } - - public String getRun() { - return run; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - private ProjectRunName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - transferConfig = Preconditions.checkNotNull(builder.getTransferConfig()); - run = Preconditions.checkNotNull(builder.getRun()); - } - - public static ProjectRunName of(String project, String transferConfig, String run) { - return newBuilder().setProject(project).setTransferConfig(transferConfig).setRun(run).build(); - } - - public static String format(String project, String transferConfig, String run) { - return newBuilder() - .setProject(project) - .setTransferConfig(transferConfig) - .setRun(run) - .build() - .toString(); - } - - public static ProjectRunName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PATH_TEMPLATE.validatedMatch( - formattedString, "ProjectRunName.parse: formattedString not in valid format"); - return of(matchMap.get("project"), matchMap.get("transfer_config"), matchMap.get("run")); - } - - 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 (ProjectRunName 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("transferConfig", transferConfig); - fieldMapBuilder.put("run", run); - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PATH_TEMPLATE.instantiate( - "project", project, "transfer_config", transferConfig, "run", run); - } - - /** Builder for ProjectRunName. */ - public static class Builder extends RunName.Builder { - - private String project; - private String transferConfig; - private String run; - - public String getProject() { - return project; - } - - public String getTransferConfig() { - return transferConfig; - } - - public String getRun() { - return run; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setTransferConfig(String transferConfig) { - this.transferConfig = transferConfig; - return this; - } - - public Builder setRun(String run) { - this.run = run; - return this; - } - - private Builder() {} - - private Builder(ProjectRunName projectRunName) { - project = projectRunName.project; - transferConfig = projectRunName.transferConfig; - run = projectRunName.run; - } - - public ProjectRunName build() { - return new ProjectRunName(this); - } - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof ProjectRunName) { - ProjectRunName that = (ProjectRunName) o; - return (this.project.equals(that.project)) - && (this.transferConfig.equals(that.transferConfig)) - && (this.run.equals(that.run)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= project.hashCode(); - h *= 1000003; - h ^= transferConfig.hashCode(); - h *= 1000003; - h ^= run.hashCode(); - return h; - } -} diff --git a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ProjectTransferConfigName.java b/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ProjectTransferConfigName.java deleted file mode 100644 index c4f5487cb8b9..000000000000 --- a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ProjectTransferConfigName.java +++ /dev/null @@ -1,188 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.bigquery.datatransfer.v1; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -/** - * AUTO-GENERATED DOCUMENTATION AND CLASS - * - * @deprecated This resource name class will be removed in the next major version. - */ -@javax.annotation.Generated("by GAPIC protoc plugin") -@Deprecated -public class ProjectTransferConfigName extends TransferConfigName { - - private static final PathTemplate PATH_TEMPLATE = - PathTemplate.createWithoutUrlEncoding("projects/{project}/transferConfigs/{transfer_config}"); - - private volatile Map fieldValuesMap; - - private final String project; - private final String transferConfig; - - public String getProject() { - return project; - } - - public String getTransferConfig() { - return transferConfig; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - private ProjectTransferConfigName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - transferConfig = Preconditions.checkNotNull(builder.getTransferConfig()); - } - - public static ProjectTransferConfigName of(String project, String transferConfig) { - return newBuilder().setProject(project).setTransferConfig(transferConfig).build(); - } - - public static String format(String project, String transferConfig) { - return newBuilder().setProject(project).setTransferConfig(transferConfig).build().toString(); - } - - public static ProjectTransferConfigName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PATH_TEMPLATE.validatedMatch( - formattedString, - "ProjectTransferConfigName.parse: formattedString not in valid format"); - return of(matchMap.get("project"), matchMap.get("transfer_config")); - } - - 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 (ProjectTransferConfigName 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("transferConfig", transferConfig); - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PATH_TEMPLATE.instantiate("project", project, "transfer_config", transferConfig); - } - - /** Builder for ProjectTransferConfigName. */ - public static class Builder extends TransferConfigName.Builder { - - private String project; - private String transferConfig; - - public String getProject() { - return project; - } - - public String getTransferConfig() { - return transferConfig; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setTransferConfig(String transferConfig) { - this.transferConfig = transferConfig; - return this; - } - - private Builder() {} - - private Builder(ProjectTransferConfigName projectTransferConfigName) { - project = projectTransferConfigName.project; - transferConfig = projectTransferConfigName.transferConfig; - } - - public ProjectTransferConfigName build() { - return new ProjectTransferConfigName(this); - } - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof ProjectTransferConfigName) { - ProjectTransferConfigName that = (ProjectTransferConfigName) o; - return (this.project.equals(that.project)) - && (this.transferConfig.equals(that.transferConfig)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= project.hashCode(); - h *= 1000003; - h ^= transferConfig.hashCode(); - return h; - } -} diff --git a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/RunNames.java b/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/RunNames.java deleted file mode 100644 index bf86b74376d9..000000000000 --- a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/RunNames.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.bigquery.datatransfer.v1; - -/** - * AUTO-GENERATED DOCUMENTATION AND CLASS - * - * @deprecated This resource name class will be removed in the next major version. - */ -@javax.annotation.Generated("by GAPIC protoc plugin") -@Deprecated -public class RunNames { - private RunNames() {} - - public static RunName parse(String resourceNameString) { - if (ProjectRunName.isParsableFrom(resourceNameString)) { - return ProjectRunName.parse(resourceNameString); - } - if (LocationRunName.isParsableFrom(resourceNameString)) { - return LocationRunName.parse(resourceNameString); - } - return UntypedRunName.parse(resourceNameString); - } -} diff --git a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/StartBigQueryJobsRequest.java b/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/StartBigQueryJobsRequest.java deleted file mode 100644 index ca4b72f41f98..000000000000 --- a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/StartBigQueryJobsRequest.java +++ /dev/null @@ -1,1342 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/bigquery/datatransfer/v1/datasource.proto - -package com.google.cloud.bigquery.datatransfer.v1; - -/** - * - * - *
- * A request to start and monitor a BigQuery load job.
- * 
- * - * Protobuf type {@code google.cloud.bigquery.datatransfer.v1.StartBigQueryJobsRequest} - */ -public final class StartBigQueryJobsRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.bigquery.datatransfer.v1.StartBigQueryJobsRequest) - StartBigQueryJobsRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use StartBigQueryJobsRequest.newBuilder() to construct. - private StartBigQueryJobsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private StartBigQueryJobsRequest() { - name_ = ""; - importedData_ = java.util.Collections.emptyList(); - userCredentials_ = com.google.protobuf.ByteString.EMPTY; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private StartBigQueryJobsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - importedData_ = - new java.util.ArrayList< - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo>(); - mutable_bitField0_ |= 0x00000002; - } - importedData_.add( - input.readMessage( - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.parser(), - extensionRegistry)); - break; - } - case 26: - { - userCredentials_ = input.readBytes(); - break; - } - case 64: - { - maxParallelism_ = 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_ & 0x00000002) != 0)) { - importedData_ = java.util.Collections.unmodifiableList(importedData_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_StartBigQueryJobsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_StartBigQueryJobsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.datatransfer.v1.StartBigQueryJobsRequest.class, - com.google.cloud.bigquery.datatransfer.v1.StartBigQueryJobsRequest.Builder.class); - } - - private int bitField0_; - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Name of the resource in the form:
-   * "projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}"
-   * 
- * - * string name = 1; - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Name of the resource in the form:
-   * "projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}"
-   * 
- * - * string name = 1; - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int IMPORTED_DATA_FIELD_NUMBER = 2; - private java.util.List importedData_; - /** - * - * - *
-   * Import jobs which should be started and monitored.
-   * 
- * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo imported_data = 2; - * - */ - public java.util.List - getImportedDataList() { - return importedData_; - } - /** - * - * - *
-   * Import jobs which should be started and monitored.
-   * 
- * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo imported_data = 2; - * - */ - public java.util.List< - ? extends com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfoOrBuilder> - getImportedDataOrBuilderList() { - return importedData_; - } - /** - * - * - *
-   * Import jobs which should be started and monitored.
-   * 
- * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo imported_data = 2; - * - */ - public int getImportedDataCount() { - return importedData_.size(); - } - /** - * - * - *
-   * Import jobs which should be started and monitored.
-   * 
- * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo imported_data = 2; - * - */ - public com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo getImportedData(int index) { - return importedData_.get(index); - } - /** - * - * - *
-   * Import jobs which should be started and monitored.
-   * 
- * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo imported_data = 2; - * - */ - public com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfoOrBuilder - getImportedDataOrBuilder(int index) { - return importedData_.get(index); - } - - public static final int USER_CREDENTIALS_FIELD_NUMBER = 3; - private com.google.protobuf.ByteString userCredentials_; - /** - * - * - *
-   * User credentials which should be used to start/monitor
-   * BigQuery jobs. If not specified, then jobs
-   * are started using data source service account credentials.
-   * This may be OAuth token or JWT token.
-   * 
- * - * bytes user_credentials = 3; - */ - public com.google.protobuf.ByteString getUserCredentials() { - return userCredentials_; - } - - public static final int MAX_PARALLELISM_FIELD_NUMBER = 8; - private int maxParallelism_; - /** - * - * - *
-   * The number of BQ Jobs that can run in parallel.
-   * 
- * - * int32 max_parallelism = 8; - */ - public int getMaxParallelism() { - return maxParallelism_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - for (int i = 0; i < importedData_.size(); i++) { - output.writeMessage(2, importedData_.get(i)); - } - if (!userCredentials_.isEmpty()) { - output.writeBytes(3, userCredentials_); - } - if (maxParallelism_ != 0) { - output.writeInt32(8, maxParallelism_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - for (int i = 0; i < importedData_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, importedData_.get(i)); - } - if (!userCredentials_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream.computeBytesSize(3, userCredentials_); - } - if (maxParallelism_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(8, maxParallelism_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.bigquery.datatransfer.v1.StartBigQueryJobsRequest)) { - return super.equals(obj); - } - com.google.cloud.bigquery.datatransfer.v1.StartBigQueryJobsRequest other = - (com.google.cloud.bigquery.datatransfer.v1.StartBigQueryJobsRequest) obj; - - if (!getName().equals(other.getName())) return false; - if (!getImportedDataList().equals(other.getImportedDataList())) return false; - if (!getUserCredentials().equals(other.getUserCredentials())) return false; - if (getMaxParallelism() != other.getMaxParallelism()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - 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 (getImportedDataCount() > 0) { - hash = (37 * hash) + IMPORTED_DATA_FIELD_NUMBER; - hash = (53 * hash) + getImportedDataList().hashCode(); - } - hash = (37 * hash) + USER_CREDENTIALS_FIELD_NUMBER; - hash = (53 * hash) + getUserCredentials().hashCode(); - hash = (37 * hash) + MAX_PARALLELISM_FIELD_NUMBER; - hash = (53 * hash) + getMaxParallelism(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.bigquery.datatransfer.v1.StartBigQueryJobsRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.datatransfer.v1.StartBigQueryJobsRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.StartBigQueryJobsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.datatransfer.v1.StartBigQueryJobsRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.StartBigQueryJobsRequest parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.datatransfer.v1.StartBigQueryJobsRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.StartBigQueryJobsRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.datatransfer.v1.StartBigQueryJobsRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.StartBigQueryJobsRequest - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.datatransfer.v1.StartBigQueryJobsRequest - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.StartBigQueryJobsRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.datatransfer.v1.StartBigQueryJobsRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.bigquery.datatransfer.v1.StartBigQueryJobsRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 request to start and monitor a BigQuery load job.
-   * 
- * - * Protobuf type {@code google.cloud.bigquery.datatransfer.v1.StartBigQueryJobsRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.bigquery.datatransfer.v1.StartBigQueryJobsRequest) - com.google.cloud.bigquery.datatransfer.v1.StartBigQueryJobsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_StartBigQueryJobsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_StartBigQueryJobsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.datatransfer.v1.StartBigQueryJobsRequest.class, - com.google.cloud.bigquery.datatransfer.v1.StartBigQueryJobsRequest.Builder.class); - } - - // Construct using - // com.google.cloud.bigquery.datatransfer.v1.StartBigQueryJobsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getImportedDataFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - if (importedDataBuilder_ == null) { - importedData_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - importedDataBuilder_.clear(); - } - userCredentials_ = com.google.protobuf.ByteString.EMPTY; - - maxParallelism_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_StartBigQueryJobsRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.bigquery.datatransfer.v1.StartBigQueryJobsRequest - getDefaultInstanceForType() { - return com.google.cloud.bigquery.datatransfer.v1.StartBigQueryJobsRequest - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.bigquery.datatransfer.v1.StartBigQueryJobsRequest build() { - com.google.cloud.bigquery.datatransfer.v1.StartBigQueryJobsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.bigquery.datatransfer.v1.StartBigQueryJobsRequest buildPartial() { - com.google.cloud.bigquery.datatransfer.v1.StartBigQueryJobsRequest result = - new com.google.cloud.bigquery.datatransfer.v1.StartBigQueryJobsRequest(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - result.name_ = name_; - if (importedDataBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - importedData_ = java.util.Collections.unmodifiableList(importedData_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.importedData_ = importedData_; - } else { - result.importedData_ = importedDataBuilder_.build(); - } - result.userCredentials_ = userCredentials_; - result.maxParallelism_ = maxParallelism_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.bigquery.datatransfer.v1.StartBigQueryJobsRequest) { - return mergeFrom( - (com.google.cloud.bigquery.datatransfer.v1.StartBigQueryJobsRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.bigquery.datatransfer.v1.StartBigQueryJobsRequest other) { - if (other - == com.google.cloud.bigquery.datatransfer.v1.StartBigQueryJobsRequest - .getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (importedDataBuilder_ == null) { - if (!other.importedData_.isEmpty()) { - if (importedData_.isEmpty()) { - importedData_ = other.importedData_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureImportedDataIsMutable(); - importedData_.addAll(other.importedData_); - } - onChanged(); - } - } else { - if (!other.importedData_.isEmpty()) { - if (importedDataBuilder_.isEmpty()) { - importedDataBuilder_.dispose(); - importedDataBuilder_ = null; - importedData_ = other.importedData_; - bitField0_ = (bitField0_ & ~0x00000002); - importedDataBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getImportedDataFieldBuilder() - : null; - } else { - importedDataBuilder_.addAllMessages(other.importedData_); - } - } - } - if (other.getUserCredentials() != com.google.protobuf.ByteString.EMPTY) { - setUserCredentials(other.getUserCredentials()); - } - if (other.getMaxParallelism() != 0) { - setMaxParallelism(other.getMaxParallelism()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.bigquery.datatransfer.v1.StartBigQueryJobsRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.bigquery.datatransfer.v1.StartBigQueryJobsRequest) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Name of the resource in the form:
-     * "projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}"
-     * 
- * - * string name = 1; - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Name of the resource in the form:
-     * "projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}"
-     * 
- * - * string name = 1; - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Name of the resource in the form:
-     * "projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}"
-     * 
- * - * string name = 1; - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Name of the resource in the form:
-     * "projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}"
-     * 
- * - * string name = 1; - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Name of the resource in the form:
-     * "projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}"
-     * 
- * - * string name = 1; - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.util.List - importedData_ = java.util.Collections.emptyList(); - - private void ensureImportedDataIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - importedData_ = - new java.util.ArrayList( - importedData_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo, - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.Builder, - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfoOrBuilder> - importedDataBuilder_; - - /** - * - * - *
-     * Import jobs which should be started and monitored.
-     * 
- * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo imported_data = 2; - * - */ - public java.util.List - getImportedDataList() { - if (importedDataBuilder_ == null) { - return java.util.Collections.unmodifiableList(importedData_); - } else { - return importedDataBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * Import jobs which should be started and monitored.
-     * 
- * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo imported_data = 2; - * - */ - public int getImportedDataCount() { - if (importedDataBuilder_ == null) { - return importedData_.size(); - } else { - return importedDataBuilder_.getCount(); - } - } - /** - * - * - *
-     * Import jobs which should be started and monitored.
-     * 
- * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo imported_data = 2; - * - */ - public com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo getImportedData(int index) { - if (importedDataBuilder_ == null) { - return importedData_.get(index); - } else { - return importedDataBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * Import jobs which should be started and monitored.
-     * 
- * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo imported_data = 2; - * - */ - public Builder setImportedData( - int index, com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo value) { - if (importedDataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureImportedDataIsMutable(); - importedData_.set(index, value); - onChanged(); - } else { - importedDataBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Import jobs which should be started and monitored.
-     * 
- * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo imported_data = 2; - * - */ - public Builder setImportedData( - int index, - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.Builder builderForValue) { - if (importedDataBuilder_ == null) { - ensureImportedDataIsMutable(); - importedData_.set(index, builderForValue.build()); - onChanged(); - } else { - importedDataBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Import jobs which should be started and monitored.
-     * 
- * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo imported_data = 2; - * - */ - public Builder addImportedData( - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo value) { - if (importedDataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureImportedDataIsMutable(); - importedData_.add(value); - onChanged(); - } else { - importedDataBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * Import jobs which should be started and monitored.
-     * 
- * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo imported_data = 2; - * - */ - public Builder addImportedData( - int index, com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo value) { - if (importedDataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureImportedDataIsMutable(); - importedData_.add(index, value); - onChanged(); - } else { - importedDataBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Import jobs which should be started and monitored.
-     * 
- * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo imported_data = 2; - * - */ - public Builder addImportedData( - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.Builder builderForValue) { - if (importedDataBuilder_ == null) { - ensureImportedDataIsMutable(); - importedData_.add(builderForValue.build()); - onChanged(); - } else { - importedDataBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Import jobs which should be started and monitored.
-     * 
- * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo imported_data = 2; - * - */ - public Builder addImportedData( - int index, - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.Builder builderForValue) { - if (importedDataBuilder_ == null) { - ensureImportedDataIsMutable(); - importedData_.add(index, builderForValue.build()); - onChanged(); - } else { - importedDataBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Import jobs which should be started and monitored.
-     * 
- * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo imported_data = 2; - * - */ - public Builder addAllImportedData( - java.lang.Iterable - values) { - if (importedDataBuilder_ == null) { - ensureImportedDataIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, importedData_); - onChanged(); - } else { - importedDataBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * Import jobs which should be started and monitored.
-     * 
- * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo imported_data = 2; - * - */ - public Builder clearImportedData() { - if (importedDataBuilder_ == null) { - importedData_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - importedDataBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Import jobs which should be started and monitored.
-     * 
- * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo imported_data = 2; - * - */ - public Builder removeImportedData(int index) { - if (importedDataBuilder_ == null) { - ensureImportedDataIsMutable(); - importedData_.remove(index); - onChanged(); - } else { - importedDataBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * Import jobs which should be started and monitored.
-     * 
- * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo imported_data = 2; - * - */ - public com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.Builder - getImportedDataBuilder(int index) { - return getImportedDataFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * Import jobs which should be started and monitored.
-     * 
- * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo imported_data = 2; - * - */ - public com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfoOrBuilder - getImportedDataOrBuilder(int index) { - if (importedDataBuilder_ == null) { - return importedData_.get(index); - } else { - return importedDataBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * Import jobs which should be started and monitored.
-     * 
- * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo imported_data = 2; - * - */ - public java.util.List< - ? extends com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfoOrBuilder> - getImportedDataOrBuilderList() { - if (importedDataBuilder_ != null) { - return importedDataBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(importedData_); - } - } - /** - * - * - *
-     * Import jobs which should be started and monitored.
-     * 
- * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo imported_data = 2; - * - */ - public com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.Builder - addImportedDataBuilder() { - return getImportedDataFieldBuilder() - .addBuilder( - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.getDefaultInstance()); - } - /** - * - * - *
-     * Import jobs which should be started and monitored.
-     * 
- * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo imported_data = 2; - * - */ - public com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.Builder - addImportedDataBuilder(int index) { - return getImportedDataFieldBuilder() - .addBuilder( - index, - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.getDefaultInstance()); - } - /** - * - * - *
-     * Import jobs which should be started and monitored.
-     * 
- * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo imported_data = 2; - * - */ - public java.util.List - getImportedDataBuilderList() { - return getImportedDataFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo, - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.Builder, - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfoOrBuilder> - getImportedDataFieldBuilder() { - if (importedDataBuilder_ == null) { - importedDataBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo, - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.Builder, - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfoOrBuilder>( - importedData_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); - importedData_ = null; - } - return importedDataBuilder_; - } - - private com.google.protobuf.ByteString userCredentials_ = com.google.protobuf.ByteString.EMPTY; - /** - * - * - *
-     * User credentials which should be used to start/monitor
-     * BigQuery jobs. If not specified, then jobs
-     * are started using data source service account credentials.
-     * This may be OAuth token or JWT token.
-     * 
- * - * bytes user_credentials = 3; - */ - public com.google.protobuf.ByteString getUserCredentials() { - return userCredentials_; - } - /** - * - * - *
-     * User credentials which should be used to start/monitor
-     * BigQuery jobs. If not specified, then jobs
-     * are started using data source service account credentials.
-     * This may be OAuth token or JWT token.
-     * 
- * - * bytes user_credentials = 3; - */ - public Builder setUserCredentials(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - - userCredentials_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * User credentials which should be used to start/monitor
-     * BigQuery jobs. If not specified, then jobs
-     * are started using data source service account credentials.
-     * This may be OAuth token or JWT token.
-     * 
- * - * bytes user_credentials = 3; - */ - public Builder clearUserCredentials() { - - userCredentials_ = getDefaultInstance().getUserCredentials(); - onChanged(); - return this; - } - - private int maxParallelism_; - /** - * - * - *
-     * The number of BQ Jobs that can run in parallel.
-     * 
- * - * int32 max_parallelism = 8; - */ - public int getMaxParallelism() { - return maxParallelism_; - } - /** - * - * - *
-     * The number of BQ Jobs that can run in parallel.
-     * 
- * - * int32 max_parallelism = 8; - */ - public Builder setMaxParallelism(int value) { - - maxParallelism_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * The number of BQ Jobs that can run in parallel.
-     * 
- * - * int32 max_parallelism = 8; - */ - public Builder clearMaxParallelism() { - - maxParallelism_ = 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.bigquery.datatransfer.v1.StartBigQueryJobsRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.bigquery.datatransfer.v1.StartBigQueryJobsRequest) - private static final com.google.cloud.bigquery.datatransfer.v1.StartBigQueryJobsRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.bigquery.datatransfer.v1.StartBigQueryJobsRequest(); - } - - public static com.google.cloud.bigquery.datatransfer.v1.StartBigQueryJobsRequest - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StartBigQueryJobsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new StartBigQueryJobsRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.bigquery.datatransfer.v1.StartBigQueryJobsRequest - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/StartBigQueryJobsRequestOrBuilder.java b/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/StartBigQueryJobsRequestOrBuilder.java deleted file mode 100644 index de3c4d2b741f..000000000000 --- a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/StartBigQueryJobsRequestOrBuilder.java +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/bigquery/datatransfer/v1/datasource.proto - -package com.google.cloud.bigquery.datatransfer.v1; - -public interface StartBigQueryJobsRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.bigquery.datatransfer.v1.StartBigQueryJobsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Name of the resource in the form:
-   * "projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}"
-   * 
- * - * string name = 1; - */ - java.lang.String getName(); - /** - * - * - *
-   * Name of the resource in the form:
-   * "projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}"
-   * 
- * - * string name = 1; - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * Import jobs which should be started and monitored.
-   * 
- * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo imported_data = 2; - * - */ - java.util.List getImportedDataList(); - /** - * - * - *
-   * Import jobs which should be started and monitored.
-   * 
- * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo imported_data = 2; - * - */ - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfo getImportedData(int index); - /** - * - * - *
-   * Import jobs which should be started and monitored.
-   * 
- * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo imported_data = 2; - * - */ - int getImportedDataCount(); - /** - * - * - *
-   * Import jobs which should be started and monitored.
-   * 
- * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo imported_data = 2; - * - */ - java.util.List - getImportedDataOrBuilderList(); - /** - * - * - *
-   * Import jobs which should be started and monitored.
-   * 
- * - * repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo imported_data = 2; - * - */ - com.google.cloud.bigquery.datatransfer.v1.ImportedDataInfoOrBuilder getImportedDataOrBuilder( - int index); - - /** - * - * - *
-   * User credentials which should be used to start/monitor
-   * BigQuery jobs. If not specified, then jobs
-   * are started using data source service account credentials.
-   * This may be OAuth token or JWT token.
-   * 
- * - * bytes user_credentials = 3; - */ - com.google.protobuf.ByteString getUserCredentials(); - - /** - * - * - *
-   * The number of BQ Jobs that can run in parallel.
-   * 
- * - * int32 max_parallelism = 8; - */ - int getMaxParallelism(); -} diff --git a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/TransferConfigNames.java b/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/TransferConfigNames.java deleted file mode 100644 index 8209054377fd..000000000000 --- a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/TransferConfigNames.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.bigquery.datatransfer.v1; - -/** - * AUTO-GENERATED DOCUMENTATION AND CLASS - * - * @deprecated This resource name class will be removed in the next major version. - */ -@javax.annotation.Generated("by GAPIC protoc plugin") -@Deprecated -public class TransferConfigNames { - private TransferConfigNames() {} - - public static TransferConfigName parse(String resourceNameString) { - if (ProjectTransferConfigName.isParsableFrom(resourceNameString)) { - return ProjectTransferConfigName.parse(resourceNameString); - } - if (LocationTransferConfigName.isParsableFrom(resourceNameString)) { - return LocationTransferConfigName.parse(resourceNameString); - } - return UntypedTransferConfigName.parse(resourceNameString); - } -} diff --git a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/UntypedDataSourceName.java b/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/UntypedDataSourceName.java deleted file mode 100644 index ae987730ab49..000000000000 --- a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/UntypedDataSourceName.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.bigquery.datatransfer.v1; - -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -/** - * AUTO-GENERATED DOCUMENTATION AND CLASS - * - * @deprecated This resource name class will be removed in the next major version. - */ -@javax.annotation.Generated("by GAPIC protoc plugin") -@Deprecated -public class UntypedDataSourceName extends DataSourceName { - - private final String rawValue; - private Map valueMap; - - private UntypedDataSourceName(String rawValue) { - this.rawValue = Preconditions.checkNotNull(rawValue); - this.valueMap = ImmutableMap.of("", rawValue); - } - - public static UntypedDataSourceName from(ResourceName resourceName) { - return new UntypedDataSourceName(resourceName.toString()); - } - - public static UntypedDataSourceName parse(String formattedString) { - return new UntypedDataSourceName(formattedString); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList(values.size()); - for (UntypedDataSourceName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return true; - } - - /** Return a map with a single value rawValue keyed on an empty String "". */ - public Map getFieldValuesMap() { - return valueMap; - } - - /** Return the initial rawValue if @param fieldName is an empty String, else return null. */ - public String getFieldValue(String fieldName) { - return valueMap.get(fieldName); - } - - @Override - public String toString() { - return rawValue; - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof UntypedDataSourceName) { - UntypedDataSourceName that = (UntypedDataSourceName) o; - return this.rawValue.equals(that.rawValue); - } - return false; - } - - @Override - public int hashCode() { - return rawValue.hashCode(); - } -} diff --git a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/UntypedRunName.java b/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/UntypedRunName.java deleted file mode 100644 index cb14a0bce52a..000000000000 --- a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/UntypedRunName.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.bigquery.datatransfer.v1; - -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -/** - * AUTO-GENERATED DOCUMENTATION AND CLASS - * - * @deprecated This resource name class will be removed in the next major version. - */ -@javax.annotation.Generated("by GAPIC protoc plugin") -@Deprecated -public class UntypedRunName extends RunName { - - private final String rawValue; - private Map valueMap; - - private UntypedRunName(String rawValue) { - this.rawValue = Preconditions.checkNotNull(rawValue); - this.valueMap = ImmutableMap.of("", rawValue); - } - - public static UntypedRunName from(ResourceName resourceName) { - return new UntypedRunName(resourceName.toString()); - } - - public static UntypedRunName parse(String formattedString) { - return new UntypedRunName(formattedString); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList(values.size()); - for (UntypedRunName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return true; - } - - /** Return a map with a single value rawValue keyed on an empty String "". */ - public Map getFieldValuesMap() { - return valueMap; - } - - /** Return the initial rawValue if @param fieldName is an empty String, else return null. */ - public String getFieldValue(String fieldName) { - return valueMap.get(fieldName); - } - - @Override - public String toString() { - return rawValue; - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof UntypedRunName) { - UntypedRunName that = (UntypedRunName) o; - return this.rawValue.equals(that.rawValue); - } - return false; - } - - @Override - public int hashCode() { - return rawValue.hashCode(); - } -} diff --git a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/UntypedTransferConfigName.java b/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/UntypedTransferConfigName.java deleted file mode 100644 index 5c971669c70c..000000000000 --- a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/UntypedTransferConfigName.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.bigquery.datatransfer.v1; - -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -/** - * AUTO-GENERATED DOCUMENTATION AND CLASS - * - * @deprecated This resource name class will be removed in the next major version. - */ -@javax.annotation.Generated("by GAPIC protoc plugin") -@Deprecated -public class UntypedTransferConfigName extends TransferConfigName { - - private final String rawValue; - private Map valueMap; - - private UntypedTransferConfigName(String rawValue) { - this.rawValue = Preconditions.checkNotNull(rawValue); - this.valueMap = ImmutableMap.of("", rawValue); - } - - public static UntypedTransferConfigName from(ResourceName resourceName) { - return new UntypedTransferConfigName(resourceName.toString()); - } - - public static UntypedTransferConfigName parse(String formattedString) { - return new UntypedTransferConfigName(formattedString); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList(values.size()); - for (UntypedTransferConfigName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return true; - } - - /** Return a map with a single value rawValue keyed on an empty String "". */ - public Map getFieldValuesMap() { - return valueMap; - } - - /** Return the initial rawValue if @param fieldName is an empty String, else return null. */ - public String getFieldValue(String fieldName) { - return valueMap.get(fieldName); - } - - @Override - public String toString() { - return rawValue; - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof UntypedTransferConfigName) { - UntypedTransferConfigName that = (UntypedTransferConfigName) o; - return this.rawValue.equals(that.rawValue); - } - return false; - } - - @Override - public int hashCode() { - return rawValue.hashCode(); - } -} diff --git a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/UpdateDataSourceDefinitionRequest.java b/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/UpdateDataSourceDefinitionRequest.java deleted file mode 100644 index ed438e7680f7..000000000000 --- a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/UpdateDataSourceDefinitionRequest.java +++ /dev/null @@ -1,1027 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/bigquery/datatransfer/v1/datasource.proto - -package com.google.cloud.bigquery.datatransfer.v1; - -/** - * - * - *
- * Represents the request of the UpdateDataSourceDefinition method.
- * 
- * - * Protobuf type {@code google.cloud.bigquery.datatransfer.v1.UpdateDataSourceDefinitionRequest} - */ -public final class UpdateDataSourceDefinitionRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.bigquery.datatransfer.v1.UpdateDataSourceDefinitionRequest) - UpdateDataSourceDefinitionRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use UpdateDataSourceDefinitionRequest.newBuilder() to construct. - private UpdateDataSourceDefinitionRequest( - com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private UpdateDataSourceDefinitionRequest() {} - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private UpdateDataSourceDefinitionRequest( - 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.bigquery.datatransfer.v1.DataSourceDefinition.Builder subBuilder = - null; - if (dataSourceDefinition_ != null) { - subBuilder = dataSourceDefinition_.toBuilder(); - } - dataSourceDefinition_ = - input.readMessage( - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(dataSourceDefinition_); - dataSourceDefinition_ = 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.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_UpdateDataSourceDefinitionRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_UpdateDataSourceDefinitionRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.datatransfer.v1.UpdateDataSourceDefinitionRequest.class, - com.google.cloud.bigquery.datatransfer.v1.UpdateDataSourceDefinitionRequest.Builder - .class); - } - - public static final int DATA_SOURCE_DEFINITION_FIELD_NUMBER = 1; - private com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition dataSourceDefinition_; - /** - * - * - *
-   * Data source definition.
-   * 
- * - * .google.cloud.bigquery.datatransfer.v1.DataSourceDefinition data_source_definition = 1; - * - */ - public boolean hasDataSourceDefinition() { - return dataSourceDefinition_ != null; - } - /** - * - * - *
-   * Data source definition.
-   * 
- * - * .google.cloud.bigquery.datatransfer.v1.DataSourceDefinition data_source_definition = 1; - * - */ - public com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition getDataSourceDefinition() { - return dataSourceDefinition_ == null - ? com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition.getDefaultInstance() - : dataSourceDefinition_; - } - /** - * - * - *
-   * Data source definition.
-   * 
- * - * .google.cloud.bigquery.datatransfer.v1.DataSourceDefinition data_source_definition = 1; - * - */ - public com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinitionOrBuilder - getDataSourceDefinitionOrBuilder() { - return getDataSourceDefinition(); - } - - public static final int UPDATE_MASK_FIELD_NUMBER = 2; - private com.google.protobuf.FieldMask updateMask_; - /** - * - * - *
-   * Update field mask.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public boolean hasUpdateMask() { - return updateMask_ != null; - } - /** - * - * - *
-   * Update field mask.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public com.google.protobuf.FieldMask getUpdateMask() { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - /** - * - * - *
-   * Update field mask.
-   * 
- * - * .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 (dataSourceDefinition_ != null) { - output.writeMessage(1, getDataSourceDefinition()); - } - 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 (dataSourceDefinition_ != null) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(1, getDataSourceDefinition()); - } - 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.bigquery.datatransfer.v1.UpdateDataSourceDefinitionRequest)) { - return super.equals(obj); - } - com.google.cloud.bigquery.datatransfer.v1.UpdateDataSourceDefinitionRequest other = - (com.google.cloud.bigquery.datatransfer.v1.UpdateDataSourceDefinitionRequest) obj; - - if (hasDataSourceDefinition() != other.hasDataSourceDefinition()) return false; - if (hasDataSourceDefinition()) { - if (!getDataSourceDefinition().equals(other.getDataSourceDefinition())) 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 (hasDataSourceDefinition()) { - hash = (37 * hash) + DATA_SOURCE_DEFINITION_FIELD_NUMBER; - hash = (53 * hash) + getDataSourceDefinition().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.bigquery.datatransfer.v1.UpdateDataSourceDefinitionRequest - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.datatransfer.v1.UpdateDataSourceDefinitionRequest - parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.UpdateDataSourceDefinitionRequest - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.datatransfer.v1.UpdateDataSourceDefinitionRequest - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.UpdateDataSourceDefinitionRequest - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.datatransfer.v1.UpdateDataSourceDefinitionRequest - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.UpdateDataSourceDefinitionRequest - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.datatransfer.v1.UpdateDataSourceDefinitionRequest - parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.UpdateDataSourceDefinitionRequest - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.datatransfer.v1.UpdateDataSourceDefinitionRequest - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.UpdateDataSourceDefinitionRequest - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.datatransfer.v1.UpdateDataSourceDefinitionRequest - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.bigquery.datatransfer.v1.UpdateDataSourceDefinitionRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Represents the request of the UpdateDataSourceDefinition method.
-   * 
- * - * Protobuf type {@code google.cloud.bigquery.datatransfer.v1.UpdateDataSourceDefinitionRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.bigquery.datatransfer.v1.UpdateDataSourceDefinitionRequest) - com.google.cloud.bigquery.datatransfer.v1.UpdateDataSourceDefinitionRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_UpdateDataSourceDefinitionRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_UpdateDataSourceDefinitionRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.datatransfer.v1.UpdateDataSourceDefinitionRequest.class, - com.google.cloud.bigquery.datatransfer.v1.UpdateDataSourceDefinitionRequest.Builder - .class); - } - - // Construct using - // com.google.cloud.bigquery.datatransfer.v1.UpdateDataSourceDefinitionRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.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 (dataSourceDefinitionBuilder_ == null) { - dataSourceDefinition_ = null; - } else { - dataSourceDefinition_ = null; - dataSourceDefinitionBuilder_ = 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.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_UpdateDataSourceDefinitionRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.bigquery.datatransfer.v1.UpdateDataSourceDefinitionRequest - getDefaultInstanceForType() { - return com.google.cloud.bigquery.datatransfer.v1.UpdateDataSourceDefinitionRequest - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.bigquery.datatransfer.v1.UpdateDataSourceDefinitionRequest build() { - com.google.cloud.bigquery.datatransfer.v1.UpdateDataSourceDefinitionRequest result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.bigquery.datatransfer.v1.UpdateDataSourceDefinitionRequest - buildPartial() { - com.google.cloud.bigquery.datatransfer.v1.UpdateDataSourceDefinitionRequest result = - new com.google.cloud.bigquery.datatransfer.v1.UpdateDataSourceDefinitionRequest(this); - if (dataSourceDefinitionBuilder_ == null) { - result.dataSourceDefinition_ = dataSourceDefinition_; - } else { - result.dataSourceDefinition_ = dataSourceDefinitionBuilder_.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.bigquery.datatransfer.v1.UpdateDataSourceDefinitionRequest) { - return mergeFrom( - (com.google.cloud.bigquery.datatransfer.v1.UpdateDataSourceDefinitionRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.bigquery.datatransfer.v1.UpdateDataSourceDefinitionRequest other) { - if (other - == com.google.cloud.bigquery.datatransfer.v1.UpdateDataSourceDefinitionRequest - .getDefaultInstance()) return this; - if (other.hasDataSourceDefinition()) { - mergeDataSourceDefinition(other.getDataSourceDefinition()); - } - 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.bigquery.datatransfer.v1.UpdateDataSourceDefinitionRequest parsedMessage = - null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.bigquery.datatransfer.v1.UpdateDataSourceDefinitionRequest) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition dataSourceDefinition_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition, - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition.Builder, - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinitionOrBuilder> - dataSourceDefinitionBuilder_; - /** - * - * - *
-     * Data source definition.
-     * 
- * - * .google.cloud.bigquery.datatransfer.v1.DataSourceDefinition data_source_definition = 1; - * - */ - public boolean hasDataSourceDefinition() { - return dataSourceDefinitionBuilder_ != null || dataSourceDefinition_ != null; - } - /** - * - * - *
-     * Data source definition.
-     * 
- * - * .google.cloud.bigquery.datatransfer.v1.DataSourceDefinition data_source_definition = 1; - * - */ - public com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition - getDataSourceDefinition() { - if (dataSourceDefinitionBuilder_ == null) { - return dataSourceDefinition_ == null - ? com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition.getDefaultInstance() - : dataSourceDefinition_; - } else { - return dataSourceDefinitionBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Data source definition.
-     * 
- * - * .google.cloud.bigquery.datatransfer.v1.DataSourceDefinition data_source_definition = 1; - * - */ - public Builder setDataSourceDefinition( - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition value) { - if (dataSourceDefinitionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - dataSourceDefinition_ = value; - onChanged(); - } else { - dataSourceDefinitionBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Data source definition.
-     * 
- * - * .google.cloud.bigquery.datatransfer.v1.DataSourceDefinition data_source_definition = 1; - * - */ - public Builder setDataSourceDefinition( - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition.Builder builderForValue) { - if (dataSourceDefinitionBuilder_ == null) { - dataSourceDefinition_ = builderForValue.build(); - onChanged(); - } else { - dataSourceDefinitionBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Data source definition.
-     * 
- * - * .google.cloud.bigquery.datatransfer.v1.DataSourceDefinition data_source_definition = 1; - * - */ - public Builder mergeDataSourceDefinition( - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition value) { - if (dataSourceDefinitionBuilder_ == null) { - if (dataSourceDefinition_ != null) { - dataSourceDefinition_ = - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition.newBuilder( - dataSourceDefinition_) - .mergeFrom(value) - .buildPartial(); - } else { - dataSourceDefinition_ = value; - } - onChanged(); - } else { - dataSourceDefinitionBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Data source definition.
-     * 
- * - * .google.cloud.bigquery.datatransfer.v1.DataSourceDefinition data_source_definition = 1; - * - */ - public Builder clearDataSourceDefinition() { - if (dataSourceDefinitionBuilder_ == null) { - dataSourceDefinition_ = null; - onChanged(); - } else { - dataSourceDefinition_ = null; - dataSourceDefinitionBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Data source definition.
-     * 
- * - * .google.cloud.bigquery.datatransfer.v1.DataSourceDefinition data_source_definition = 1; - * - */ - public com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition.Builder - getDataSourceDefinitionBuilder() { - - onChanged(); - return getDataSourceDefinitionFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Data source definition.
-     * 
- * - * .google.cloud.bigquery.datatransfer.v1.DataSourceDefinition data_source_definition = 1; - * - */ - public com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinitionOrBuilder - getDataSourceDefinitionOrBuilder() { - if (dataSourceDefinitionBuilder_ != null) { - return dataSourceDefinitionBuilder_.getMessageOrBuilder(); - } else { - return dataSourceDefinition_ == null - ? com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition.getDefaultInstance() - : dataSourceDefinition_; - } - } - /** - * - * - *
-     * Data source definition.
-     * 
- * - * .google.cloud.bigquery.datatransfer.v1.DataSourceDefinition data_source_definition = 1; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition, - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition.Builder, - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinitionOrBuilder> - getDataSourceDefinitionFieldBuilder() { - if (dataSourceDefinitionBuilder_ == null) { - dataSourceDefinitionBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition, - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition.Builder, - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinitionOrBuilder>( - getDataSourceDefinition(), getParentForChildren(), isClean()); - dataSourceDefinition_ = null; - } - return dataSourceDefinitionBuilder_; - } - - 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_; - /** - * - * - *
-     * Update field mask.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public boolean hasUpdateMask() { - return updateMaskBuilder_ != null || updateMask_ != null; - } - /** - * - * - *
-     * Update field mask.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public com.google.protobuf.FieldMask getUpdateMask() { - if (updateMaskBuilder_ == null) { - return updateMask_ == null - ? com.google.protobuf.FieldMask.getDefaultInstance() - : updateMask_; - } else { - return updateMaskBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Update field mask.
-     * 
- * - * .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; - } - /** - * - * - *
-     * Update field mask.
-     * 
- * - * .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; - } - /** - * - * - *
-     * Update field mask.
-     * 
- * - * .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; - } - /** - * - * - *
-     * Update field mask.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public Builder clearUpdateMask() { - if (updateMaskBuilder_ == null) { - updateMask_ = null; - onChanged(); - } else { - updateMask_ = null; - updateMaskBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Update field mask.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { - - onChanged(); - return getUpdateMaskFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Update field mask.
-     * 
- * - * .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_; - } - } - /** - * - * - *
-     * Update field mask.
-     * 
- * - * .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.bigquery.datatransfer.v1.UpdateDataSourceDefinitionRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.bigquery.datatransfer.v1.UpdateDataSourceDefinitionRequest) - private static final com.google.cloud.bigquery.datatransfer.v1.UpdateDataSourceDefinitionRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.bigquery.datatransfer.v1.UpdateDataSourceDefinitionRequest(); - } - - public static com.google.cloud.bigquery.datatransfer.v1.UpdateDataSourceDefinitionRequest - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdateDataSourceDefinitionRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateDataSourceDefinitionRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.bigquery.datatransfer.v1.UpdateDataSourceDefinitionRequest - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/UpdateDataSourceDefinitionRequestOrBuilder.java b/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/UpdateDataSourceDefinitionRequestOrBuilder.java deleted file mode 100644 index 6c1e0e8035d3..000000000000 --- a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/UpdateDataSourceDefinitionRequestOrBuilder.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/bigquery/datatransfer/v1/datasource.proto - -package com.google.cloud.bigquery.datatransfer.v1; - -public interface UpdateDataSourceDefinitionRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.bigquery.datatransfer.v1.UpdateDataSourceDefinitionRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Data source definition.
-   * 
- * - * .google.cloud.bigquery.datatransfer.v1.DataSourceDefinition data_source_definition = 1; - * - */ - boolean hasDataSourceDefinition(); - /** - * - * - *
-   * Data source definition.
-   * 
- * - * .google.cloud.bigquery.datatransfer.v1.DataSourceDefinition data_source_definition = 1; - * - */ - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition getDataSourceDefinition(); - /** - * - * - *
-   * Data source definition.
-   * 
- * - * .google.cloud.bigquery.datatransfer.v1.DataSourceDefinition data_source_definition = 1; - * - */ - com.google.cloud.bigquery.datatransfer.v1.DataSourceDefinitionOrBuilder - getDataSourceDefinitionOrBuilder(); - - /** - * - * - *
-   * Update field mask.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - boolean hasUpdateMask(); - /** - * - * - *
-   * Update field mask.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - com.google.protobuf.FieldMask getUpdateMask(); - /** - * - * - *
-   * Update field mask.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); -} diff --git a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/UpdateTransferRunRequest.java b/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/UpdateTransferRunRequest.java deleted file mode 100644 index 1059839d4e8e..000000000000 --- a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/UpdateTransferRunRequest.java +++ /dev/null @@ -1,1017 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/bigquery/datatransfer/v1/datasource.proto - -package com.google.cloud.bigquery.datatransfer.v1; - -/** - * - * - *
- * A request to update a transfer run.
- * 
- * - * Protobuf type {@code google.cloud.bigquery.datatransfer.v1.UpdateTransferRunRequest} - */ -public final class UpdateTransferRunRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.bigquery.datatransfer.v1.UpdateTransferRunRequest) - UpdateTransferRunRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use UpdateTransferRunRequest.newBuilder() to construct. - private UpdateTransferRunRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private UpdateTransferRunRequest() {} - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private UpdateTransferRunRequest( - 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.bigquery.datatransfer.v1.TransferRun.Builder subBuilder = null; - if (transferRun_ != null) { - subBuilder = transferRun_.toBuilder(); - } - transferRun_ = - input.readMessage( - com.google.cloud.bigquery.datatransfer.v1.TransferRun.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(transferRun_); - transferRun_ = 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.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_UpdateTransferRunRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_UpdateTransferRunRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.datatransfer.v1.UpdateTransferRunRequest.class, - com.google.cloud.bigquery.datatransfer.v1.UpdateTransferRunRequest.Builder.class); - } - - public static final int TRANSFER_RUN_FIELD_NUMBER = 1; - private com.google.cloud.bigquery.datatransfer.v1.TransferRun transferRun_; - /** - * - * - *
-   * Run name must be set and correspond to an already existing run. Only
-   * state, error_status, and data_version fields will be updated. All other
-   * fields will be ignored.
-   * 
- * - * .google.cloud.bigquery.datatransfer.v1.TransferRun transfer_run = 1; - */ - public boolean hasTransferRun() { - return transferRun_ != null; - } - /** - * - * - *
-   * Run name must be set and correspond to an already existing run. Only
-   * state, error_status, and data_version fields will be updated. All other
-   * fields will be ignored.
-   * 
- * - * .google.cloud.bigquery.datatransfer.v1.TransferRun transfer_run = 1; - */ - public com.google.cloud.bigquery.datatransfer.v1.TransferRun getTransferRun() { - return transferRun_ == null - ? com.google.cloud.bigquery.datatransfer.v1.TransferRun.getDefaultInstance() - : transferRun_; - } - /** - * - * - *
-   * Run name must be set and correspond to an already existing run. Only
-   * state, error_status, and data_version fields will be updated. All other
-   * fields will be ignored.
-   * 
- * - * .google.cloud.bigquery.datatransfer.v1.TransferRun transfer_run = 1; - */ - public com.google.cloud.bigquery.datatransfer.v1.TransferRunOrBuilder getTransferRunOrBuilder() { - return getTransferRun(); - } - - public static final int UPDATE_MASK_FIELD_NUMBER = 2; - private com.google.protobuf.FieldMask updateMask_; - /** - * - * - *
-   * Required list of fields to be updated in this request.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public boolean hasUpdateMask() { - return updateMask_ != null; - } - /** - * - * - *
-   * Required list of fields to be updated in this request.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public com.google.protobuf.FieldMask getUpdateMask() { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - /** - * - * - *
-   * Required list of fields to be updated in this request.
-   * 
- * - * .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 (transferRun_ != null) { - output.writeMessage(1, getTransferRun()); - } - 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 (transferRun_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTransferRun()); - } - 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.bigquery.datatransfer.v1.UpdateTransferRunRequest)) { - return super.equals(obj); - } - com.google.cloud.bigquery.datatransfer.v1.UpdateTransferRunRequest other = - (com.google.cloud.bigquery.datatransfer.v1.UpdateTransferRunRequest) obj; - - if (hasTransferRun() != other.hasTransferRun()) return false; - if (hasTransferRun()) { - if (!getTransferRun().equals(other.getTransferRun())) 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 (hasTransferRun()) { - hash = (37 * hash) + TRANSFER_RUN_FIELD_NUMBER; - hash = (53 * hash) + getTransferRun().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.bigquery.datatransfer.v1.UpdateTransferRunRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.datatransfer.v1.UpdateTransferRunRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.UpdateTransferRunRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.datatransfer.v1.UpdateTransferRunRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.UpdateTransferRunRequest parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.datatransfer.v1.UpdateTransferRunRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.UpdateTransferRunRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.datatransfer.v1.UpdateTransferRunRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.UpdateTransferRunRequest - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.datatransfer.v1.UpdateTransferRunRequest - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.bigquery.datatransfer.v1.UpdateTransferRunRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.datatransfer.v1.UpdateTransferRunRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.bigquery.datatransfer.v1.UpdateTransferRunRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 request to update a transfer run.
-   * 
- * - * Protobuf type {@code google.cloud.bigquery.datatransfer.v1.UpdateTransferRunRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.bigquery.datatransfer.v1.UpdateTransferRunRequest) - com.google.cloud.bigquery.datatransfer.v1.UpdateTransferRunRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_UpdateTransferRunRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_UpdateTransferRunRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.datatransfer.v1.UpdateTransferRunRequest.class, - com.google.cloud.bigquery.datatransfer.v1.UpdateTransferRunRequest.Builder.class); - } - - // Construct using - // com.google.cloud.bigquery.datatransfer.v1.UpdateTransferRunRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.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 (transferRunBuilder_ == null) { - transferRun_ = null; - } else { - transferRun_ = null; - transferRunBuilder_ = 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.bigquery.datatransfer.v1.DataSourceProto - .internal_static_google_cloud_bigquery_datatransfer_v1_UpdateTransferRunRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.bigquery.datatransfer.v1.UpdateTransferRunRequest - getDefaultInstanceForType() { - return com.google.cloud.bigquery.datatransfer.v1.UpdateTransferRunRequest - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.bigquery.datatransfer.v1.UpdateTransferRunRequest build() { - com.google.cloud.bigquery.datatransfer.v1.UpdateTransferRunRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.bigquery.datatransfer.v1.UpdateTransferRunRequest buildPartial() { - com.google.cloud.bigquery.datatransfer.v1.UpdateTransferRunRequest result = - new com.google.cloud.bigquery.datatransfer.v1.UpdateTransferRunRequest(this); - if (transferRunBuilder_ == null) { - result.transferRun_ = transferRun_; - } else { - result.transferRun_ = transferRunBuilder_.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.bigquery.datatransfer.v1.UpdateTransferRunRequest) { - return mergeFrom( - (com.google.cloud.bigquery.datatransfer.v1.UpdateTransferRunRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.bigquery.datatransfer.v1.UpdateTransferRunRequest other) { - if (other - == com.google.cloud.bigquery.datatransfer.v1.UpdateTransferRunRequest - .getDefaultInstance()) return this; - if (other.hasTransferRun()) { - mergeTransferRun(other.getTransferRun()); - } - 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.bigquery.datatransfer.v1.UpdateTransferRunRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.bigquery.datatransfer.v1.UpdateTransferRunRequest) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.bigquery.datatransfer.v1.TransferRun transferRun_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.bigquery.datatransfer.v1.TransferRun, - com.google.cloud.bigquery.datatransfer.v1.TransferRun.Builder, - com.google.cloud.bigquery.datatransfer.v1.TransferRunOrBuilder> - transferRunBuilder_; - /** - * - * - *
-     * Run name must be set and correspond to an already existing run. Only
-     * state, error_status, and data_version fields will be updated. All other
-     * fields will be ignored.
-     * 
- * - * .google.cloud.bigquery.datatransfer.v1.TransferRun transfer_run = 1; - */ - public boolean hasTransferRun() { - return transferRunBuilder_ != null || transferRun_ != null; - } - /** - * - * - *
-     * Run name must be set and correspond to an already existing run. Only
-     * state, error_status, and data_version fields will be updated. All other
-     * fields will be ignored.
-     * 
- * - * .google.cloud.bigquery.datatransfer.v1.TransferRun transfer_run = 1; - */ - public com.google.cloud.bigquery.datatransfer.v1.TransferRun getTransferRun() { - if (transferRunBuilder_ == null) { - return transferRun_ == null - ? com.google.cloud.bigquery.datatransfer.v1.TransferRun.getDefaultInstance() - : transferRun_; - } else { - return transferRunBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Run name must be set and correspond to an already existing run. Only
-     * state, error_status, and data_version fields will be updated. All other
-     * fields will be ignored.
-     * 
- * - * .google.cloud.bigquery.datatransfer.v1.TransferRun transfer_run = 1; - */ - public Builder setTransferRun(com.google.cloud.bigquery.datatransfer.v1.TransferRun value) { - if (transferRunBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - transferRun_ = value; - onChanged(); - } else { - transferRunBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Run name must be set and correspond to an already existing run. Only
-     * state, error_status, and data_version fields will be updated. All other
-     * fields will be ignored.
-     * 
- * - * .google.cloud.bigquery.datatransfer.v1.TransferRun transfer_run = 1; - */ - public Builder setTransferRun( - com.google.cloud.bigquery.datatransfer.v1.TransferRun.Builder builderForValue) { - if (transferRunBuilder_ == null) { - transferRun_ = builderForValue.build(); - onChanged(); - } else { - transferRunBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Run name must be set and correspond to an already existing run. Only
-     * state, error_status, and data_version fields will be updated. All other
-     * fields will be ignored.
-     * 
- * - * .google.cloud.bigquery.datatransfer.v1.TransferRun transfer_run = 1; - */ - public Builder mergeTransferRun(com.google.cloud.bigquery.datatransfer.v1.TransferRun value) { - if (transferRunBuilder_ == null) { - if (transferRun_ != null) { - transferRun_ = - com.google.cloud.bigquery.datatransfer.v1.TransferRun.newBuilder(transferRun_) - .mergeFrom(value) - .buildPartial(); - } else { - transferRun_ = value; - } - onChanged(); - } else { - transferRunBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Run name must be set and correspond to an already existing run. Only
-     * state, error_status, and data_version fields will be updated. All other
-     * fields will be ignored.
-     * 
- * - * .google.cloud.bigquery.datatransfer.v1.TransferRun transfer_run = 1; - */ - public Builder clearTransferRun() { - if (transferRunBuilder_ == null) { - transferRun_ = null; - onChanged(); - } else { - transferRun_ = null; - transferRunBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Run name must be set and correspond to an already existing run. Only
-     * state, error_status, and data_version fields will be updated. All other
-     * fields will be ignored.
-     * 
- * - * .google.cloud.bigquery.datatransfer.v1.TransferRun transfer_run = 1; - */ - public com.google.cloud.bigquery.datatransfer.v1.TransferRun.Builder getTransferRunBuilder() { - - onChanged(); - return getTransferRunFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Run name must be set and correspond to an already existing run. Only
-     * state, error_status, and data_version fields will be updated. All other
-     * fields will be ignored.
-     * 
- * - * .google.cloud.bigquery.datatransfer.v1.TransferRun transfer_run = 1; - */ - public com.google.cloud.bigquery.datatransfer.v1.TransferRunOrBuilder - getTransferRunOrBuilder() { - if (transferRunBuilder_ != null) { - return transferRunBuilder_.getMessageOrBuilder(); - } else { - return transferRun_ == null - ? com.google.cloud.bigquery.datatransfer.v1.TransferRun.getDefaultInstance() - : transferRun_; - } - } - /** - * - * - *
-     * Run name must be set and correspond to an already existing run. Only
-     * state, error_status, and data_version fields will be updated. All other
-     * fields will be ignored.
-     * 
- * - * .google.cloud.bigquery.datatransfer.v1.TransferRun transfer_run = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.bigquery.datatransfer.v1.TransferRun, - com.google.cloud.bigquery.datatransfer.v1.TransferRun.Builder, - com.google.cloud.bigquery.datatransfer.v1.TransferRunOrBuilder> - getTransferRunFieldBuilder() { - if (transferRunBuilder_ == null) { - transferRunBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.bigquery.datatransfer.v1.TransferRun, - com.google.cloud.bigquery.datatransfer.v1.TransferRun.Builder, - com.google.cloud.bigquery.datatransfer.v1.TransferRunOrBuilder>( - getTransferRun(), getParentForChildren(), isClean()); - transferRun_ = null; - } - return transferRunBuilder_; - } - - private com.google.protobuf.FieldMask updateMask_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder> - updateMaskBuilder_; - /** - * - * - *
-     * Required list of fields to be updated in this request.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public boolean hasUpdateMask() { - return updateMaskBuilder_ != null || updateMask_ != null; - } - /** - * - * - *
-     * Required list of fields to be updated in this request.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public com.google.protobuf.FieldMask getUpdateMask() { - if (updateMaskBuilder_ == null) { - return updateMask_ == null - ? com.google.protobuf.FieldMask.getDefaultInstance() - : updateMask_; - } else { - return updateMaskBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required list of fields to be updated in this request.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public Builder setUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateMask_ = value; - onChanged(); - } else { - updateMaskBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Required list of fields to be updated in this request.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { - if (updateMaskBuilder_ == null) { - updateMask_ = builderForValue.build(); - onChanged(); - } else { - updateMaskBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Required list of fields to be updated in this request.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (updateMask_ != null) { - updateMask_ = - com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); - } else { - updateMask_ = value; - } - onChanged(); - } else { - updateMaskBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Required list of fields to be updated in this request.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public Builder clearUpdateMask() { - if (updateMaskBuilder_ == null) { - updateMask_ = null; - onChanged(); - } else { - updateMask_ = null; - updateMaskBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Required list of fields to be updated in this request.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { - - onChanged(); - return getUpdateMaskFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required list of fields to be updated in this request.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - if (updateMaskBuilder_ != null) { - return updateMaskBuilder_.getMessageOrBuilder(); - } else { - return updateMask_ == null - ? com.google.protobuf.FieldMask.getDefaultInstance() - : updateMask_; - } - } - /** - * - * - *
-     * Required list of fields to be updated in this request.
-     * 
- * - * .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.bigquery.datatransfer.v1.UpdateTransferRunRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.bigquery.datatransfer.v1.UpdateTransferRunRequest) - private static final com.google.cloud.bigquery.datatransfer.v1.UpdateTransferRunRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.bigquery.datatransfer.v1.UpdateTransferRunRequest(); - } - - public static com.google.cloud.bigquery.datatransfer.v1.UpdateTransferRunRequest - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdateTransferRunRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateTransferRunRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.bigquery.datatransfer.v1.UpdateTransferRunRequest - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/UpdateTransferRunRequestOrBuilder.java b/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/UpdateTransferRunRequestOrBuilder.java deleted file mode 100644 index abec4940fe87..000000000000 --- a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/UpdateTransferRunRequestOrBuilder.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/bigquery/datatransfer/v1/datasource.proto - -package com.google.cloud.bigquery.datatransfer.v1; - -public interface UpdateTransferRunRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.bigquery.datatransfer.v1.UpdateTransferRunRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Run name must be set and correspond to an already existing run. Only
-   * state, error_status, and data_version fields will be updated. All other
-   * fields will be ignored.
-   * 
- * - * .google.cloud.bigquery.datatransfer.v1.TransferRun transfer_run = 1; - */ - boolean hasTransferRun(); - /** - * - * - *
-   * Run name must be set and correspond to an already existing run. Only
-   * state, error_status, and data_version fields will be updated. All other
-   * fields will be ignored.
-   * 
- * - * .google.cloud.bigquery.datatransfer.v1.TransferRun transfer_run = 1; - */ - com.google.cloud.bigquery.datatransfer.v1.TransferRun getTransferRun(); - /** - * - * - *
-   * Run name must be set and correspond to an already existing run. Only
-   * state, error_status, and data_version fields will be updated. All other
-   * fields will be ignored.
-   * 
- * - * .google.cloud.bigquery.datatransfer.v1.TransferRun transfer_run = 1; - */ - com.google.cloud.bigquery.datatransfer.v1.TransferRunOrBuilder getTransferRunOrBuilder(); - - /** - * - * - *
-   * Required list of fields to be updated in this request.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - boolean hasUpdateMask(); - /** - * - * - *
-   * Required list of fields to be updated in this request.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - com.google.protobuf.FieldMask getUpdateMask(); - /** - * - * - *
-   * Required list of fields to be updated in this request.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); -} diff --git a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/WriteDisposition.java b/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/WriteDisposition.java deleted file mode 100644 index 60174391eaca..000000000000 --- a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/WriteDisposition.java +++ /dev/null @@ -1,170 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/bigquery/datatransfer/v1/datasource.proto - -package com.google.cloud.bigquery.datatransfer.v1; - -/** - * - * - *
- * Options for writing to the table.
- * The WRITE_EMPTY option is intentionally excluded from the enum and is not
- * supported by the data transfer service.
- * 
- * - * Protobuf enum {@code google.cloud.bigquery.datatransfer.v1.WriteDisposition} - */ -public enum WriteDisposition implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-   * The default writeDispostion
-   * 
- * - * WRITE_DISPOSITION_UNSPECIFIED = 0; - */ - WRITE_DISPOSITION_UNSPECIFIED(0), - /** - * - * - *
-   * overwrites the table data.
-   * 
- * - * WRITE_TRUNCATE = 1; - */ - WRITE_TRUNCATE(1), - /** - * - * - *
-   * the data is appended to the table.
-   * Note duplication might happen if this mode is used.
-   * 
- * - * WRITE_APPEND = 2; - */ - WRITE_APPEND(2), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-   * The default writeDispostion
-   * 
- * - * WRITE_DISPOSITION_UNSPECIFIED = 0; - */ - public static final int WRITE_DISPOSITION_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-   * overwrites the table data.
-   * 
- * - * WRITE_TRUNCATE = 1; - */ - public static final int WRITE_TRUNCATE_VALUE = 1; - /** - * - * - *
-   * the data is appended to the table.
-   * Note duplication might happen if this mode is used.
-   * 
- * - * WRITE_APPEND = 2; - */ - public static final int WRITE_APPEND_VALUE = 2; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** @deprecated Use {@link #forNumber(int)} instead. */ - @java.lang.Deprecated - public static WriteDisposition valueOf(int value) { - return forNumber(value); - } - - public static WriteDisposition forNumber(int value) { - switch (value) { - case 0: - return WRITE_DISPOSITION_UNSPECIFIED; - case 1: - return WRITE_TRUNCATE; - case 2: - return WRITE_APPEND; - 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 WriteDisposition findValueByNumber(int number) { - return WriteDisposition.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.bigquery.datatransfer.v1.DataSourceProto.getDescriptor() - .getEnumTypes() - .get(0); - } - - private static final WriteDisposition[] VALUES = values(); - - public static WriteDisposition 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 WriteDisposition(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.bigquery.datatransfer.v1.WriteDisposition) -} diff --git a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/proto/google/cloud/bigquery/datatransfer/v1/datasource.proto b/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/proto/google/cloud/bigquery/datatransfer/v1/datasource.proto deleted file mode 100644 index d7400a55935d..000000000000 --- a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/proto/google/cloud/bigquery/datatransfer/v1/datasource.proto +++ /dev/null @@ -1,542 +0,0 @@ -// Copyright 2019 Google LLC. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// 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.bigquery.datatransfer.v1; - -import "google/api/annotations.proto"; -import "google/cloud/bigquery/datatransfer/v1/datatransfer.proto"; -import "google/cloud/bigquery/datatransfer/v1/transfer.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/timestamp.proto"; -import "google/protobuf/wrappers.proto"; -import "google/api/client.proto"; - -option csharp_namespace = "Google.Cloud.BigQuery.DataTransfer.V1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/bigquery/datatransfer/v1;datatransfer"; -option java_multiple_files = true; -option java_outer_classname = "DataSourceProto"; -option java_package = "com.google.cloud.bigquery.datatransfer.v1"; -option php_namespace = "Google\\Cloud\\BigQuery\\DataTransfer\\V1"; - -// The Google BigQuery Data Transfer API allows BigQuery users to -// configure transfer of their data from other Google Products into BigQuery. -// This service exposes methods that should be used by data source backend. -service DataSourceService { - option (google.api.default_host) = "bigquerydatatransfer.googleapis.com"; - - // Update a transfer run. If successful, resets - // data_source.update_deadline_seconds timer. - rpc UpdateTransferRun(UpdateTransferRunRequest) returns (TransferRun) { - option (google.api.http) = { - patch: "/v1/{transfer_run.name=projects/*/locations/*/transferConfigs/*/runs/*}" - body: "transfer_run" - }; - } - - // Log messages for a transfer run. If successful (at least 1 message), resets - // data_source.update_deadline_seconds timer. - rpc LogTransferRunMessages(LogTransferRunMessagesRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/transferConfigs/*/runs/*}:logMessages" - body: "*" - }; - } - - // Notify the Data Transfer Service that data is ready for loading. - // The Data Transfer Service will start and monitor multiple BigQuery Load - // jobs for a transfer run. Monitored jobs will be automatically retried - // and produce log messages when starting and finishing a job. - // Can be called multiple times for the same transfer run. - rpc StartBigQueryJobs(StartBigQueryJobsRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/transferConfigs/*/runs/*}:startBigQueryJobs" - body: "*" - }; - } - - // Notify the Data Transfer Service that the data source is done processing - // the run. No more status updates or requests to start/monitor jobs will be - // accepted. The run will be finalized by the Data Transfer Service when all - // monitored jobs are completed. - // Does not need to be called if the run is set to FAILED. - rpc FinishRun(FinishRunRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/transferConfigs/*/runs/*}:finishRun" - body: "*" - }; - } - - // Creates a data source definition. Calling this method will automatically - // use your credentials to create the following Google Cloud resources in - // YOUR Google Cloud project. - // 1. OAuth client - // 2. Pub/Sub Topics and Subscriptions in each supported_location_ids. e.g., - // projects/{project_id}/{topics|subscriptions}/bigquerydatatransfer.{data_source_id}.{location_id}.run - // The field data_source.client_id should be left empty in the input request, - // as the API will create a new OAuth client on behalf of the caller. On the - // other hand data_source.scopes usually need to be set when there are OAuth - // scopes that need to be granted by end users. - // 3. We need a longer deadline due to the 60 seconds SLO from Pub/Sub admin - // Operations. This also applies to update and delete data source definition. - rpc CreateDataSourceDefinition(CreateDataSourceDefinitionRequest) returns (DataSourceDefinition) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/dataSourceDefinitions" - body: "data_source_definition" - }; - } - - // Updates an existing data source definition. If changing - // supported_location_ids, triggers same effects as mentioned in "Create a - // data source definition." - rpc UpdateDataSourceDefinition(UpdateDataSourceDefinitionRequest) returns (DataSourceDefinition) { - option (google.api.http) = { - patch: "/v1/{data_source_definition.name=projects/*/locations/*/dataSourceDefinitions/*}" - body: "data_source_definition" - }; - } - - // Deletes a data source definition, all of the transfer configs associated - // with this data source definition (if any) must be deleted first by the user - // in ALL regions, in order to delete the data source definition. - // This method is primarily meant for deleting data sources created during - // testing stage. - // If the data source is referenced by transfer configs in the region - // specified in the request URL, the method will fail immediately. If in the - // current region (e.g., US) it's not used by any transfer configs, but in - // another region (e.g., EU) it is, then although the method will succeed in - // region US, but it will fail when the deletion operation is replicated to - // region EU. And eventually, the system will replicate the data source - // definition back from EU to US, in order to bring all regions to - // consistency. The final effect is that the data source appears to be - // 'undeleted' in the US region. - rpc DeleteDataSourceDefinition(DeleteDataSourceDefinitionRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/dataSourceDefinitions/*}" - }; - } - - // Retrieves an existing data source definition. - rpc GetDataSourceDefinition(GetDataSourceDefinitionRequest) returns (DataSourceDefinition) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/dataSourceDefinitions/*}" - }; - } - - // Lists supported data source definitions. - rpc ListDataSourceDefinitions(ListDataSourceDefinitionsRequest) returns (ListDataSourceDefinitionsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/dataSourceDefinitions" - }; - } -} - -// Describes data which should be imported. -message ImportedDataInfo { - // Defines schema of a field in the imported data. - message FieldSchema { - // LINT.IfChange - // Field type. - enum Type { - // Illegal value. - TYPE_UNSPECIFIED = 0; - - // 64K, UTF8. - STRING = 1; - - // 64-bit signed. - INTEGER = 2; - - // 64-bit IEEE floating point. - FLOAT = 3; - - // Aggregate type. - RECORD = 4; - - // 64K, Binary. - BYTES = 5; - - // 2-valued. - BOOLEAN = 6; - - // 64-bit signed usec since UTC epoch. - TIMESTAMP = 7; - - // Civil date - Year, Month, Day. - DATE = 8; - - // Civil time - Hour, Minute, Second, Microseconds. - TIME = 9; - - // Combination of civil date and civil time. - DATETIME = 10; - - // Numeric type with 38 decimal digits of precision and 9 decimal digits - // of scale. - NUMERIC = 11; - - // Geography object (go/googlesql_geography). - GEOGRAPHY = 12; - } - - // Field name. Matches: [A-Za-z_][A-Za-z_0-9]{0,127} - string field_name = 1; - - // Field type - Type type = 2; - - // Is field repeated. - bool is_repeated = 3; - - // Description for this field. - string description = 4; - - // Present iff type == RECORD. - RecordSchema schema = 5; - } - - // Describes schema of the data to be ingested. - message RecordSchema { - // One field per column in the record. - repeated FieldSchema fields = 1; - } - - // External table definition. These tables can be referenced with 'name' - // in the query and can be read just like any other table. - message TableDefinition { - // CSV specific options. - message CsvOptions { - // The delimiter. We currently restrict this to U+0001 to U+00FF and - // apply additional constraints during validation. - google.protobuf.StringValue field_delimiter = 1; - - // Whether CSV files are allowed to have quoted newlines. If quoted - // newlines are allowed, we can't split CSV files. - google.protobuf.BoolValue allow_quoted_newlines = 2; - - // The quote character. We currently restrict this to U+0000 to U+00FF - // and apply additional constraints during validation. Set to '\0' to - // indicate no quote is used. - google.protobuf.StringValue quote_char = 3; - - // Number of leading rows to skip. - google.protobuf.Int64Value skip_leading_rows = 4; - - // Accept rows that are missing trailing optional columns. - google.protobuf.BoolValue allow_jagged_rows = 5; - } - - // BigQuery table_id (required). This will be used to reference this - // table in the query. - string table_id = 1; - - // URIs for the data to be imported. All URIs must be from the same storage - // system. - repeated string source_uris = 2; - - // Describes the format of the data in source_uri. - Format format = 3; - - // Specify the maximum number of bad records that can be ignored. - // If bad records exceed this threshold the query is aborted. - int32 max_bad_records = 4; - - // Character encoding of the input when applicable (CSV, JSON). - // Defaults to UTF8. - Encoding encoding = 5; - - // CSV specific options. - CsvOptions csv_options = 6; - - // Optional schema for the data. When not specified for JSON and CSV formats - // we will try to detect it automatically. - RecordSchema schema = 7; - - // Indicates if extra values that are not represented in the table schema is - // allowed. - google.protobuf.BoolValue ignore_unknown_values = 10; - } - - // Data format. - enum Format { - // Unspecified format. In this case, we have to infer the format from the - // data source. - FORMAT_UNSPECIFIED = 0; - - // CSV format. - CSV = 1; - - // Newline-delimited JSON. - JSON = 2; - - // Avro format. See http://avro.apache.org . - AVRO = 3; - - // RecordIO. - RECORDIO = 4; - - // ColumnIO. - COLUMNIO = 5; - - // Capacitor. - CAPACITOR = 6; - - // Parquet format. See https://parquet.apache.org . - PARQUET = 7; - - // ORC format. See https://orc.apache.org . - ORC = 8; - } - - // Encoding of input data in CSV/JSON format. - enum Encoding { - // Default encoding (UTF8). - ENCODING_UNSPECIFIED = 0; - - // ISO_8859_1 encoding. - ISO_8859_1 = 1; - - // UTF8 encoding. - UTF8 = 2; - } - - // SQL query to run. When empty, API checks that there is only one - // table_def specified and loads this table. Only Standard SQL queries - // are accepted. Legacy SQL is not allowed. - string sql = 1; - - // Table where results should be written. - string destination_table_id = 2; - - // The description of a destination table. This can be several sentences - // or paragraphs describing the table contents in detail. - string destination_table_description = 10; - - // When used WITHOUT the "sql" parameter, describes the schema of the - // destination table. - // When used WITH the "sql" parameter, describes tables with data stored - // outside of BigQuery. - repeated TableDefinition table_defs = 3; - - // Inline code for User-defined function resources. - // Ignored when "sql" parameter is empty. - repeated string user_defined_functions = 4; - - // Specifies the action if the destination table already exists. - WriteDisposition write_disposition = 6; -} - -// A request to update a transfer run. -message UpdateTransferRunRequest { - // Run name must be set and correspond to an already existing run. Only - // state, error_status, and data_version fields will be updated. All other - // fields will be ignored. - TransferRun transfer_run = 1; - - // Required list of fields to be updated in this request. - google.protobuf.FieldMask update_mask = 2; -} - -// A request to add transfer status messages to the run. -message LogTransferRunMessagesRequest { - // Name of the resource in the form: - // "projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}" - string name = 1; - - // Messages to append. - repeated TransferMessage transfer_messages = 2; -} - -// A request to start and monitor a BigQuery load job. -message StartBigQueryJobsRequest { - // Name of the resource in the form: - // "projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}" - string name = 1; - - // Import jobs which should be started and monitored. - repeated ImportedDataInfo imported_data = 2; - - // User credentials which should be used to start/monitor - // BigQuery jobs. If not specified, then jobs - // are started using data source service account credentials. - // This may be OAuth token or JWT token. - bytes user_credentials = 3; - - // The number of BQ Jobs that can run in parallel. - int32 max_parallelism = 8; -} - -// A request to finish a run. -message FinishRunRequest { - // Name of the resource in the form: - // "projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}" - string name = 1; -} - -// Represents the request of the CreateDataSourceDefinition method. -message CreateDataSourceDefinitionRequest { - // The BigQuery project id for which data source definition is associated. - // Must be in the form: `projects/{project_id}/locations/{location_id}` - string parent = 1; - - // Data source definition. - DataSourceDefinition data_source_definition = 2; -} - -// Represents the request of the UpdateDataSourceDefinition method. -message UpdateDataSourceDefinitionRequest { - // Data source definition. - DataSourceDefinition data_source_definition = 1; - - // Update field mask. - google.protobuf.FieldMask update_mask = 2; -} - -// Represents the request of the DeleteDataSourceDefinition method. All transfer -// configs associated with the data source must be deleted first, before the -// data source can be deleted. -message DeleteDataSourceDefinitionRequest { - // The field will contain name of the resource requested, for example: - // `projects/{project_id}/locations/{location_id}/dataSourceDefinitions/{data_source_id}` - string name = 1; -} - -// Represents the request of the GetDataSourceDefinition method. -message GetDataSourceDefinitionRequest { - // The field will contain name of the resource requested. - string name = 1; -} - -// Options for writing to the table. -// The WRITE_EMPTY option is intentionally excluded from the enum and is not -// supported by the data transfer service. -enum WriteDisposition { - // The default writeDispostion - WRITE_DISPOSITION_UNSPECIFIED = 0; - - // overwrites the table data. - WRITE_TRUNCATE = 1; - - // the data is appended to the table. - // Note duplication might happen if this mode is used. - WRITE_APPEND = 2; -} - -// Represents the request of the ListDataSourceDefinitions method. -message ListDataSourceDefinitionsRequest { - // The BigQuery project id for which data sources should be returned. - // Must be in the form: `projects/{project_id}/locations/{location_id}` - string parent = 1; - - // Pagination token, which can be used to request a specific page - // of `ListDataSourceDefinitionsRequest` list results. For multiple-page - // results, `ListDataSourceDefinitionsResponse` outputs a `next_page` token, - // which can be used as the `page_token` value to request the next page of - // the list results. - string page_token = 2; - - // Page size. The default page size is the maximum value of 1000 results. - int32 page_size = 3; -} - -// Returns a list of supported data source definitions. -message ListDataSourceDefinitionsResponse { - // List of supported data source definitions. - repeated DataSourceDefinition data_source_definitions = 1; - - // Output only. The next-pagination token. For multiple-page list results, - // this token can be used as the - // `ListDataSourceDefinitionsRequest.page_token` - // to request the next page of the list results. - string next_page_token = 2; -} - -// Represents the data source definition. -message DataSourceDefinition { - // The resource name of the data source definition. - // Data source definition names have the form - // `projects/{project_id}/locations/{location}/dataSourceDefinitions/{data_source_id}`. - string name = 21; - - // Data source metadata. - DataSource data_source = 1; - - // The Pub/Sub topic to be used for broadcasting a message when a transfer run - // is created. Both this topic and transfer_config_pubsub_topic can be - // set to a custom topic. By default, both topics are auto-generated if none - // of them is provided when creating the definition. However, if one topic is - // manually set, the other topic has to be manually set as well. The only - // difference is that transfer_run_pubsub_topic must be a non-empty Pub/Sub - // topic, but transfer_config_pubsub_topic can be set to empty. The comments - // about "{location}" for transfer_config_pubsub_topic apply here too. - string transfer_run_pubsub_topic = 13; - - // Duration which should be added to schedule_time to calculate - // run_time when job is scheduled. Only applicable for automatically - // scheduled transfer runs. Used to start a run early on a data source that - // supports continuous data refresh to compensate for unknown timezone - // offsets. Use a negative number to start a run late for data sources not - // supporting continuous data refresh. - google.protobuf.Duration run_time_offset = 16; - - // Support e-mail address of the OAuth client's Brand, which contains the - // consent screen data. - string support_email = 22; - - // When service account is specified, BigQuery will share created dataset - // with the given service account. Also, this service account will be - // eligible to perform status updates and message logging for data transfer - // runs for the corresponding data_source_id. - string service_account = 2; - - // Is data source disabled? If true, data_source is not visible. - // API will also stop returning any data transfer configs and/or runs - // associated with the data source. This setting has higher priority - // than whitelisted_project_ids. - bool disabled = 5; - - // The Pub/Sub topic to use for broadcasting a message for transfer config. If - // empty, a message will not be broadcasted. Both this topic and - // transfer_run_pubsub_topic are auto-generated if none of them is provided - // when creating the definition. It is recommended to provide - // transfer_config_pubsub_topic if a user-owned transfer_run_pubsub_topic is - // provided. Otherwise, it will be set to empty. If "{location}" is found in - // the value, then that means, data source wants to handle message separately - // for datasets in different regions. We will replace {location} with the - // actual dataset location, as the actual topic name. For example, - // projects/connector/topics/scheduler-{location} could become - // projects/connector/topics/scheduler-us. If "{location}" is not found, then - // we will use the input value as topic name. - string transfer_config_pubsub_topic = 12; - - // Supported location_ids used for deciding in which locations Pub/Sub topics - // need to be created. If custom Pub/Sub topics are used and they contains - // '{location}', the location_ids will be used for validating the topics by - // replacing the '{location}' with the individual location in the list. The - // valid values are the "location_id" field of the response of `GET - // https://bigquerydatatransfer.googleapis.com/v1/{name=projects/*}/locations` - // In addition, if the data source needs to support all available regions, - // supported_location_ids can be set to "global" (a single string element). - // When "global" is specified: - // 1) the data source implementation is supposed to stage the data in proper - // region of the destination dataset; - // 2) Data source developer should be aware of the implications (e.g., network - // traffic latency, potential charge associated with cross-region traffic, - // etc.) of supporting the "global" region; - repeated string supported_location_ids = 23; -} diff --git a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/proto/google/cloud/bigquery/datatransfer/v1/resourcestate.proto b/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/proto/google/cloud/bigquery/datatransfer/v1/resourcestate.proto deleted file mode 100644 index dcc8db6e0d5f..000000000000 --- a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/src/main/proto/google/cloud/bigquery/datatransfer/v1/resourcestate.proto +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2019 Google LLC. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// 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.bigquery.datatransfer.v1; - -import "google/api/annotations.proto"; -import "google/protobuf/timestamp.proto"; - -option csharp_namespace = "Google.Cloud.BigQuery.DataTransfer.V1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/bigquery/datatransfer/v1;datatransfer"; -option java_multiple_files = true; -option java_outer_classname = "ResourceStateProto"; -option java_package = "com.google.cloud.bigquery.datatransfer.v1"; -option php_namespace = "Google\\Cloud\\BigQuery\\DataTransfer\\V1"; diff --git a/java-monitoring/.OwlBot-hermetic.yaml b/java-monitoring/.OwlBot-hermetic.yaml index 35168b6e2690..d7b4fa1f3ae4 100644 --- a/java-monitoring/.OwlBot-hermetic.yaml +++ b/java-monitoring/.OwlBot-hermetic.yaml @@ -22,9 +22,6 @@ deep-remove-regex: deep-preserve-regex: - "/java-monitoring/google-.*/src/test/java/com/google/cloud/.*/v.*/it/IT.*Test.java" - "/java-monitoring/google-cloud-monitoring/src/test/java/com/google/cloud/monitoring/v3/ITVPCServiceControlTest.java" -- "/java-monitoring/proto-google-cloud-monitoring-v3/src/main/java/com/google/monitoring/v3/AlertPolicyConditionName.java" -- "/java-monitoring/proto-google-cloud-monitoring-v3/src/main/java/com/google/monitoring/v3/DroppedLabelsOuterClass.java" -- "/java-monitoring/proto-google-cloud-monitoring-v3/src/main/java/google/monitoring/v3/DroppedLabelsOuterClass.java" deep-copy-regex: - source: "/google/monitoring/(v.*)/.*-java/proto-google-.*/src" diff --git a/java-monitoring/proto-google-cloud-monitoring-v3/src/main/java/com/google/monitoring/v3/AlertPolicyConditionName.java b/java-monitoring/proto-google-cloud-monitoring-v3/src/main/java/com/google/monitoring/v3/AlertPolicyConditionName.java deleted file mode 100644 index 550498772ea0..000000000000 --- a/java-monitoring/proto-google-cloud-monitoring-v3/src/main/java/com/google/monitoring/v3/AlertPolicyConditionName.java +++ /dev/null @@ -1,215 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.monitoring.v3; - -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 AlertPolicyConditionName implements ResourceName { - - private static final PathTemplate PATH_TEMPLATE = - PathTemplate.createWithoutUrlEncoding( - "projects/{project}/alertPolicies/{alert_policy}/conditions/{condition}"); - - private volatile Map fieldValuesMap; - - private final String project; - private final String alertPolicy; - private final String condition; - - public String getProject() { - return project; - } - - public String getAlertPolicy() { - return alertPolicy; - } - - public String getCondition() { - return condition; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - private AlertPolicyConditionName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - alertPolicy = Preconditions.checkNotNull(builder.getAlertPolicy()); - condition = Preconditions.checkNotNull(builder.getCondition()); - } - - public static AlertPolicyConditionName of(String project, String alertPolicy, String condition) { - return newBuilder() - .setProject(project) - .setAlertPolicy(alertPolicy) - .setCondition(condition) - .build(); - } - - public static String format(String project, String alertPolicy, String condition) { - return newBuilder() - .setProject(project) - .setAlertPolicy(alertPolicy) - .setCondition(condition) - .build() - .toString(); - } - - public static AlertPolicyConditionName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PATH_TEMPLATE.validatedMatch( - formattedString, "AlertPolicyConditionName.parse: formattedString not in valid format"); - return of(matchMap.get("project"), matchMap.get("alert_policy"), matchMap.get("condition")); - } - - 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 (AlertPolicyConditionName 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("alertPolicy", alertPolicy); - fieldMapBuilder.put("condition", condition); - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PATH_TEMPLATE.instantiate( - "project", project, "alert_policy", alertPolicy, "condition", condition); - } - - /** Builder for AlertPolicyConditionName. */ - public static class Builder { - - private String project; - private String alertPolicy; - private String condition; - - public String getProject() { - return project; - } - - public String getAlertPolicy() { - return alertPolicy; - } - - public String getCondition() { - return condition; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setAlertPolicy(String alertPolicy) { - this.alertPolicy = alertPolicy; - return this; - } - - public Builder setCondition(String condition) { - this.condition = condition; - return this; - } - - private Builder() {} - - private Builder(AlertPolicyConditionName alertPolicyConditionName) { - project = alertPolicyConditionName.project; - alertPolicy = alertPolicyConditionName.alertPolicy; - condition = alertPolicyConditionName.condition; - } - - public AlertPolicyConditionName build() { - return new AlertPolicyConditionName(this); - } - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof AlertPolicyConditionName) { - AlertPolicyConditionName that = (AlertPolicyConditionName) o; - return (this.project.equals(that.project)) - && (this.alertPolicy.equals(that.alertPolicy)) - && (this.condition.equals(that.condition)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= project.hashCode(); - h *= 1000003; - h ^= alertPolicy.hashCode(); - h *= 1000003; - h ^= condition.hashCode(); - return h; - } -} diff --git a/java-monitoring/proto-google-cloud-monitoring-v3/src/main/java/com/google/monitoring/v3/DroppedLabelsOuterClass.java b/java-monitoring/proto-google-cloud-monitoring-v3/src/main/java/com/google/monitoring/v3/DroppedLabelsOuterClass.java deleted file mode 100644 index 5d12e132f14a..000000000000 --- a/java-monitoring/proto-google-cloud-monitoring-v3/src/main/java/com/google/monitoring/v3/DroppedLabelsOuterClass.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/monitoring/v3/dropped_labels.proto - -package com.google.monitoring.v3; - -public final class DroppedLabelsOuterClass { - private DroppedLabelsOuterClass() {} - - 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_monitoring_v3_DroppedLabels_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_monitoring_v3_DroppedLabels_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_monitoring_v3_DroppedLabels_LabelEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_monitoring_v3_DroppedLabels_LabelEntry_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/monitoring/v3/dropped_labels.pr" - + "oto\022\024google.monitoring.v3\032\034google/api/an" - + "notations.proto\"|\n\rDroppedLabels\022=\n\005labe" - + "l\030\001 \003(\0132..google.monitoring.v3.DroppedLa" - + "bels.LabelEntry\032,\n\nLabelEntry\022\013\n\003key\030\001 \001" - + "(\t\022\r\n\005value\030\002 \001(\t:\0028\001B\\\n\030com.google.moni" - + "toring.v3P\001Z>google.golang.org/genproto/" - + "googleapis/monitoring/v3;monitoringb\006pro" - + "to3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), - }, - assigner); - internal_static_google_monitoring_v3_DroppedLabels_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_monitoring_v3_DroppedLabels_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_monitoring_v3_DroppedLabels_descriptor, - new java.lang.String[] { - "Label", - }); - internal_static_google_monitoring_v3_DroppedLabels_LabelEntry_descriptor = - internal_static_google_monitoring_v3_DroppedLabels_descriptor.getNestedTypes().get(0); - internal_static_google_monitoring_v3_DroppedLabels_LabelEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_monitoring_v3_DroppedLabels_LabelEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - com.google.api.AnnotationsProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/java-monitoring/proto-google-cloud-monitoring-v3/src/main/java/google/monitoring/v3/DroppedLabelsOuterClass.java b/java-monitoring/proto-google-cloud-monitoring-v3/src/main/java/google/monitoring/v3/DroppedLabelsOuterClass.java deleted file mode 100644 index 319dbc0015bf..000000000000 --- a/java-monitoring/proto-google-cloud-monitoring-v3/src/main/java/google/monitoring/v3/DroppedLabelsOuterClass.java +++ /dev/null @@ -1,938 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/monitoring/v3/dropped_labels.proto - -package google.monitoring.v3; - -public final class DroppedLabelsOuterClass { - private DroppedLabelsOuterClass() {} - - 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 DroppedLabelsOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.monitoring.v3.DroppedLabels) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * Map from label to its value, for all labels dropped in any aggregation.
-     * 
- * - * map<string, string> label = 1; - */ - int getLabelCount(); - /** - * - * - *
-     * Map from label to its value, for all labels dropped in any aggregation.
-     * 
- * - * map<string, string> label = 1; - */ - boolean containsLabel(java.lang.String key); - /** Use {@link #getLabelMap()} instead. */ - @java.lang.Deprecated - java.util.Map getLabel(); - /** - * - * - *
-     * Map from label to its value, for all labels dropped in any aggregation.
-     * 
- * - * map<string, string> label = 1; - */ - java.util.Map getLabelMap(); - /** - * - * - *
-     * Map from label to its value, for all labels dropped in any aggregation.
-     * 
- * - * map<string, string> label = 1; - */ - java.lang.String getLabelOrDefault(java.lang.String key, java.lang.String defaultValue); - /** - * - * - *
-     * Map from label to its value, for all labels dropped in any aggregation.
-     * 
- * - * map<string, string> label = 1; - */ - java.lang.String getLabelOrThrow(java.lang.String key); - } - /** - * - * - *
-   * A set of (label, value) pairs which were dropped during aggregation, attached
-   * to google.api.Distribution.Exemplars in google.api.Distribution values during
-   * aggregation.
-   * These values are used in combination with the label values that remain on the
-   * aggregated Distribution timeseries to construct the full label set for the
-   * exemplar values.  The resulting full label set may be used to identify the
-   * specific task/job/instance (for example) which may be contributing to a
-   * long-tail, while allowing the storage savings of only storing aggregated
-   * distribution values for a large group.
-   * Note that there are no guarantees on ordering of the labels from
-   * exemplar-to-exemplar and from distribution-to-distribution in the same
-   * stream, and there may be duplicates.  It is up to clients to resolve any
-   * ambiguities.
-   * 
- * - * Protobuf type {@code google.monitoring.v3.DroppedLabels} - */ - public static final class DroppedLabels extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.monitoring.v3.DroppedLabels) - DroppedLabelsOrBuilder { - private static final long serialVersionUID = 0L; - // Use DroppedLabels.newBuilder() to construct. - private DroppedLabels(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private DroppedLabels() {} - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private DroppedLabels( - 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)) { - label_ = - com.google.protobuf.MapField.newMapField( - LabelDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry label__ = - input.readMessage( - LabelDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - label_.getMutableMap().put(label__.getKey(), label__.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 google.monitoring.v3.DroppedLabelsOuterClass - .internal_static_google_monitoring_v3_DroppedLabels_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 1: - return internalGetLabel(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return google.monitoring.v3.DroppedLabelsOuterClass - .internal_static_google_monitoring_v3_DroppedLabels_fieldAccessorTable - .ensureFieldAccessorsInitialized( - google.monitoring.v3.DroppedLabelsOuterClass.DroppedLabels.class, - google.monitoring.v3.DroppedLabelsOuterClass.DroppedLabels.Builder.class); - } - - public static final int LABEL_FIELD_NUMBER = 1; - - private static final class LabelDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - google.monitoring.v3.DroppedLabelsOuterClass - .internal_static_google_monitoring_v3_DroppedLabels_LabelEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - - private com.google.protobuf.MapField label_; - - private com.google.protobuf.MapField internalGetLabel() { - if (label_ == null) { - return com.google.protobuf.MapField.emptyMapField(LabelDefaultEntryHolder.defaultEntry); - } - return label_; - } - - public int getLabelCount() { - return internalGetLabel().getMap().size(); - } - /** - * - * - *
-     * Map from label to its value, for all labels dropped in any aggregation.
-     * 
- * - * map<string, string> label = 1; - */ - public boolean containsLabel(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetLabel().getMap().containsKey(key); - } - /** Use {@link #getLabelMap()} instead. */ - @java.lang.Deprecated - public java.util.Map getLabel() { - return getLabelMap(); - } - /** - * - * - *
-     * Map from label to its value, for all labels dropped in any aggregation.
-     * 
- * - * map<string, string> label = 1; - */ - public java.util.Map getLabelMap() { - return internalGetLabel().getMap(); - } - /** - * - * - *
-     * Map from label to its value, for all labels dropped in any aggregation.
-     * 
- * - * map<string, string> label = 1; - */ - public java.lang.String getLabelOrDefault(java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetLabel().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * Map from label to its value, for all labels dropped in any aggregation.
-     * 
- * - * map<string, string> label = 1; - */ - public java.lang.String getLabelOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetLabel().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, internalGetLabel(), LabelDefaultEntryHolder.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 : - internalGetLabel().getMap().entrySet()) { - com.google.protobuf.MapEntry label__ = - LabelDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, label__); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof google.monitoring.v3.DroppedLabelsOuterClass.DroppedLabels)) { - return super.equals(obj); - } - google.monitoring.v3.DroppedLabelsOuterClass.DroppedLabels other = - (google.monitoring.v3.DroppedLabelsOuterClass.DroppedLabels) obj; - - if (!internalGetLabel().equals(other.internalGetLabel())) return false; - if (!unknownFields.equals(other.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 (!internalGetLabel().getMap().isEmpty()) { - hash = (37 * hash) + LABEL_FIELD_NUMBER; - hash = (53 * hash) + internalGetLabel().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static google.monitoring.v3.DroppedLabelsOuterClass.DroppedLabels parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static google.monitoring.v3.DroppedLabelsOuterClass.DroppedLabels parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static google.monitoring.v3.DroppedLabelsOuterClass.DroppedLabels parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static google.monitoring.v3.DroppedLabelsOuterClass.DroppedLabels parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static google.monitoring.v3.DroppedLabelsOuterClass.DroppedLabels parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static google.monitoring.v3.DroppedLabelsOuterClass.DroppedLabels parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static google.monitoring.v3.DroppedLabelsOuterClass.DroppedLabels parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static google.monitoring.v3.DroppedLabelsOuterClass.DroppedLabels parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static google.monitoring.v3.DroppedLabelsOuterClass.DroppedLabels parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static google.monitoring.v3.DroppedLabelsOuterClass.DroppedLabels parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static google.monitoring.v3.DroppedLabelsOuterClass.DroppedLabels parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static google.monitoring.v3.DroppedLabelsOuterClass.DroppedLabels parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - google.monitoring.v3.DroppedLabelsOuterClass.DroppedLabels prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 set of (label, value) pairs which were dropped during aggregation, attached
-     * to google.api.Distribution.Exemplars in google.api.Distribution values during
-     * aggregation.
-     * These values are used in combination with the label values that remain on the
-     * aggregated Distribution timeseries to construct the full label set for the
-     * exemplar values.  The resulting full label set may be used to identify the
-     * specific task/job/instance (for example) which may be contributing to a
-     * long-tail, while allowing the storage savings of only storing aggregated
-     * distribution values for a large group.
-     * Note that there are no guarantees on ordering of the labels from
-     * exemplar-to-exemplar and from distribution-to-distribution in the same
-     * stream, and there may be duplicates.  It is up to clients to resolve any
-     * ambiguities.
-     * 
- * - * Protobuf type {@code google.monitoring.v3.DroppedLabels} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.monitoring.v3.DroppedLabels) - google.monitoring.v3.DroppedLabelsOuterClass.DroppedLabelsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return google.monitoring.v3.DroppedLabelsOuterClass - .internal_static_google_monitoring_v3_DroppedLabels_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 1: - return internalGetLabel(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { - switch (number) { - case 1: - return internalGetMutableLabel(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return google.monitoring.v3.DroppedLabelsOuterClass - .internal_static_google_monitoring_v3_DroppedLabels_fieldAccessorTable - .ensureFieldAccessorsInitialized( - google.monitoring.v3.DroppedLabelsOuterClass.DroppedLabels.class, - google.monitoring.v3.DroppedLabelsOuterClass.DroppedLabels.Builder.class); - } - - // Construct using google.monitoring.v3.DroppedLabelsOuterClass.DroppedLabels.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - internalGetMutableLabel().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return google.monitoring.v3.DroppedLabelsOuterClass - .internal_static_google_monitoring_v3_DroppedLabels_descriptor; - } - - @java.lang.Override - public google.monitoring.v3.DroppedLabelsOuterClass.DroppedLabels - getDefaultInstanceForType() { - return google.monitoring.v3.DroppedLabelsOuterClass.DroppedLabels.getDefaultInstance(); - } - - @java.lang.Override - public google.monitoring.v3.DroppedLabelsOuterClass.DroppedLabels build() { - google.monitoring.v3.DroppedLabelsOuterClass.DroppedLabels result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public google.monitoring.v3.DroppedLabelsOuterClass.DroppedLabels buildPartial() { - google.monitoring.v3.DroppedLabelsOuterClass.DroppedLabels result = - new google.monitoring.v3.DroppedLabelsOuterClass.DroppedLabels(this); - int from_bitField0_ = bitField0_; - result.label_ = internalGetLabel(); - result.label_.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 google.monitoring.v3.DroppedLabelsOuterClass.DroppedLabels) { - return mergeFrom((google.monitoring.v3.DroppedLabelsOuterClass.DroppedLabels) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(google.monitoring.v3.DroppedLabelsOuterClass.DroppedLabels other) { - if (other - == google.monitoring.v3.DroppedLabelsOuterClass.DroppedLabels.getDefaultInstance()) - return this; - internalGetMutableLabel().mergeFrom(other.internalGetLabel()); - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - google.monitoring.v3.DroppedLabelsOuterClass.DroppedLabels parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (google.monitoring.v3.DroppedLabelsOuterClass.DroppedLabels) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private com.google.protobuf.MapField label_; - - private com.google.protobuf.MapField internalGetLabel() { - if (label_ == null) { - return com.google.protobuf.MapField.emptyMapField(LabelDefaultEntryHolder.defaultEntry); - } - return label_; - } - - private com.google.protobuf.MapField - internalGetMutableLabel() { - onChanged(); - ; - if (label_ == null) { - label_ = com.google.protobuf.MapField.newMapField(LabelDefaultEntryHolder.defaultEntry); - } - if (!label_.isMutable()) { - label_ = label_.copy(); - } - return label_; - } - - public int getLabelCount() { - return internalGetLabel().getMap().size(); - } - /** - * - * - *
-       * Map from label to its value, for all labels dropped in any aggregation.
-       * 
- * - * map<string, string> label = 1; - */ - public boolean containsLabel(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetLabel().getMap().containsKey(key); - } - /** Use {@link #getLabelMap()} instead. */ - @java.lang.Deprecated - public java.util.Map getLabel() { - return getLabelMap(); - } - /** - * - * - *
-       * Map from label to its value, for all labels dropped in any aggregation.
-       * 
- * - * map<string, string> label = 1; - */ - public java.util.Map getLabelMap() { - return internalGetLabel().getMap(); - } - /** - * - * - *
-       * Map from label to its value, for all labels dropped in any aggregation.
-       * 
- * - * map<string, string> label = 1; - */ - public java.lang.String getLabelOrDefault( - java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetLabel().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-       * Map from label to its value, for all labels dropped in any aggregation.
-       * 
- * - * map<string, string> label = 1; - */ - public java.lang.String getLabelOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetLabel().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearLabel() { - internalGetMutableLabel().getMutableMap().clear(); - return this; - } - /** - * - * - *
-       * Map from label to its value, for all labels dropped in any aggregation.
-       * 
- * - * map<string, string> label = 1; - */ - public Builder removeLabel(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableLabel().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableLabel() { - return internalGetMutableLabel().getMutableMap(); - } - /** - * - * - *
-       * Map from label to its value, for all labels dropped in any aggregation.
-       * 
- * - * map<string, string> label = 1; - */ - public Builder putLabel(java.lang.String key, java.lang.String value) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - if (value == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableLabel().getMutableMap().put(key, value); - return this; - } - /** - * - * - *
-       * Map from label to its value, for all labels dropped in any aggregation.
-       * 
- * - * map<string, string> label = 1; - */ - public Builder putAllLabel(java.util.Map values) { - internalGetMutableLabel().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.monitoring.v3.DroppedLabels) - } - - // @@protoc_insertion_point(class_scope:google.monitoring.v3.DroppedLabels) - private static final google.monitoring.v3.DroppedLabelsOuterClass.DroppedLabels - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new google.monitoring.v3.DroppedLabelsOuterClass.DroppedLabels(); - } - - public static google.monitoring.v3.DroppedLabelsOuterClass.DroppedLabels getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DroppedLabels parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DroppedLabels(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public google.monitoring.v3.DroppedLabelsOuterClass.DroppedLabels getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_monitoring_v3_DroppedLabels_descriptor; - private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_monitoring_v3_DroppedLabels_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_monitoring_v3_DroppedLabels_LabelEntry_descriptor; - private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_monitoring_v3_DroppedLabels_LabelEntry_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/monitoring/v3/dropped_labels.pr" - + "oto\022\024google.monitoring.v3\"|\n\rDroppedLabe" - + "ls\022=\n\005label\030\001 \003(\0132..google.monitoring.v3" - + ".DroppedLabels.LabelEntry\032,\n\nLabelEntry\022" - + "\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B@Z>googl" - + "e.golang.org/genproto/googleapis/monitor" - + "ing/v3;monitoringb\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}, assigner); - internal_static_google_monitoring_v3_DroppedLabels_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_monitoring_v3_DroppedLabels_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_monitoring_v3_DroppedLabels_descriptor, - new java.lang.String[] { - "Label", - }); - internal_static_google_monitoring_v3_DroppedLabels_LabelEntry_descriptor = - internal_static_google_monitoring_v3_DroppedLabels_descriptor.getNestedTypes().get(0); - internal_static_google_monitoring_v3_DroppedLabels_LabelEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_monitoring_v3_DroppedLabels_LabelEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/java-speech/.OwlBot-hermetic.yaml b/java-speech/.OwlBot-hermetic.yaml index 3966eadd5190..399e85f41d5d 100644 --- a/java-speech/.OwlBot-hermetic.yaml +++ b/java-speech/.OwlBot-hermetic.yaml @@ -21,16 +21,11 @@ deep-remove-regex: deep-preserve-regex: - "/java-speech/google-.*/src/test/java/com/google/cloud/.*/v.*/it/IT.*Test.java" -- "/java-speech/proto-google-cloud-speech-v1beta1/" -- "/java-speech/grpc-google-cloud-speech-v1beta1/" -- "/java-speech/google-cloud-speech/src/main/java/com/google/cloud/speech/v1beta1" -- "/java-speech/google-cloud-speech/src/test/java/com/google/cloud/speech/v1beta1" - "/java-speech/google-cloud-speech/src/test/java/com/google/cloud/speech/v1/SpeechSmokeTest.java" - "/java-speech/google-cloud-speech/src/test/java/com/google/cloud/speech/v1p1beta1/SpeechSmokeTest.java" - "/java-speech/google-cloud-speech/src/test/resources/hello.flac" - "/java-speech/google-cloud-speech/src/test/resources/META-INF/native-image/" - deep-copy-regex: - source: "/google/cloud/speech/(v.*)/.*-java/proto-google-.*/src" dest: "/owl-bot-staging/java-speech/$1/proto-google-cloud-speech-$1/src" diff --git a/java-speech/google-cloud-speech-bom/pom.xml b/java-speech/google-cloud-speech-bom/pom.xml index 07069c2707d6..9e3516df8de1 100644 --- a/java-speech/google-cloud-speech-bom/pom.xml +++ b/java-speech/google-cloud-speech-bom/pom.xml @@ -30,11 +30,6 @@ grpc-google-cloud-speech-v1 4.45.0-SNAPSHOT - - com.google.api.grpc - grpc-google-cloud-speech-v1beta1 - 2.45.0-SNAPSHOT - com.google.api.grpc grpc-google-cloud-speech-v1p1beta1 @@ -50,11 +45,6 @@ proto-google-cloud-speech-v1 4.45.0-SNAPSHOT - - com.google.api.grpc - proto-google-cloud-speech-v1beta1 - 2.45.0-SNAPSHOT - com.google.api.grpc proto-google-cloud-speech-v1p1beta1 diff --git a/java-speech/google-cloud-speech/pom.xml b/java-speech/google-cloud-speech/pom.xml index 6671a7e90ddc..736eed9b5537 100644 --- a/java-speech/google-cloud-speech/pom.xml +++ b/java-speech/google-cloud-speech/pom.xml @@ -26,10 +26,6 @@ com.google.api.grpc proto-google-cloud-speech-v2 - - com.google.api.grpc - proto-google-cloud-speech-v1beta1 - com.google.api.grpc proto-google-cloud-speech-v1 @@ -95,11 +91,6 @@ grpc-google-cloud-speech-v2 test - - com.google.api.grpc - grpc-google-cloud-speech-v1beta1 - test - com.google.api.grpc grpc-google-cloud-speech-v1 diff --git a/java-speech/grpc-google-cloud-speech-v1beta1/pom.xml b/java-speech/grpc-google-cloud-speech-v1beta1/pom.xml deleted file mode 100644 index ae3fb908bb59..000000000000 --- a/java-speech/grpc-google-cloud-speech-v1beta1/pom.xml +++ /dev/null @@ -1,45 +0,0 @@ - - 4.0.0 - com.google.api.grpc - grpc-google-cloud-speech-v1beta1 - 2.45.0-SNAPSHOT - grpc-google-cloud-speech-v1beta1 - GRPC library for grpc-google-cloud-speech-v1beta1 - - com.google.cloud - google-cloud-speech-parent - 4.45.0-SNAPSHOT - - - - io.grpc - grpc-api - - - io.grpc - grpc-stub - - - io.grpc - grpc-protobuf - - - com.google.api.grpc - proto-google-cloud-speech-v1beta1 - - - com.google.guava - guava - - - com.google.api.grpc - proto-google-common-protos - - - com.google.protobuf - protobuf-java - - - diff --git a/java-speech/grpc-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/SpeechGrpc.java b/java-speech/grpc-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/SpeechGrpc.java deleted file mode 100644 index 13cecfd93c95..000000000000 --- a/java-speech/grpc-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/SpeechGrpc.java +++ /dev/null @@ -1,611 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.google.cloud.speech.v1beta1; - -import static io.grpc.MethodDescriptor.generateFullMethodName; -import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall; -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.asyncBidiStreamingCall; -import static io.grpc.stub.ServerCalls.asyncUnaryCall; -import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall; -import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; - -/** - * - * - *
- * Service that implements Google Cloud Speech API.
- * 
- */ -@javax.annotation.Generated( - value = "by gRPC proto compiler (version 1.10.0)", - comments = "Source: google/cloud/speech/v1beta1/cloud_speech.proto") -public final class SpeechGrpc { - - private SpeechGrpc() {} - - public static final String SERVICE_NAME = "google.cloud.speech.v1beta1.Speech"; - - // Static method descriptors that strictly reflect the proto. - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getSyncRecognizeMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.cloud.speech.v1beta1.SyncRecognizeRequest, - com.google.cloud.speech.v1beta1.SyncRecognizeResponse> - METHOD_SYNC_RECOGNIZE = getSyncRecognizeMethodHelper(); - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.speech.v1beta1.SyncRecognizeRequest, - com.google.cloud.speech.v1beta1.SyncRecognizeResponse> - getSyncRecognizeMethod; - - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - public static io.grpc.MethodDescriptor< - com.google.cloud.speech.v1beta1.SyncRecognizeRequest, - com.google.cloud.speech.v1beta1.SyncRecognizeResponse> - getSyncRecognizeMethod() { - return getSyncRecognizeMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.cloud.speech.v1beta1.SyncRecognizeRequest, - com.google.cloud.speech.v1beta1.SyncRecognizeResponse> - getSyncRecognizeMethodHelper() { - io.grpc.MethodDescriptor< - com.google.cloud.speech.v1beta1.SyncRecognizeRequest, - com.google.cloud.speech.v1beta1.SyncRecognizeResponse> - getSyncRecognizeMethod; - if ((getSyncRecognizeMethod = SpeechGrpc.getSyncRecognizeMethod) == null) { - synchronized (SpeechGrpc.class) { - if ((getSyncRecognizeMethod = SpeechGrpc.getSyncRecognizeMethod) == null) { - SpeechGrpc.getSyncRecognizeMethod = - getSyncRecognizeMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName( - "google.cloud.speech.v1beta1.Speech", "SyncRecognize")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.speech.v1beta1.SyncRecognizeRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.speech.v1beta1.SyncRecognizeResponse - .getDefaultInstance())) - .setSchemaDescriptor(new SpeechMethodDescriptorSupplier("SyncRecognize")) - .build(); - } - } - } - return getSyncRecognizeMethod; - } - - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getAsyncRecognizeMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.cloud.speech.v1beta1.AsyncRecognizeRequest, com.google.longrunning.Operation> - METHOD_ASYNC_RECOGNIZE = getAsyncRecognizeMethodHelper(); - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.speech.v1beta1.AsyncRecognizeRequest, com.google.longrunning.Operation> - getAsyncRecognizeMethod; - - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - public static io.grpc.MethodDescriptor< - com.google.cloud.speech.v1beta1.AsyncRecognizeRequest, com.google.longrunning.Operation> - getAsyncRecognizeMethod() { - return getAsyncRecognizeMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.cloud.speech.v1beta1.AsyncRecognizeRequest, com.google.longrunning.Operation> - getAsyncRecognizeMethodHelper() { - io.grpc.MethodDescriptor< - com.google.cloud.speech.v1beta1.AsyncRecognizeRequest, com.google.longrunning.Operation> - getAsyncRecognizeMethod; - if ((getAsyncRecognizeMethod = SpeechGrpc.getAsyncRecognizeMethod) == null) { - synchronized (SpeechGrpc.class) { - if ((getAsyncRecognizeMethod = SpeechGrpc.getAsyncRecognizeMethod) == null) { - SpeechGrpc.getAsyncRecognizeMethod = - getAsyncRecognizeMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName( - "google.cloud.speech.v1beta1.Speech", "AsyncRecognize")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.speech.v1beta1.AsyncRecognizeRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor(new SpeechMethodDescriptorSupplier("AsyncRecognize")) - .build(); - } - } - } - return getAsyncRecognizeMethod; - } - - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getStreamingRecognizeMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.cloud.speech.v1beta1.StreamingRecognizeRequest, - com.google.cloud.speech.v1beta1.StreamingRecognizeResponse> - METHOD_STREAMING_RECOGNIZE = getStreamingRecognizeMethodHelper(); - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.speech.v1beta1.StreamingRecognizeRequest, - com.google.cloud.speech.v1beta1.StreamingRecognizeResponse> - getStreamingRecognizeMethod; - - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - public static io.grpc.MethodDescriptor< - com.google.cloud.speech.v1beta1.StreamingRecognizeRequest, - com.google.cloud.speech.v1beta1.StreamingRecognizeResponse> - getStreamingRecognizeMethod() { - return getStreamingRecognizeMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.cloud.speech.v1beta1.StreamingRecognizeRequest, - com.google.cloud.speech.v1beta1.StreamingRecognizeResponse> - getStreamingRecognizeMethodHelper() { - io.grpc.MethodDescriptor< - com.google.cloud.speech.v1beta1.StreamingRecognizeRequest, - com.google.cloud.speech.v1beta1.StreamingRecognizeResponse> - getStreamingRecognizeMethod; - if ((getStreamingRecognizeMethod = SpeechGrpc.getStreamingRecognizeMethod) == null) { - synchronized (SpeechGrpc.class) { - if ((getStreamingRecognizeMethod = SpeechGrpc.getStreamingRecognizeMethod) == null) { - SpeechGrpc.getStreamingRecognizeMethod = - getStreamingRecognizeMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) - .setFullMethodName( - generateFullMethodName( - "google.cloud.speech.v1beta1.Speech", "StreamingRecognize")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.speech.v1beta1.StreamingRecognizeRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.speech.v1beta1.StreamingRecognizeResponse - .getDefaultInstance())) - .setSchemaDescriptor(new SpeechMethodDescriptorSupplier("StreamingRecognize")) - .build(); - } - } - } - return getStreamingRecognizeMethod; - } - - /** Creates a new async stub that supports all call types for the service */ - public static SpeechStub newStub(io.grpc.Channel channel) { - return new SpeechStub(channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static SpeechBlockingStub newBlockingStub(io.grpc.Channel channel) { - return new SpeechBlockingStub(channel); - } - - /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ - public static SpeechFutureStub newFutureStub(io.grpc.Channel channel) { - return new SpeechFutureStub(channel); - } - - /** - * - * - *
-   * Service that implements Google Cloud Speech API.
-   * 
- */ - public abstract static class SpeechImplBase implements io.grpc.BindableService { - - /** - * - * - *
-     * Performs synchronous speech recognition: receive results after all audio
-     * has been sent and processed.
-     * 
- */ - public void syncRecognize( - com.google.cloud.speech.v1beta1.SyncRecognizeRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - asyncUnimplementedUnaryCall(getSyncRecognizeMethodHelper(), responseObserver); - } - - /** - * - * - *
-     * Performs asynchronous speech recognition: receive results via the
-     * [google.longrunning.Operations]
-     * (/speech/reference/rest/v1beta1/operations#Operation)
-     * interface. Returns either an
-     * `Operation.error` or an `Operation.response` which contains
-     * an `AsyncRecognizeResponse` message.
-     * 
- */ - public void asyncRecognize( - com.google.cloud.speech.v1beta1.AsyncRecognizeRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getAsyncRecognizeMethodHelper(), responseObserver); - } - - /** - * - * - *
-     * Performs bidirectional streaming speech recognition: receive results while
-     * sending audio. This method is only available via the gRPC API (not REST).
-     * 
- */ - public io.grpc.stub.StreamObserver - streamingRecognize( - io.grpc.stub.StreamObserver - responseObserver) { - return asyncUnimplementedStreamingCall(getStreamingRecognizeMethodHelper(), responseObserver); - } - - @java.lang.Override - public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getSyncRecognizeMethodHelper(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.speech.v1beta1.SyncRecognizeRequest, - com.google.cloud.speech.v1beta1.SyncRecognizeResponse>( - this, METHODID_SYNC_RECOGNIZE))) - .addMethod( - getAsyncRecognizeMethodHelper(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.speech.v1beta1.AsyncRecognizeRequest, - com.google.longrunning.Operation>(this, METHODID_ASYNC_RECOGNIZE))) - .addMethod( - getStreamingRecognizeMethodHelper(), - asyncBidiStreamingCall( - new MethodHandlers< - com.google.cloud.speech.v1beta1.StreamingRecognizeRequest, - com.google.cloud.speech.v1beta1.StreamingRecognizeResponse>( - this, METHODID_STREAMING_RECOGNIZE))) - .build(); - } - } - - /** - * - * - *
-   * Service that implements Google Cloud Speech API.
-   * 
- */ - public static final class SpeechStub extends io.grpc.stub.AbstractStub { - private SpeechStub(io.grpc.Channel channel) { - super(channel); - } - - private SpeechStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected SpeechStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new SpeechStub(channel, callOptions); - } - - /** - * - * - *
-     * Performs synchronous speech recognition: receive results after all audio
-     * has been sent and processed.
-     * 
- */ - public void syncRecognize( - com.google.cloud.speech.v1beta1.SyncRecognizeRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - asyncUnaryCall( - getChannel().newCall(getSyncRecognizeMethodHelper(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Performs asynchronous speech recognition: receive results via the
-     * [google.longrunning.Operations]
-     * (/speech/reference/rest/v1beta1/operations#Operation)
-     * interface. Returns either an
-     * `Operation.error` or an `Operation.response` which contains
-     * an `AsyncRecognizeResponse` message.
-     * 
- */ - public void asyncRecognize( - com.google.cloud.speech.v1beta1.AsyncRecognizeRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnaryCall( - getChannel().newCall(getAsyncRecognizeMethodHelper(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Performs bidirectional streaming speech recognition: receive results while
-     * sending audio. This method is only available via the gRPC API (not REST).
-     * 
- */ - public io.grpc.stub.StreamObserver - streamingRecognize( - io.grpc.stub.StreamObserver - responseObserver) { - return asyncBidiStreamingCall( - getChannel().newCall(getStreamingRecognizeMethodHelper(), getCallOptions()), - responseObserver); - } - } - - /** - * - * - *
-   * Service that implements Google Cloud Speech API.
-   * 
- */ - public static final class SpeechBlockingStub - extends io.grpc.stub.AbstractStub { - private SpeechBlockingStub(io.grpc.Channel channel) { - super(channel); - } - - private SpeechBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected SpeechBlockingStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new SpeechBlockingStub(channel, callOptions); - } - - /** - * - * - *
-     * Performs synchronous speech recognition: receive results after all audio
-     * has been sent and processed.
-     * 
- */ - public com.google.cloud.speech.v1beta1.SyncRecognizeResponse syncRecognize( - com.google.cloud.speech.v1beta1.SyncRecognizeRequest request) { - return blockingUnaryCall( - getChannel(), getSyncRecognizeMethodHelper(), getCallOptions(), request); - } - - /** - * - * - *
-     * Performs asynchronous speech recognition: receive results via the
-     * [google.longrunning.Operations]
-     * (/speech/reference/rest/v1beta1/operations#Operation)
-     * interface. Returns either an
-     * `Operation.error` or an `Operation.response` which contains
-     * an `AsyncRecognizeResponse` message.
-     * 
- */ - public com.google.longrunning.Operation asyncRecognize( - com.google.cloud.speech.v1beta1.AsyncRecognizeRequest request) { - return blockingUnaryCall( - getChannel(), getAsyncRecognizeMethodHelper(), getCallOptions(), request); - } - } - - /** - * - * - *
-   * Service that implements Google Cloud Speech API.
-   * 
- */ - public static final class SpeechFutureStub extends io.grpc.stub.AbstractStub { - private SpeechFutureStub(io.grpc.Channel channel) { - super(channel); - } - - private SpeechFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected SpeechFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new SpeechFutureStub(channel, callOptions); - } - - /** - * - * - *
-     * Performs synchronous speech recognition: receive results after all audio
-     * has been sent and processed.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.speech.v1beta1.SyncRecognizeResponse> - syncRecognize(com.google.cloud.speech.v1beta1.SyncRecognizeRequest request) { - return futureUnaryCall( - getChannel().newCall(getSyncRecognizeMethodHelper(), getCallOptions()), request); - } - - /** - * - * - *
-     * Performs asynchronous speech recognition: receive results via the
-     * [google.longrunning.Operations]
-     * (/speech/reference/rest/v1beta1/operations#Operation)
-     * interface. Returns either an
-     * `Operation.error` or an `Operation.response` which contains
-     * an `AsyncRecognizeResponse` message.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - asyncRecognize(com.google.cloud.speech.v1beta1.AsyncRecognizeRequest request) { - return futureUnaryCall( - getChannel().newCall(getAsyncRecognizeMethodHelper(), getCallOptions()), request); - } - } - - private static final int METHODID_SYNC_RECOGNIZE = 0; - private static final int METHODID_ASYNC_RECOGNIZE = 1; - private static final int METHODID_STREAMING_RECOGNIZE = 2; - - 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 SpeechImplBase serviceImpl; - private final int methodId; - - MethodHandlers(SpeechImplBase 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_SYNC_RECOGNIZE: - serviceImpl.syncRecognize( - (com.google.cloud.speech.v1beta1.SyncRecognizeRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_ASYNC_RECOGNIZE: - serviceImpl.asyncRecognize( - (com.google.cloud.speech.v1beta1.AsyncRecognizeRequest) 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) { - case METHODID_STREAMING_RECOGNIZE: - return (io.grpc.stub.StreamObserver) - serviceImpl.streamingRecognize( - (io.grpc.stub.StreamObserver< - com.google.cloud.speech.v1beta1.StreamingRecognizeResponse>) - responseObserver); - default: - throw new AssertionError(); - } - } - } - - private abstract static class SpeechBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, - io.grpc.protobuf.ProtoServiceDescriptorSupplier { - SpeechBaseDescriptorSupplier() {} - - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return com.google.cloud.speech.v1beta1.SpeechProto.getDescriptor(); - } - - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("Speech"); - } - } - - private static final class SpeechFileDescriptorSupplier extends SpeechBaseDescriptorSupplier { - SpeechFileDescriptorSupplier() {} - } - - private static final class SpeechMethodDescriptorSupplier extends SpeechBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; - - SpeechMethodDescriptorSupplier(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 (SpeechGrpc.class) { - result = serviceDescriptor; - if (result == null) { - serviceDescriptor = - result = - io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new SpeechFileDescriptorSupplier()) - .addMethod(getSyncRecognizeMethodHelper()) - .addMethod(getAsyncRecognizeMethodHelper()) - .addMethod(getStreamingRecognizeMethodHelper()) - .build(); - } - } - } - return result; - } -} diff --git a/java-speech/pom.xml b/java-speech/pom.xml index b2cc036dfe1e..b7863bfc50a3 100644 --- a/java-speech/pom.xml +++ b/java-speech/pom.xml @@ -46,11 +46,6 @@ google-cloud-speech 4.45.0-SNAPSHOT
- - com.google.api.grpc - proto-google-cloud-speech-v1beta1 - 2.45.0-SNAPSHOT - com.google.api.grpc proto-google-cloud-speech-v1p1beta1 @@ -61,11 +56,6 @@ grpc-google-cloud-speech-v1 4.45.0-SNAPSHOT - - com.google.api.grpc - grpc-google-cloud-speech-v1beta1 - 2.45.0-SNAPSHOT - com.google.api.grpc grpc-google-cloud-speech-v1p1beta1 @@ -77,11 +67,9 @@ google-cloud-speech grpc-google-cloud-speech-v1 - grpc-google-cloud-speech-v1beta1 grpc-google-cloud-speech-v1p1beta1 grpc-google-cloud-speech-v2 proto-google-cloud-speech-v1 - proto-google-cloud-speech-v1beta1 proto-google-cloud-speech-v1p1beta1 proto-google-cloud-speech-v2 google-cloud-speech-bom diff --git a/java-speech/proto-google-cloud-speech-v1beta1/clirr-ignored-differences.xml b/java-speech/proto-google-cloud-speech-v1beta1/clirr-ignored-differences.xml deleted file mode 100644 index 43a8146223a5..000000000000 --- a/java-speech/proto-google-cloud-speech-v1beta1/clirr-ignored-differences.xml +++ /dev/null @@ -1,80 +0,0 @@ - - - - - 7012 - com/google/cloud/speech/v1beta1/*OrBuilder - * get*(*) - - - 7012 - com/google/cloud/speech/v1beta1/*OrBuilder - boolean contains*(*) - - - 7012 - com/google/cloud/speech/v1beta1/*OrBuilder - boolean has*(*) - - - - 7006 - com/google/cloud/speech/v1beta1/** - * getDefaultInstanceForType() - ** - - - 7006 - com/google/cloud/speech/v1beta1/** - * addRepeatedField(*) - ** - - - 7006 - com/google/cloud/speech/v1beta1/** - * clear() - ** - - - 7006 - com/google/cloud/speech/v1beta1/** - * clearField(*) - ** - - - 7006 - com/google/cloud/speech/v1beta1/** - * clearOneof(*) - ** - - - 7006 - com/google/cloud/speech/v1beta1/** - * clone() - ** - - - 7006 - com/google/cloud/speech/v1beta1/** - * mergeUnknownFields(*) - ** - - - 7006 - com/google/cloud/speech/v1beta1/** - * setField(*) - ** - - - 7006 - com/google/cloud/speech/v1beta1/** - * setRepeatedField(*) - ** - - - 7006 - com/google/cloud/speech/v1beta1/** - * setUnknownFields(*) - ** - - diff --git a/java-speech/proto-google-cloud-speech-v1beta1/pom.xml b/java-speech/proto-google-cloud-speech-v1beta1/pom.xml deleted file mode 100644 index ba0c901330fd..000000000000 --- a/java-speech/proto-google-cloud-speech-v1beta1/pom.xml +++ /dev/null @@ -1,27 +0,0 @@ - - 4.0.0 - com.google.api.grpc - proto-google-cloud-speech-v1beta1 - 2.45.0-SNAPSHOT - proto-google-cloud-speech-v1beta1 - PROTO library for proto-google-cloud-speech-v1beta1 - - com.google.cloud - google-cloud-speech-parent - 4.45.0-SNAPSHOT - - - - com.google.protobuf - protobuf-java - compile - - - com.google.api.grpc - proto-google-common-protos - compile - - - \ No newline at end of file diff --git a/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/AsyncRecognizeMetadata.java b/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/AsyncRecognizeMetadata.java deleted file mode 100644 index 989f4236bf9c..000000000000 --- a/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/AsyncRecognizeMetadata.java +++ /dev/null @@ -1,1039 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/speech/v1beta1/cloud_speech.proto - -package com.google.cloud.speech.v1beta1; - -/** - * - * - *
- * Describes the progress of a long-running `AsyncRecognize` call. It is
- * included in the `metadata` field of the `Operation` returned by the
- * `GetOperation` call of the `google::longrunning::Operations` service.
- * 
- * - * Protobuf type {@code google.cloud.speech.v1beta1.AsyncRecognizeMetadata} - */ -public final class AsyncRecognizeMetadata extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.speech.v1beta1.AsyncRecognizeMetadata) - AsyncRecognizeMetadataOrBuilder { - private static final long serialVersionUID = 0L; - // Use AsyncRecognizeMetadata.newBuilder() to construct. - private AsyncRecognizeMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private AsyncRecognizeMetadata() { - progressPercent_ = 0; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private AsyncRecognizeMetadata( - 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; - default: - { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - case 8: - { - progressPercent_ = input.readInt32(); - break; - } - case 18: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (startTime_ != null) { - subBuilder = startTime_.toBuilder(); - } - startTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(startTime_); - startTime_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (lastUpdateTime_ != null) { - subBuilder = lastUpdateTime_.toBuilder(); - } - lastUpdateTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(lastUpdateTime_); - lastUpdateTime_ = subBuilder.buildPartial(); - } - - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_AsyncRecognizeMetadata_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_AsyncRecognizeMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.speech.v1beta1.AsyncRecognizeMetadata.class, - com.google.cloud.speech.v1beta1.AsyncRecognizeMetadata.Builder.class); - } - - public static final int PROGRESS_PERCENT_FIELD_NUMBER = 1; - private int progressPercent_; - /** - * - * - *
-   * Approximate percentage of audio processed thus far. Guaranteed to be 100
-   * when the audio is fully processed and the results are available.
-   * 
- * - * int32 progress_percent = 1; - */ - public int getProgressPercent() { - return progressPercent_; - } - - public static final int START_TIME_FIELD_NUMBER = 2; - private com.google.protobuf.Timestamp startTime_; - /** - * - * - *
-   * Time when the request was received.
-   * 
- * - * .google.protobuf.Timestamp start_time = 2; - */ - public boolean hasStartTime() { - return startTime_ != null; - } - /** - * - * - *
-   * Time when the request was received.
-   * 
- * - * .google.protobuf.Timestamp start_time = 2; - */ - public com.google.protobuf.Timestamp getStartTime() { - return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } - /** - * - * - *
-   * Time when the request was received.
-   * 
- * - * .google.protobuf.Timestamp start_time = 2; - */ - public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { - return getStartTime(); - } - - public static final int LAST_UPDATE_TIME_FIELD_NUMBER = 3; - private com.google.protobuf.Timestamp lastUpdateTime_; - /** - * - * - *
-   * Time of the most recent processing update.
-   * 
- * - * .google.protobuf.Timestamp last_update_time = 3; - */ - public boolean hasLastUpdateTime() { - return lastUpdateTime_ != null; - } - /** - * - * - *
-   * Time of the most recent processing update.
-   * 
- * - * .google.protobuf.Timestamp last_update_time = 3; - */ - public com.google.protobuf.Timestamp getLastUpdateTime() { - return lastUpdateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : lastUpdateTime_; - } - /** - * - * - *
-   * Time of the most recent processing update.
-   * 
- * - * .google.protobuf.Timestamp last_update_time = 3; - */ - public com.google.protobuf.TimestampOrBuilder getLastUpdateTimeOrBuilder() { - return getLastUpdateTime(); - } - - private byte memoizedIsInitialized = -1; - - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (progressPercent_ != 0) { - output.writeInt32(1, progressPercent_); - } - if (startTime_ != null) { - output.writeMessage(2, getStartTime()); - } - if (lastUpdateTime_ != null) { - output.writeMessage(3, getLastUpdateTime()); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (progressPercent_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, progressPercent_); - } - if (startTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getStartTime()); - } - if (lastUpdateTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getLastUpdateTime()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.speech.v1beta1.AsyncRecognizeMetadata)) { - return super.equals(obj); - } - com.google.cloud.speech.v1beta1.AsyncRecognizeMetadata other = - (com.google.cloud.speech.v1beta1.AsyncRecognizeMetadata) obj; - - boolean result = true; - result = result && (getProgressPercent() == other.getProgressPercent()); - result = result && (hasStartTime() == other.hasStartTime()); - if (hasStartTime()) { - result = result && getStartTime().equals(other.getStartTime()); - } - result = result && (hasLastUpdateTime() == other.hasLastUpdateTime()); - if (hasLastUpdateTime()) { - result = result && getLastUpdateTime().equals(other.getLastUpdateTime()); - } - result = result && unknownFields.equals(other.unknownFields); - return result; - } - - @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 (hasStartTime()) { - hash = (37 * hash) + START_TIME_FIELD_NUMBER; - hash = (53 * hash) + getStartTime().hashCode(); - } - if (hasLastUpdateTime()) { - hash = (37 * hash) + LAST_UPDATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getLastUpdateTime().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.speech.v1beta1.AsyncRecognizeMetadata parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.speech.v1beta1.AsyncRecognizeMetadata parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.AsyncRecognizeMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.speech.v1beta1.AsyncRecognizeMetadata parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.AsyncRecognizeMetadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.speech.v1beta1.AsyncRecognizeMetadata parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.AsyncRecognizeMetadata parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.speech.v1beta1.AsyncRecognizeMetadata parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.AsyncRecognizeMetadata parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.speech.v1beta1.AsyncRecognizeMetadata parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.AsyncRecognizeMetadata parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.speech.v1beta1.AsyncRecognizeMetadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.speech.v1beta1.AsyncRecognizeMetadata prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 progress of a long-running `AsyncRecognize` call. It is
-   * included in the `metadata` field of the `Operation` returned by the
-   * `GetOperation` call of the `google::longrunning::Operations` service.
-   * 
- * - * Protobuf type {@code google.cloud.speech.v1beta1.AsyncRecognizeMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.speech.v1beta1.AsyncRecognizeMetadata) - com.google.cloud.speech.v1beta1.AsyncRecognizeMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_AsyncRecognizeMetadata_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_AsyncRecognizeMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.speech.v1beta1.AsyncRecognizeMetadata.class, - com.google.cloud.speech.v1beta1.AsyncRecognizeMetadata.Builder.class); - } - - // Construct using com.google.cloud.speech.v1beta1.AsyncRecognizeMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - public Builder clear() { - super.clear(); - progressPercent_ = 0; - - if (startTimeBuilder_ == null) { - startTime_ = null; - } else { - startTime_ = null; - startTimeBuilder_ = null; - } - if (lastUpdateTimeBuilder_ == null) { - lastUpdateTime_ = null; - } else { - lastUpdateTime_ = null; - lastUpdateTimeBuilder_ = null; - } - return this; - } - - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_AsyncRecognizeMetadata_descriptor; - } - - public com.google.cloud.speech.v1beta1.AsyncRecognizeMetadata getDefaultInstanceForType() { - return com.google.cloud.speech.v1beta1.AsyncRecognizeMetadata.getDefaultInstance(); - } - - public com.google.cloud.speech.v1beta1.AsyncRecognizeMetadata build() { - com.google.cloud.speech.v1beta1.AsyncRecognizeMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.cloud.speech.v1beta1.AsyncRecognizeMetadata buildPartial() { - com.google.cloud.speech.v1beta1.AsyncRecognizeMetadata result = - new com.google.cloud.speech.v1beta1.AsyncRecognizeMetadata(this); - result.progressPercent_ = progressPercent_; - if (startTimeBuilder_ == null) { - result.startTime_ = startTime_; - } else { - result.startTime_ = startTimeBuilder_.build(); - } - if (lastUpdateTimeBuilder_ == null) { - result.lastUpdateTime_ = lastUpdateTime_; - } else { - result.lastUpdateTime_ = lastUpdateTimeBuilder_.build(); - } - onBuilt(); - return result; - } - - public Builder clone() { - return (Builder) super.clone(); - } - - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); - } - - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); - } - - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); - } - - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); - } - - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.speech.v1beta1.AsyncRecognizeMetadata) { - return mergeFrom((com.google.cloud.speech.v1beta1.AsyncRecognizeMetadata) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.speech.v1beta1.AsyncRecognizeMetadata other) { - if (other == com.google.cloud.speech.v1beta1.AsyncRecognizeMetadata.getDefaultInstance()) - return this; - if (other.getProgressPercent() != 0) { - setProgressPercent(other.getProgressPercent()); - } - if (other.hasStartTime()) { - mergeStartTime(other.getStartTime()); - } - if (other.hasLastUpdateTime()) { - mergeLastUpdateTime(other.getLastUpdateTime()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.speech.v1beta1.AsyncRecognizeMetadata parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.speech.v1beta1.AsyncRecognizeMetadata) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int progressPercent_; - /** - * - * - *
-     * Approximate percentage of audio processed thus far. Guaranteed to be 100
-     * when the audio is fully processed and the results are available.
-     * 
- * - * int32 progress_percent = 1; - */ - public int getProgressPercent() { - return progressPercent_; - } - /** - * - * - *
-     * Approximate percentage of audio processed thus far. Guaranteed to be 100
-     * when the audio is fully processed and the results are available.
-     * 
- * - * int32 progress_percent = 1; - */ - public Builder setProgressPercent(int value) { - - progressPercent_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Approximate percentage of audio processed thus far. Guaranteed to be 100
-     * when the audio is fully processed and the results are available.
-     * 
- * - * int32 progress_percent = 1; - */ - public Builder clearProgressPercent() { - - progressPercent_ = 0; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp startTime_ = null; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - startTimeBuilder_; - /** - * - * - *
-     * Time when the request was received.
-     * 
- * - * .google.protobuf.Timestamp start_time = 2; - */ - public boolean hasStartTime() { - return startTimeBuilder_ != null || startTime_ != null; - } - /** - * - * - *
-     * Time when the request was received.
-     * 
- * - * .google.protobuf.Timestamp start_time = 2; - */ - public com.google.protobuf.Timestamp getStartTime() { - if (startTimeBuilder_ == null) { - return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } else { - return startTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Time when the request was received.
-     * 
- * - * .google.protobuf.Timestamp start_time = 2; - */ - public Builder setStartTime(com.google.protobuf.Timestamp value) { - if (startTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - startTime_ = value; - onChanged(); - } else { - startTimeBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Time when the request was received.
-     * 
- * - * .google.protobuf.Timestamp start_time = 2; - */ - public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (startTimeBuilder_ == null) { - startTime_ = builderForValue.build(); - onChanged(); - } else { - startTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Time when the request was received.
-     * 
- * - * .google.protobuf.Timestamp start_time = 2; - */ - public Builder mergeStartTime(com.google.protobuf.Timestamp value) { - if (startTimeBuilder_ == null) { - if (startTime_ != null) { - startTime_ = - com.google.protobuf.Timestamp.newBuilder(startTime_).mergeFrom(value).buildPartial(); - } else { - startTime_ = value; - } - onChanged(); - } else { - startTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Time when the request was received.
-     * 
- * - * .google.protobuf.Timestamp start_time = 2; - */ - public Builder clearStartTime() { - if (startTimeBuilder_ == null) { - startTime_ = null; - onChanged(); - } else { - startTime_ = null; - startTimeBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Time when the request was received.
-     * 
- * - * .google.protobuf.Timestamp start_time = 2; - */ - public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { - - onChanged(); - return getStartTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Time when the request was received.
-     * 
- * - * .google.protobuf.Timestamp start_time = 2; - */ - public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { - if (startTimeBuilder_ != null) { - return startTimeBuilder_.getMessageOrBuilder(); - } else { - return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } - } - /** - * - * - *
-     * Time when the request was received.
-     * 
- * - * .google.protobuf.Timestamp start_time = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getStartTimeFieldBuilder() { - if (startTimeBuilder_ == null) { - startTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getStartTime(), getParentForChildren(), isClean()); - startTime_ = null; - } - return startTimeBuilder_; - } - - private com.google.protobuf.Timestamp lastUpdateTime_ = null; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - lastUpdateTimeBuilder_; - /** - * - * - *
-     * Time of the most recent processing update.
-     * 
- * - * .google.protobuf.Timestamp last_update_time = 3; - */ - public boolean hasLastUpdateTime() { - return lastUpdateTimeBuilder_ != null || lastUpdateTime_ != null; - } - /** - * - * - *
-     * Time of the most recent processing update.
-     * 
- * - * .google.protobuf.Timestamp last_update_time = 3; - */ - public com.google.protobuf.Timestamp getLastUpdateTime() { - if (lastUpdateTimeBuilder_ == null) { - return lastUpdateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : lastUpdateTime_; - } else { - return lastUpdateTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Time of the most recent processing update.
-     * 
- * - * .google.protobuf.Timestamp last_update_time = 3; - */ - public Builder setLastUpdateTime(com.google.protobuf.Timestamp value) { - if (lastUpdateTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - lastUpdateTime_ = value; - onChanged(); - } else { - lastUpdateTimeBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Time of the most recent processing update.
-     * 
- * - * .google.protobuf.Timestamp last_update_time = 3; - */ - public Builder setLastUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (lastUpdateTimeBuilder_ == null) { - lastUpdateTime_ = builderForValue.build(); - onChanged(); - } else { - lastUpdateTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Time of the most recent processing update.
-     * 
- * - * .google.protobuf.Timestamp last_update_time = 3; - */ - public Builder mergeLastUpdateTime(com.google.protobuf.Timestamp value) { - if (lastUpdateTimeBuilder_ == null) { - if (lastUpdateTime_ != null) { - lastUpdateTime_ = - com.google.protobuf.Timestamp.newBuilder(lastUpdateTime_) - .mergeFrom(value) - .buildPartial(); - } else { - lastUpdateTime_ = value; - } - onChanged(); - } else { - lastUpdateTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Time of the most recent processing update.
-     * 
- * - * .google.protobuf.Timestamp last_update_time = 3; - */ - public Builder clearLastUpdateTime() { - if (lastUpdateTimeBuilder_ == null) { - lastUpdateTime_ = null; - onChanged(); - } else { - lastUpdateTime_ = null; - lastUpdateTimeBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Time of the most recent processing update.
-     * 
- * - * .google.protobuf.Timestamp last_update_time = 3; - */ - public com.google.protobuf.Timestamp.Builder getLastUpdateTimeBuilder() { - - onChanged(); - return getLastUpdateTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Time of the most recent processing update.
-     * 
- * - * .google.protobuf.Timestamp last_update_time = 3; - */ - public com.google.protobuf.TimestampOrBuilder getLastUpdateTimeOrBuilder() { - if (lastUpdateTimeBuilder_ != null) { - return lastUpdateTimeBuilder_.getMessageOrBuilder(); - } else { - return lastUpdateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : lastUpdateTime_; - } - } - /** - * - * - *
-     * Time of the most recent processing update.
-     * 
- * - * .google.protobuf.Timestamp last_update_time = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getLastUpdateTimeFieldBuilder() { - if (lastUpdateTimeBuilder_ == null) { - lastUpdateTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getLastUpdateTime(), getParentForChildren(), isClean()); - lastUpdateTime_ = null; - } - return lastUpdateTimeBuilder_; - } - - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.speech.v1beta1.AsyncRecognizeMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.speech.v1beta1.AsyncRecognizeMetadata) - private static final com.google.cloud.speech.v1beta1.AsyncRecognizeMetadata DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.speech.v1beta1.AsyncRecognizeMetadata(); - } - - public static com.google.cloud.speech.v1beta1.AsyncRecognizeMetadata getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public AsyncRecognizeMetadata parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AsyncRecognizeMetadata(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.cloud.speech.v1beta1.AsyncRecognizeMetadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/AsyncRecognizeMetadataOrBuilder.java b/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/AsyncRecognizeMetadataOrBuilder.java deleted file mode 100644 index 9840b822b2e4..000000000000 --- a/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/AsyncRecognizeMetadataOrBuilder.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/speech/v1beta1/cloud_speech.proto - -package com.google.cloud.speech.v1beta1; - -public interface AsyncRecognizeMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.speech.v1beta1.AsyncRecognizeMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Approximate percentage of audio processed thus far. Guaranteed to be 100
-   * when the audio is fully processed and the results are available.
-   * 
- * - * int32 progress_percent = 1; - */ - int getProgressPercent(); - - /** - * - * - *
-   * Time when the request was received.
-   * 
- * - * .google.protobuf.Timestamp start_time = 2; - */ - boolean hasStartTime(); - /** - * - * - *
-   * Time when the request was received.
-   * 
- * - * .google.protobuf.Timestamp start_time = 2; - */ - com.google.protobuf.Timestamp getStartTime(); - /** - * - * - *
-   * Time when the request was received.
-   * 
- * - * .google.protobuf.Timestamp start_time = 2; - */ - com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); - - /** - * - * - *
-   * Time of the most recent processing update.
-   * 
- * - * .google.protobuf.Timestamp last_update_time = 3; - */ - boolean hasLastUpdateTime(); - /** - * - * - *
-   * Time of the most recent processing update.
-   * 
- * - * .google.protobuf.Timestamp last_update_time = 3; - */ - com.google.protobuf.Timestamp getLastUpdateTime(); - /** - * - * - *
-   * Time of the most recent processing update.
-   * 
- * - * .google.protobuf.Timestamp last_update_time = 3; - */ - com.google.protobuf.TimestampOrBuilder getLastUpdateTimeOrBuilder(); -} diff --git a/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/AsyncRecognizeRequest.java b/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/AsyncRecognizeRequest.java deleted file mode 100644 index ba481428dea6..000000000000 --- a/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/AsyncRecognizeRequest.java +++ /dev/null @@ -1,975 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/speech/v1beta1/cloud_speech.proto - -package com.google.cloud.speech.v1beta1; - -/** - * - * - *
- * The top-level message sent by the client for the `AsyncRecognize` method.
- * 
- * - * Protobuf type {@code google.cloud.speech.v1beta1.AsyncRecognizeRequest} - */ -public final class AsyncRecognizeRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.speech.v1beta1.AsyncRecognizeRequest) - AsyncRecognizeRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use AsyncRecognizeRequest.newBuilder() to construct. - private AsyncRecognizeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private AsyncRecognizeRequest() {} - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private AsyncRecognizeRequest( - 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; - default: - { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - case 10: - { - com.google.cloud.speech.v1beta1.RecognitionConfig.Builder subBuilder = null; - if (config_ != null) { - subBuilder = config_.toBuilder(); - } - config_ = - input.readMessage( - com.google.cloud.speech.v1beta1.RecognitionConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(config_); - config_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.cloud.speech.v1beta1.RecognitionAudio.Builder subBuilder = null; - if (audio_ != null) { - subBuilder = audio_.toBuilder(); - } - audio_ = - input.readMessage( - com.google.cloud.speech.v1beta1.RecognitionAudio.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(audio_); - audio_ = subBuilder.buildPartial(); - } - - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_AsyncRecognizeRequest_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_AsyncRecognizeRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.speech.v1beta1.AsyncRecognizeRequest.class, - com.google.cloud.speech.v1beta1.AsyncRecognizeRequest.Builder.class); - } - - public static final int CONFIG_FIELD_NUMBER = 1; - private com.google.cloud.speech.v1beta1.RecognitionConfig config_; - /** - * - * - *
-   * *Required* Provides information to the recognizer that specifies how to
-   * process the request.
-   * 
- * - * .google.cloud.speech.v1beta1.RecognitionConfig config = 1; - */ - public boolean hasConfig() { - return config_ != null; - } - /** - * - * - *
-   * *Required* Provides information to the recognizer that specifies how to
-   * process the request.
-   * 
- * - * .google.cloud.speech.v1beta1.RecognitionConfig config = 1; - */ - public com.google.cloud.speech.v1beta1.RecognitionConfig getConfig() { - return config_ == null - ? com.google.cloud.speech.v1beta1.RecognitionConfig.getDefaultInstance() - : config_; - } - /** - * - * - *
-   * *Required* Provides information to the recognizer that specifies how to
-   * process the request.
-   * 
- * - * .google.cloud.speech.v1beta1.RecognitionConfig config = 1; - */ - public com.google.cloud.speech.v1beta1.RecognitionConfigOrBuilder getConfigOrBuilder() { - return getConfig(); - } - - public static final int AUDIO_FIELD_NUMBER = 2; - private com.google.cloud.speech.v1beta1.RecognitionAudio audio_; - /** - * - * - *
-   * *Required* The audio data to be recognized.
-   * 
- * - * .google.cloud.speech.v1beta1.RecognitionAudio audio = 2; - */ - public boolean hasAudio() { - return audio_ != null; - } - /** - * - * - *
-   * *Required* The audio data to be recognized.
-   * 
- * - * .google.cloud.speech.v1beta1.RecognitionAudio audio = 2; - */ - public com.google.cloud.speech.v1beta1.RecognitionAudio getAudio() { - return audio_ == null - ? com.google.cloud.speech.v1beta1.RecognitionAudio.getDefaultInstance() - : audio_; - } - /** - * - * - *
-   * *Required* The audio data to be recognized.
-   * 
- * - * .google.cloud.speech.v1beta1.RecognitionAudio audio = 2; - */ - public com.google.cloud.speech.v1beta1.RecognitionAudioOrBuilder getAudioOrBuilder() { - return getAudio(); - } - - private byte memoizedIsInitialized = -1; - - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (config_ != null) { - output.writeMessage(1, getConfig()); - } - if (audio_ != null) { - output.writeMessage(2, getAudio()); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (config_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getConfig()); - } - if (audio_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getAudio()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.speech.v1beta1.AsyncRecognizeRequest)) { - return super.equals(obj); - } - com.google.cloud.speech.v1beta1.AsyncRecognizeRequest other = - (com.google.cloud.speech.v1beta1.AsyncRecognizeRequest) obj; - - boolean result = true; - result = result && (hasConfig() == other.hasConfig()); - if (hasConfig()) { - result = result && getConfig().equals(other.getConfig()); - } - result = result && (hasAudio() == other.hasAudio()); - if (hasAudio()) { - result = result && getAudio().equals(other.getAudio()); - } - result = result && unknownFields.equals(other.unknownFields); - return result; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasConfig()) { - hash = (37 * hash) + CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getConfig().hashCode(); - } - if (hasAudio()) { - hash = (37 * hash) + AUDIO_FIELD_NUMBER; - hash = (53 * hash) + getAudio().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.speech.v1beta1.AsyncRecognizeRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.speech.v1beta1.AsyncRecognizeRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.AsyncRecognizeRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.speech.v1beta1.AsyncRecognizeRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.AsyncRecognizeRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.speech.v1beta1.AsyncRecognizeRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.AsyncRecognizeRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.speech.v1beta1.AsyncRecognizeRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.AsyncRecognizeRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.speech.v1beta1.AsyncRecognizeRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.AsyncRecognizeRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.speech.v1beta1.AsyncRecognizeRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.speech.v1beta1.AsyncRecognizeRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 top-level message sent by the client for the `AsyncRecognize` method.
-   * 
- * - * Protobuf type {@code google.cloud.speech.v1beta1.AsyncRecognizeRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.speech.v1beta1.AsyncRecognizeRequest) - com.google.cloud.speech.v1beta1.AsyncRecognizeRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_AsyncRecognizeRequest_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_AsyncRecognizeRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.speech.v1beta1.AsyncRecognizeRequest.class, - com.google.cloud.speech.v1beta1.AsyncRecognizeRequest.Builder.class); - } - - // Construct using com.google.cloud.speech.v1beta1.AsyncRecognizeRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - public Builder clear() { - super.clear(); - if (configBuilder_ == null) { - config_ = null; - } else { - config_ = null; - configBuilder_ = null; - } - if (audioBuilder_ == null) { - audio_ = null; - } else { - audio_ = null; - audioBuilder_ = null; - } - return this; - } - - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_AsyncRecognizeRequest_descriptor; - } - - public com.google.cloud.speech.v1beta1.AsyncRecognizeRequest getDefaultInstanceForType() { - return com.google.cloud.speech.v1beta1.AsyncRecognizeRequest.getDefaultInstance(); - } - - public com.google.cloud.speech.v1beta1.AsyncRecognizeRequest build() { - com.google.cloud.speech.v1beta1.AsyncRecognizeRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.cloud.speech.v1beta1.AsyncRecognizeRequest buildPartial() { - com.google.cloud.speech.v1beta1.AsyncRecognizeRequest result = - new com.google.cloud.speech.v1beta1.AsyncRecognizeRequest(this); - if (configBuilder_ == null) { - result.config_ = config_; - } else { - result.config_ = configBuilder_.build(); - } - if (audioBuilder_ == null) { - result.audio_ = audio_; - } else { - result.audio_ = audioBuilder_.build(); - } - onBuilt(); - return result; - } - - public Builder clone() { - return (Builder) super.clone(); - } - - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); - } - - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); - } - - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); - } - - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); - } - - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.speech.v1beta1.AsyncRecognizeRequest) { - return mergeFrom((com.google.cloud.speech.v1beta1.AsyncRecognizeRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.speech.v1beta1.AsyncRecognizeRequest other) { - if (other == com.google.cloud.speech.v1beta1.AsyncRecognizeRequest.getDefaultInstance()) - return this; - if (other.hasConfig()) { - mergeConfig(other.getConfig()); - } - if (other.hasAudio()) { - mergeAudio(other.getAudio()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.speech.v1beta1.AsyncRecognizeRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.speech.v1beta1.AsyncRecognizeRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.speech.v1beta1.RecognitionConfig config_ = null; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.speech.v1beta1.RecognitionConfig, - com.google.cloud.speech.v1beta1.RecognitionConfig.Builder, - com.google.cloud.speech.v1beta1.RecognitionConfigOrBuilder> - configBuilder_; - /** - * - * - *
-     * *Required* Provides information to the recognizer that specifies how to
-     * process the request.
-     * 
- * - * .google.cloud.speech.v1beta1.RecognitionConfig config = 1; - */ - public boolean hasConfig() { - return configBuilder_ != null || config_ != null; - } - /** - * - * - *
-     * *Required* Provides information to the recognizer that specifies how to
-     * process the request.
-     * 
- * - * .google.cloud.speech.v1beta1.RecognitionConfig config = 1; - */ - public com.google.cloud.speech.v1beta1.RecognitionConfig getConfig() { - if (configBuilder_ == null) { - return config_ == null - ? com.google.cloud.speech.v1beta1.RecognitionConfig.getDefaultInstance() - : config_; - } else { - return configBuilder_.getMessage(); - } - } - /** - * - * - *
-     * *Required* Provides information to the recognizer that specifies how to
-     * process the request.
-     * 
- * - * .google.cloud.speech.v1beta1.RecognitionConfig config = 1; - */ - public Builder setConfig(com.google.cloud.speech.v1beta1.RecognitionConfig value) { - if (configBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - config_ = value; - onChanged(); - } else { - configBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * *Required* Provides information to the recognizer that specifies how to
-     * process the request.
-     * 
- * - * .google.cloud.speech.v1beta1.RecognitionConfig config = 1; - */ - public Builder setConfig( - com.google.cloud.speech.v1beta1.RecognitionConfig.Builder builderForValue) { - if (configBuilder_ == null) { - config_ = builderForValue.build(); - onChanged(); - } else { - configBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * *Required* Provides information to the recognizer that specifies how to
-     * process the request.
-     * 
- * - * .google.cloud.speech.v1beta1.RecognitionConfig config = 1; - */ - public Builder mergeConfig(com.google.cloud.speech.v1beta1.RecognitionConfig value) { - if (configBuilder_ == null) { - if (config_ != null) { - config_ = - com.google.cloud.speech.v1beta1.RecognitionConfig.newBuilder(config_) - .mergeFrom(value) - .buildPartial(); - } else { - config_ = value; - } - onChanged(); - } else { - configBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * *Required* Provides information to the recognizer that specifies how to
-     * process the request.
-     * 
- * - * .google.cloud.speech.v1beta1.RecognitionConfig config = 1; - */ - public Builder clearConfig() { - if (configBuilder_ == null) { - config_ = null; - onChanged(); - } else { - config_ = null; - configBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * *Required* Provides information to the recognizer that specifies how to
-     * process the request.
-     * 
- * - * .google.cloud.speech.v1beta1.RecognitionConfig config = 1; - */ - public com.google.cloud.speech.v1beta1.RecognitionConfig.Builder getConfigBuilder() { - - onChanged(); - return getConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * *Required* Provides information to the recognizer that specifies how to
-     * process the request.
-     * 
- * - * .google.cloud.speech.v1beta1.RecognitionConfig config = 1; - */ - public com.google.cloud.speech.v1beta1.RecognitionConfigOrBuilder getConfigOrBuilder() { - if (configBuilder_ != null) { - return configBuilder_.getMessageOrBuilder(); - } else { - return config_ == null - ? com.google.cloud.speech.v1beta1.RecognitionConfig.getDefaultInstance() - : config_; - } - } - /** - * - * - *
-     * *Required* Provides information to the recognizer that specifies how to
-     * process the request.
-     * 
- * - * .google.cloud.speech.v1beta1.RecognitionConfig config = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.speech.v1beta1.RecognitionConfig, - com.google.cloud.speech.v1beta1.RecognitionConfig.Builder, - com.google.cloud.speech.v1beta1.RecognitionConfigOrBuilder> - getConfigFieldBuilder() { - if (configBuilder_ == null) { - configBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.speech.v1beta1.RecognitionConfig, - com.google.cloud.speech.v1beta1.RecognitionConfig.Builder, - com.google.cloud.speech.v1beta1.RecognitionConfigOrBuilder>( - getConfig(), getParentForChildren(), isClean()); - config_ = null; - } - return configBuilder_; - } - - private com.google.cloud.speech.v1beta1.RecognitionAudio audio_ = null; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.speech.v1beta1.RecognitionAudio, - com.google.cloud.speech.v1beta1.RecognitionAudio.Builder, - com.google.cloud.speech.v1beta1.RecognitionAudioOrBuilder> - audioBuilder_; - /** - * - * - *
-     * *Required* The audio data to be recognized.
-     * 
- * - * .google.cloud.speech.v1beta1.RecognitionAudio audio = 2; - */ - public boolean hasAudio() { - return audioBuilder_ != null || audio_ != null; - } - /** - * - * - *
-     * *Required* The audio data to be recognized.
-     * 
- * - * .google.cloud.speech.v1beta1.RecognitionAudio audio = 2; - */ - public com.google.cloud.speech.v1beta1.RecognitionAudio getAudio() { - if (audioBuilder_ == null) { - return audio_ == null - ? com.google.cloud.speech.v1beta1.RecognitionAudio.getDefaultInstance() - : audio_; - } else { - return audioBuilder_.getMessage(); - } - } - /** - * - * - *
-     * *Required* The audio data to be recognized.
-     * 
- * - * .google.cloud.speech.v1beta1.RecognitionAudio audio = 2; - */ - public Builder setAudio(com.google.cloud.speech.v1beta1.RecognitionAudio value) { - if (audioBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - audio_ = value; - onChanged(); - } else { - audioBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * *Required* The audio data to be recognized.
-     * 
- * - * .google.cloud.speech.v1beta1.RecognitionAudio audio = 2; - */ - public Builder setAudio( - com.google.cloud.speech.v1beta1.RecognitionAudio.Builder builderForValue) { - if (audioBuilder_ == null) { - audio_ = builderForValue.build(); - onChanged(); - } else { - audioBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * *Required* The audio data to be recognized.
-     * 
- * - * .google.cloud.speech.v1beta1.RecognitionAudio audio = 2; - */ - public Builder mergeAudio(com.google.cloud.speech.v1beta1.RecognitionAudio value) { - if (audioBuilder_ == null) { - if (audio_ != null) { - audio_ = - com.google.cloud.speech.v1beta1.RecognitionAudio.newBuilder(audio_) - .mergeFrom(value) - .buildPartial(); - } else { - audio_ = value; - } - onChanged(); - } else { - audioBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * *Required* The audio data to be recognized.
-     * 
- * - * .google.cloud.speech.v1beta1.RecognitionAudio audio = 2; - */ - public Builder clearAudio() { - if (audioBuilder_ == null) { - audio_ = null; - onChanged(); - } else { - audio_ = null; - audioBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * *Required* The audio data to be recognized.
-     * 
- * - * .google.cloud.speech.v1beta1.RecognitionAudio audio = 2; - */ - public com.google.cloud.speech.v1beta1.RecognitionAudio.Builder getAudioBuilder() { - - onChanged(); - return getAudioFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * *Required* The audio data to be recognized.
-     * 
- * - * .google.cloud.speech.v1beta1.RecognitionAudio audio = 2; - */ - public com.google.cloud.speech.v1beta1.RecognitionAudioOrBuilder getAudioOrBuilder() { - if (audioBuilder_ != null) { - return audioBuilder_.getMessageOrBuilder(); - } else { - return audio_ == null - ? com.google.cloud.speech.v1beta1.RecognitionAudio.getDefaultInstance() - : audio_; - } - } - /** - * - * - *
-     * *Required* The audio data to be recognized.
-     * 
- * - * .google.cloud.speech.v1beta1.RecognitionAudio audio = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.speech.v1beta1.RecognitionAudio, - com.google.cloud.speech.v1beta1.RecognitionAudio.Builder, - com.google.cloud.speech.v1beta1.RecognitionAudioOrBuilder> - getAudioFieldBuilder() { - if (audioBuilder_ == null) { - audioBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.speech.v1beta1.RecognitionAudio, - com.google.cloud.speech.v1beta1.RecognitionAudio.Builder, - com.google.cloud.speech.v1beta1.RecognitionAudioOrBuilder>( - getAudio(), getParentForChildren(), isClean()); - audio_ = null; - } - return audioBuilder_; - } - - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.speech.v1beta1.AsyncRecognizeRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.speech.v1beta1.AsyncRecognizeRequest) - private static final com.google.cloud.speech.v1beta1.AsyncRecognizeRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.speech.v1beta1.AsyncRecognizeRequest(); - } - - public static com.google.cloud.speech.v1beta1.AsyncRecognizeRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public AsyncRecognizeRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AsyncRecognizeRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.cloud.speech.v1beta1.AsyncRecognizeRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/AsyncRecognizeRequestOrBuilder.java b/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/AsyncRecognizeRequestOrBuilder.java deleted file mode 100644 index 4f1ba2c89fe2..000000000000 --- a/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/AsyncRecognizeRequestOrBuilder.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/speech/v1beta1/cloud_speech.proto - -package com.google.cloud.speech.v1beta1; - -public interface AsyncRecognizeRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.speech.v1beta1.AsyncRecognizeRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * *Required* Provides information to the recognizer that specifies how to
-   * process the request.
-   * 
- * - * .google.cloud.speech.v1beta1.RecognitionConfig config = 1; - */ - boolean hasConfig(); - /** - * - * - *
-   * *Required* Provides information to the recognizer that specifies how to
-   * process the request.
-   * 
- * - * .google.cloud.speech.v1beta1.RecognitionConfig config = 1; - */ - com.google.cloud.speech.v1beta1.RecognitionConfig getConfig(); - /** - * - * - *
-   * *Required* Provides information to the recognizer that specifies how to
-   * process the request.
-   * 
- * - * .google.cloud.speech.v1beta1.RecognitionConfig config = 1; - */ - com.google.cloud.speech.v1beta1.RecognitionConfigOrBuilder getConfigOrBuilder(); - - /** - * - * - *
-   * *Required* The audio data to be recognized.
-   * 
- * - * .google.cloud.speech.v1beta1.RecognitionAudio audio = 2; - */ - boolean hasAudio(); - /** - * - * - *
-   * *Required* The audio data to be recognized.
-   * 
- * - * .google.cloud.speech.v1beta1.RecognitionAudio audio = 2; - */ - com.google.cloud.speech.v1beta1.RecognitionAudio getAudio(); - /** - * - * - *
-   * *Required* The audio data to be recognized.
-   * 
- * - * .google.cloud.speech.v1beta1.RecognitionAudio audio = 2; - */ - com.google.cloud.speech.v1beta1.RecognitionAudioOrBuilder getAudioOrBuilder(); -} diff --git a/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/AsyncRecognizeResponse.java b/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/AsyncRecognizeResponse.java deleted file mode 100644 index 96883c6ff0df..000000000000 --- a/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/AsyncRecognizeResponse.java +++ /dev/null @@ -1,965 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/speech/v1beta1/cloud_speech.proto - -package com.google.cloud.speech.v1beta1; - -/** - * - * - *
- * The only message returned to the client by `AsyncRecognize`. It contains the
- * result as zero or more sequential `SpeechRecognitionResult` messages. It is
- * included in the `result.response` field of the `Operation` returned by the
- * `GetOperation` call of the `google::longrunning::Operations` service.
- * 
- * - * Protobuf type {@code google.cloud.speech.v1beta1.AsyncRecognizeResponse} - */ -public final class AsyncRecognizeResponse extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.speech.v1beta1.AsyncRecognizeResponse) - AsyncRecognizeResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use AsyncRecognizeResponse.newBuilder() to construct. - private AsyncRecognizeResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private AsyncRecognizeResponse() { - results_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private AsyncRecognizeResponse( - 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; - default: - { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - results_ = - new java.util.ArrayList< - com.google.cloud.speech.v1beta1.SpeechRecognitionResult>(); - mutable_bitField0_ |= 0x00000001; - } - results_.add( - input.readMessage( - com.google.cloud.speech.v1beta1.SpeechRecognitionResult.parser(), - extensionRegistry)); - break; - } - } - } - } catch (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) == 0x00000001)) { - results_ = java.util.Collections.unmodifiableList(results_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_AsyncRecognizeResponse_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_AsyncRecognizeResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.speech.v1beta1.AsyncRecognizeResponse.class, - com.google.cloud.speech.v1beta1.AsyncRecognizeResponse.Builder.class); - } - - public static final int RESULTS_FIELD_NUMBER = 2; - private java.util.List results_; - /** - * - * - *
-   * *Output-only* Sequential list of transcription results corresponding to
-   * sequential portions of audio.
-   * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2; - */ - public java.util.List getResultsList() { - return results_; - } - /** - * - * - *
-   * *Output-only* Sequential list of transcription results corresponding to
-   * sequential portions of audio.
-   * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2; - */ - public java.util.List - getResultsOrBuilderList() { - return results_; - } - /** - * - * - *
-   * *Output-only* Sequential list of transcription results corresponding to
-   * sequential portions of audio.
-   * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2; - */ - public int getResultsCount() { - return results_.size(); - } - /** - * - * - *
-   * *Output-only* Sequential list of transcription results corresponding to
-   * sequential portions of audio.
-   * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2; - */ - public com.google.cloud.speech.v1beta1.SpeechRecognitionResult getResults(int index) { - return results_.get(index); - } - /** - * - * - *
-   * *Output-only* Sequential list of transcription results corresponding to
-   * sequential portions of audio.
-   * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2; - */ - public com.google.cloud.speech.v1beta1.SpeechRecognitionResultOrBuilder getResultsOrBuilder( - int index) { - return results_.get(index); - } - - private byte memoizedIsInitialized = -1; - - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < results_.size(); i++) { - output.writeMessage(2, results_.get(i)); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < results_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, results_.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.speech.v1beta1.AsyncRecognizeResponse)) { - return super.equals(obj); - } - com.google.cloud.speech.v1beta1.AsyncRecognizeResponse other = - (com.google.cloud.speech.v1beta1.AsyncRecognizeResponse) obj; - - boolean result = true; - result = result && getResultsList().equals(other.getResultsList()); - result = result && unknownFields.equals(other.unknownFields); - return result; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getResultsCount() > 0) { - hash = (37 * hash) + RESULTS_FIELD_NUMBER; - hash = (53 * hash) + getResultsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.speech.v1beta1.AsyncRecognizeResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.speech.v1beta1.AsyncRecognizeResponse parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.AsyncRecognizeResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.speech.v1beta1.AsyncRecognizeResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.AsyncRecognizeResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.speech.v1beta1.AsyncRecognizeResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.AsyncRecognizeResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.speech.v1beta1.AsyncRecognizeResponse parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.AsyncRecognizeResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.speech.v1beta1.AsyncRecognizeResponse parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.AsyncRecognizeResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.speech.v1beta1.AsyncRecognizeResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.speech.v1beta1.AsyncRecognizeResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 only message returned to the client by `AsyncRecognize`. It contains the
-   * result as zero or more sequential `SpeechRecognitionResult` messages. It is
-   * included in the `result.response` field of the `Operation` returned by the
-   * `GetOperation` call of the `google::longrunning::Operations` service.
-   * 
- * - * Protobuf type {@code google.cloud.speech.v1beta1.AsyncRecognizeResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.speech.v1beta1.AsyncRecognizeResponse) - com.google.cloud.speech.v1beta1.AsyncRecognizeResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_AsyncRecognizeResponse_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_AsyncRecognizeResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.speech.v1beta1.AsyncRecognizeResponse.class, - com.google.cloud.speech.v1beta1.AsyncRecognizeResponse.Builder.class); - } - - // Construct using com.google.cloud.speech.v1beta1.AsyncRecognizeResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getResultsFieldBuilder(); - } - } - - public Builder clear() { - super.clear(); - if (resultsBuilder_ == null) { - results_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - resultsBuilder_.clear(); - } - return this; - } - - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_AsyncRecognizeResponse_descriptor; - } - - public com.google.cloud.speech.v1beta1.AsyncRecognizeResponse getDefaultInstanceForType() { - return com.google.cloud.speech.v1beta1.AsyncRecognizeResponse.getDefaultInstance(); - } - - public com.google.cloud.speech.v1beta1.AsyncRecognizeResponse build() { - com.google.cloud.speech.v1beta1.AsyncRecognizeResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.cloud.speech.v1beta1.AsyncRecognizeResponse buildPartial() { - com.google.cloud.speech.v1beta1.AsyncRecognizeResponse result = - new com.google.cloud.speech.v1beta1.AsyncRecognizeResponse(this); - int from_bitField0_ = bitField0_; - if (resultsBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - results_ = java.util.Collections.unmodifiableList(results_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.results_ = results_; - } else { - result.results_ = resultsBuilder_.build(); - } - onBuilt(); - return result; - } - - public Builder clone() { - return (Builder) super.clone(); - } - - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); - } - - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); - } - - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); - } - - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); - } - - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.speech.v1beta1.AsyncRecognizeResponse) { - return mergeFrom((com.google.cloud.speech.v1beta1.AsyncRecognizeResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.speech.v1beta1.AsyncRecognizeResponse other) { - if (other == com.google.cloud.speech.v1beta1.AsyncRecognizeResponse.getDefaultInstance()) - return this; - if (resultsBuilder_ == null) { - if (!other.results_.isEmpty()) { - if (results_.isEmpty()) { - results_ = other.results_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureResultsIsMutable(); - results_.addAll(other.results_); - } - onChanged(); - } - } else { - if (!other.results_.isEmpty()) { - if (resultsBuilder_.isEmpty()) { - resultsBuilder_.dispose(); - resultsBuilder_ = null; - results_ = other.results_; - bitField0_ = (bitField0_ & ~0x00000001); - resultsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getResultsFieldBuilder() - : null; - } else { - resultsBuilder_.addAllMessages(other.results_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.speech.v1beta1.AsyncRecognizeResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.speech.v1beta1.AsyncRecognizeResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.util.List results_ = - java.util.Collections.emptyList(); - - private void ensureResultsIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - results_ = - new java.util.ArrayList( - results_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.speech.v1beta1.SpeechRecognitionResult, - com.google.cloud.speech.v1beta1.SpeechRecognitionResult.Builder, - com.google.cloud.speech.v1beta1.SpeechRecognitionResultOrBuilder> - resultsBuilder_; - - /** - * - * - *
-     * *Output-only* Sequential list of transcription results corresponding to
-     * sequential portions of audio.
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2; - */ - public java.util.List - getResultsList() { - if (resultsBuilder_ == null) { - return java.util.Collections.unmodifiableList(results_); - } else { - return resultsBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * *Output-only* Sequential list of transcription results corresponding to
-     * sequential portions of audio.
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2; - */ - public int getResultsCount() { - if (resultsBuilder_ == null) { - return results_.size(); - } else { - return resultsBuilder_.getCount(); - } - } - /** - * - * - *
-     * *Output-only* Sequential list of transcription results corresponding to
-     * sequential portions of audio.
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2; - */ - public com.google.cloud.speech.v1beta1.SpeechRecognitionResult getResults(int index) { - if (resultsBuilder_ == null) { - return results_.get(index); - } else { - return resultsBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * *Output-only* Sequential list of transcription results corresponding to
-     * sequential portions of audio.
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2; - */ - public Builder setResults( - int index, com.google.cloud.speech.v1beta1.SpeechRecognitionResult value) { - if (resultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResultsIsMutable(); - results_.set(index, value); - onChanged(); - } else { - resultsBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * *Output-only* Sequential list of transcription results corresponding to
-     * sequential portions of audio.
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2; - */ - public Builder setResults( - int index, - com.google.cloud.speech.v1beta1.SpeechRecognitionResult.Builder builderForValue) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - results_.set(index, builderForValue.build()); - onChanged(); - } else { - resultsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * *Output-only* Sequential list of transcription results corresponding to
-     * sequential portions of audio.
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2; - */ - public Builder addResults(com.google.cloud.speech.v1beta1.SpeechRecognitionResult value) { - if (resultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResultsIsMutable(); - results_.add(value); - onChanged(); - } else { - resultsBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * *Output-only* Sequential list of transcription results corresponding to
-     * sequential portions of audio.
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2; - */ - public Builder addResults( - int index, com.google.cloud.speech.v1beta1.SpeechRecognitionResult value) { - if (resultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResultsIsMutable(); - results_.add(index, value); - onChanged(); - } else { - resultsBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * *Output-only* Sequential list of transcription results corresponding to
-     * sequential portions of audio.
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2; - */ - public Builder addResults( - com.google.cloud.speech.v1beta1.SpeechRecognitionResult.Builder builderForValue) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - results_.add(builderForValue.build()); - onChanged(); - } else { - resultsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * *Output-only* Sequential list of transcription results corresponding to
-     * sequential portions of audio.
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2; - */ - public Builder addResults( - int index, - com.google.cloud.speech.v1beta1.SpeechRecognitionResult.Builder builderForValue) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - results_.add(index, builderForValue.build()); - onChanged(); - } else { - resultsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * *Output-only* Sequential list of transcription results corresponding to
-     * sequential portions of audio.
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2; - */ - public Builder addAllResults( - java.lang.Iterable - values) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, results_); - onChanged(); - } else { - resultsBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * *Output-only* Sequential list of transcription results corresponding to
-     * sequential portions of audio.
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2; - */ - public Builder clearResults() { - if (resultsBuilder_ == null) { - results_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - resultsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * *Output-only* Sequential list of transcription results corresponding to
-     * sequential portions of audio.
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2; - */ - public Builder removeResults(int index) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - results_.remove(index); - onChanged(); - } else { - resultsBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * *Output-only* Sequential list of transcription results corresponding to
-     * sequential portions of audio.
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2; - */ - public com.google.cloud.speech.v1beta1.SpeechRecognitionResult.Builder getResultsBuilder( - int index) { - return getResultsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * *Output-only* Sequential list of transcription results corresponding to
-     * sequential portions of audio.
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2; - */ - public com.google.cloud.speech.v1beta1.SpeechRecognitionResultOrBuilder getResultsOrBuilder( - int index) { - if (resultsBuilder_ == null) { - return results_.get(index); - } else { - return resultsBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * *Output-only* Sequential list of transcription results corresponding to
-     * sequential portions of audio.
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2; - */ - public java.util.List< - ? extends com.google.cloud.speech.v1beta1.SpeechRecognitionResultOrBuilder> - getResultsOrBuilderList() { - if (resultsBuilder_ != null) { - return resultsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(results_); - } - } - /** - * - * - *
-     * *Output-only* Sequential list of transcription results corresponding to
-     * sequential portions of audio.
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2; - */ - public com.google.cloud.speech.v1beta1.SpeechRecognitionResult.Builder addResultsBuilder() { - return getResultsFieldBuilder() - .addBuilder(com.google.cloud.speech.v1beta1.SpeechRecognitionResult.getDefaultInstance()); - } - /** - * - * - *
-     * *Output-only* Sequential list of transcription results corresponding to
-     * sequential portions of audio.
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2; - */ - public com.google.cloud.speech.v1beta1.SpeechRecognitionResult.Builder addResultsBuilder( - int index) { - return getResultsFieldBuilder() - .addBuilder( - index, com.google.cloud.speech.v1beta1.SpeechRecognitionResult.getDefaultInstance()); - } - /** - * - * - *
-     * *Output-only* Sequential list of transcription results corresponding to
-     * sequential portions of audio.
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2; - */ - public java.util.List - getResultsBuilderList() { - return getResultsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.speech.v1beta1.SpeechRecognitionResult, - com.google.cloud.speech.v1beta1.SpeechRecognitionResult.Builder, - com.google.cloud.speech.v1beta1.SpeechRecognitionResultOrBuilder> - getResultsFieldBuilder() { - if (resultsBuilder_ == null) { - resultsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.speech.v1beta1.SpeechRecognitionResult, - com.google.cloud.speech.v1beta1.SpeechRecognitionResult.Builder, - com.google.cloud.speech.v1beta1.SpeechRecognitionResultOrBuilder>( - results_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); - results_ = null; - } - return resultsBuilder_; - } - - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.speech.v1beta1.AsyncRecognizeResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.speech.v1beta1.AsyncRecognizeResponse) - private static final com.google.cloud.speech.v1beta1.AsyncRecognizeResponse DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.speech.v1beta1.AsyncRecognizeResponse(); - } - - public static com.google.cloud.speech.v1beta1.AsyncRecognizeResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public AsyncRecognizeResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AsyncRecognizeResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.cloud.speech.v1beta1.AsyncRecognizeResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/AsyncRecognizeResponseOrBuilder.java b/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/AsyncRecognizeResponseOrBuilder.java deleted file mode 100644 index 50d49cfb05a3..000000000000 --- a/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/AsyncRecognizeResponseOrBuilder.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/speech/v1beta1/cloud_speech.proto - -package com.google.cloud.speech.v1beta1; - -public interface AsyncRecognizeResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.speech.v1beta1.AsyncRecognizeResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * *Output-only* Sequential list of transcription results corresponding to
-   * sequential portions of audio.
-   * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2; - */ - java.util.List getResultsList(); - /** - * - * - *
-   * *Output-only* Sequential list of transcription results corresponding to
-   * sequential portions of audio.
-   * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2; - */ - com.google.cloud.speech.v1beta1.SpeechRecognitionResult getResults(int index); - /** - * - * - *
-   * *Output-only* Sequential list of transcription results corresponding to
-   * sequential portions of audio.
-   * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2; - */ - int getResultsCount(); - /** - * - * - *
-   * *Output-only* Sequential list of transcription results corresponding to
-   * sequential portions of audio.
-   * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2; - */ - java.util.List - getResultsOrBuilderList(); - /** - * - * - *
-   * *Output-only* Sequential list of transcription results corresponding to
-   * sequential portions of audio.
-   * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2; - */ - com.google.cloud.speech.v1beta1.SpeechRecognitionResultOrBuilder getResultsOrBuilder(int index); -} diff --git a/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/RecognitionAudio.java b/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/RecognitionAudio.java deleted file mode 100644 index c4372ebd16ad..000000000000 --- a/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/RecognitionAudio.java +++ /dev/null @@ -1,832 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/speech/v1beta1/cloud_speech.proto - -package com.google.cloud.speech.v1beta1; - -/** - * - * - *
- * Contains audio data in the encoding specified in the `RecognitionConfig`.
- * Either `content` or `uri` must be supplied. Supplying both or neither
- * returns [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. See
- * [audio limits](https://cloud.google.com/speech/limits#content).
- * 
- * - * Protobuf type {@code google.cloud.speech.v1beta1.RecognitionAudio} - */ -public final class RecognitionAudio extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.speech.v1beta1.RecognitionAudio) - RecognitionAudioOrBuilder { - private static final long serialVersionUID = 0L; - // Use RecognitionAudio.newBuilder() to construct. - private RecognitionAudio(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private RecognitionAudio() {} - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private RecognitionAudio( - 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; - default: - { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - case 10: - { - audioSourceCase_ = 1; - audioSource_ = input.readBytes(); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - audioSourceCase_ = 2; - audioSource_ = s; - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_RecognitionAudio_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_RecognitionAudio_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.speech.v1beta1.RecognitionAudio.class, - com.google.cloud.speech.v1beta1.RecognitionAudio.Builder.class); - } - - private int audioSourceCase_ = 0; - private java.lang.Object audioSource_; - - public enum AudioSourceCase implements com.google.protobuf.Internal.EnumLite { - CONTENT(1), - URI(2), - AUDIOSOURCE_NOT_SET(0); - private final int value; - - private AudioSourceCase(int value) { - this.value = value; - } - /** @deprecated Use {@link #forNumber(int)} instead. */ - @java.lang.Deprecated - public static AudioSourceCase valueOf(int value) { - return forNumber(value); - } - - public static AudioSourceCase forNumber(int value) { - switch (value) { - case 1: - return CONTENT; - case 2: - return URI; - case 0: - return AUDIOSOURCE_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public AudioSourceCase getAudioSourceCase() { - return AudioSourceCase.forNumber(audioSourceCase_); - } - - public static final int CONTENT_FIELD_NUMBER = 1; - /** - * - * - *
-   * The audio data bytes encoded as specified in
-   * `RecognitionConfig`. Note: as with all bytes fields, protobuffers use a
-   * pure binary representation, whereas JSON representations use base64.
-   * 
- * - * bytes content = 1; - */ - public com.google.protobuf.ByteString getContent() { - if (audioSourceCase_ == 1) { - return (com.google.protobuf.ByteString) audioSource_; - } - return com.google.protobuf.ByteString.EMPTY; - } - - public static final int URI_FIELD_NUMBER = 2; - /** - * - * - *
-   * URI that points to a file that contains audio data bytes as specified in
-   * `RecognitionConfig`. Currently, only Google Cloud Storage URIs are
-   * supported, which must be specified in the following format:
-   * `gs://bucket_name/object_name` (other URI formats return
-   * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see
-   * [Request URIs](https://cloud.google.com/storage/docs/reference-uris).
-   * 
- * - * string uri = 2; - */ - public java.lang.String getUri() { - java.lang.Object ref = ""; - if (audioSourceCase_ == 2) { - ref = audioSource_; - } - if (ref instanceof java.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 (audioSourceCase_ == 2) { - audioSource_ = s; - } - return s; - } - } - /** - * - * - *
-   * URI that points to a file that contains audio data bytes as specified in
-   * `RecognitionConfig`. Currently, only Google Cloud Storage URIs are
-   * supported, which must be specified in the following format:
-   * `gs://bucket_name/object_name` (other URI formats return
-   * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see
-   * [Request URIs](https://cloud.google.com/storage/docs/reference-uris).
-   * 
- * - * string uri = 2; - */ - public com.google.protobuf.ByteString getUriBytes() { - java.lang.Object ref = ""; - if (audioSourceCase_ == 2) { - ref = audioSource_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (audioSourceCase_ == 2) { - audioSource_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (audioSourceCase_ == 1) { - output.writeBytes(1, (com.google.protobuf.ByteString) audioSource_); - } - if (audioSourceCase_ == 2) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, audioSource_); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (audioSourceCase_ == 1) { - size += - com.google.protobuf.CodedOutputStream.computeBytesSize( - 1, (com.google.protobuf.ByteString) audioSource_); - } - if (audioSourceCase_ == 2) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, audioSource_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.speech.v1beta1.RecognitionAudio)) { - return super.equals(obj); - } - com.google.cloud.speech.v1beta1.RecognitionAudio other = - (com.google.cloud.speech.v1beta1.RecognitionAudio) obj; - - boolean result = true; - result = result && getAudioSourceCase().equals(other.getAudioSourceCase()); - if (!result) return false; - switch (audioSourceCase_) { - case 1: - result = result && getContent().equals(other.getContent()); - break; - case 2: - result = result && getUri().equals(other.getUri()); - break; - case 0: - default: - } - result = result && unknownFields.equals(other.unknownFields); - return result; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - switch (audioSourceCase_) { - case 1: - hash = (37 * hash) + CONTENT_FIELD_NUMBER; - hash = (53 * hash) + getContent().hashCode(); - break; - case 2: - hash = (37 * hash) + URI_FIELD_NUMBER; - hash = (53 * hash) + getUri().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.speech.v1beta1.RecognitionAudio parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.speech.v1beta1.RecognitionAudio parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.RecognitionAudio parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.speech.v1beta1.RecognitionAudio parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.RecognitionAudio parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.speech.v1beta1.RecognitionAudio parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.RecognitionAudio parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.speech.v1beta1.RecognitionAudio parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.RecognitionAudio parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.speech.v1beta1.RecognitionAudio parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.RecognitionAudio parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.speech.v1beta1.RecognitionAudio parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.speech.v1beta1.RecognitionAudio prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 audio data in the encoding specified in the `RecognitionConfig`.
-   * Either `content` or `uri` must be supplied. Supplying both or neither
-   * returns [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. See
-   * [audio limits](https://cloud.google.com/speech/limits#content).
-   * 
- * - * Protobuf type {@code google.cloud.speech.v1beta1.RecognitionAudio} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.speech.v1beta1.RecognitionAudio) - com.google.cloud.speech.v1beta1.RecognitionAudioOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_RecognitionAudio_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_RecognitionAudio_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.speech.v1beta1.RecognitionAudio.class, - com.google.cloud.speech.v1beta1.RecognitionAudio.Builder.class); - } - - // Construct using com.google.cloud.speech.v1beta1.RecognitionAudio.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - public Builder clear() { - super.clear(); - audioSourceCase_ = 0; - audioSource_ = null; - return this; - } - - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_RecognitionAudio_descriptor; - } - - public com.google.cloud.speech.v1beta1.RecognitionAudio getDefaultInstanceForType() { - return com.google.cloud.speech.v1beta1.RecognitionAudio.getDefaultInstance(); - } - - public com.google.cloud.speech.v1beta1.RecognitionAudio build() { - com.google.cloud.speech.v1beta1.RecognitionAudio result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.cloud.speech.v1beta1.RecognitionAudio buildPartial() { - com.google.cloud.speech.v1beta1.RecognitionAudio result = - new com.google.cloud.speech.v1beta1.RecognitionAudio(this); - if (audioSourceCase_ == 1) { - result.audioSource_ = audioSource_; - } - if (audioSourceCase_ == 2) { - result.audioSource_ = audioSource_; - } - result.audioSourceCase_ = audioSourceCase_; - onBuilt(); - return result; - } - - public Builder clone() { - return (Builder) super.clone(); - } - - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); - } - - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); - } - - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); - } - - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); - } - - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.speech.v1beta1.RecognitionAudio) { - return mergeFrom((com.google.cloud.speech.v1beta1.RecognitionAudio) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.speech.v1beta1.RecognitionAudio other) { - if (other == com.google.cloud.speech.v1beta1.RecognitionAudio.getDefaultInstance()) - return this; - switch (other.getAudioSourceCase()) { - case CONTENT: - { - setContent(other.getContent()); - break; - } - case URI: - { - audioSourceCase_ = 2; - audioSource_ = other.audioSource_; - onChanged(); - break; - } - case AUDIOSOURCE_NOT_SET: - { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.speech.v1beta1.RecognitionAudio parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.speech.v1beta1.RecognitionAudio) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int audioSourceCase_ = 0; - private java.lang.Object audioSource_; - - public AudioSourceCase getAudioSourceCase() { - return AudioSourceCase.forNumber(audioSourceCase_); - } - - public Builder clearAudioSource() { - audioSourceCase_ = 0; - audioSource_ = null; - onChanged(); - return this; - } - - /** - * - * - *
-     * The audio data bytes encoded as specified in
-     * `RecognitionConfig`. Note: as with all bytes fields, protobuffers use a
-     * pure binary representation, whereas JSON representations use base64.
-     * 
- * - * bytes content = 1; - */ - public com.google.protobuf.ByteString getContent() { - if (audioSourceCase_ == 1) { - return (com.google.protobuf.ByteString) audioSource_; - } - return com.google.protobuf.ByteString.EMPTY; - } - /** - * - * - *
-     * The audio data bytes encoded as specified in
-     * `RecognitionConfig`. Note: as with all bytes fields, protobuffers use a
-     * pure binary representation, whereas JSON representations use base64.
-     * 
- * - * bytes content = 1; - */ - public Builder setContent(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - audioSourceCase_ = 1; - audioSource_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * The audio data bytes encoded as specified in
-     * `RecognitionConfig`. Note: as with all bytes fields, protobuffers use a
-     * pure binary representation, whereas JSON representations use base64.
-     * 
- * - * bytes content = 1; - */ - public Builder clearContent() { - if (audioSourceCase_ == 1) { - audioSourceCase_ = 0; - audioSource_ = null; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * URI that points to a file that contains audio data bytes as specified in
-     * `RecognitionConfig`. Currently, only Google Cloud Storage URIs are
-     * supported, which must be specified in the following format:
-     * `gs://bucket_name/object_name` (other URI formats return
-     * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see
-     * [Request URIs](https://cloud.google.com/storage/docs/reference-uris).
-     * 
- * - * string uri = 2; - */ - public java.lang.String getUri() { - java.lang.Object ref = ""; - if (audioSourceCase_ == 2) { - ref = audioSource_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (audioSourceCase_ == 2) { - audioSource_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * URI that points to a file that contains audio data bytes as specified in
-     * `RecognitionConfig`. Currently, only Google Cloud Storage URIs are
-     * supported, which must be specified in the following format:
-     * `gs://bucket_name/object_name` (other URI formats return
-     * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see
-     * [Request URIs](https://cloud.google.com/storage/docs/reference-uris).
-     * 
- * - * string uri = 2; - */ - public com.google.protobuf.ByteString getUriBytes() { - java.lang.Object ref = ""; - if (audioSourceCase_ == 2) { - ref = audioSource_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (audioSourceCase_ == 2) { - audioSource_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * URI that points to a file that contains audio data bytes as specified in
-     * `RecognitionConfig`. Currently, only Google Cloud Storage URIs are
-     * supported, which must be specified in the following format:
-     * `gs://bucket_name/object_name` (other URI formats return
-     * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see
-     * [Request URIs](https://cloud.google.com/storage/docs/reference-uris).
-     * 
- * - * string uri = 2; - */ - public Builder setUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - audioSourceCase_ = 2; - audioSource_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * URI that points to a file that contains audio data bytes as specified in
-     * `RecognitionConfig`. Currently, only Google Cloud Storage URIs are
-     * supported, which must be specified in the following format:
-     * `gs://bucket_name/object_name` (other URI formats return
-     * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see
-     * [Request URIs](https://cloud.google.com/storage/docs/reference-uris).
-     * 
- * - * string uri = 2; - */ - public Builder clearUri() { - if (audioSourceCase_ == 2) { - audioSourceCase_ = 0; - audioSource_ = null; - onChanged(); - } - return this; - } - /** - * - * - *
-     * URI that points to a file that contains audio data bytes as specified in
-     * `RecognitionConfig`. Currently, only Google Cloud Storage URIs are
-     * supported, which must be specified in the following format:
-     * `gs://bucket_name/object_name` (other URI formats return
-     * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see
-     * [Request URIs](https://cloud.google.com/storage/docs/reference-uris).
-     * 
- * - * string uri = 2; - */ - public Builder setUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - audioSourceCase_ = 2; - audioSource_ = value; - onChanged(); - return this; - } - - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.speech.v1beta1.RecognitionAudio) - } - - // @@protoc_insertion_point(class_scope:google.cloud.speech.v1beta1.RecognitionAudio) - private static final com.google.cloud.speech.v1beta1.RecognitionAudio DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.speech.v1beta1.RecognitionAudio(); - } - - public static com.google.cloud.speech.v1beta1.RecognitionAudio getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public RecognitionAudio parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new RecognitionAudio(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.cloud.speech.v1beta1.RecognitionAudio getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/RecognitionAudioOrBuilder.java b/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/RecognitionAudioOrBuilder.java deleted file mode 100644 index 8527f7a2a49f..000000000000 --- a/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/RecognitionAudioOrBuilder.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/speech/v1beta1/cloud_speech.proto - -package com.google.cloud.speech.v1beta1; - -public interface RecognitionAudioOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.speech.v1beta1.RecognitionAudio) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The audio data bytes encoded as specified in
-   * `RecognitionConfig`. Note: as with all bytes fields, protobuffers use a
-   * pure binary representation, whereas JSON representations use base64.
-   * 
- * - * bytes content = 1; - */ - com.google.protobuf.ByteString getContent(); - - /** - * - * - *
-   * URI that points to a file that contains audio data bytes as specified in
-   * `RecognitionConfig`. Currently, only Google Cloud Storage URIs are
-   * supported, which must be specified in the following format:
-   * `gs://bucket_name/object_name` (other URI formats return
-   * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see
-   * [Request URIs](https://cloud.google.com/storage/docs/reference-uris).
-   * 
- * - * string uri = 2; - */ - java.lang.String getUri(); - /** - * - * - *
-   * URI that points to a file that contains audio data bytes as specified in
-   * `RecognitionConfig`. Currently, only Google Cloud Storage URIs are
-   * supported, which must be specified in the following format:
-   * `gs://bucket_name/object_name` (other URI formats return
-   * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see
-   * [Request URIs](https://cloud.google.com/storage/docs/reference-uris).
-   * 
- * - * string uri = 2; - */ - com.google.protobuf.ByteString getUriBytes(); - - public com.google.cloud.speech.v1beta1.RecognitionAudio.AudioSourceCase getAudioSourceCase(); -} diff --git a/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/RecognitionConfig.java b/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/RecognitionConfig.java deleted file mode 100644 index 145dc965dd05..000000000000 --- a/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/RecognitionConfig.java +++ /dev/null @@ -1,1544 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/speech/v1beta1/cloud_speech.proto - -package com.google.cloud.speech.v1beta1; - -/** - * - * - *
- * Provides information to the recognizer that specifies how to process the
- * request.
- * 
- * - * Protobuf type {@code google.cloud.speech.v1beta1.RecognitionConfig} - */ -public final class RecognitionConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.speech.v1beta1.RecognitionConfig) - RecognitionConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use RecognitionConfig.newBuilder() to construct. - private RecognitionConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private RecognitionConfig() { - encoding_ = 0; - sampleRate_ = 0; - languageCode_ = ""; - maxAlternatives_ = 0; - profanityFilter_ = false; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private RecognitionConfig( - 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; - default: - { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - case 8: - { - int rawValue = input.readEnum(); - - encoding_ = rawValue; - break; - } - case 16: - { - sampleRate_ = input.readInt32(); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - languageCode_ = s; - break; - } - case 32: - { - maxAlternatives_ = input.readInt32(); - break; - } - case 40: - { - profanityFilter_ = input.readBool(); - break; - } - case 50: - { - com.google.cloud.speech.v1beta1.SpeechContext.Builder subBuilder = null; - if (speechContext_ != null) { - subBuilder = speechContext_.toBuilder(); - } - speechContext_ = - input.readMessage( - com.google.cloud.speech.v1beta1.SpeechContext.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(speechContext_); - speechContext_ = subBuilder.buildPartial(); - } - - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_RecognitionConfig_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_RecognitionConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.speech.v1beta1.RecognitionConfig.class, - com.google.cloud.speech.v1beta1.RecognitionConfig.Builder.class); - } - - /** - * - * - *
-   * Audio encoding of the data sent in the audio message. All encodings support
-   * only 1 channel (mono) audio. Only `FLAC` includes a header that describes
-   * the bytes of audio that follow the header. The other encodings are raw
-   * audio bytes with no header.
-   * For best results, the audio source should be captured and transmitted using
-   * a lossless encoding (`FLAC` or `LINEAR16`). Recognition accuracy may be
-   * reduced if lossy codecs (such as AMR, AMR_WB and MULAW) are used to capture
-   * or transmit the audio, particularly if background noise is present.
-   * 
- * - * Protobuf enum {@code google.cloud.speech.v1beta1.RecognitionConfig.AudioEncoding} - */ - public enum AudioEncoding implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * Not specified. Will return result [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT].
-     * 
- * - * ENCODING_UNSPECIFIED = 0; - */ - ENCODING_UNSPECIFIED(0), - /** - * - * - *
-     * Uncompressed 16-bit signed little-endian samples (Linear PCM).
-     * This is the only encoding that may be used by `AsyncRecognize`.
-     * 
- * - * LINEAR16 = 1; - */ - LINEAR16(1), - /** - * - * - *
-     * This is the recommended encoding for `SyncRecognize` and
-     * `StreamingRecognize` because it uses lossless compression; therefore
-     * recognition accuracy is not compromised by a lossy codec.
-     * The stream FLAC (Free Lossless Audio Codec) encoding is specified at:
-     * http://flac.sourceforge.net/documentation.html.
-     * 16-bit and 24-bit samples are supported.
-     * Not all fields in STREAMINFO are supported.
-     * 
- * - * FLAC = 2; - */ - FLAC(2), - /** - * - * - *
-     * 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law.
-     * 
- * - * MULAW = 3; - */ - MULAW(3), - /** - * - * - *
-     * Adaptive Multi-Rate Narrowband codec. `sample_rate` must be 8000 Hz.
-     * 
- * - * AMR = 4; - */ - AMR(4), - /** - * - * - *
-     * Adaptive Multi-Rate Wideband codec. `sample_rate` must be 16000 Hz.
-     * 
- * - * AMR_WB = 5; - */ - AMR_WB(5), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * Not specified. Will return result [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT].
-     * 
- * - * ENCODING_UNSPECIFIED = 0; - */ - public static final int ENCODING_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * Uncompressed 16-bit signed little-endian samples (Linear PCM).
-     * This is the only encoding that may be used by `AsyncRecognize`.
-     * 
- * - * LINEAR16 = 1; - */ - public static final int LINEAR16_VALUE = 1; - /** - * - * - *
-     * This is the recommended encoding for `SyncRecognize` and
-     * `StreamingRecognize` because it uses lossless compression; therefore
-     * recognition accuracy is not compromised by a lossy codec.
-     * The stream FLAC (Free Lossless Audio Codec) encoding is specified at:
-     * http://flac.sourceforge.net/documentation.html.
-     * 16-bit and 24-bit samples are supported.
-     * Not all fields in STREAMINFO are supported.
-     * 
- * - * FLAC = 2; - */ - public static final int FLAC_VALUE = 2; - /** - * - * - *
-     * 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law.
-     * 
- * - * MULAW = 3; - */ - public static final int MULAW_VALUE = 3; - /** - * - * - *
-     * Adaptive Multi-Rate Narrowband codec. `sample_rate` must be 8000 Hz.
-     * 
- * - * AMR = 4; - */ - public static final int AMR_VALUE = 4; - /** - * - * - *
-     * Adaptive Multi-Rate Wideband codec. `sample_rate` must be 16000 Hz.
-     * 
- * - * AMR_WB = 5; - */ - public static final int AMR_WB_VALUE = 5; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** @deprecated Use {@link #forNumber(int)} instead. */ - @java.lang.Deprecated - public static AudioEncoding valueOf(int value) { - return forNumber(value); - } - - public static AudioEncoding forNumber(int value) { - switch (value) { - case 0: - return ENCODING_UNSPECIFIED; - case 1: - return LINEAR16; - case 2: - return FLAC; - case 3: - return MULAW; - case 4: - return AMR; - case 5: - return AMR_WB; - 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 AudioEncoding findValueByNumber(int number) { - return AudioEncoding.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.speech.v1beta1.RecognitionConfig.getDescriptor() - .getEnumTypes() - .get(0); - } - - private static final AudioEncoding[] VALUES = values(); - - public static AudioEncoding 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 AudioEncoding(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.speech.v1beta1.RecognitionConfig.AudioEncoding) - } - - public static final int ENCODING_FIELD_NUMBER = 1; - private int encoding_; - /** - * - * - *
-   * *Required* Encoding of audio data sent in all `RecognitionAudio` messages.
-   * 
- * - * .google.cloud.speech.v1beta1.RecognitionConfig.AudioEncoding encoding = 1; - */ - public int getEncodingValue() { - return encoding_; - } - /** - * - * - *
-   * *Required* Encoding of audio data sent in all `RecognitionAudio` messages.
-   * 
- * - * .google.cloud.speech.v1beta1.RecognitionConfig.AudioEncoding encoding = 1; - */ - public com.google.cloud.speech.v1beta1.RecognitionConfig.AudioEncoding getEncoding() { - com.google.cloud.speech.v1beta1.RecognitionConfig.AudioEncoding result = - com.google.cloud.speech.v1beta1.RecognitionConfig.AudioEncoding.valueOf(encoding_); - return result == null - ? com.google.cloud.speech.v1beta1.RecognitionConfig.AudioEncoding.UNRECOGNIZED - : result; - } - - public static final int SAMPLE_RATE_FIELD_NUMBER = 2; - private int sampleRate_; - /** - * - * - *
-   * *Required* Sample rate in Hertz of the audio data sent in all
-   * `RecognitionAudio` messages. Valid values are: 8000-48000.
-   * 16000 is optimal. For best results, set the sampling rate of the audio
-   * source to 16000 Hz. If that's not possible, use the native sample rate of
-   * the audio source (instead of re-sampling).
-   * 
- * - * int32 sample_rate = 2; - */ - public int getSampleRate() { - return sampleRate_; - } - - public static final int LANGUAGE_CODE_FIELD_NUMBER = 3; - private volatile java.lang.Object languageCode_; - /** - * - * - *
-   * *Optional* The language of the supplied audio as a BCP-47 language tag.
-   * Example: "en-GB"  https://www.rfc-editor.org/rfc/bcp/bcp47.txt
-   * If omitted, defaults to "en-US". See
-   * [Language Support](https://cloud.google.com/speech/docs/languages)
-   * for a list of the currently supported language codes.
-   * 
- * - * string language_code = 3; - */ - public java.lang.String getLanguageCode() { - java.lang.Object ref = languageCode_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - languageCode_ = s; - return s; - } - } - /** - * - * - *
-   * *Optional* The language of the supplied audio as a BCP-47 language tag.
-   * Example: "en-GB"  https://www.rfc-editor.org/rfc/bcp/bcp47.txt
-   * If omitted, defaults to "en-US". See
-   * [Language Support](https://cloud.google.com/speech/docs/languages)
-   * for a list of the currently supported language codes.
-   * 
- * - * string language_code = 3; - */ - public com.google.protobuf.ByteString getLanguageCodeBytes() { - java.lang.Object ref = languageCode_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - languageCode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int MAX_ALTERNATIVES_FIELD_NUMBER = 4; - private int maxAlternatives_; - /** - * - * - *
-   * *Optional* Maximum number of recognition hypotheses to be returned.
-   * Specifically, the maximum number of `SpeechRecognitionAlternative` messages
-   * within each `SpeechRecognitionResult`.
-   * The server may return fewer than `max_alternatives`.
-   * Valid values are `0`-`30`. A value of `0` or `1` will return a maximum of
-   * one. If omitted, will return a maximum of one.
-   * 
- * - * int32 max_alternatives = 4; - */ - public int getMaxAlternatives() { - return maxAlternatives_; - } - - public static final int PROFANITY_FILTER_FIELD_NUMBER = 5; - private boolean profanityFilter_; - /** - * - * - *
-   * *Optional* If set to `true`, the server will attempt to filter out
-   * profanities, replacing all but the initial character in each filtered word
-   * with asterisks, e.g. "f***". If set to `false` or omitted, profanities
-   * won't be filtered out.
-   * 
- * - * bool profanity_filter = 5; - */ - public boolean getProfanityFilter() { - return profanityFilter_; - } - - public static final int SPEECH_CONTEXT_FIELD_NUMBER = 6; - private com.google.cloud.speech.v1beta1.SpeechContext speechContext_; - /** - * - * - *
-   * *Optional* A means to provide context to assist the speech recognition.
-   * 
- * - * .google.cloud.speech.v1beta1.SpeechContext speech_context = 6; - */ - public boolean hasSpeechContext() { - return speechContext_ != null; - } - /** - * - * - *
-   * *Optional* A means to provide context to assist the speech recognition.
-   * 
- * - * .google.cloud.speech.v1beta1.SpeechContext speech_context = 6; - */ - public com.google.cloud.speech.v1beta1.SpeechContext getSpeechContext() { - return speechContext_ == null - ? com.google.cloud.speech.v1beta1.SpeechContext.getDefaultInstance() - : speechContext_; - } - /** - * - * - *
-   * *Optional* A means to provide context to assist the speech recognition.
-   * 
- * - * .google.cloud.speech.v1beta1.SpeechContext speech_context = 6; - */ - public com.google.cloud.speech.v1beta1.SpeechContextOrBuilder getSpeechContextOrBuilder() { - return getSpeechContext(); - } - - private byte memoizedIsInitialized = -1; - - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (encoding_ - != com.google.cloud.speech.v1beta1.RecognitionConfig.AudioEncoding.ENCODING_UNSPECIFIED - .getNumber()) { - output.writeEnum(1, encoding_); - } - if (sampleRate_ != 0) { - output.writeInt32(2, sampleRate_); - } - if (!getLanguageCodeBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, languageCode_); - } - if (maxAlternatives_ != 0) { - output.writeInt32(4, maxAlternatives_); - } - if (profanityFilter_ != false) { - output.writeBool(5, profanityFilter_); - } - if (speechContext_ != null) { - output.writeMessage(6, getSpeechContext()); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (encoding_ - != com.google.cloud.speech.v1beta1.RecognitionConfig.AudioEncoding.ENCODING_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, encoding_); - } - if (sampleRate_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, sampleRate_); - } - if (!getLanguageCodeBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, languageCode_); - } - if (maxAlternatives_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, maxAlternatives_); - } - if (profanityFilter_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, profanityFilter_); - } - if (speechContext_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getSpeechContext()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.speech.v1beta1.RecognitionConfig)) { - return super.equals(obj); - } - com.google.cloud.speech.v1beta1.RecognitionConfig other = - (com.google.cloud.speech.v1beta1.RecognitionConfig) obj; - - boolean result = true; - result = result && encoding_ == other.encoding_; - result = result && (getSampleRate() == other.getSampleRate()); - result = result && getLanguageCode().equals(other.getLanguageCode()); - result = result && (getMaxAlternatives() == other.getMaxAlternatives()); - result = result && (getProfanityFilter() == other.getProfanityFilter()); - result = result && (hasSpeechContext() == other.hasSpeechContext()); - if (hasSpeechContext()) { - result = result && getSpeechContext().equals(other.getSpeechContext()); - } - result = result && unknownFields.equals(other.unknownFields); - return result; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ENCODING_FIELD_NUMBER; - hash = (53 * hash) + encoding_; - hash = (37 * hash) + SAMPLE_RATE_FIELD_NUMBER; - hash = (53 * hash) + getSampleRate(); - hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; - hash = (53 * hash) + getLanguageCode().hashCode(); - hash = (37 * hash) + MAX_ALTERNATIVES_FIELD_NUMBER; - hash = (53 * hash) + getMaxAlternatives(); - hash = (37 * hash) + PROFANITY_FILTER_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getProfanityFilter()); - if (hasSpeechContext()) { - hash = (37 * hash) + SPEECH_CONTEXT_FIELD_NUMBER; - hash = (53 * hash) + getSpeechContext().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.speech.v1beta1.RecognitionConfig parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.speech.v1beta1.RecognitionConfig parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.RecognitionConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.speech.v1beta1.RecognitionConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.RecognitionConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.speech.v1beta1.RecognitionConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.RecognitionConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.speech.v1beta1.RecognitionConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.RecognitionConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.speech.v1beta1.RecognitionConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.RecognitionConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.speech.v1beta1.RecognitionConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.speech.v1beta1.RecognitionConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Provides information to the recognizer that specifies how to process the
-   * request.
-   * 
- * - * Protobuf type {@code google.cloud.speech.v1beta1.RecognitionConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.speech.v1beta1.RecognitionConfig) - com.google.cloud.speech.v1beta1.RecognitionConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_RecognitionConfig_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_RecognitionConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.speech.v1beta1.RecognitionConfig.class, - com.google.cloud.speech.v1beta1.RecognitionConfig.Builder.class); - } - - // Construct using com.google.cloud.speech.v1beta1.RecognitionConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - public Builder clear() { - super.clear(); - encoding_ = 0; - - sampleRate_ = 0; - - languageCode_ = ""; - - maxAlternatives_ = 0; - - profanityFilter_ = false; - - if (speechContextBuilder_ == null) { - speechContext_ = null; - } else { - speechContext_ = null; - speechContextBuilder_ = null; - } - return this; - } - - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_RecognitionConfig_descriptor; - } - - public com.google.cloud.speech.v1beta1.RecognitionConfig getDefaultInstanceForType() { - return com.google.cloud.speech.v1beta1.RecognitionConfig.getDefaultInstance(); - } - - public com.google.cloud.speech.v1beta1.RecognitionConfig build() { - com.google.cloud.speech.v1beta1.RecognitionConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.cloud.speech.v1beta1.RecognitionConfig buildPartial() { - com.google.cloud.speech.v1beta1.RecognitionConfig result = - new com.google.cloud.speech.v1beta1.RecognitionConfig(this); - result.encoding_ = encoding_; - result.sampleRate_ = sampleRate_; - result.languageCode_ = languageCode_; - result.maxAlternatives_ = maxAlternatives_; - result.profanityFilter_ = profanityFilter_; - if (speechContextBuilder_ == null) { - result.speechContext_ = speechContext_; - } else { - result.speechContext_ = speechContextBuilder_.build(); - } - onBuilt(); - return result; - } - - public Builder clone() { - return (Builder) super.clone(); - } - - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); - } - - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); - } - - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); - } - - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); - } - - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.speech.v1beta1.RecognitionConfig) { - return mergeFrom((com.google.cloud.speech.v1beta1.RecognitionConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.speech.v1beta1.RecognitionConfig other) { - if (other == com.google.cloud.speech.v1beta1.RecognitionConfig.getDefaultInstance()) - return this; - if (other.encoding_ != 0) { - setEncodingValue(other.getEncodingValue()); - } - if (other.getSampleRate() != 0) { - setSampleRate(other.getSampleRate()); - } - if (!other.getLanguageCode().isEmpty()) { - languageCode_ = other.languageCode_; - onChanged(); - } - if (other.getMaxAlternatives() != 0) { - setMaxAlternatives(other.getMaxAlternatives()); - } - if (other.getProfanityFilter() != false) { - setProfanityFilter(other.getProfanityFilter()); - } - if (other.hasSpeechContext()) { - mergeSpeechContext(other.getSpeechContext()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.speech.v1beta1.RecognitionConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.speech.v1beta1.RecognitionConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int encoding_ = 0; - /** - * - * - *
-     * *Required* Encoding of audio data sent in all `RecognitionAudio` messages.
-     * 
- * - * .google.cloud.speech.v1beta1.RecognitionConfig.AudioEncoding encoding = 1; - */ - public int getEncodingValue() { - return encoding_; - } - /** - * - * - *
-     * *Required* Encoding of audio data sent in all `RecognitionAudio` messages.
-     * 
- * - * .google.cloud.speech.v1beta1.RecognitionConfig.AudioEncoding encoding = 1; - */ - public Builder setEncodingValue(int value) { - encoding_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * *Required* Encoding of audio data sent in all `RecognitionAudio` messages.
-     * 
- * - * .google.cloud.speech.v1beta1.RecognitionConfig.AudioEncoding encoding = 1; - */ - public com.google.cloud.speech.v1beta1.RecognitionConfig.AudioEncoding getEncoding() { - com.google.cloud.speech.v1beta1.RecognitionConfig.AudioEncoding result = - com.google.cloud.speech.v1beta1.RecognitionConfig.AudioEncoding.valueOf(encoding_); - return result == null - ? com.google.cloud.speech.v1beta1.RecognitionConfig.AudioEncoding.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * *Required* Encoding of audio data sent in all `RecognitionAudio` messages.
-     * 
- * - * .google.cloud.speech.v1beta1.RecognitionConfig.AudioEncoding encoding = 1; - */ - public Builder setEncoding( - com.google.cloud.speech.v1beta1.RecognitionConfig.AudioEncoding value) { - if (value == null) { - throw new NullPointerException(); - } - - encoding_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * *Required* Encoding of audio data sent in all `RecognitionAudio` messages.
-     * 
- * - * .google.cloud.speech.v1beta1.RecognitionConfig.AudioEncoding encoding = 1; - */ - public Builder clearEncoding() { - - encoding_ = 0; - onChanged(); - return this; - } - - private int sampleRate_; - /** - * - * - *
-     * *Required* Sample rate in Hertz of the audio data sent in all
-     * `RecognitionAudio` messages. Valid values are: 8000-48000.
-     * 16000 is optimal. For best results, set the sampling rate of the audio
-     * source to 16000 Hz. If that's not possible, use the native sample rate of
-     * the audio source (instead of re-sampling).
-     * 
- * - * int32 sample_rate = 2; - */ - public int getSampleRate() { - return sampleRate_; - } - /** - * - * - *
-     * *Required* Sample rate in Hertz of the audio data sent in all
-     * `RecognitionAudio` messages. Valid values are: 8000-48000.
-     * 16000 is optimal. For best results, set the sampling rate of the audio
-     * source to 16000 Hz. If that's not possible, use the native sample rate of
-     * the audio source (instead of re-sampling).
-     * 
- * - * int32 sample_rate = 2; - */ - public Builder setSampleRate(int value) { - - sampleRate_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * *Required* Sample rate in Hertz of the audio data sent in all
-     * `RecognitionAudio` messages. Valid values are: 8000-48000.
-     * 16000 is optimal. For best results, set the sampling rate of the audio
-     * source to 16000 Hz. If that's not possible, use the native sample rate of
-     * the audio source (instead of re-sampling).
-     * 
- * - * int32 sample_rate = 2; - */ - public Builder clearSampleRate() { - - sampleRate_ = 0; - onChanged(); - return this; - } - - private java.lang.Object languageCode_ = ""; - /** - * - * - *
-     * *Optional* The language of the supplied audio as a BCP-47 language tag.
-     * Example: "en-GB"  https://www.rfc-editor.org/rfc/bcp/bcp47.txt
-     * If omitted, defaults to "en-US". See
-     * [Language Support](https://cloud.google.com/speech/docs/languages)
-     * for a list of the currently supported language codes.
-     * 
- * - * string language_code = 3; - */ - public java.lang.String getLanguageCode() { - java.lang.Object ref = languageCode_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - languageCode_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * *Optional* The language of the supplied audio as a BCP-47 language tag.
-     * Example: "en-GB"  https://www.rfc-editor.org/rfc/bcp/bcp47.txt
-     * If omitted, defaults to "en-US". See
-     * [Language Support](https://cloud.google.com/speech/docs/languages)
-     * for a list of the currently supported language codes.
-     * 
- * - * string language_code = 3; - */ - public com.google.protobuf.ByteString getLanguageCodeBytes() { - java.lang.Object ref = languageCode_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - languageCode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * *Optional* The language of the supplied audio as a BCP-47 language tag.
-     * Example: "en-GB"  https://www.rfc-editor.org/rfc/bcp/bcp47.txt
-     * If omitted, defaults to "en-US". See
-     * [Language Support](https://cloud.google.com/speech/docs/languages)
-     * for a list of the currently supported language codes.
-     * 
- * - * string language_code = 3; - */ - public Builder setLanguageCode(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - languageCode_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * *Optional* The language of the supplied audio as a BCP-47 language tag.
-     * Example: "en-GB"  https://www.rfc-editor.org/rfc/bcp/bcp47.txt
-     * If omitted, defaults to "en-US". See
-     * [Language Support](https://cloud.google.com/speech/docs/languages)
-     * for a list of the currently supported language codes.
-     * 
- * - * string language_code = 3; - */ - public Builder clearLanguageCode() { - - languageCode_ = getDefaultInstance().getLanguageCode(); - onChanged(); - return this; - } - /** - * - * - *
-     * *Optional* The language of the supplied audio as a BCP-47 language tag.
-     * Example: "en-GB"  https://www.rfc-editor.org/rfc/bcp/bcp47.txt
-     * If omitted, defaults to "en-US". See
-     * [Language Support](https://cloud.google.com/speech/docs/languages)
-     * for a list of the currently supported language codes.
-     * 
- * - * string language_code = 3; - */ - public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - languageCode_ = value; - onChanged(); - return this; - } - - private int maxAlternatives_; - /** - * - * - *
-     * *Optional* Maximum number of recognition hypotheses to be returned.
-     * Specifically, the maximum number of `SpeechRecognitionAlternative` messages
-     * within each `SpeechRecognitionResult`.
-     * The server may return fewer than `max_alternatives`.
-     * Valid values are `0`-`30`. A value of `0` or `1` will return a maximum of
-     * one. If omitted, will return a maximum of one.
-     * 
- * - * int32 max_alternatives = 4; - */ - public int getMaxAlternatives() { - return maxAlternatives_; - } - /** - * - * - *
-     * *Optional* Maximum number of recognition hypotheses to be returned.
-     * Specifically, the maximum number of `SpeechRecognitionAlternative` messages
-     * within each `SpeechRecognitionResult`.
-     * The server may return fewer than `max_alternatives`.
-     * Valid values are `0`-`30`. A value of `0` or `1` will return a maximum of
-     * one. If omitted, will return a maximum of one.
-     * 
- * - * int32 max_alternatives = 4; - */ - public Builder setMaxAlternatives(int value) { - - maxAlternatives_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * *Optional* Maximum number of recognition hypotheses to be returned.
-     * Specifically, the maximum number of `SpeechRecognitionAlternative` messages
-     * within each `SpeechRecognitionResult`.
-     * The server may return fewer than `max_alternatives`.
-     * Valid values are `0`-`30`. A value of `0` or `1` will return a maximum of
-     * one. If omitted, will return a maximum of one.
-     * 
- * - * int32 max_alternatives = 4; - */ - public Builder clearMaxAlternatives() { - - maxAlternatives_ = 0; - onChanged(); - return this; - } - - private boolean profanityFilter_; - /** - * - * - *
-     * *Optional* If set to `true`, the server will attempt to filter out
-     * profanities, replacing all but the initial character in each filtered word
-     * with asterisks, e.g. "f***". If set to `false` or omitted, profanities
-     * won't be filtered out.
-     * 
- * - * bool profanity_filter = 5; - */ - public boolean getProfanityFilter() { - return profanityFilter_; - } - /** - * - * - *
-     * *Optional* If set to `true`, the server will attempt to filter out
-     * profanities, replacing all but the initial character in each filtered word
-     * with asterisks, e.g. "f***". If set to `false` or omitted, profanities
-     * won't be filtered out.
-     * 
- * - * bool profanity_filter = 5; - */ - public Builder setProfanityFilter(boolean value) { - - profanityFilter_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * *Optional* If set to `true`, the server will attempt to filter out
-     * profanities, replacing all but the initial character in each filtered word
-     * with asterisks, e.g. "f***". If set to `false` or omitted, profanities
-     * won't be filtered out.
-     * 
- * - * bool profanity_filter = 5; - */ - public Builder clearProfanityFilter() { - - profanityFilter_ = false; - onChanged(); - return this; - } - - private com.google.cloud.speech.v1beta1.SpeechContext speechContext_ = null; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.speech.v1beta1.SpeechContext, - com.google.cloud.speech.v1beta1.SpeechContext.Builder, - com.google.cloud.speech.v1beta1.SpeechContextOrBuilder> - speechContextBuilder_; - /** - * - * - *
-     * *Optional* A means to provide context to assist the speech recognition.
-     * 
- * - * .google.cloud.speech.v1beta1.SpeechContext speech_context = 6; - */ - public boolean hasSpeechContext() { - return speechContextBuilder_ != null || speechContext_ != null; - } - /** - * - * - *
-     * *Optional* A means to provide context to assist the speech recognition.
-     * 
- * - * .google.cloud.speech.v1beta1.SpeechContext speech_context = 6; - */ - public com.google.cloud.speech.v1beta1.SpeechContext getSpeechContext() { - if (speechContextBuilder_ == null) { - return speechContext_ == null - ? com.google.cloud.speech.v1beta1.SpeechContext.getDefaultInstance() - : speechContext_; - } else { - return speechContextBuilder_.getMessage(); - } - } - /** - * - * - *
-     * *Optional* A means to provide context to assist the speech recognition.
-     * 
- * - * .google.cloud.speech.v1beta1.SpeechContext speech_context = 6; - */ - public Builder setSpeechContext(com.google.cloud.speech.v1beta1.SpeechContext value) { - if (speechContextBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - speechContext_ = value; - onChanged(); - } else { - speechContextBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * *Optional* A means to provide context to assist the speech recognition.
-     * 
- * - * .google.cloud.speech.v1beta1.SpeechContext speech_context = 6; - */ - public Builder setSpeechContext( - com.google.cloud.speech.v1beta1.SpeechContext.Builder builderForValue) { - if (speechContextBuilder_ == null) { - speechContext_ = builderForValue.build(); - onChanged(); - } else { - speechContextBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * *Optional* A means to provide context to assist the speech recognition.
-     * 
- * - * .google.cloud.speech.v1beta1.SpeechContext speech_context = 6; - */ - public Builder mergeSpeechContext(com.google.cloud.speech.v1beta1.SpeechContext value) { - if (speechContextBuilder_ == null) { - if (speechContext_ != null) { - speechContext_ = - com.google.cloud.speech.v1beta1.SpeechContext.newBuilder(speechContext_) - .mergeFrom(value) - .buildPartial(); - } else { - speechContext_ = value; - } - onChanged(); - } else { - speechContextBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * *Optional* A means to provide context to assist the speech recognition.
-     * 
- * - * .google.cloud.speech.v1beta1.SpeechContext speech_context = 6; - */ - public Builder clearSpeechContext() { - if (speechContextBuilder_ == null) { - speechContext_ = null; - onChanged(); - } else { - speechContext_ = null; - speechContextBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * *Optional* A means to provide context to assist the speech recognition.
-     * 
- * - * .google.cloud.speech.v1beta1.SpeechContext speech_context = 6; - */ - public com.google.cloud.speech.v1beta1.SpeechContext.Builder getSpeechContextBuilder() { - - onChanged(); - return getSpeechContextFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * *Optional* A means to provide context to assist the speech recognition.
-     * 
- * - * .google.cloud.speech.v1beta1.SpeechContext speech_context = 6; - */ - public com.google.cloud.speech.v1beta1.SpeechContextOrBuilder getSpeechContextOrBuilder() { - if (speechContextBuilder_ != null) { - return speechContextBuilder_.getMessageOrBuilder(); - } else { - return speechContext_ == null - ? com.google.cloud.speech.v1beta1.SpeechContext.getDefaultInstance() - : speechContext_; - } - } - /** - * - * - *
-     * *Optional* A means to provide context to assist the speech recognition.
-     * 
- * - * .google.cloud.speech.v1beta1.SpeechContext speech_context = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.speech.v1beta1.SpeechContext, - com.google.cloud.speech.v1beta1.SpeechContext.Builder, - com.google.cloud.speech.v1beta1.SpeechContextOrBuilder> - getSpeechContextFieldBuilder() { - if (speechContextBuilder_ == null) { - speechContextBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.speech.v1beta1.SpeechContext, - com.google.cloud.speech.v1beta1.SpeechContext.Builder, - com.google.cloud.speech.v1beta1.SpeechContextOrBuilder>( - getSpeechContext(), getParentForChildren(), isClean()); - speechContext_ = null; - } - return speechContextBuilder_; - } - - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.speech.v1beta1.RecognitionConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.speech.v1beta1.RecognitionConfig) - private static final com.google.cloud.speech.v1beta1.RecognitionConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.speech.v1beta1.RecognitionConfig(); - } - - public static com.google.cloud.speech.v1beta1.RecognitionConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public RecognitionConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new RecognitionConfig(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.cloud.speech.v1beta1.RecognitionConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/RecognitionConfigOrBuilder.java b/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/RecognitionConfigOrBuilder.java deleted file mode 100644 index c0996b92f788..000000000000 --- a/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/RecognitionConfigOrBuilder.java +++ /dev/null @@ -1,151 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/speech/v1beta1/cloud_speech.proto - -package com.google.cloud.speech.v1beta1; - -public interface RecognitionConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.speech.v1beta1.RecognitionConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * *Required* Encoding of audio data sent in all `RecognitionAudio` messages.
-   * 
- * - * .google.cloud.speech.v1beta1.RecognitionConfig.AudioEncoding encoding = 1; - */ - int getEncodingValue(); - /** - * - * - *
-   * *Required* Encoding of audio data sent in all `RecognitionAudio` messages.
-   * 
- * - * .google.cloud.speech.v1beta1.RecognitionConfig.AudioEncoding encoding = 1; - */ - com.google.cloud.speech.v1beta1.RecognitionConfig.AudioEncoding getEncoding(); - - /** - * - * - *
-   * *Required* Sample rate in Hertz of the audio data sent in all
-   * `RecognitionAudio` messages. Valid values are: 8000-48000.
-   * 16000 is optimal. For best results, set the sampling rate of the audio
-   * source to 16000 Hz. If that's not possible, use the native sample rate of
-   * the audio source (instead of re-sampling).
-   * 
- * - * int32 sample_rate = 2; - */ - int getSampleRate(); - - /** - * - * - *
-   * *Optional* The language of the supplied audio as a BCP-47 language tag.
-   * Example: "en-GB"  https://www.rfc-editor.org/rfc/bcp/bcp47.txt
-   * If omitted, defaults to "en-US". See
-   * [Language Support](https://cloud.google.com/speech/docs/languages)
-   * for a list of the currently supported language codes.
-   * 
- * - * string language_code = 3; - */ - java.lang.String getLanguageCode(); - /** - * - * - *
-   * *Optional* The language of the supplied audio as a BCP-47 language tag.
-   * Example: "en-GB"  https://www.rfc-editor.org/rfc/bcp/bcp47.txt
-   * If omitted, defaults to "en-US". See
-   * [Language Support](https://cloud.google.com/speech/docs/languages)
-   * for a list of the currently supported language codes.
-   * 
- * - * string language_code = 3; - */ - com.google.protobuf.ByteString getLanguageCodeBytes(); - - /** - * - * - *
-   * *Optional* Maximum number of recognition hypotheses to be returned.
-   * Specifically, the maximum number of `SpeechRecognitionAlternative` messages
-   * within each `SpeechRecognitionResult`.
-   * The server may return fewer than `max_alternatives`.
-   * Valid values are `0`-`30`. A value of `0` or `1` will return a maximum of
-   * one. If omitted, will return a maximum of one.
-   * 
- * - * int32 max_alternatives = 4; - */ - int getMaxAlternatives(); - - /** - * - * - *
-   * *Optional* If set to `true`, the server will attempt to filter out
-   * profanities, replacing all but the initial character in each filtered word
-   * with asterisks, e.g. "f***". If set to `false` or omitted, profanities
-   * won't be filtered out.
-   * 
- * - * bool profanity_filter = 5; - */ - boolean getProfanityFilter(); - - /** - * - * - *
-   * *Optional* A means to provide context to assist the speech recognition.
-   * 
- * - * .google.cloud.speech.v1beta1.SpeechContext speech_context = 6; - */ - boolean hasSpeechContext(); - /** - * - * - *
-   * *Optional* A means to provide context to assist the speech recognition.
-   * 
- * - * .google.cloud.speech.v1beta1.SpeechContext speech_context = 6; - */ - com.google.cloud.speech.v1beta1.SpeechContext getSpeechContext(); - /** - * - * - *
-   * *Optional* A means to provide context to assist the speech recognition.
-   * 
- * - * .google.cloud.speech.v1beta1.SpeechContext speech_context = 6; - */ - com.google.cloud.speech.v1beta1.SpeechContextOrBuilder getSpeechContextOrBuilder(); -} diff --git a/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/SpeechContext.java b/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/SpeechContext.java deleted file mode 100644 index b91a93a05709..000000000000 --- a/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/SpeechContext.java +++ /dev/null @@ -1,737 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/speech/v1beta1/cloud_speech.proto - -package com.google.cloud.speech.v1beta1; - -/** - * - * - *
- * Provides "hints" to the speech recognizer to favor specific words and phrases
- * in the results.
- * 
- * - * Protobuf type {@code google.cloud.speech.v1beta1.SpeechContext} - */ -public final class SpeechContext extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.speech.v1beta1.SpeechContext) - SpeechContextOrBuilder { - private static final long serialVersionUID = 0L; - // Use SpeechContext.newBuilder() to construct. - private SpeechContext(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private SpeechContext() { - phrases_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private SpeechContext( - 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; - default: - { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - phrases_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - phrases_.add(s); - break; - } - } - } - } catch (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) == 0x00000001)) { - phrases_ = phrases_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_SpeechContext_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_SpeechContext_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.speech.v1beta1.SpeechContext.class, - com.google.cloud.speech.v1beta1.SpeechContext.Builder.class); - } - - public static final int PHRASES_FIELD_NUMBER = 1; - private com.google.protobuf.LazyStringList phrases_; - /** - * - * - *
-   * *Optional* A list of strings containing words and phrases "hints" so that
-   * the speech recognition is more likely to recognize them. This can be used
-   * to improve the accuracy for specific words and phrases, for example, if
-   * specific commands are typically spoken by the user. This can also be used
-   * to add additional words to the vocabulary of the recognizer. See
-   * [usage limits](https://cloud.google.com/speech/limits#content).
-   * 
- * - * repeated string phrases = 1; - */ - public com.google.protobuf.ProtocolStringList getPhrasesList() { - return phrases_; - } - /** - * - * - *
-   * *Optional* A list of strings containing words and phrases "hints" so that
-   * the speech recognition is more likely to recognize them. This can be used
-   * to improve the accuracy for specific words and phrases, for example, if
-   * specific commands are typically spoken by the user. This can also be used
-   * to add additional words to the vocabulary of the recognizer. See
-   * [usage limits](https://cloud.google.com/speech/limits#content).
-   * 
- * - * repeated string phrases = 1; - */ - public int getPhrasesCount() { - return phrases_.size(); - } - /** - * - * - *
-   * *Optional* A list of strings containing words and phrases "hints" so that
-   * the speech recognition is more likely to recognize them. This can be used
-   * to improve the accuracy for specific words and phrases, for example, if
-   * specific commands are typically spoken by the user. This can also be used
-   * to add additional words to the vocabulary of the recognizer. See
-   * [usage limits](https://cloud.google.com/speech/limits#content).
-   * 
- * - * repeated string phrases = 1; - */ - public java.lang.String getPhrases(int index) { - return phrases_.get(index); - } - /** - * - * - *
-   * *Optional* A list of strings containing words and phrases "hints" so that
-   * the speech recognition is more likely to recognize them. This can be used
-   * to improve the accuracy for specific words and phrases, for example, if
-   * specific commands are typically spoken by the user. This can also be used
-   * to add additional words to the vocabulary of the recognizer. See
-   * [usage limits](https://cloud.google.com/speech/limits#content).
-   * 
- * - * repeated string phrases = 1; - */ - public com.google.protobuf.ByteString getPhrasesBytes(int index) { - return phrases_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < phrases_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, phrases_.getRaw(i)); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < phrases_.size(); i++) { - dataSize += computeStringSizeNoTag(phrases_.getRaw(i)); - } - size += dataSize; - size += 1 * getPhrasesList().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.speech.v1beta1.SpeechContext)) { - return super.equals(obj); - } - com.google.cloud.speech.v1beta1.SpeechContext other = - (com.google.cloud.speech.v1beta1.SpeechContext) obj; - - boolean result = true; - result = result && getPhrasesList().equals(other.getPhrasesList()); - result = result && unknownFields.equals(other.unknownFields); - return result; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getPhrasesCount() > 0) { - hash = (37 * hash) + PHRASES_FIELD_NUMBER; - hash = (53 * hash) + getPhrasesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.speech.v1beta1.SpeechContext parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.speech.v1beta1.SpeechContext parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.SpeechContext parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.speech.v1beta1.SpeechContext parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.SpeechContext parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.speech.v1beta1.SpeechContext parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.SpeechContext parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.speech.v1beta1.SpeechContext parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.SpeechContext parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.speech.v1beta1.SpeechContext parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.SpeechContext parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.speech.v1beta1.SpeechContext parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.speech.v1beta1.SpeechContext prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Provides "hints" to the speech recognizer to favor specific words and phrases
-   * in the results.
-   * 
- * - * Protobuf type {@code google.cloud.speech.v1beta1.SpeechContext} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.speech.v1beta1.SpeechContext) - com.google.cloud.speech.v1beta1.SpeechContextOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_SpeechContext_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_SpeechContext_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.speech.v1beta1.SpeechContext.class, - com.google.cloud.speech.v1beta1.SpeechContext.Builder.class); - } - - // Construct using com.google.cloud.speech.v1beta1.SpeechContext.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - public Builder clear() { - super.clear(); - phrases_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_SpeechContext_descriptor; - } - - public com.google.cloud.speech.v1beta1.SpeechContext getDefaultInstanceForType() { - return com.google.cloud.speech.v1beta1.SpeechContext.getDefaultInstance(); - } - - public com.google.cloud.speech.v1beta1.SpeechContext build() { - com.google.cloud.speech.v1beta1.SpeechContext result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.cloud.speech.v1beta1.SpeechContext buildPartial() { - com.google.cloud.speech.v1beta1.SpeechContext result = - new com.google.cloud.speech.v1beta1.SpeechContext(this); - int from_bitField0_ = bitField0_; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - phrases_ = phrases_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.phrases_ = phrases_; - onBuilt(); - return result; - } - - public Builder clone() { - return (Builder) super.clone(); - } - - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); - } - - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); - } - - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); - } - - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); - } - - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.speech.v1beta1.SpeechContext) { - return mergeFrom((com.google.cloud.speech.v1beta1.SpeechContext) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.speech.v1beta1.SpeechContext other) { - if (other == com.google.cloud.speech.v1beta1.SpeechContext.getDefaultInstance()) return this; - if (!other.phrases_.isEmpty()) { - if (phrases_.isEmpty()) { - phrases_ = other.phrases_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensurePhrasesIsMutable(); - phrases_.addAll(other.phrases_); - } - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.speech.v1beta1.SpeechContext parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.speech.v1beta1.SpeechContext) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private com.google.protobuf.LazyStringList phrases_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensurePhrasesIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - phrases_ = new com.google.protobuf.LazyStringArrayList(phrases_); - bitField0_ |= 0x00000001; - } - } - /** - * - * - *
-     * *Optional* A list of strings containing words and phrases "hints" so that
-     * the speech recognition is more likely to recognize them. This can be used
-     * to improve the accuracy for specific words and phrases, for example, if
-     * specific commands are typically spoken by the user. This can also be used
-     * to add additional words to the vocabulary of the recognizer. See
-     * [usage limits](https://cloud.google.com/speech/limits#content).
-     * 
- * - * repeated string phrases = 1; - */ - public com.google.protobuf.ProtocolStringList getPhrasesList() { - return phrases_.getUnmodifiableView(); - } - /** - * - * - *
-     * *Optional* A list of strings containing words and phrases "hints" so that
-     * the speech recognition is more likely to recognize them. This can be used
-     * to improve the accuracy for specific words and phrases, for example, if
-     * specific commands are typically spoken by the user. This can also be used
-     * to add additional words to the vocabulary of the recognizer. See
-     * [usage limits](https://cloud.google.com/speech/limits#content).
-     * 
- * - * repeated string phrases = 1; - */ - public int getPhrasesCount() { - return phrases_.size(); - } - /** - * - * - *
-     * *Optional* A list of strings containing words and phrases "hints" so that
-     * the speech recognition is more likely to recognize them. This can be used
-     * to improve the accuracy for specific words and phrases, for example, if
-     * specific commands are typically spoken by the user. This can also be used
-     * to add additional words to the vocabulary of the recognizer. See
-     * [usage limits](https://cloud.google.com/speech/limits#content).
-     * 
- * - * repeated string phrases = 1; - */ - public java.lang.String getPhrases(int index) { - return phrases_.get(index); - } - /** - * - * - *
-     * *Optional* A list of strings containing words and phrases "hints" so that
-     * the speech recognition is more likely to recognize them. This can be used
-     * to improve the accuracy for specific words and phrases, for example, if
-     * specific commands are typically spoken by the user. This can also be used
-     * to add additional words to the vocabulary of the recognizer. See
-     * [usage limits](https://cloud.google.com/speech/limits#content).
-     * 
- * - * repeated string phrases = 1; - */ - public com.google.protobuf.ByteString getPhrasesBytes(int index) { - return phrases_.getByteString(index); - } - /** - * - * - *
-     * *Optional* A list of strings containing words and phrases "hints" so that
-     * the speech recognition is more likely to recognize them. This can be used
-     * to improve the accuracy for specific words and phrases, for example, if
-     * specific commands are typically spoken by the user. This can also be used
-     * to add additional words to the vocabulary of the recognizer. See
-     * [usage limits](https://cloud.google.com/speech/limits#content).
-     * 
- * - * repeated string phrases = 1; - */ - public Builder setPhrases(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensurePhrasesIsMutable(); - phrases_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * *Optional* A list of strings containing words and phrases "hints" so that
-     * the speech recognition is more likely to recognize them. This can be used
-     * to improve the accuracy for specific words and phrases, for example, if
-     * specific commands are typically spoken by the user. This can also be used
-     * to add additional words to the vocabulary of the recognizer. See
-     * [usage limits](https://cloud.google.com/speech/limits#content).
-     * 
- * - * repeated string phrases = 1; - */ - public Builder addPhrases(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensurePhrasesIsMutable(); - phrases_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * *Optional* A list of strings containing words and phrases "hints" so that
-     * the speech recognition is more likely to recognize them. This can be used
-     * to improve the accuracy for specific words and phrases, for example, if
-     * specific commands are typically spoken by the user. This can also be used
-     * to add additional words to the vocabulary of the recognizer. See
-     * [usage limits](https://cloud.google.com/speech/limits#content).
-     * 
- * - * repeated string phrases = 1; - */ - public Builder addAllPhrases(java.lang.Iterable values) { - ensurePhrasesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, phrases_); - onChanged(); - return this; - } - /** - * - * - *
-     * *Optional* A list of strings containing words and phrases "hints" so that
-     * the speech recognition is more likely to recognize them. This can be used
-     * to improve the accuracy for specific words and phrases, for example, if
-     * specific commands are typically spoken by the user. This can also be used
-     * to add additional words to the vocabulary of the recognizer. See
-     * [usage limits](https://cloud.google.com/speech/limits#content).
-     * 
- * - * repeated string phrases = 1; - */ - public Builder clearPhrases() { - phrases_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * *Optional* A list of strings containing words and phrases "hints" so that
-     * the speech recognition is more likely to recognize them. This can be used
-     * to improve the accuracy for specific words and phrases, for example, if
-     * specific commands are typically spoken by the user. This can also be used
-     * to add additional words to the vocabulary of the recognizer. See
-     * [usage limits](https://cloud.google.com/speech/limits#content).
-     * 
- * - * repeated string phrases = 1; - */ - public Builder addPhrasesBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensurePhrasesIsMutable(); - phrases_.add(value); - onChanged(); - return this; - } - - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.speech.v1beta1.SpeechContext) - } - - // @@protoc_insertion_point(class_scope:google.cloud.speech.v1beta1.SpeechContext) - private static final com.google.cloud.speech.v1beta1.SpeechContext DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.speech.v1beta1.SpeechContext(); - } - - public static com.google.cloud.speech.v1beta1.SpeechContext getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public SpeechContext parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new SpeechContext(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.cloud.speech.v1beta1.SpeechContext getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/SpeechContextOrBuilder.java b/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/SpeechContextOrBuilder.java deleted file mode 100644 index c1f860a3a711..000000000000 --- a/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/SpeechContextOrBuilder.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/speech/v1beta1/cloud_speech.proto - -package com.google.cloud.speech.v1beta1; - -public interface SpeechContextOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.speech.v1beta1.SpeechContext) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * *Optional* A list of strings containing words and phrases "hints" so that
-   * the speech recognition is more likely to recognize them. This can be used
-   * to improve the accuracy for specific words and phrases, for example, if
-   * specific commands are typically spoken by the user. This can also be used
-   * to add additional words to the vocabulary of the recognizer. See
-   * [usage limits](https://cloud.google.com/speech/limits#content).
-   * 
- * - * repeated string phrases = 1; - */ - java.util.List getPhrasesList(); - /** - * - * - *
-   * *Optional* A list of strings containing words and phrases "hints" so that
-   * the speech recognition is more likely to recognize them. This can be used
-   * to improve the accuracy for specific words and phrases, for example, if
-   * specific commands are typically spoken by the user. This can also be used
-   * to add additional words to the vocabulary of the recognizer. See
-   * [usage limits](https://cloud.google.com/speech/limits#content).
-   * 
- * - * repeated string phrases = 1; - */ - int getPhrasesCount(); - /** - * - * - *
-   * *Optional* A list of strings containing words and phrases "hints" so that
-   * the speech recognition is more likely to recognize them. This can be used
-   * to improve the accuracy for specific words and phrases, for example, if
-   * specific commands are typically spoken by the user. This can also be used
-   * to add additional words to the vocabulary of the recognizer. See
-   * [usage limits](https://cloud.google.com/speech/limits#content).
-   * 
- * - * repeated string phrases = 1; - */ - java.lang.String getPhrases(int index); - /** - * - * - *
-   * *Optional* A list of strings containing words and phrases "hints" so that
-   * the speech recognition is more likely to recognize them. This can be used
-   * to improve the accuracy for specific words and phrases, for example, if
-   * specific commands are typically spoken by the user. This can also be used
-   * to add additional words to the vocabulary of the recognizer. See
-   * [usage limits](https://cloud.google.com/speech/limits#content).
-   * 
- * - * repeated string phrases = 1; - */ - com.google.protobuf.ByteString getPhrasesBytes(int index); -} diff --git a/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/SpeechProto.java b/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/SpeechProto.java deleted file mode 100644 index b2ebc23262a3..000000000000 --- a/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/SpeechProto.java +++ /dev/null @@ -1,319 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/speech/v1beta1/cloud_speech.proto - -package com.google.cloud.speech.v1beta1; - -public final class SpeechProto { - private SpeechProto() {} - - 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_speech_v1beta1_SyncRecognizeRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_speech_v1beta1_SyncRecognizeRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_speech_v1beta1_AsyncRecognizeRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_speech_v1beta1_AsyncRecognizeRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_speech_v1beta1_StreamingRecognizeRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_speech_v1beta1_StreamingRecognizeRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_speech_v1beta1_StreamingRecognitionConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_speech_v1beta1_StreamingRecognitionConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_speech_v1beta1_RecognitionConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_speech_v1beta1_RecognitionConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_speech_v1beta1_SpeechContext_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_speech_v1beta1_SpeechContext_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_speech_v1beta1_RecognitionAudio_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_speech_v1beta1_RecognitionAudio_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_speech_v1beta1_SyncRecognizeResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_speech_v1beta1_SyncRecognizeResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_speech_v1beta1_AsyncRecognizeResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_speech_v1beta1_AsyncRecognizeResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_speech_v1beta1_AsyncRecognizeMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_speech_v1beta1_AsyncRecognizeMetadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_speech_v1beta1_StreamingRecognizeResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_speech_v1beta1_StreamingRecognizeResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_speech_v1beta1_StreamingRecognitionResult_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_speech_v1beta1_StreamingRecognitionResult_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_speech_v1beta1_SpeechRecognitionResult_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_speech_v1beta1_SpeechRecognitionResult_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_speech_v1beta1_SpeechRecognitionAlternative_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_speech_v1beta1_SpeechRecognitionAlternative_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/speech/v1beta1/cloud_spee" - + "ch.proto\022\033google.cloud.speech.v1beta1\032\034g" - + "oogle/api/annotations.proto\032#google/long" - + "running/operations.proto\032\036google/protobu" - + "f/duration.proto\032\037google/protobuf/timest" - + "amp.proto\032\027google/rpc/status.proto\"\224\001\n\024S" - + "yncRecognizeRequest\022>\n\006config\030\001 \001(\0132..go" - + "ogle.cloud.speech.v1beta1.RecognitionCon" - + "fig\022<\n\005audio\030\002 \001(\0132-.google.cloud.speech" - + ".v1beta1.RecognitionAudio\"\225\001\n\025AsyncRecog" - + "nizeRequest\022>\n\006config\030\001 \001(\0132..google.clo" - + "ud.speech.v1beta1.RecognitionConfig\022<\n\005a" - + "udio\030\002 \001(\0132-.google.cloud.speech.v1beta1" - + ".RecognitionAudio\"\236\001\n\031StreamingRecognize" - + "Request\022S\n\020streaming_config\030\001 \001(\01327.goog" - + "le.cloud.speech.v1beta1.StreamingRecogni" - + "tionConfigH\000\022\027\n\raudio_content\030\002 \001(\014H\000B\023\n" - + "\021streaming_request\"\217\001\n\032StreamingRecognit" - + "ionConfig\022>\n\006config\030\001 \001(\0132..google.cloud" - + ".speech.v1beta1.RecognitionConfig\022\030\n\020sin" - + "gle_utterance\030\002 \001(\010\022\027\n\017interim_results\030\003" - + " \001(\010\"\352\002\n\021RecognitionConfig\022N\n\010encoding\030\001" - + " \001(\0162<.google.cloud.speech.v1beta1.Recog" - + "nitionConfig.AudioEncoding\022\023\n\013sample_rat" - + "e\030\002 \001(\005\022\025\n\rlanguage_code\030\003 \001(\t\022\030\n\020max_al" - + "ternatives\030\004 \001(\005\022\030\n\020profanity_filter\030\005 \001" - + "(\010\022B\n\016speech_context\030\006 \001(\0132*.google.clou" - + "d.speech.v1beta1.SpeechContext\"a\n\rAudioE" - + "ncoding\022\030\n\024ENCODING_UNSPECIFIED\020\000\022\014\n\010LIN" - + "EAR16\020\001\022\010\n\004FLAC\020\002\022\t\n\005MULAW\020\003\022\007\n\003AMR\020\004\022\n\n" - + "\006AMR_WB\020\005\" \n\rSpeechContext\022\017\n\007phrases\030\001 " - + "\003(\t\"D\n\020RecognitionAudio\022\021\n\007content\030\001 \001(\014" - + "H\000\022\r\n\003uri\030\002 \001(\tH\000B\016\n\014audio_source\"^\n\025Syn" - + "cRecognizeResponse\022E\n\007results\030\002 \003(\01324.go" - + "ogle.cloud.speech.v1beta1.SpeechRecognit" - + "ionResult\"_\n\026AsyncRecognizeResponse\022E\n\007r" - + "esults\030\002 \003(\01324.google.cloud.speech.v1bet" - + "a1.SpeechRecognitionResult\"\230\001\n\026AsyncReco" - + "gnizeMetadata\022\030\n\020progress_percent\030\001 \001(\005\022" - + ".\n\nstart_time\030\002 \001(\0132\032.google.protobuf.Ti" - + "mestamp\0224\n\020last_update_time\030\003 \001(\0132\032.goog" - + "le.protobuf.Timestamp\"\205\003\n\032StreamingRecog" - + "nizeResponse\022!\n\005error\030\001 \001(\0132\022.google.rpc" - + ".Status\022H\n\007results\030\002 \003(\01327.google.cloud." - + "speech.v1beta1.StreamingRecognitionResul" - + "t\022\024\n\014result_index\030\003 \001(\005\022_\n\017endpointer_ty" - + "pe\030\004 \001(\0162F.google.cloud.speech.v1beta1.S" - + "treamingRecognizeResponse.EndpointerType" - + "\"\202\001\n\016EndpointerType\022 \n\034ENDPOINTER_EVENT_" - + "UNSPECIFIED\020\000\022\023\n\017START_OF_SPEECH\020\001\022\021\n\rEN" - + "D_OF_SPEECH\020\002\022\020\n\014END_OF_AUDIO\020\003\022\024\n\020END_O" - + "F_UTTERANCE\020\004\"\222\001\n\032StreamingRecognitionRe" - + "sult\022O\n\014alternatives\030\001 \003(\01329.google.clou" - + "d.speech.v1beta1.SpeechRecognitionAltern" - + "ative\022\020\n\010is_final\030\002 \001(\010\022\021\n\tstability\030\003 \001" - + "(\002\"j\n\027SpeechRecognitionResult\022O\n\014alterna" - + "tives\030\001 \003(\01329.google.cloud.speech.v1beta" - + "1.SpeechRecognitionAlternative\"F\n\034Speech" - + "RecognitionAlternative\022\022\n\ntranscript\030\001 \001" - + "(\t\022\022\n\nconfidence\030\002 \001(\0022\310\003\n\006Speech\022\240\001\n\rSy" - + "ncRecognize\0221.google.cloud.speech.v1beta" - + "1.SyncRecognizeRequest\0322.google.cloud.sp" - + "eech.v1beta1.SyncRecognizeResponse\"(\202\323\344\223" - + "\002\"\"\035/v1beta1/speech:syncrecognize:\001*\022\216\001\n" - + "\016AsyncRecognize\0222.google.cloud.speech.v1" - + "beta1.AsyncRecognizeRequest\032\035.google.lon" - + "grunning.Operation\")\202\323\344\223\002#\"\036/v1beta1/spe" - + "ech:asyncrecognize:\001*\022\211\001\n\022StreamingRecog" - + "nize\0226.google.cloud.speech.v1beta1.Strea" - + "mingRecognizeRequest\0327.google.cloud.spee" - + "ch.v1beta1.StreamingRecognizeResponse(\0010" - + "\001Bs\n\037com.google.cloud.speech.v1beta1B\013Sp" - + "eechProtoP\001ZAgoogle.golang.org/genproto/" - + "googleapis/cloud/speech/v1beta1;speechb\006" - + "proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), - com.google.longrunning.OperationsProto.getDescriptor(), - com.google.protobuf.DurationProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - com.google.rpc.StatusProto.getDescriptor(), - }, - assigner); - internal_static_google_cloud_speech_v1beta1_SyncRecognizeRequest_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_speech_v1beta1_SyncRecognizeRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_speech_v1beta1_SyncRecognizeRequest_descriptor, - new java.lang.String[] { - "Config", "Audio", - }); - internal_static_google_cloud_speech_v1beta1_AsyncRecognizeRequest_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_speech_v1beta1_AsyncRecognizeRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_speech_v1beta1_AsyncRecognizeRequest_descriptor, - new java.lang.String[] { - "Config", "Audio", - }); - internal_static_google_cloud_speech_v1beta1_StreamingRecognizeRequest_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_speech_v1beta1_StreamingRecognizeRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_speech_v1beta1_StreamingRecognizeRequest_descriptor, - new java.lang.String[] { - "StreamingConfig", "AudioContent", "StreamingRequest", - }); - internal_static_google_cloud_speech_v1beta1_StreamingRecognitionConfig_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_cloud_speech_v1beta1_StreamingRecognitionConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_speech_v1beta1_StreamingRecognitionConfig_descriptor, - new java.lang.String[] { - "Config", "SingleUtterance", "InterimResults", - }); - internal_static_google_cloud_speech_v1beta1_RecognitionConfig_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_google_cloud_speech_v1beta1_RecognitionConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_speech_v1beta1_RecognitionConfig_descriptor, - new java.lang.String[] { - "Encoding", - "SampleRate", - "LanguageCode", - "MaxAlternatives", - "ProfanityFilter", - "SpeechContext", - }); - internal_static_google_cloud_speech_v1beta1_SpeechContext_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_google_cloud_speech_v1beta1_SpeechContext_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_speech_v1beta1_SpeechContext_descriptor, - new java.lang.String[] { - "Phrases", - }); - internal_static_google_cloud_speech_v1beta1_RecognitionAudio_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_google_cloud_speech_v1beta1_RecognitionAudio_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_speech_v1beta1_RecognitionAudio_descriptor, - new java.lang.String[] { - "Content", "Uri", "AudioSource", - }); - internal_static_google_cloud_speech_v1beta1_SyncRecognizeResponse_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_google_cloud_speech_v1beta1_SyncRecognizeResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_speech_v1beta1_SyncRecognizeResponse_descriptor, - new java.lang.String[] { - "Results", - }); - internal_static_google_cloud_speech_v1beta1_AsyncRecognizeResponse_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_google_cloud_speech_v1beta1_AsyncRecognizeResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_speech_v1beta1_AsyncRecognizeResponse_descriptor, - new java.lang.String[] { - "Results", - }); - internal_static_google_cloud_speech_v1beta1_AsyncRecognizeMetadata_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_google_cloud_speech_v1beta1_AsyncRecognizeMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_speech_v1beta1_AsyncRecognizeMetadata_descriptor, - new java.lang.String[] { - "ProgressPercent", "StartTime", "LastUpdateTime", - }); - internal_static_google_cloud_speech_v1beta1_StreamingRecognizeResponse_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_google_cloud_speech_v1beta1_StreamingRecognizeResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_speech_v1beta1_StreamingRecognizeResponse_descriptor, - new java.lang.String[] { - "Error", "Results", "ResultIndex", "EndpointerType", - }); - internal_static_google_cloud_speech_v1beta1_StreamingRecognitionResult_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_google_cloud_speech_v1beta1_StreamingRecognitionResult_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_speech_v1beta1_StreamingRecognitionResult_descriptor, - new java.lang.String[] { - "Alternatives", "IsFinal", "Stability", - }); - internal_static_google_cloud_speech_v1beta1_SpeechRecognitionResult_descriptor = - getDescriptor().getMessageTypes().get(12); - internal_static_google_cloud_speech_v1beta1_SpeechRecognitionResult_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_speech_v1beta1_SpeechRecognitionResult_descriptor, - new java.lang.String[] { - "Alternatives", - }); - internal_static_google_cloud_speech_v1beta1_SpeechRecognitionAlternative_descriptor = - getDescriptor().getMessageTypes().get(13); - internal_static_google_cloud_speech_v1beta1_SpeechRecognitionAlternative_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_speech_v1beta1_SpeechRecognitionAlternative_descriptor, - new java.lang.String[] { - "Transcript", "Confidence", - }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.AnnotationsProto.http); - com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( - descriptor, registry); - com.google.api.AnnotationsProto.getDescriptor(); - com.google.longrunning.OperationsProto.getDescriptor(); - com.google.protobuf.DurationProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - com.google.rpc.StatusProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/SpeechRecognitionAlternative.java b/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/SpeechRecognitionAlternative.java deleted file mode 100644 index 099a59907bc8..000000000000 --- a/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/SpeechRecognitionAlternative.java +++ /dev/null @@ -1,700 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/speech/v1beta1/cloud_speech.proto - -package com.google.cloud.speech.v1beta1; - -/** - * - * - *
- * Alternative hypotheses (a.k.a. n-best list).
- * 
- * - * Protobuf type {@code google.cloud.speech.v1beta1.SpeechRecognitionAlternative} - */ -public final class SpeechRecognitionAlternative extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.speech.v1beta1.SpeechRecognitionAlternative) - SpeechRecognitionAlternativeOrBuilder { - private static final long serialVersionUID = 0L; - // Use SpeechRecognitionAlternative.newBuilder() to construct. - private SpeechRecognitionAlternative(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private SpeechRecognitionAlternative() { - transcript_ = ""; - confidence_ = 0F; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private SpeechRecognitionAlternative( - 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; - default: - { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - transcript_ = s; - break; - } - case 21: - { - confidence_ = input.readFloat(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_SpeechRecognitionAlternative_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_SpeechRecognitionAlternative_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative.class, - com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative.Builder.class); - } - - public static final int TRANSCRIPT_FIELD_NUMBER = 1; - private volatile java.lang.Object transcript_; - /** - * - * - *
-   * *Output-only* Transcript text representing the words that the user spoke.
-   * 
- * - * string transcript = 1; - */ - public java.lang.String getTranscript() { - java.lang.Object ref = transcript_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - transcript_ = s; - return s; - } - } - /** - * - * - *
-   * *Output-only* Transcript text representing the words that the user spoke.
-   * 
- * - * string transcript = 1; - */ - public com.google.protobuf.ByteString getTranscriptBytes() { - java.lang.Object ref = transcript_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - transcript_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CONFIDENCE_FIELD_NUMBER = 2; - private float confidence_; - /** - * - * - *
-   * *Output-only* The confidence estimate between 0.0 and 1.0. A higher number
-   * indicates an estimated greater likelihood that the recognized words are
-   * correct. This field is typically provided only for the top hypothesis, and
-   * only for `is_final=true` results. Clients should not rely on the
-   * `confidence` field as it is not guaranteed to be accurate, or even set, in
-   * any of the results.
-   * The default of 0.0 is a sentinel value indicating `confidence` was not set.
-   * 
- * - * float confidence = 2; - */ - public float getConfidence() { - return confidence_; - } - - private byte memoizedIsInitialized = -1; - - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getTranscriptBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, transcript_); - } - if (confidence_ != 0F) { - output.writeFloat(2, confidence_); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getTranscriptBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, transcript_); - } - if (confidence_ != 0F) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, confidence_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative)) { - return super.equals(obj); - } - com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative other = - (com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative) obj; - - boolean result = true; - result = result && getTranscript().equals(other.getTranscript()); - result = - result - && (java.lang.Float.floatToIntBits(getConfidence()) - == java.lang.Float.floatToIntBits(other.getConfidence())); - result = result && unknownFields.equals(other.unknownFields); - return result; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + TRANSCRIPT_FIELD_NUMBER; - hash = (53 * hash) + getTranscript().hashCode(); - hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getConfidence()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Alternative hypotheses (a.k.a. n-best list).
-   * 
- * - * Protobuf type {@code google.cloud.speech.v1beta1.SpeechRecognitionAlternative} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.speech.v1beta1.SpeechRecognitionAlternative) - com.google.cloud.speech.v1beta1.SpeechRecognitionAlternativeOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_SpeechRecognitionAlternative_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_SpeechRecognitionAlternative_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative.class, - com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative.Builder.class); - } - - // Construct using com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - public Builder clear() { - super.clear(); - transcript_ = ""; - - confidence_ = 0F; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_SpeechRecognitionAlternative_descriptor; - } - - public com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative - getDefaultInstanceForType() { - return com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative.getDefaultInstance(); - } - - public com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative build() { - com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative buildPartial() { - com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative result = - new com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative(this); - result.transcript_ = transcript_; - result.confidence_ = confidence_; - onBuilt(); - return result; - } - - public Builder clone() { - return (Builder) super.clone(); - } - - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); - } - - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); - } - - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); - } - - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); - } - - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative) { - return mergeFrom((com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative other) { - if (other - == com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative.getDefaultInstance()) - return this; - if (!other.getTranscript().isEmpty()) { - transcript_ = other.transcript_; - onChanged(); - } - if (other.getConfidence() != 0F) { - setConfidence(other.getConfidence()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object transcript_ = ""; - /** - * - * - *
-     * *Output-only* Transcript text representing the words that the user spoke.
-     * 
- * - * string transcript = 1; - */ - public java.lang.String getTranscript() { - java.lang.Object ref = transcript_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - transcript_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * *Output-only* Transcript text representing the words that the user spoke.
-     * 
- * - * string transcript = 1; - */ - public com.google.protobuf.ByteString getTranscriptBytes() { - java.lang.Object ref = transcript_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - transcript_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * *Output-only* Transcript text representing the words that the user spoke.
-     * 
- * - * string transcript = 1; - */ - public Builder setTranscript(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - transcript_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * *Output-only* Transcript text representing the words that the user spoke.
-     * 
- * - * string transcript = 1; - */ - public Builder clearTranscript() { - - transcript_ = getDefaultInstance().getTranscript(); - onChanged(); - return this; - } - /** - * - * - *
-     * *Output-only* Transcript text representing the words that the user spoke.
-     * 
- * - * string transcript = 1; - */ - public Builder setTranscriptBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - transcript_ = value; - onChanged(); - return this; - } - - private float confidence_; - /** - * - * - *
-     * *Output-only* The confidence estimate between 0.0 and 1.0. A higher number
-     * indicates an estimated greater likelihood that the recognized words are
-     * correct. This field is typically provided only for the top hypothesis, and
-     * only for `is_final=true` results. Clients should not rely on the
-     * `confidence` field as it is not guaranteed to be accurate, or even set, in
-     * any of the results.
-     * The default of 0.0 is a sentinel value indicating `confidence` was not set.
-     * 
- * - * float confidence = 2; - */ - public float getConfidence() { - return confidence_; - } - /** - * - * - *
-     * *Output-only* The confidence estimate between 0.0 and 1.0. A higher number
-     * indicates an estimated greater likelihood that the recognized words are
-     * correct. This field is typically provided only for the top hypothesis, and
-     * only for `is_final=true` results. Clients should not rely on the
-     * `confidence` field as it is not guaranteed to be accurate, or even set, in
-     * any of the results.
-     * The default of 0.0 is a sentinel value indicating `confidence` was not set.
-     * 
- * - * float confidence = 2; - */ - public Builder setConfidence(float value) { - - confidence_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * *Output-only* The confidence estimate between 0.0 and 1.0. A higher number
-     * indicates an estimated greater likelihood that the recognized words are
-     * correct. This field is typically provided only for the top hypothesis, and
-     * only for `is_final=true` results. Clients should not rely on the
-     * `confidence` field as it is not guaranteed to be accurate, or even set, in
-     * any of the results.
-     * The default of 0.0 is a sentinel value indicating `confidence` was not set.
-     * 
- * - * float confidence = 2; - */ - public Builder clearConfidence() { - - confidence_ = 0F; - onChanged(); - return this; - } - - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.speech.v1beta1.SpeechRecognitionAlternative) - } - - // @@protoc_insertion_point(class_scope:google.cloud.speech.v1beta1.SpeechRecognitionAlternative) - private static final com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative(); - } - - public static com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public SpeechRecognitionAlternative parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new SpeechRecognitionAlternative(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/SpeechRecognitionAlternativeOrBuilder.java b/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/SpeechRecognitionAlternativeOrBuilder.java deleted file mode 100644 index 69303ffcbc0b..000000000000 --- a/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/SpeechRecognitionAlternativeOrBuilder.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/speech/v1beta1/cloud_speech.proto - -package com.google.cloud.speech.v1beta1; - -public interface SpeechRecognitionAlternativeOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.speech.v1beta1.SpeechRecognitionAlternative) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * *Output-only* Transcript text representing the words that the user spoke.
-   * 
- * - * string transcript = 1; - */ - java.lang.String getTranscript(); - /** - * - * - *
-   * *Output-only* Transcript text representing the words that the user spoke.
-   * 
- * - * string transcript = 1; - */ - com.google.protobuf.ByteString getTranscriptBytes(); - - /** - * - * - *
-   * *Output-only* The confidence estimate between 0.0 and 1.0. A higher number
-   * indicates an estimated greater likelihood that the recognized words are
-   * correct. This field is typically provided only for the top hypothesis, and
-   * only for `is_final=true` results. Clients should not rely on the
-   * `confidence` field as it is not guaranteed to be accurate, or even set, in
-   * any of the results.
-   * The default of 0.0 is a sentinel value indicating `confidence` was not set.
-   * 
- * - * float confidence = 2; - */ - float getConfidence(); -} diff --git a/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/SpeechRecognitionResult.java b/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/SpeechRecognitionResult.java deleted file mode 100644 index ebc1e51d8034..000000000000 --- a/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/SpeechRecognitionResult.java +++ /dev/null @@ -1,989 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/speech/v1beta1/cloud_speech.proto - -package com.google.cloud.speech.v1beta1; - -/** - * - * - *
- * A speech recognition result corresponding to a portion of the audio.
- * 
- * - * Protobuf type {@code google.cloud.speech.v1beta1.SpeechRecognitionResult} - */ -public final class SpeechRecognitionResult extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.speech.v1beta1.SpeechRecognitionResult) - SpeechRecognitionResultOrBuilder { - private static final long serialVersionUID = 0L; - // Use SpeechRecognitionResult.newBuilder() to construct. - private SpeechRecognitionResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private SpeechRecognitionResult() { - alternatives_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private SpeechRecognitionResult( - 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; - default: - { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - alternatives_ = - new java.util.ArrayList< - com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative>(); - mutable_bitField0_ |= 0x00000001; - } - alternatives_.add( - input.readMessage( - com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative.parser(), - extensionRegistry)); - break; - } - } - } - } catch (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) == 0x00000001)) { - alternatives_ = java.util.Collections.unmodifiableList(alternatives_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_SpeechRecognitionResult_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_SpeechRecognitionResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.speech.v1beta1.SpeechRecognitionResult.class, - com.google.cloud.speech.v1beta1.SpeechRecognitionResult.Builder.class); - } - - public static final int ALTERNATIVES_FIELD_NUMBER = 1; - private java.util.List - alternatives_; - /** - * - * - *
-   * *Output-only* May contain one or more recognition hypotheses (up to the
-   * maximum specified in `max_alternatives`).
-   * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1; - * - */ - public java.util.List - getAlternativesList() { - return alternatives_; - } - /** - * - * - *
-   * *Output-only* May contain one or more recognition hypotheses (up to the
-   * maximum specified in `max_alternatives`).
-   * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1; - * - */ - public java.util.List< - ? extends com.google.cloud.speech.v1beta1.SpeechRecognitionAlternativeOrBuilder> - getAlternativesOrBuilderList() { - return alternatives_; - } - /** - * - * - *
-   * *Output-only* May contain one or more recognition hypotheses (up to the
-   * maximum specified in `max_alternatives`).
-   * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1; - * - */ - public int getAlternativesCount() { - return alternatives_.size(); - } - /** - * - * - *
-   * *Output-only* May contain one or more recognition hypotheses (up to the
-   * maximum specified in `max_alternatives`).
-   * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1; - * - */ - public com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative getAlternatives(int index) { - return alternatives_.get(index); - } - /** - * - * - *
-   * *Output-only* May contain one or more recognition hypotheses (up to the
-   * maximum specified in `max_alternatives`).
-   * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1; - * - */ - public com.google.cloud.speech.v1beta1.SpeechRecognitionAlternativeOrBuilder - getAlternativesOrBuilder(int index) { - return alternatives_.get(index); - } - - private byte memoizedIsInitialized = -1; - - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < alternatives_.size(); i++) { - output.writeMessage(1, alternatives_.get(i)); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < alternatives_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, alternatives_.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.speech.v1beta1.SpeechRecognitionResult)) { - return super.equals(obj); - } - com.google.cloud.speech.v1beta1.SpeechRecognitionResult other = - (com.google.cloud.speech.v1beta1.SpeechRecognitionResult) obj; - - boolean result = true; - result = result && getAlternativesList().equals(other.getAlternativesList()); - result = result && unknownFields.equals(other.unknownFields); - return result; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getAlternativesCount() > 0) { - hash = (37 * hash) + ALTERNATIVES_FIELD_NUMBER; - hash = (53 * hash) + getAlternativesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.speech.v1beta1.SpeechRecognitionResult parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.speech.v1beta1.SpeechRecognitionResult parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.SpeechRecognitionResult parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.speech.v1beta1.SpeechRecognitionResult parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.SpeechRecognitionResult parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.speech.v1beta1.SpeechRecognitionResult parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.SpeechRecognitionResult parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.speech.v1beta1.SpeechRecognitionResult parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.SpeechRecognitionResult parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.speech.v1beta1.SpeechRecognitionResult parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.SpeechRecognitionResult parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.speech.v1beta1.SpeechRecognitionResult parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.speech.v1beta1.SpeechRecognitionResult prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 speech recognition result corresponding to a portion of the audio.
-   * 
- * - * Protobuf type {@code google.cloud.speech.v1beta1.SpeechRecognitionResult} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.speech.v1beta1.SpeechRecognitionResult) - com.google.cloud.speech.v1beta1.SpeechRecognitionResultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_SpeechRecognitionResult_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_SpeechRecognitionResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.speech.v1beta1.SpeechRecognitionResult.class, - com.google.cloud.speech.v1beta1.SpeechRecognitionResult.Builder.class); - } - - // Construct using com.google.cloud.speech.v1beta1.SpeechRecognitionResult.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getAlternativesFieldBuilder(); - } - } - - public Builder clear() { - super.clear(); - if (alternativesBuilder_ == null) { - alternatives_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - alternativesBuilder_.clear(); - } - return this; - } - - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_SpeechRecognitionResult_descriptor; - } - - public com.google.cloud.speech.v1beta1.SpeechRecognitionResult getDefaultInstanceForType() { - return com.google.cloud.speech.v1beta1.SpeechRecognitionResult.getDefaultInstance(); - } - - public com.google.cloud.speech.v1beta1.SpeechRecognitionResult build() { - com.google.cloud.speech.v1beta1.SpeechRecognitionResult result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.cloud.speech.v1beta1.SpeechRecognitionResult buildPartial() { - com.google.cloud.speech.v1beta1.SpeechRecognitionResult result = - new com.google.cloud.speech.v1beta1.SpeechRecognitionResult(this); - int from_bitField0_ = bitField0_; - if (alternativesBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - alternatives_ = java.util.Collections.unmodifiableList(alternatives_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.alternatives_ = alternatives_; - } else { - result.alternatives_ = alternativesBuilder_.build(); - } - onBuilt(); - return result; - } - - public Builder clone() { - return (Builder) super.clone(); - } - - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); - } - - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); - } - - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); - } - - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); - } - - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.speech.v1beta1.SpeechRecognitionResult) { - return mergeFrom((com.google.cloud.speech.v1beta1.SpeechRecognitionResult) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.speech.v1beta1.SpeechRecognitionResult other) { - if (other == com.google.cloud.speech.v1beta1.SpeechRecognitionResult.getDefaultInstance()) - return this; - if (alternativesBuilder_ == null) { - if (!other.alternatives_.isEmpty()) { - if (alternatives_.isEmpty()) { - alternatives_ = other.alternatives_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureAlternativesIsMutable(); - alternatives_.addAll(other.alternatives_); - } - onChanged(); - } - } else { - if (!other.alternatives_.isEmpty()) { - if (alternativesBuilder_.isEmpty()) { - alternativesBuilder_.dispose(); - alternativesBuilder_ = null; - alternatives_ = other.alternatives_; - bitField0_ = (bitField0_ & ~0x00000001); - alternativesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getAlternativesFieldBuilder() - : null; - } else { - alternativesBuilder_.addAllMessages(other.alternatives_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.speech.v1beta1.SpeechRecognitionResult parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.speech.v1beta1.SpeechRecognitionResult) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.util.List - alternatives_ = java.util.Collections.emptyList(); - - private void ensureAlternativesIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - alternatives_ = - new java.util.ArrayList( - alternatives_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative, - com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative.Builder, - com.google.cloud.speech.v1beta1.SpeechRecognitionAlternativeOrBuilder> - alternativesBuilder_; - - /** - * - * - *
-     * *Output-only* May contain one or more recognition hypotheses (up to the
-     * maximum specified in `max_alternatives`).
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1; - * - */ - public java.util.List - getAlternativesList() { - if (alternativesBuilder_ == null) { - return java.util.Collections.unmodifiableList(alternatives_); - } else { - return alternativesBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * *Output-only* May contain one or more recognition hypotheses (up to the
-     * maximum specified in `max_alternatives`).
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1; - * - */ - public int getAlternativesCount() { - if (alternativesBuilder_ == null) { - return alternatives_.size(); - } else { - return alternativesBuilder_.getCount(); - } - } - /** - * - * - *
-     * *Output-only* May contain one or more recognition hypotheses (up to the
-     * maximum specified in `max_alternatives`).
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1; - * - */ - public com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative getAlternatives(int index) { - if (alternativesBuilder_ == null) { - return alternatives_.get(index); - } else { - return alternativesBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * *Output-only* May contain one or more recognition hypotheses (up to the
-     * maximum specified in `max_alternatives`).
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1; - * - */ - public Builder setAlternatives( - int index, com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative value) { - if (alternativesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAlternativesIsMutable(); - alternatives_.set(index, value); - onChanged(); - } else { - alternativesBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * *Output-only* May contain one or more recognition hypotheses (up to the
-     * maximum specified in `max_alternatives`).
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1; - * - */ - public Builder setAlternatives( - int index, - com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative.Builder builderForValue) { - if (alternativesBuilder_ == null) { - ensureAlternativesIsMutable(); - alternatives_.set(index, builderForValue.build()); - onChanged(); - } else { - alternativesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * *Output-only* May contain one or more recognition hypotheses (up to the
-     * maximum specified in `max_alternatives`).
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1; - * - */ - public Builder addAlternatives( - com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative value) { - if (alternativesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAlternativesIsMutable(); - alternatives_.add(value); - onChanged(); - } else { - alternativesBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * *Output-only* May contain one or more recognition hypotheses (up to the
-     * maximum specified in `max_alternatives`).
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1; - * - */ - public Builder addAlternatives( - int index, com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative value) { - if (alternativesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAlternativesIsMutable(); - alternatives_.add(index, value); - onChanged(); - } else { - alternativesBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * *Output-only* May contain one or more recognition hypotheses (up to the
-     * maximum specified in `max_alternatives`).
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1; - * - */ - public Builder addAlternatives( - com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative.Builder builderForValue) { - if (alternativesBuilder_ == null) { - ensureAlternativesIsMutable(); - alternatives_.add(builderForValue.build()); - onChanged(); - } else { - alternativesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * *Output-only* May contain one or more recognition hypotheses (up to the
-     * maximum specified in `max_alternatives`).
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1; - * - */ - public Builder addAlternatives( - int index, - com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative.Builder builderForValue) { - if (alternativesBuilder_ == null) { - ensureAlternativesIsMutable(); - alternatives_.add(index, builderForValue.build()); - onChanged(); - } else { - alternativesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * *Output-only* May contain one or more recognition hypotheses (up to the
-     * maximum specified in `max_alternatives`).
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1; - * - */ - public Builder addAllAlternatives( - java.lang.Iterable - values) { - if (alternativesBuilder_ == null) { - ensureAlternativesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, alternatives_); - onChanged(); - } else { - alternativesBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * *Output-only* May contain one or more recognition hypotheses (up to the
-     * maximum specified in `max_alternatives`).
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1; - * - */ - public Builder clearAlternatives() { - if (alternativesBuilder_ == null) { - alternatives_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - alternativesBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * *Output-only* May contain one or more recognition hypotheses (up to the
-     * maximum specified in `max_alternatives`).
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1; - * - */ - public Builder removeAlternatives(int index) { - if (alternativesBuilder_ == null) { - ensureAlternativesIsMutable(); - alternatives_.remove(index); - onChanged(); - } else { - alternativesBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * *Output-only* May contain one or more recognition hypotheses (up to the
-     * maximum specified in `max_alternatives`).
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1; - * - */ - public com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative.Builder - getAlternativesBuilder(int index) { - return getAlternativesFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * *Output-only* May contain one or more recognition hypotheses (up to the
-     * maximum specified in `max_alternatives`).
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1; - * - */ - public com.google.cloud.speech.v1beta1.SpeechRecognitionAlternativeOrBuilder - getAlternativesOrBuilder(int index) { - if (alternativesBuilder_ == null) { - return alternatives_.get(index); - } else { - return alternativesBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * *Output-only* May contain one or more recognition hypotheses (up to the
-     * maximum specified in `max_alternatives`).
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1; - * - */ - public java.util.List< - ? extends com.google.cloud.speech.v1beta1.SpeechRecognitionAlternativeOrBuilder> - getAlternativesOrBuilderList() { - if (alternativesBuilder_ != null) { - return alternativesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(alternatives_); - } - } - /** - * - * - *
-     * *Output-only* May contain one or more recognition hypotheses (up to the
-     * maximum specified in `max_alternatives`).
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1; - * - */ - public com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative.Builder - addAlternativesBuilder() { - return getAlternativesFieldBuilder() - .addBuilder( - com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative.getDefaultInstance()); - } - /** - * - * - *
-     * *Output-only* May contain one or more recognition hypotheses (up to the
-     * maximum specified in `max_alternatives`).
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1; - * - */ - public com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative.Builder - addAlternativesBuilder(int index) { - return getAlternativesFieldBuilder() - .addBuilder( - index, - com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative.getDefaultInstance()); - } - /** - * - * - *
-     * *Output-only* May contain one or more recognition hypotheses (up to the
-     * maximum specified in `max_alternatives`).
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1; - * - */ - public java.util.List - getAlternativesBuilderList() { - return getAlternativesFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative, - com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative.Builder, - com.google.cloud.speech.v1beta1.SpeechRecognitionAlternativeOrBuilder> - getAlternativesFieldBuilder() { - if (alternativesBuilder_ == null) { - alternativesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative, - com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative.Builder, - com.google.cloud.speech.v1beta1.SpeechRecognitionAlternativeOrBuilder>( - alternatives_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); - alternatives_ = null; - } - return alternativesBuilder_; - } - - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.speech.v1beta1.SpeechRecognitionResult) - } - - // @@protoc_insertion_point(class_scope:google.cloud.speech.v1beta1.SpeechRecognitionResult) - private static final com.google.cloud.speech.v1beta1.SpeechRecognitionResult DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.speech.v1beta1.SpeechRecognitionResult(); - } - - public static com.google.cloud.speech.v1beta1.SpeechRecognitionResult getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public SpeechRecognitionResult parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new SpeechRecognitionResult(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.cloud.speech.v1beta1.SpeechRecognitionResult getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/SpeechRecognitionResultOrBuilder.java b/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/SpeechRecognitionResultOrBuilder.java deleted file mode 100644 index 4373456e1558..000000000000 --- a/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/SpeechRecognitionResultOrBuilder.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/speech/v1beta1/cloud_speech.proto - -package com.google.cloud.speech.v1beta1; - -public interface SpeechRecognitionResultOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.speech.v1beta1.SpeechRecognitionResult) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * *Output-only* May contain one or more recognition hypotheses (up to the
-   * maximum specified in `max_alternatives`).
-   * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1; - * - */ - java.util.List - getAlternativesList(); - /** - * - * - *
-   * *Output-only* May contain one or more recognition hypotheses (up to the
-   * maximum specified in `max_alternatives`).
-   * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1; - * - */ - com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative getAlternatives(int index); - /** - * - * - *
-   * *Output-only* May contain one or more recognition hypotheses (up to the
-   * maximum specified in `max_alternatives`).
-   * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1; - * - */ - int getAlternativesCount(); - /** - * - * - *
-   * *Output-only* May contain one or more recognition hypotheses (up to the
-   * maximum specified in `max_alternatives`).
-   * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1; - * - */ - java.util.List - getAlternativesOrBuilderList(); - /** - * - * - *
-   * *Output-only* May contain one or more recognition hypotheses (up to the
-   * maximum specified in `max_alternatives`).
-   * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1; - * - */ - com.google.cloud.speech.v1beta1.SpeechRecognitionAlternativeOrBuilder getAlternativesOrBuilder( - int index); -} diff --git a/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/StreamingRecognitionConfig.java b/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/StreamingRecognitionConfig.java deleted file mode 100644 index 50b8b87ce59f..000000000000 --- a/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/StreamingRecognitionConfig.java +++ /dev/null @@ -1,915 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/speech/v1beta1/cloud_speech.proto - -package com.google.cloud.speech.v1beta1; - -/** - * - * - *
- * Provides information to the recognizer that specifies how to process the
- * request.
- * 
- * - * Protobuf type {@code google.cloud.speech.v1beta1.StreamingRecognitionConfig} - */ -public final class StreamingRecognitionConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.speech.v1beta1.StreamingRecognitionConfig) - StreamingRecognitionConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use StreamingRecognitionConfig.newBuilder() to construct. - private StreamingRecognitionConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private StreamingRecognitionConfig() { - singleUtterance_ = false; - interimResults_ = false; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private StreamingRecognitionConfig( - 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; - default: - { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - case 10: - { - com.google.cloud.speech.v1beta1.RecognitionConfig.Builder subBuilder = null; - if (config_ != null) { - subBuilder = config_.toBuilder(); - } - config_ = - input.readMessage( - com.google.cloud.speech.v1beta1.RecognitionConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(config_); - config_ = subBuilder.buildPartial(); - } - - break; - } - case 16: - { - singleUtterance_ = input.readBool(); - break; - } - case 24: - { - interimResults_ = input.readBool(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_StreamingRecognitionConfig_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_StreamingRecognitionConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.speech.v1beta1.StreamingRecognitionConfig.class, - com.google.cloud.speech.v1beta1.StreamingRecognitionConfig.Builder.class); - } - - public static final int CONFIG_FIELD_NUMBER = 1; - private com.google.cloud.speech.v1beta1.RecognitionConfig config_; - /** - * - * - *
-   * *Required* Provides information to the recognizer that specifies how to
-   * process the request.
-   * 
- * - * .google.cloud.speech.v1beta1.RecognitionConfig config = 1; - */ - public boolean hasConfig() { - return config_ != null; - } - /** - * - * - *
-   * *Required* Provides information to the recognizer that specifies how to
-   * process the request.
-   * 
- * - * .google.cloud.speech.v1beta1.RecognitionConfig config = 1; - */ - public com.google.cloud.speech.v1beta1.RecognitionConfig getConfig() { - return config_ == null - ? com.google.cloud.speech.v1beta1.RecognitionConfig.getDefaultInstance() - : config_; - } - /** - * - * - *
-   * *Required* Provides information to the recognizer that specifies how to
-   * process the request.
-   * 
- * - * .google.cloud.speech.v1beta1.RecognitionConfig config = 1; - */ - public com.google.cloud.speech.v1beta1.RecognitionConfigOrBuilder getConfigOrBuilder() { - return getConfig(); - } - - public static final int SINGLE_UTTERANCE_FIELD_NUMBER = 2; - private boolean singleUtterance_; - /** - * - * - *
-   * *Optional* If `false` or omitted, the recognizer will perform continuous
-   * recognition (continuing to wait for and process audio even if the user
-   * pauses speaking) until the client closes the input stream (gRPC API) or
-   * until the maximum time limit has been reached. May return multiple
-   * `StreamingRecognitionResult`s with the `is_final` flag set to `true`.
-   * If `true`, the recognizer will detect a single spoken utterance. When it
-   * detects that the user has paused or stopped speaking, it will return an
-   * `END_OF_UTTERANCE` event and cease recognition. It will return no more than
-   * one `StreamingRecognitionResult` with the `is_final` flag set to `true`.
-   * 
- * - * bool single_utterance = 2; - */ - public boolean getSingleUtterance() { - return singleUtterance_; - } - - public static final int INTERIM_RESULTS_FIELD_NUMBER = 3; - private boolean interimResults_; - /** - * - * - *
-   * *Optional* If `true`, interim results (tentative hypotheses) may be
-   * returned as they become available (these interim results are indicated with
-   * the `is_final=false` flag).
-   * If `false` or omitted, only `is_final=true` result(s) are returned.
-   * 
- * - * bool interim_results = 3; - */ - public boolean getInterimResults() { - return interimResults_; - } - - private byte memoizedIsInitialized = -1; - - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (config_ != null) { - output.writeMessage(1, getConfig()); - } - if (singleUtterance_ != false) { - output.writeBool(2, singleUtterance_); - } - if (interimResults_ != false) { - output.writeBool(3, interimResults_); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (config_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getConfig()); - } - if (singleUtterance_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, singleUtterance_); - } - if (interimResults_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, interimResults_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.speech.v1beta1.StreamingRecognitionConfig)) { - return super.equals(obj); - } - com.google.cloud.speech.v1beta1.StreamingRecognitionConfig other = - (com.google.cloud.speech.v1beta1.StreamingRecognitionConfig) obj; - - boolean result = true; - result = result && (hasConfig() == other.hasConfig()); - if (hasConfig()) { - result = result && getConfig().equals(other.getConfig()); - } - result = result && (getSingleUtterance() == other.getSingleUtterance()); - result = result && (getInterimResults() == other.getInterimResults()); - result = result && unknownFields.equals(other.unknownFields); - return result; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasConfig()) { - hash = (37 * hash) + CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getConfig().hashCode(); - } - hash = (37 * hash) + SINGLE_UTTERANCE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSingleUtterance()); - hash = (37 * hash) + INTERIM_RESULTS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getInterimResults()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.speech.v1beta1.StreamingRecognitionConfig parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.speech.v1beta1.StreamingRecognitionConfig parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.StreamingRecognitionConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.speech.v1beta1.StreamingRecognitionConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.StreamingRecognitionConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.speech.v1beta1.StreamingRecognitionConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.StreamingRecognitionConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.speech.v1beta1.StreamingRecognitionConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.StreamingRecognitionConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.speech.v1beta1.StreamingRecognitionConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.StreamingRecognitionConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.speech.v1beta1.StreamingRecognitionConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.speech.v1beta1.StreamingRecognitionConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Provides information to the recognizer that specifies how to process the
-   * request.
-   * 
- * - * Protobuf type {@code google.cloud.speech.v1beta1.StreamingRecognitionConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.speech.v1beta1.StreamingRecognitionConfig) - com.google.cloud.speech.v1beta1.StreamingRecognitionConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_StreamingRecognitionConfig_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_StreamingRecognitionConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.speech.v1beta1.StreamingRecognitionConfig.class, - com.google.cloud.speech.v1beta1.StreamingRecognitionConfig.Builder.class); - } - - // Construct using com.google.cloud.speech.v1beta1.StreamingRecognitionConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - public Builder clear() { - super.clear(); - if (configBuilder_ == null) { - config_ = null; - } else { - config_ = null; - configBuilder_ = null; - } - singleUtterance_ = false; - - interimResults_ = false; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_StreamingRecognitionConfig_descriptor; - } - - public com.google.cloud.speech.v1beta1.StreamingRecognitionConfig getDefaultInstanceForType() { - return com.google.cloud.speech.v1beta1.StreamingRecognitionConfig.getDefaultInstance(); - } - - public com.google.cloud.speech.v1beta1.StreamingRecognitionConfig build() { - com.google.cloud.speech.v1beta1.StreamingRecognitionConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.cloud.speech.v1beta1.StreamingRecognitionConfig buildPartial() { - com.google.cloud.speech.v1beta1.StreamingRecognitionConfig result = - new com.google.cloud.speech.v1beta1.StreamingRecognitionConfig(this); - if (configBuilder_ == null) { - result.config_ = config_; - } else { - result.config_ = configBuilder_.build(); - } - result.singleUtterance_ = singleUtterance_; - result.interimResults_ = interimResults_; - onBuilt(); - return result; - } - - public Builder clone() { - return (Builder) super.clone(); - } - - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); - } - - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); - } - - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); - } - - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); - } - - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.speech.v1beta1.StreamingRecognitionConfig) { - return mergeFrom((com.google.cloud.speech.v1beta1.StreamingRecognitionConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.speech.v1beta1.StreamingRecognitionConfig other) { - if (other == com.google.cloud.speech.v1beta1.StreamingRecognitionConfig.getDefaultInstance()) - return this; - if (other.hasConfig()) { - mergeConfig(other.getConfig()); - } - if (other.getSingleUtterance() != false) { - setSingleUtterance(other.getSingleUtterance()); - } - if (other.getInterimResults() != false) { - setInterimResults(other.getInterimResults()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.speech.v1beta1.StreamingRecognitionConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.speech.v1beta1.StreamingRecognitionConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.speech.v1beta1.RecognitionConfig config_ = null; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.speech.v1beta1.RecognitionConfig, - com.google.cloud.speech.v1beta1.RecognitionConfig.Builder, - com.google.cloud.speech.v1beta1.RecognitionConfigOrBuilder> - configBuilder_; - /** - * - * - *
-     * *Required* Provides information to the recognizer that specifies how to
-     * process the request.
-     * 
- * - * .google.cloud.speech.v1beta1.RecognitionConfig config = 1; - */ - public boolean hasConfig() { - return configBuilder_ != null || config_ != null; - } - /** - * - * - *
-     * *Required* Provides information to the recognizer that specifies how to
-     * process the request.
-     * 
- * - * .google.cloud.speech.v1beta1.RecognitionConfig config = 1; - */ - public com.google.cloud.speech.v1beta1.RecognitionConfig getConfig() { - if (configBuilder_ == null) { - return config_ == null - ? com.google.cloud.speech.v1beta1.RecognitionConfig.getDefaultInstance() - : config_; - } else { - return configBuilder_.getMessage(); - } - } - /** - * - * - *
-     * *Required* Provides information to the recognizer that specifies how to
-     * process the request.
-     * 
- * - * .google.cloud.speech.v1beta1.RecognitionConfig config = 1; - */ - public Builder setConfig(com.google.cloud.speech.v1beta1.RecognitionConfig value) { - if (configBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - config_ = value; - onChanged(); - } else { - configBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * *Required* Provides information to the recognizer that specifies how to
-     * process the request.
-     * 
- * - * .google.cloud.speech.v1beta1.RecognitionConfig config = 1; - */ - public Builder setConfig( - com.google.cloud.speech.v1beta1.RecognitionConfig.Builder builderForValue) { - if (configBuilder_ == null) { - config_ = builderForValue.build(); - onChanged(); - } else { - configBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * *Required* Provides information to the recognizer that specifies how to
-     * process the request.
-     * 
- * - * .google.cloud.speech.v1beta1.RecognitionConfig config = 1; - */ - public Builder mergeConfig(com.google.cloud.speech.v1beta1.RecognitionConfig value) { - if (configBuilder_ == null) { - if (config_ != null) { - config_ = - com.google.cloud.speech.v1beta1.RecognitionConfig.newBuilder(config_) - .mergeFrom(value) - .buildPartial(); - } else { - config_ = value; - } - onChanged(); - } else { - configBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * *Required* Provides information to the recognizer that specifies how to
-     * process the request.
-     * 
- * - * .google.cloud.speech.v1beta1.RecognitionConfig config = 1; - */ - public Builder clearConfig() { - if (configBuilder_ == null) { - config_ = null; - onChanged(); - } else { - config_ = null; - configBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * *Required* Provides information to the recognizer that specifies how to
-     * process the request.
-     * 
- * - * .google.cloud.speech.v1beta1.RecognitionConfig config = 1; - */ - public com.google.cloud.speech.v1beta1.RecognitionConfig.Builder getConfigBuilder() { - - onChanged(); - return getConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * *Required* Provides information to the recognizer that specifies how to
-     * process the request.
-     * 
- * - * .google.cloud.speech.v1beta1.RecognitionConfig config = 1; - */ - public com.google.cloud.speech.v1beta1.RecognitionConfigOrBuilder getConfigOrBuilder() { - if (configBuilder_ != null) { - return configBuilder_.getMessageOrBuilder(); - } else { - return config_ == null - ? com.google.cloud.speech.v1beta1.RecognitionConfig.getDefaultInstance() - : config_; - } - } - /** - * - * - *
-     * *Required* Provides information to the recognizer that specifies how to
-     * process the request.
-     * 
- * - * .google.cloud.speech.v1beta1.RecognitionConfig config = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.speech.v1beta1.RecognitionConfig, - com.google.cloud.speech.v1beta1.RecognitionConfig.Builder, - com.google.cloud.speech.v1beta1.RecognitionConfigOrBuilder> - getConfigFieldBuilder() { - if (configBuilder_ == null) { - configBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.speech.v1beta1.RecognitionConfig, - com.google.cloud.speech.v1beta1.RecognitionConfig.Builder, - com.google.cloud.speech.v1beta1.RecognitionConfigOrBuilder>( - getConfig(), getParentForChildren(), isClean()); - config_ = null; - } - return configBuilder_; - } - - private boolean singleUtterance_; - /** - * - * - *
-     * *Optional* If `false` or omitted, the recognizer will perform continuous
-     * recognition (continuing to wait for and process audio even if the user
-     * pauses speaking) until the client closes the input stream (gRPC API) or
-     * until the maximum time limit has been reached. May return multiple
-     * `StreamingRecognitionResult`s with the `is_final` flag set to `true`.
-     * If `true`, the recognizer will detect a single spoken utterance. When it
-     * detects that the user has paused or stopped speaking, it will return an
-     * `END_OF_UTTERANCE` event and cease recognition. It will return no more than
-     * one `StreamingRecognitionResult` with the `is_final` flag set to `true`.
-     * 
- * - * bool single_utterance = 2; - */ - public boolean getSingleUtterance() { - return singleUtterance_; - } - /** - * - * - *
-     * *Optional* If `false` or omitted, the recognizer will perform continuous
-     * recognition (continuing to wait for and process audio even if the user
-     * pauses speaking) until the client closes the input stream (gRPC API) or
-     * until the maximum time limit has been reached. May return multiple
-     * `StreamingRecognitionResult`s with the `is_final` flag set to `true`.
-     * If `true`, the recognizer will detect a single spoken utterance. When it
-     * detects that the user has paused or stopped speaking, it will return an
-     * `END_OF_UTTERANCE` event and cease recognition. It will return no more than
-     * one `StreamingRecognitionResult` with the `is_final` flag set to `true`.
-     * 
- * - * bool single_utterance = 2; - */ - public Builder setSingleUtterance(boolean value) { - - singleUtterance_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * *Optional* If `false` or omitted, the recognizer will perform continuous
-     * recognition (continuing to wait for and process audio even if the user
-     * pauses speaking) until the client closes the input stream (gRPC API) or
-     * until the maximum time limit has been reached. May return multiple
-     * `StreamingRecognitionResult`s with the `is_final` flag set to `true`.
-     * If `true`, the recognizer will detect a single spoken utterance. When it
-     * detects that the user has paused or stopped speaking, it will return an
-     * `END_OF_UTTERANCE` event and cease recognition. It will return no more than
-     * one `StreamingRecognitionResult` with the `is_final` flag set to `true`.
-     * 
- * - * bool single_utterance = 2; - */ - public Builder clearSingleUtterance() { - - singleUtterance_ = false; - onChanged(); - return this; - } - - private boolean interimResults_; - /** - * - * - *
-     * *Optional* If `true`, interim results (tentative hypotheses) may be
-     * returned as they become available (these interim results are indicated with
-     * the `is_final=false` flag).
-     * If `false` or omitted, only `is_final=true` result(s) are returned.
-     * 
- * - * bool interim_results = 3; - */ - public boolean getInterimResults() { - return interimResults_; - } - /** - * - * - *
-     * *Optional* If `true`, interim results (tentative hypotheses) may be
-     * returned as they become available (these interim results are indicated with
-     * the `is_final=false` flag).
-     * If `false` or omitted, only `is_final=true` result(s) are returned.
-     * 
- * - * bool interim_results = 3; - */ - public Builder setInterimResults(boolean value) { - - interimResults_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * *Optional* If `true`, interim results (tentative hypotheses) may be
-     * returned as they become available (these interim results are indicated with
-     * the `is_final=false` flag).
-     * If `false` or omitted, only `is_final=true` result(s) are returned.
-     * 
- * - * bool interim_results = 3; - */ - public Builder clearInterimResults() { - - interimResults_ = false; - onChanged(); - return this; - } - - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.speech.v1beta1.StreamingRecognitionConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.speech.v1beta1.StreamingRecognitionConfig) - private static final com.google.cloud.speech.v1beta1.StreamingRecognitionConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.speech.v1beta1.StreamingRecognitionConfig(); - } - - public static com.google.cloud.speech.v1beta1.StreamingRecognitionConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public StreamingRecognitionConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new StreamingRecognitionConfig(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.cloud.speech.v1beta1.StreamingRecognitionConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/StreamingRecognitionConfigOrBuilder.java b/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/StreamingRecognitionConfigOrBuilder.java deleted file mode 100644 index a86a3e255d05..000000000000 --- a/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/StreamingRecognitionConfigOrBuilder.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/speech/v1beta1/cloud_speech.proto - -package com.google.cloud.speech.v1beta1; - -public interface StreamingRecognitionConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.speech.v1beta1.StreamingRecognitionConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * *Required* Provides information to the recognizer that specifies how to
-   * process the request.
-   * 
- * - * .google.cloud.speech.v1beta1.RecognitionConfig config = 1; - */ - boolean hasConfig(); - /** - * - * - *
-   * *Required* Provides information to the recognizer that specifies how to
-   * process the request.
-   * 
- * - * .google.cloud.speech.v1beta1.RecognitionConfig config = 1; - */ - com.google.cloud.speech.v1beta1.RecognitionConfig getConfig(); - /** - * - * - *
-   * *Required* Provides information to the recognizer that specifies how to
-   * process the request.
-   * 
- * - * .google.cloud.speech.v1beta1.RecognitionConfig config = 1; - */ - com.google.cloud.speech.v1beta1.RecognitionConfigOrBuilder getConfigOrBuilder(); - - /** - * - * - *
-   * *Optional* If `false` or omitted, the recognizer will perform continuous
-   * recognition (continuing to wait for and process audio even if the user
-   * pauses speaking) until the client closes the input stream (gRPC API) or
-   * until the maximum time limit has been reached. May return multiple
-   * `StreamingRecognitionResult`s with the `is_final` flag set to `true`.
-   * If `true`, the recognizer will detect a single spoken utterance. When it
-   * detects that the user has paused or stopped speaking, it will return an
-   * `END_OF_UTTERANCE` event and cease recognition. It will return no more than
-   * one `StreamingRecognitionResult` with the `is_final` flag set to `true`.
-   * 
- * - * bool single_utterance = 2; - */ - boolean getSingleUtterance(); - - /** - * - * - *
-   * *Optional* If `true`, interim results (tentative hypotheses) may be
-   * returned as they become available (these interim results are indicated with
-   * the `is_final=false` flag).
-   * If `false` or omitted, only `is_final=true` result(s) are returned.
-   * 
- * - * bool interim_results = 3; - */ - boolean getInterimResults(); -} diff --git a/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/StreamingRecognitionResult.java b/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/StreamingRecognitionResult.java deleted file mode 100644 index 62b004988a24..000000000000 --- a/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/StreamingRecognitionResult.java +++ /dev/null @@ -1,1189 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/speech/v1beta1/cloud_speech.proto - -package com.google.cloud.speech.v1beta1; - -/** - * - * - *
- * A streaming speech recognition result corresponding to a portion of the audio
- * that is currently being processed.
- * 
- * - * Protobuf type {@code google.cloud.speech.v1beta1.StreamingRecognitionResult} - */ -public final class StreamingRecognitionResult extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.speech.v1beta1.StreamingRecognitionResult) - StreamingRecognitionResultOrBuilder { - private static final long serialVersionUID = 0L; - // Use StreamingRecognitionResult.newBuilder() to construct. - private StreamingRecognitionResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private StreamingRecognitionResult() { - alternatives_ = java.util.Collections.emptyList(); - isFinal_ = false; - stability_ = 0F; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private StreamingRecognitionResult( - 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; - default: - { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - alternatives_ = - new java.util.ArrayList< - com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative>(); - mutable_bitField0_ |= 0x00000001; - } - alternatives_.add( - input.readMessage( - com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative.parser(), - extensionRegistry)); - break; - } - case 16: - { - isFinal_ = input.readBool(); - break; - } - case 29: - { - stability_ = input.readFloat(); - break; - } - } - } - } catch (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) == 0x00000001)) { - alternatives_ = java.util.Collections.unmodifiableList(alternatives_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_StreamingRecognitionResult_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_StreamingRecognitionResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.speech.v1beta1.StreamingRecognitionResult.class, - com.google.cloud.speech.v1beta1.StreamingRecognitionResult.Builder.class); - } - - private int bitField0_; - public static final int ALTERNATIVES_FIELD_NUMBER = 1; - private java.util.List - alternatives_; - /** - * - * - *
-   * *Output-only* May contain one or more recognition hypotheses (up to the
-   * maximum specified in `max_alternatives`).
-   * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1; - * - */ - public java.util.List - getAlternativesList() { - return alternatives_; - } - /** - * - * - *
-   * *Output-only* May contain one or more recognition hypotheses (up to the
-   * maximum specified in `max_alternatives`).
-   * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1; - * - */ - public java.util.List< - ? extends com.google.cloud.speech.v1beta1.SpeechRecognitionAlternativeOrBuilder> - getAlternativesOrBuilderList() { - return alternatives_; - } - /** - * - * - *
-   * *Output-only* May contain one or more recognition hypotheses (up to the
-   * maximum specified in `max_alternatives`).
-   * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1; - * - */ - public int getAlternativesCount() { - return alternatives_.size(); - } - /** - * - * - *
-   * *Output-only* May contain one or more recognition hypotheses (up to the
-   * maximum specified in `max_alternatives`).
-   * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1; - * - */ - public com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative getAlternatives(int index) { - return alternatives_.get(index); - } - /** - * - * - *
-   * *Output-only* May contain one or more recognition hypotheses (up to the
-   * maximum specified in `max_alternatives`).
-   * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1; - * - */ - public com.google.cloud.speech.v1beta1.SpeechRecognitionAlternativeOrBuilder - getAlternativesOrBuilder(int index) { - return alternatives_.get(index); - } - - public static final int IS_FINAL_FIELD_NUMBER = 2; - private boolean isFinal_; - /** - * - * - *
-   * *Output-only* If `false`, this `StreamingRecognitionResult` represents an
-   * interim result that may change. If `true`, this is the final time the
-   * speech service will return this particular `StreamingRecognitionResult`,
-   * the recognizer will not return any further hypotheses for this portion of
-   * the transcript and corresponding audio.
-   * 
- * - * bool is_final = 2; - */ - public boolean getIsFinal() { - return isFinal_; - } - - public static final int STABILITY_FIELD_NUMBER = 3; - private float stability_; - /** - * - * - *
-   * *Output-only* An estimate of the likelihood that the recognizer will not
-   * change its guess about this interim result. Values range from 0.0
-   * (completely unstable) to 1.0 (completely stable).
-   * This field is only provided for interim results (`is_final=false`).
-   * The default of 0.0 is a sentinel value indicating `stability` was not set.
-   * 
- * - * float stability = 3; - */ - public float getStability() { - return stability_; - } - - private byte memoizedIsInitialized = -1; - - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < alternatives_.size(); i++) { - output.writeMessage(1, alternatives_.get(i)); - } - if (isFinal_ != false) { - output.writeBool(2, isFinal_); - } - if (stability_ != 0F) { - output.writeFloat(3, stability_); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < alternatives_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, alternatives_.get(i)); - } - if (isFinal_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, isFinal_); - } - if (stability_ != 0F) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(3, stability_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.speech.v1beta1.StreamingRecognitionResult)) { - return super.equals(obj); - } - com.google.cloud.speech.v1beta1.StreamingRecognitionResult other = - (com.google.cloud.speech.v1beta1.StreamingRecognitionResult) obj; - - boolean result = true; - result = result && getAlternativesList().equals(other.getAlternativesList()); - result = result && (getIsFinal() == other.getIsFinal()); - result = - result - && (java.lang.Float.floatToIntBits(getStability()) - == java.lang.Float.floatToIntBits(other.getStability())); - result = result && unknownFields.equals(other.unknownFields); - return result; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getAlternativesCount() > 0) { - hash = (37 * hash) + ALTERNATIVES_FIELD_NUMBER; - hash = (53 * hash) + getAlternativesList().hashCode(); - } - hash = (37 * hash) + IS_FINAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsFinal()); - hash = (37 * hash) + STABILITY_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getStability()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.speech.v1beta1.StreamingRecognitionResult parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.speech.v1beta1.StreamingRecognitionResult parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.StreamingRecognitionResult parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.speech.v1beta1.StreamingRecognitionResult parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.StreamingRecognitionResult parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.speech.v1beta1.StreamingRecognitionResult parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.StreamingRecognitionResult parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.speech.v1beta1.StreamingRecognitionResult parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.StreamingRecognitionResult parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.speech.v1beta1.StreamingRecognitionResult parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.StreamingRecognitionResult parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.speech.v1beta1.StreamingRecognitionResult parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.speech.v1beta1.StreamingRecognitionResult prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 streaming speech recognition result corresponding to a portion of the audio
-   * that is currently being processed.
-   * 
- * - * Protobuf type {@code google.cloud.speech.v1beta1.StreamingRecognitionResult} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.speech.v1beta1.StreamingRecognitionResult) - com.google.cloud.speech.v1beta1.StreamingRecognitionResultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_StreamingRecognitionResult_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_StreamingRecognitionResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.speech.v1beta1.StreamingRecognitionResult.class, - com.google.cloud.speech.v1beta1.StreamingRecognitionResult.Builder.class); - } - - // Construct using com.google.cloud.speech.v1beta1.StreamingRecognitionResult.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getAlternativesFieldBuilder(); - } - } - - public Builder clear() { - super.clear(); - if (alternativesBuilder_ == null) { - alternatives_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - alternativesBuilder_.clear(); - } - isFinal_ = false; - - stability_ = 0F; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_StreamingRecognitionResult_descriptor; - } - - public com.google.cloud.speech.v1beta1.StreamingRecognitionResult getDefaultInstanceForType() { - return com.google.cloud.speech.v1beta1.StreamingRecognitionResult.getDefaultInstance(); - } - - public com.google.cloud.speech.v1beta1.StreamingRecognitionResult build() { - com.google.cloud.speech.v1beta1.StreamingRecognitionResult result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.cloud.speech.v1beta1.StreamingRecognitionResult buildPartial() { - com.google.cloud.speech.v1beta1.StreamingRecognitionResult result = - new com.google.cloud.speech.v1beta1.StreamingRecognitionResult(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (alternativesBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - alternatives_ = java.util.Collections.unmodifiableList(alternatives_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.alternatives_ = alternatives_; - } else { - result.alternatives_ = alternativesBuilder_.build(); - } - result.isFinal_ = isFinal_; - result.stability_ = stability_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder clone() { - return (Builder) super.clone(); - } - - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); - } - - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); - } - - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); - } - - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); - } - - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.speech.v1beta1.StreamingRecognitionResult) { - return mergeFrom((com.google.cloud.speech.v1beta1.StreamingRecognitionResult) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.speech.v1beta1.StreamingRecognitionResult other) { - if (other == com.google.cloud.speech.v1beta1.StreamingRecognitionResult.getDefaultInstance()) - return this; - if (alternativesBuilder_ == null) { - if (!other.alternatives_.isEmpty()) { - if (alternatives_.isEmpty()) { - alternatives_ = other.alternatives_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureAlternativesIsMutable(); - alternatives_.addAll(other.alternatives_); - } - onChanged(); - } - } else { - if (!other.alternatives_.isEmpty()) { - if (alternativesBuilder_.isEmpty()) { - alternativesBuilder_.dispose(); - alternativesBuilder_ = null; - alternatives_ = other.alternatives_; - bitField0_ = (bitField0_ & ~0x00000001); - alternativesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getAlternativesFieldBuilder() - : null; - } else { - alternativesBuilder_.addAllMessages(other.alternatives_); - } - } - } - if (other.getIsFinal() != false) { - setIsFinal(other.getIsFinal()); - } - if (other.getStability() != 0F) { - setStability(other.getStability()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.speech.v1beta1.StreamingRecognitionResult parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.speech.v1beta1.StreamingRecognitionResult) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.util.List - alternatives_ = java.util.Collections.emptyList(); - - private void ensureAlternativesIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - alternatives_ = - new java.util.ArrayList( - alternatives_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative, - com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative.Builder, - com.google.cloud.speech.v1beta1.SpeechRecognitionAlternativeOrBuilder> - alternativesBuilder_; - - /** - * - * - *
-     * *Output-only* May contain one or more recognition hypotheses (up to the
-     * maximum specified in `max_alternatives`).
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1; - * - */ - public java.util.List - getAlternativesList() { - if (alternativesBuilder_ == null) { - return java.util.Collections.unmodifiableList(alternatives_); - } else { - return alternativesBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * *Output-only* May contain one or more recognition hypotheses (up to the
-     * maximum specified in `max_alternatives`).
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1; - * - */ - public int getAlternativesCount() { - if (alternativesBuilder_ == null) { - return alternatives_.size(); - } else { - return alternativesBuilder_.getCount(); - } - } - /** - * - * - *
-     * *Output-only* May contain one or more recognition hypotheses (up to the
-     * maximum specified in `max_alternatives`).
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1; - * - */ - public com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative getAlternatives(int index) { - if (alternativesBuilder_ == null) { - return alternatives_.get(index); - } else { - return alternativesBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * *Output-only* May contain one or more recognition hypotheses (up to the
-     * maximum specified in `max_alternatives`).
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1; - * - */ - public Builder setAlternatives( - int index, com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative value) { - if (alternativesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAlternativesIsMutable(); - alternatives_.set(index, value); - onChanged(); - } else { - alternativesBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * *Output-only* May contain one or more recognition hypotheses (up to the
-     * maximum specified in `max_alternatives`).
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1; - * - */ - public Builder setAlternatives( - int index, - com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative.Builder builderForValue) { - if (alternativesBuilder_ == null) { - ensureAlternativesIsMutable(); - alternatives_.set(index, builderForValue.build()); - onChanged(); - } else { - alternativesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * *Output-only* May contain one or more recognition hypotheses (up to the
-     * maximum specified in `max_alternatives`).
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1; - * - */ - public Builder addAlternatives( - com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative value) { - if (alternativesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAlternativesIsMutable(); - alternatives_.add(value); - onChanged(); - } else { - alternativesBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * *Output-only* May contain one or more recognition hypotheses (up to the
-     * maximum specified in `max_alternatives`).
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1; - * - */ - public Builder addAlternatives( - int index, com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative value) { - if (alternativesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAlternativesIsMutable(); - alternatives_.add(index, value); - onChanged(); - } else { - alternativesBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * *Output-only* May contain one or more recognition hypotheses (up to the
-     * maximum specified in `max_alternatives`).
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1; - * - */ - public Builder addAlternatives( - com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative.Builder builderForValue) { - if (alternativesBuilder_ == null) { - ensureAlternativesIsMutable(); - alternatives_.add(builderForValue.build()); - onChanged(); - } else { - alternativesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * *Output-only* May contain one or more recognition hypotheses (up to the
-     * maximum specified in `max_alternatives`).
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1; - * - */ - public Builder addAlternatives( - int index, - com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative.Builder builderForValue) { - if (alternativesBuilder_ == null) { - ensureAlternativesIsMutable(); - alternatives_.add(index, builderForValue.build()); - onChanged(); - } else { - alternativesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * *Output-only* May contain one or more recognition hypotheses (up to the
-     * maximum specified in `max_alternatives`).
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1; - * - */ - public Builder addAllAlternatives( - java.lang.Iterable - values) { - if (alternativesBuilder_ == null) { - ensureAlternativesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, alternatives_); - onChanged(); - } else { - alternativesBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * *Output-only* May contain one or more recognition hypotheses (up to the
-     * maximum specified in `max_alternatives`).
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1; - * - */ - public Builder clearAlternatives() { - if (alternativesBuilder_ == null) { - alternatives_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - alternativesBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * *Output-only* May contain one or more recognition hypotheses (up to the
-     * maximum specified in `max_alternatives`).
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1; - * - */ - public Builder removeAlternatives(int index) { - if (alternativesBuilder_ == null) { - ensureAlternativesIsMutable(); - alternatives_.remove(index); - onChanged(); - } else { - alternativesBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * *Output-only* May contain one or more recognition hypotheses (up to the
-     * maximum specified in `max_alternatives`).
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1; - * - */ - public com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative.Builder - getAlternativesBuilder(int index) { - return getAlternativesFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * *Output-only* May contain one or more recognition hypotheses (up to the
-     * maximum specified in `max_alternatives`).
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1; - * - */ - public com.google.cloud.speech.v1beta1.SpeechRecognitionAlternativeOrBuilder - getAlternativesOrBuilder(int index) { - if (alternativesBuilder_ == null) { - return alternatives_.get(index); - } else { - return alternativesBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * *Output-only* May contain one or more recognition hypotheses (up to the
-     * maximum specified in `max_alternatives`).
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1; - * - */ - public java.util.List< - ? extends com.google.cloud.speech.v1beta1.SpeechRecognitionAlternativeOrBuilder> - getAlternativesOrBuilderList() { - if (alternativesBuilder_ != null) { - return alternativesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(alternatives_); - } - } - /** - * - * - *
-     * *Output-only* May contain one or more recognition hypotheses (up to the
-     * maximum specified in `max_alternatives`).
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1; - * - */ - public com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative.Builder - addAlternativesBuilder() { - return getAlternativesFieldBuilder() - .addBuilder( - com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative.getDefaultInstance()); - } - /** - * - * - *
-     * *Output-only* May contain one or more recognition hypotheses (up to the
-     * maximum specified in `max_alternatives`).
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1; - * - */ - public com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative.Builder - addAlternativesBuilder(int index) { - return getAlternativesFieldBuilder() - .addBuilder( - index, - com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative.getDefaultInstance()); - } - /** - * - * - *
-     * *Output-only* May contain one or more recognition hypotheses (up to the
-     * maximum specified in `max_alternatives`).
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1; - * - */ - public java.util.List - getAlternativesBuilderList() { - return getAlternativesFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative, - com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative.Builder, - com.google.cloud.speech.v1beta1.SpeechRecognitionAlternativeOrBuilder> - getAlternativesFieldBuilder() { - if (alternativesBuilder_ == null) { - alternativesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative, - com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative.Builder, - com.google.cloud.speech.v1beta1.SpeechRecognitionAlternativeOrBuilder>( - alternatives_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); - alternatives_ = null; - } - return alternativesBuilder_; - } - - private boolean isFinal_; - /** - * - * - *
-     * *Output-only* If `false`, this `StreamingRecognitionResult` represents an
-     * interim result that may change. If `true`, this is the final time the
-     * speech service will return this particular `StreamingRecognitionResult`,
-     * the recognizer will not return any further hypotheses for this portion of
-     * the transcript and corresponding audio.
-     * 
- * - * bool is_final = 2; - */ - public boolean getIsFinal() { - return isFinal_; - } - /** - * - * - *
-     * *Output-only* If `false`, this `StreamingRecognitionResult` represents an
-     * interim result that may change. If `true`, this is the final time the
-     * speech service will return this particular `StreamingRecognitionResult`,
-     * the recognizer will not return any further hypotheses for this portion of
-     * the transcript and corresponding audio.
-     * 
- * - * bool is_final = 2; - */ - public Builder setIsFinal(boolean value) { - - isFinal_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * *Output-only* If `false`, this `StreamingRecognitionResult` represents an
-     * interim result that may change. If `true`, this is the final time the
-     * speech service will return this particular `StreamingRecognitionResult`,
-     * the recognizer will not return any further hypotheses for this portion of
-     * the transcript and corresponding audio.
-     * 
- * - * bool is_final = 2; - */ - public Builder clearIsFinal() { - - isFinal_ = false; - onChanged(); - return this; - } - - private float stability_; - /** - * - * - *
-     * *Output-only* An estimate of the likelihood that the recognizer will not
-     * change its guess about this interim result. Values range from 0.0
-     * (completely unstable) to 1.0 (completely stable).
-     * This field is only provided for interim results (`is_final=false`).
-     * The default of 0.0 is a sentinel value indicating `stability` was not set.
-     * 
- * - * float stability = 3; - */ - public float getStability() { - return stability_; - } - /** - * - * - *
-     * *Output-only* An estimate of the likelihood that the recognizer will not
-     * change its guess about this interim result. Values range from 0.0
-     * (completely unstable) to 1.0 (completely stable).
-     * This field is only provided for interim results (`is_final=false`).
-     * The default of 0.0 is a sentinel value indicating `stability` was not set.
-     * 
- * - * float stability = 3; - */ - public Builder setStability(float value) { - - stability_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * *Output-only* An estimate of the likelihood that the recognizer will not
-     * change its guess about this interim result. Values range from 0.0
-     * (completely unstable) to 1.0 (completely stable).
-     * This field is only provided for interim results (`is_final=false`).
-     * The default of 0.0 is a sentinel value indicating `stability` was not set.
-     * 
- * - * float stability = 3; - */ - public Builder clearStability() { - - stability_ = 0F; - onChanged(); - return this; - } - - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.speech.v1beta1.StreamingRecognitionResult) - } - - // @@protoc_insertion_point(class_scope:google.cloud.speech.v1beta1.StreamingRecognitionResult) - private static final com.google.cloud.speech.v1beta1.StreamingRecognitionResult DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.speech.v1beta1.StreamingRecognitionResult(); - } - - public static com.google.cloud.speech.v1beta1.StreamingRecognitionResult getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public StreamingRecognitionResult parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new StreamingRecognitionResult(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.cloud.speech.v1beta1.StreamingRecognitionResult getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/StreamingRecognitionResultOrBuilder.java b/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/StreamingRecognitionResultOrBuilder.java deleted file mode 100644 index 80f2a1f65c79..000000000000 --- a/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/StreamingRecognitionResultOrBuilder.java +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/speech/v1beta1/cloud_speech.proto - -package com.google.cloud.speech.v1beta1; - -public interface StreamingRecognitionResultOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.speech.v1beta1.StreamingRecognitionResult) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * *Output-only* May contain one or more recognition hypotheses (up to the
-   * maximum specified in `max_alternatives`).
-   * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1; - * - */ - java.util.List - getAlternativesList(); - /** - * - * - *
-   * *Output-only* May contain one or more recognition hypotheses (up to the
-   * maximum specified in `max_alternatives`).
-   * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1; - * - */ - com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative getAlternatives(int index); - /** - * - * - *
-   * *Output-only* May contain one or more recognition hypotheses (up to the
-   * maximum specified in `max_alternatives`).
-   * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1; - * - */ - int getAlternativesCount(); - /** - * - * - *
-   * *Output-only* May contain one or more recognition hypotheses (up to the
-   * maximum specified in `max_alternatives`).
-   * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1; - * - */ - java.util.List - getAlternativesOrBuilderList(); - /** - * - * - *
-   * *Output-only* May contain one or more recognition hypotheses (up to the
-   * maximum specified in `max_alternatives`).
-   * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1; - * - */ - com.google.cloud.speech.v1beta1.SpeechRecognitionAlternativeOrBuilder getAlternativesOrBuilder( - int index); - - /** - * - * - *
-   * *Output-only* If `false`, this `StreamingRecognitionResult` represents an
-   * interim result that may change. If `true`, this is the final time the
-   * speech service will return this particular `StreamingRecognitionResult`,
-   * the recognizer will not return any further hypotheses for this portion of
-   * the transcript and corresponding audio.
-   * 
- * - * bool is_final = 2; - */ - boolean getIsFinal(); - - /** - * - * - *
-   * *Output-only* An estimate of the likelihood that the recognizer will not
-   * change its guess about this interim result. Values range from 0.0
-   * (completely unstable) to 1.0 (completely stable).
-   * This field is only provided for interim results (`is_final=false`).
-   * The default of 0.0 is a sentinel value indicating `stability` was not set.
-   * 
- * - * float stability = 3; - */ - float getStability(); -} diff --git a/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/StreamingRecognizeRequest.java b/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/StreamingRecognizeRequest.java deleted file mode 100644 index 33c6533f61bb..000000000000 --- a/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/StreamingRecognizeRequest.java +++ /dev/null @@ -1,961 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/speech/v1beta1/cloud_speech.proto - -package com.google.cloud.speech.v1beta1; - -/** - * - * - *
- * The top-level message sent by the client for the `StreamingRecognize` method.
- * Multiple `StreamingRecognizeRequest` messages are sent. The first message
- * must contain a `streaming_config` message and must not contain `audio` data.
- * All subsequent messages must contain `audio` data and must not contain a
- * `streaming_config` message.
- * 
- * - * Protobuf type {@code google.cloud.speech.v1beta1.StreamingRecognizeRequest} - */ -public final class StreamingRecognizeRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.speech.v1beta1.StreamingRecognizeRequest) - StreamingRecognizeRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use StreamingRecognizeRequest.newBuilder() to construct. - private StreamingRecognizeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private StreamingRecognizeRequest() {} - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private StreamingRecognizeRequest( - 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; - default: - { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - case 10: - { - com.google.cloud.speech.v1beta1.StreamingRecognitionConfig.Builder subBuilder = null; - if (streamingRequestCase_ == 1) { - subBuilder = - ((com.google.cloud.speech.v1beta1.StreamingRecognitionConfig) streamingRequest_) - .toBuilder(); - } - streamingRequest_ = - input.readMessage( - com.google.cloud.speech.v1beta1.StreamingRecognitionConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.speech.v1beta1.StreamingRecognitionConfig) streamingRequest_); - streamingRequest_ = subBuilder.buildPartial(); - } - streamingRequestCase_ = 1; - break; - } - case 18: - { - streamingRequestCase_ = 2; - streamingRequest_ = input.readBytes(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_StreamingRecognizeRequest_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_StreamingRecognizeRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.speech.v1beta1.StreamingRecognizeRequest.class, - com.google.cloud.speech.v1beta1.StreamingRecognizeRequest.Builder.class); - } - - private int streamingRequestCase_ = 0; - private java.lang.Object streamingRequest_; - - public enum StreamingRequestCase implements com.google.protobuf.Internal.EnumLite { - STREAMING_CONFIG(1), - AUDIO_CONTENT(2), - STREAMINGREQUEST_NOT_SET(0); - private final int value; - - private StreamingRequestCase(int value) { - this.value = value; - } - /** @deprecated Use {@link #forNumber(int)} instead. */ - @java.lang.Deprecated - public static StreamingRequestCase valueOf(int value) { - return forNumber(value); - } - - public static StreamingRequestCase forNumber(int value) { - switch (value) { - case 1: - return STREAMING_CONFIG; - case 2: - return AUDIO_CONTENT; - case 0: - return STREAMINGREQUEST_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public StreamingRequestCase getStreamingRequestCase() { - return StreamingRequestCase.forNumber(streamingRequestCase_); - } - - public static final int STREAMING_CONFIG_FIELD_NUMBER = 1; - /** - * - * - *
-   * Provides information to the recognizer that specifies how to process the
-   * request. The first `StreamingRecognizeRequest` message must contain a
-   * `streaming_config`  message.
-   * 
- * - * .google.cloud.speech.v1beta1.StreamingRecognitionConfig streaming_config = 1; - */ - public boolean hasStreamingConfig() { - return streamingRequestCase_ == 1; - } - /** - * - * - *
-   * Provides information to the recognizer that specifies how to process the
-   * request. The first `StreamingRecognizeRequest` message must contain a
-   * `streaming_config`  message.
-   * 
- * - * .google.cloud.speech.v1beta1.StreamingRecognitionConfig streaming_config = 1; - */ - public com.google.cloud.speech.v1beta1.StreamingRecognitionConfig getStreamingConfig() { - if (streamingRequestCase_ == 1) { - return (com.google.cloud.speech.v1beta1.StreamingRecognitionConfig) streamingRequest_; - } - return com.google.cloud.speech.v1beta1.StreamingRecognitionConfig.getDefaultInstance(); - } - /** - * - * - *
-   * Provides information to the recognizer that specifies how to process the
-   * request. The first `StreamingRecognizeRequest` message must contain a
-   * `streaming_config`  message.
-   * 
- * - * .google.cloud.speech.v1beta1.StreamingRecognitionConfig streaming_config = 1; - */ - public com.google.cloud.speech.v1beta1.StreamingRecognitionConfigOrBuilder - getStreamingConfigOrBuilder() { - if (streamingRequestCase_ == 1) { - return (com.google.cloud.speech.v1beta1.StreamingRecognitionConfig) streamingRequest_; - } - return com.google.cloud.speech.v1beta1.StreamingRecognitionConfig.getDefaultInstance(); - } - - public static final int AUDIO_CONTENT_FIELD_NUMBER = 2; - /** - * - * - *
-   * The audio data to be recognized. Sequential chunks of audio data are sent
-   * in sequential `StreamingRecognizeRequest` messages. The first
-   * `StreamingRecognizeRequest` message must not contain `audio_content` data
-   * and all subsequent `StreamingRecognizeRequest` messages must contain
-   * `audio_content` data. The audio bytes must be encoded as specified in
-   * `RecognitionConfig`. Note: as with all bytes fields, protobuffers use a
-   * pure binary representation (not base64). See
-   * [audio limits](https://cloud.google.com/speech/limits#content).
-   * 
- * - * bytes audio_content = 2; - */ - public com.google.protobuf.ByteString getAudioContent() { - if (streamingRequestCase_ == 2) { - return (com.google.protobuf.ByteString) streamingRequest_; - } - return com.google.protobuf.ByteString.EMPTY; - } - - private byte memoizedIsInitialized = -1; - - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (streamingRequestCase_ == 1) { - output.writeMessage( - 1, (com.google.cloud.speech.v1beta1.StreamingRecognitionConfig) streamingRequest_); - } - if (streamingRequestCase_ == 2) { - output.writeBytes(2, (com.google.protobuf.ByteString) streamingRequest_); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (streamingRequestCase_ == 1) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 1, (com.google.cloud.speech.v1beta1.StreamingRecognitionConfig) streamingRequest_); - } - if (streamingRequestCase_ == 2) { - size += - com.google.protobuf.CodedOutputStream.computeBytesSize( - 2, (com.google.protobuf.ByteString) streamingRequest_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.speech.v1beta1.StreamingRecognizeRequest)) { - return super.equals(obj); - } - com.google.cloud.speech.v1beta1.StreamingRecognizeRequest other = - (com.google.cloud.speech.v1beta1.StreamingRecognizeRequest) obj; - - boolean result = true; - result = result && getStreamingRequestCase().equals(other.getStreamingRequestCase()); - if (!result) return false; - switch (streamingRequestCase_) { - case 1: - result = result && getStreamingConfig().equals(other.getStreamingConfig()); - break; - case 2: - result = result && getAudioContent().equals(other.getAudioContent()); - break; - case 0: - default: - } - result = result && unknownFields.equals(other.unknownFields); - return result; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - switch (streamingRequestCase_) { - case 1: - hash = (37 * hash) + STREAMING_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getStreamingConfig().hashCode(); - break; - case 2: - hash = (37 * hash) + AUDIO_CONTENT_FIELD_NUMBER; - hash = (53 * hash) + getAudioContent().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.speech.v1beta1.StreamingRecognizeRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.speech.v1beta1.StreamingRecognizeRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.StreamingRecognizeRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.speech.v1beta1.StreamingRecognizeRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.StreamingRecognizeRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.speech.v1beta1.StreamingRecognizeRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.StreamingRecognizeRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.speech.v1beta1.StreamingRecognizeRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.StreamingRecognizeRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.speech.v1beta1.StreamingRecognizeRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.StreamingRecognizeRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.speech.v1beta1.StreamingRecognizeRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.speech.v1beta1.StreamingRecognizeRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 top-level message sent by the client for the `StreamingRecognize` method.
-   * Multiple `StreamingRecognizeRequest` messages are sent. The first message
-   * must contain a `streaming_config` message and must not contain `audio` data.
-   * All subsequent messages must contain `audio` data and must not contain a
-   * `streaming_config` message.
-   * 
- * - * Protobuf type {@code google.cloud.speech.v1beta1.StreamingRecognizeRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.speech.v1beta1.StreamingRecognizeRequest) - com.google.cloud.speech.v1beta1.StreamingRecognizeRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_StreamingRecognizeRequest_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_StreamingRecognizeRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.speech.v1beta1.StreamingRecognizeRequest.class, - com.google.cloud.speech.v1beta1.StreamingRecognizeRequest.Builder.class); - } - - // Construct using com.google.cloud.speech.v1beta1.StreamingRecognizeRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - public Builder clear() { - super.clear(); - streamingRequestCase_ = 0; - streamingRequest_ = null; - return this; - } - - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_StreamingRecognizeRequest_descriptor; - } - - public com.google.cloud.speech.v1beta1.StreamingRecognizeRequest getDefaultInstanceForType() { - return com.google.cloud.speech.v1beta1.StreamingRecognizeRequest.getDefaultInstance(); - } - - public com.google.cloud.speech.v1beta1.StreamingRecognizeRequest build() { - com.google.cloud.speech.v1beta1.StreamingRecognizeRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.cloud.speech.v1beta1.StreamingRecognizeRequest buildPartial() { - com.google.cloud.speech.v1beta1.StreamingRecognizeRequest result = - new com.google.cloud.speech.v1beta1.StreamingRecognizeRequest(this); - if (streamingRequestCase_ == 1) { - if (streamingConfigBuilder_ == null) { - result.streamingRequest_ = streamingRequest_; - } else { - result.streamingRequest_ = streamingConfigBuilder_.build(); - } - } - if (streamingRequestCase_ == 2) { - result.streamingRequest_ = streamingRequest_; - } - result.streamingRequestCase_ = streamingRequestCase_; - onBuilt(); - return result; - } - - public Builder clone() { - return (Builder) super.clone(); - } - - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); - } - - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); - } - - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); - } - - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); - } - - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.speech.v1beta1.StreamingRecognizeRequest) { - return mergeFrom((com.google.cloud.speech.v1beta1.StreamingRecognizeRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.speech.v1beta1.StreamingRecognizeRequest other) { - if (other == com.google.cloud.speech.v1beta1.StreamingRecognizeRequest.getDefaultInstance()) - return this; - switch (other.getStreamingRequestCase()) { - case STREAMING_CONFIG: - { - mergeStreamingConfig(other.getStreamingConfig()); - break; - } - case AUDIO_CONTENT: - { - setAudioContent(other.getAudioContent()); - break; - } - case STREAMINGREQUEST_NOT_SET: - { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.speech.v1beta1.StreamingRecognizeRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.speech.v1beta1.StreamingRecognizeRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int streamingRequestCase_ = 0; - private java.lang.Object streamingRequest_; - - public StreamingRequestCase getStreamingRequestCase() { - return StreamingRequestCase.forNumber(streamingRequestCase_); - } - - public Builder clearStreamingRequest() { - streamingRequestCase_ = 0; - streamingRequest_ = null; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.speech.v1beta1.StreamingRecognitionConfig, - com.google.cloud.speech.v1beta1.StreamingRecognitionConfig.Builder, - com.google.cloud.speech.v1beta1.StreamingRecognitionConfigOrBuilder> - streamingConfigBuilder_; - /** - * - * - *
-     * Provides information to the recognizer that specifies how to process the
-     * request. The first `StreamingRecognizeRequest` message must contain a
-     * `streaming_config`  message.
-     * 
- * - * .google.cloud.speech.v1beta1.StreamingRecognitionConfig streaming_config = 1; - */ - public boolean hasStreamingConfig() { - return streamingRequestCase_ == 1; - } - /** - * - * - *
-     * Provides information to the recognizer that specifies how to process the
-     * request. The first `StreamingRecognizeRequest` message must contain a
-     * `streaming_config`  message.
-     * 
- * - * .google.cloud.speech.v1beta1.StreamingRecognitionConfig streaming_config = 1; - */ - public com.google.cloud.speech.v1beta1.StreamingRecognitionConfig getStreamingConfig() { - if (streamingConfigBuilder_ == null) { - if (streamingRequestCase_ == 1) { - return (com.google.cloud.speech.v1beta1.StreamingRecognitionConfig) streamingRequest_; - } - return com.google.cloud.speech.v1beta1.StreamingRecognitionConfig.getDefaultInstance(); - } else { - if (streamingRequestCase_ == 1) { - return streamingConfigBuilder_.getMessage(); - } - return com.google.cloud.speech.v1beta1.StreamingRecognitionConfig.getDefaultInstance(); - } - } - /** - * - * - *
-     * Provides information to the recognizer that specifies how to process the
-     * request. The first `StreamingRecognizeRequest` message must contain a
-     * `streaming_config`  message.
-     * 
- * - * .google.cloud.speech.v1beta1.StreamingRecognitionConfig streaming_config = 1; - */ - public Builder setStreamingConfig( - com.google.cloud.speech.v1beta1.StreamingRecognitionConfig value) { - if (streamingConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - streamingRequest_ = value; - onChanged(); - } else { - streamingConfigBuilder_.setMessage(value); - } - streamingRequestCase_ = 1; - return this; - } - /** - * - * - *
-     * Provides information to the recognizer that specifies how to process the
-     * request. The first `StreamingRecognizeRequest` message must contain a
-     * `streaming_config`  message.
-     * 
- * - * .google.cloud.speech.v1beta1.StreamingRecognitionConfig streaming_config = 1; - */ - public Builder setStreamingConfig( - com.google.cloud.speech.v1beta1.StreamingRecognitionConfig.Builder builderForValue) { - if (streamingConfigBuilder_ == null) { - streamingRequest_ = builderForValue.build(); - onChanged(); - } else { - streamingConfigBuilder_.setMessage(builderForValue.build()); - } - streamingRequestCase_ = 1; - return this; - } - /** - * - * - *
-     * Provides information to the recognizer that specifies how to process the
-     * request. The first `StreamingRecognizeRequest` message must contain a
-     * `streaming_config`  message.
-     * 
- * - * .google.cloud.speech.v1beta1.StreamingRecognitionConfig streaming_config = 1; - */ - public Builder mergeStreamingConfig( - com.google.cloud.speech.v1beta1.StreamingRecognitionConfig value) { - if (streamingConfigBuilder_ == null) { - if (streamingRequestCase_ == 1 - && streamingRequest_ - != com.google.cloud.speech.v1beta1.StreamingRecognitionConfig - .getDefaultInstance()) { - streamingRequest_ = - com.google.cloud.speech.v1beta1.StreamingRecognitionConfig.newBuilder( - (com.google.cloud.speech.v1beta1.StreamingRecognitionConfig) - streamingRequest_) - .mergeFrom(value) - .buildPartial(); - } else { - streamingRequest_ = value; - } - onChanged(); - } else { - if (streamingRequestCase_ == 1) { - streamingConfigBuilder_.mergeFrom(value); - } - streamingConfigBuilder_.setMessage(value); - } - streamingRequestCase_ = 1; - return this; - } - /** - * - * - *
-     * Provides information to the recognizer that specifies how to process the
-     * request. The first `StreamingRecognizeRequest` message must contain a
-     * `streaming_config`  message.
-     * 
- * - * .google.cloud.speech.v1beta1.StreamingRecognitionConfig streaming_config = 1; - */ - public Builder clearStreamingConfig() { - if (streamingConfigBuilder_ == null) { - if (streamingRequestCase_ == 1) { - streamingRequestCase_ = 0; - streamingRequest_ = null; - onChanged(); - } - } else { - if (streamingRequestCase_ == 1) { - streamingRequestCase_ = 0; - streamingRequest_ = null; - } - streamingConfigBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Provides information to the recognizer that specifies how to process the
-     * request. The first `StreamingRecognizeRequest` message must contain a
-     * `streaming_config`  message.
-     * 
- * - * .google.cloud.speech.v1beta1.StreamingRecognitionConfig streaming_config = 1; - */ - public com.google.cloud.speech.v1beta1.StreamingRecognitionConfig.Builder - getStreamingConfigBuilder() { - return getStreamingConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Provides information to the recognizer that specifies how to process the
-     * request. The first `StreamingRecognizeRequest` message must contain a
-     * `streaming_config`  message.
-     * 
- * - * .google.cloud.speech.v1beta1.StreamingRecognitionConfig streaming_config = 1; - */ - public com.google.cloud.speech.v1beta1.StreamingRecognitionConfigOrBuilder - getStreamingConfigOrBuilder() { - if ((streamingRequestCase_ == 1) && (streamingConfigBuilder_ != null)) { - return streamingConfigBuilder_.getMessageOrBuilder(); - } else { - if (streamingRequestCase_ == 1) { - return (com.google.cloud.speech.v1beta1.StreamingRecognitionConfig) streamingRequest_; - } - return com.google.cloud.speech.v1beta1.StreamingRecognitionConfig.getDefaultInstance(); - } - } - /** - * - * - *
-     * Provides information to the recognizer that specifies how to process the
-     * request. The first `StreamingRecognizeRequest` message must contain a
-     * `streaming_config`  message.
-     * 
- * - * .google.cloud.speech.v1beta1.StreamingRecognitionConfig streaming_config = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.speech.v1beta1.StreamingRecognitionConfig, - com.google.cloud.speech.v1beta1.StreamingRecognitionConfig.Builder, - com.google.cloud.speech.v1beta1.StreamingRecognitionConfigOrBuilder> - getStreamingConfigFieldBuilder() { - if (streamingConfigBuilder_ == null) { - if (!(streamingRequestCase_ == 1)) { - streamingRequest_ = - com.google.cloud.speech.v1beta1.StreamingRecognitionConfig.getDefaultInstance(); - } - streamingConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.speech.v1beta1.StreamingRecognitionConfig, - com.google.cloud.speech.v1beta1.StreamingRecognitionConfig.Builder, - com.google.cloud.speech.v1beta1.StreamingRecognitionConfigOrBuilder>( - (com.google.cloud.speech.v1beta1.StreamingRecognitionConfig) streamingRequest_, - getParentForChildren(), - isClean()); - streamingRequest_ = null; - } - streamingRequestCase_ = 1; - onChanged(); - ; - return streamingConfigBuilder_; - } - - /** - * - * - *
-     * The audio data to be recognized. Sequential chunks of audio data are sent
-     * in sequential `StreamingRecognizeRequest` messages. The first
-     * `StreamingRecognizeRequest` message must not contain `audio_content` data
-     * and all subsequent `StreamingRecognizeRequest` messages must contain
-     * `audio_content` data. The audio bytes must be encoded as specified in
-     * `RecognitionConfig`. Note: as with all bytes fields, protobuffers use a
-     * pure binary representation (not base64). See
-     * [audio limits](https://cloud.google.com/speech/limits#content).
-     * 
- * - * bytes audio_content = 2; - */ - public com.google.protobuf.ByteString getAudioContent() { - if (streamingRequestCase_ == 2) { - return (com.google.protobuf.ByteString) streamingRequest_; - } - return com.google.protobuf.ByteString.EMPTY; - } - /** - * - * - *
-     * The audio data to be recognized. Sequential chunks of audio data are sent
-     * in sequential `StreamingRecognizeRequest` messages. The first
-     * `StreamingRecognizeRequest` message must not contain `audio_content` data
-     * and all subsequent `StreamingRecognizeRequest` messages must contain
-     * `audio_content` data. The audio bytes must be encoded as specified in
-     * `RecognitionConfig`. Note: as with all bytes fields, protobuffers use a
-     * pure binary representation (not base64). See
-     * [audio limits](https://cloud.google.com/speech/limits#content).
-     * 
- * - * bytes audio_content = 2; - */ - public Builder setAudioContent(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - streamingRequestCase_ = 2; - streamingRequest_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * The audio data to be recognized. Sequential chunks of audio data are sent
-     * in sequential `StreamingRecognizeRequest` messages. The first
-     * `StreamingRecognizeRequest` message must not contain `audio_content` data
-     * and all subsequent `StreamingRecognizeRequest` messages must contain
-     * `audio_content` data. The audio bytes must be encoded as specified in
-     * `RecognitionConfig`. Note: as with all bytes fields, protobuffers use a
-     * pure binary representation (not base64). See
-     * [audio limits](https://cloud.google.com/speech/limits#content).
-     * 
- * - * bytes audio_content = 2; - */ - public Builder clearAudioContent() { - if (streamingRequestCase_ == 2) { - streamingRequestCase_ = 0; - streamingRequest_ = null; - onChanged(); - } - return this; - } - - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.speech.v1beta1.StreamingRecognizeRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.speech.v1beta1.StreamingRecognizeRequest) - private static final com.google.cloud.speech.v1beta1.StreamingRecognizeRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.speech.v1beta1.StreamingRecognizeRequest(); - } - - public static com.google.cloud.speech.v1beta1.StreamingRecognizeRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public StreamingRecognizeRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new StreamingRecognizeRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.cloud.speech.v1beta1.StreamingRecognizeRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/StreamingRecognizeRequestOrBuilder.java b/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/StreamingRecognizeRequestOrBuilder.java deleted file mode 100644 index 3879a185adb8..000000000000 --- a/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/StreamingRecognizeRequestOrBuilder.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/speech/v1beta1/cloud_speech.proto - -package com.google.cloud.speech.v1beta1; - -public interface StreamingRecognizeRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.speech.v1beta1.StreamingRecognizeRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Provides information to the recognizer that specifies how to process the
-   * request. The first `StreamingRecognizeRequest` message must contain a
-   * `streaming_config`  message.
-   * 
- * - * .google.cloud.speech.v1beta1.StreamingRecognitionConfig streaming_config = 1; - */ - boolean hasStreamingConfig(); - /** - * - * - *
-   * Provides information to the recognizer that specifies how to process the
-   * request. The first `StreamingRecognizeRequest` message must contain a
-   * `streaming_config`  message.
-   * 
- * - * .google.cloud.speech.v1beta1.StreamingRecognitionConfig streaming_config = 1; - */ - com.google.cloud.speech.v1beta1.StreamingRecognitionConfig getStreamingConfig(); - /** - * - * - *
-   * Provides information to the recognizer that specifies how to process the
-   * request. The first `StreamingRecognizeRequest` message must contain a
-   * `streaming_config`  message.
-   * 
- * - * .google.cloud.speech.v1beta1.StreamingRecognitionConfig streaming_config = 1; - */ - com.google.cloud.speech.v1beta1.StreamingRecognitionConfigOrBuilder getStreamingConfigOrBuilder(); - - /** - * - * - *
-   * The audio data to be recognized. Sequential chunks of audio data are sent
-   * in sequential `StreamingRecognizeRequest` messages. The first
-   * `StreamingRecognizeRequest` message must not contain `audio_content` data
-   * and all subsequent `StreamingRecognizeRequest` messages must contain
-   * `audio_content` data. The audio bytes must be encoded as specified in
-   * `RecognitionConfig`. Note: as with all bytes fields, protobuffers use a
-   * pure binary representation (not base64). See
-   * [audio limits](https://cloud.google.com/speech/limits#content).
-   * 
- * - * bytes audio_content = 2; - */ - com.google.protobuf.ByteString getAudioContent(); - - public com.google.cloud.speech.v1beta1.StreamingRecognizeRequest.StreamingRequestCase - getStreamingRequestCase(); -} diff --git a/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/StreamingRecognizeResponse.java b/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/StreamingRecognizeResponse.java deleted file mode 100644 index b44539afaf7f..000000000000 --- a/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/StreamingRecognizeResponse.java +++ /dev/null @@ -1,1821 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/speech/v1beta1/cloud_speech.proto - -package com.google.cloud.speech.v1beta1; - -/** - * - * - *
- * `StreamingRecognizeResponse` is the only message returned to the client by
- * `StreamingRecognize`. A series of one or more `StreamingRecognizeResponse`
- * messages are streamed back to the client.
- * Here's an example of a series of ten `StreamingRecognizeResponse`s that might
- * be returned while processing audio:
- * 1. endpointer_type: START_OF_SPEECH
- * 2. results { alternatives { transcript: "tube" } stability: 0.01 }
- *    result_index: 0
- * 3. results { alternatives { transcript: "to be a" } stability: 0.01 }
- *    result_index: 0
- * 4. results { alternatives { transcript: "to be" } stability: 0.9 }
- *    results { alternatives { transcript: " or not to be" } stability: 0.01 }
- *    result_index: 0
- * 5. results { alternatives { transcript: "to be or not to be"
- *                             confidence: 0.92 }
- *              alternatives { transcript: "to bee or not to bee" }
- *              is_final: true }
- *    result_index: 0
- * 6. results { alternatives { transcript: " that's" } stability: 0.01 }
- *    result_index: 1
- * 7. results { alternatives { transcript: " that is" } stability: 0.9 }
- *    results { alternatives { transcript: " the question" } stability: 0.01 }
- *    result_index: 1
- * 8. endpointer_type: END_OF_SPEECH
- * 9. results { alternatives { transcript: " that is the question"
- *                             confidence: 0.98 }
- *              alternatives { transcript: " that was the question" }
- *              is_final: true }
- *    result_index: 1
- * 10. endpointer_type: END_OF_AUDIO
- * Notes:
- * - Only two of the above responses #5 and #9 contain final results, they are
- *   indicated by `is_final: true`. Concatenating these together generates the
- *   full transcript: "to be or not to be that is the question".
- * - The others contain interim `results`. #4 and #7 contain two interim
- *   `results`, the first portion has a high stability and is less likely to
- *   change, the second portion has a low stability and is very likely to
- *   change. A UI designer might choose to show only high stability `results`.
- * - The specific `stability` and `confidence` values shown above are only for
- *   illustrative purposes. Actual values may vary.
- * - The `result_index` indicates the portion of audio that has had final
- *   results returned, and is no longer being processed. For example, the
- *   `results` in #6 and later correspond to the portion of audio after
- *   "to be or not to be".
- * 
- * - * Protobuf type {@code google.cloud.speech.v1beta1.StreamingRecognizeResponse} - */ -public final class StreamingRecognizeResponse extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.speech.v1beta1.StreamingRecognizeResponse) - StreamingRecognizeResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use StreamingRecognizeResponse.newBuilder() to construct. - private StreamingRecognizeResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private StreamingRecognizeResponse() { - results_ = java.util.Collections.emptyList(); - resultIndex_ = 0; - endpointerType_ = 0; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private StreamingRecognizeResponse( - 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; - default: - { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - case 10: - { - com.google.rpc.Status.Builder subBuilder = null; - if (error_ != null) { - subBuilder = error_.toBuilder(); - } - error_ = input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(error_); - error_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - results_ = - new java.util.ArrayList< - com.google.cloud.speech.v1beta1.StreamingRecognitionResult>(); - mutable_bitField0_ |= 0x00000002; - } - results_.add( - input.readMessage( - com.google.cloud.speech.v1beta1.StreamingRecognitionResult.parser(), - extensionRegistry)); - break; - } - case 24: - { - resultIndex_ = input.readInt32(); - break; - } - case 32: - { - int rawValue = input.readEnum(); - - endpointerType_ = rawValue; - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - results_ = java.util.Collections.unmodifiableList(results_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_StreamingRecognizeResponse_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_StreamingRecognizeResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.speech.v1beta1.StreamingRecognizeResponse.class, - com.google.cloud.speech.v1beta1.StreamingRecognizeResponse.Builder.class); - } - - /** - * - * - *
-   * Indicates the type of endpointer event.
-   * 
- * - * Protobuf enum {@code google.cloud.speech.v1beta1.StreamingRecognizeResponse.EndpointerType} - */ - public enum EndpointerType implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * No endpointer event specified.
-     * 
- * - * ENDPOINTER_EVENT_UNSPECIFIED = 0; - */ - ENDPOINTER_EVENT_UNSPECIFIED(0), - /** - * - * - *
-     * Speech has been detected in the audio stream, and the service is
-     * beginning to process it.
-     * 
- * - * START_OF_SPEECH = 1; - */ - START_OF_SPEECH(1), - /** - * - * - *
-     * Speech has ceased to be detected in the audio stream. (For example, the
-     * user may have paused after speaking.) If `single_utterance` is `false`,
-     * the service will continue to process audio, and if subsequent speech is
-     * detected, will send another START_OF_SPEECH event.
-     * 
- * - * END_OF_SPEECH = 2; - */ - END_OF_SPEECH(2), - /** - * - * - *
-     * This event is sent after the client has half-closed the input stream gRPC
-     * connection and the server has received all of the audio. (The server may
-     * still be processing the audio and may subsequently return additional
-     * results.)
-     * 
- * - * END_OF_AUDIO = 3; - */ - END_OF_AUDIO(3), - /** - * - * - *
-     * This event is only sent when `single_utterance` is `true`. It indicates
-     * that the server has detected the end of the user's speech utterance and
-     * expects no additional speech. Therefore, the server will not process
-     * additional audio (although it may subsequently return additional
-     * results). The client should stop sending additional audio data,
-     * half-close the gRPC connection, and wait for any additional results
-     * until the server closes the gRPC connection.
-     * 
- * - * END_OF_UTTERANCE = 4; - */ - END_OF_UTTERANCE(4), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * No endpointer event specified.
-     * 
- * - * ENDPOINTER_EVENT_UNSPECIFIED = 0; - */ - public static final int ENDPOINTER_EVENT_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * Speech has been detected in the audio stream, and the service is
-     * beginning to process it.
-     * 
- * - * START_OF_SPEECH = 1; - */ - public static final int START_OF_SPEECH_VALUE = 1; - /** - * - * - *
-     * Speech has ceased to be detected in the audio stream. (For example, the
-     * user may have paused after speaking.) If `single_utterance` is `false`,
-     * the service will continue to process audio, and if subsequent speech is
-     * detected, will send another START_OF_SPEECH event.
-     * 
- * - * END_OF_SPEECH = 2; - */ - public static final int END_OF_SPEECH_VALUE = 2; - /** - * - * - *
-     * This event is sent after the client has half-closed the input stream gRPC
-     * connection and the server has received all of the audio. (The server may
-     * still be processing the audio and may subsequently return additional
-     * results.)
-     * 
- * - * END_OF_AUDIO = 3; - */ - public static final int END_OF_AUDIO_VALUE = 3; - /** - * - * - *
-     * This event is only sent when `single_utterance` is `true`. It indicates
-     * that the server has detected the end of the user's speech utterance and
-     * expects no additional speech. Therefore, the server will not process
-     * additional audio (although it may subsequently return additional
-     * results). The client should stop sending additional audio data,
-     * half-close the gRPC connection, and wait for any additional results
-     * until the server closes the gRPC connection.
-     * 
- * - * END_OF_UTTERANCE = 4; - */ - public static final int END_OF_UTTERANCE_VALUE = 4; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** @deprecated Use {@link #forNumber(int)} instead. */ - @java.lang.Deprecated - public static EndpointerType valueOf(int value) { - return forNumber(value); - } - - public static EndpointerType forNumber(int value) { - switch (value) { - case 0: - return ENDPOINTER_EVENT_UNSPECIFIED; - case 1: - return START_OF_SPEECH; - case 2: - return END_OF_SPEECH; - case 3: - return END_OF_AUDIO; - case 4: - return END_OF_UTTERANCE; - 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 EndpointerType findValueByNumber(int number) { - return EndpointerType.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.speech.v1beta1.StreamingRecognizeResponse.getDescriptor() - .getEnumTypes() - .get(0); - } - - private static final EndpointerType[] VALUES = values(); - - public static EndpointerType 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 EndpointerType(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.speech.v1beta1.StreamingRecognizeResponse.EndpointerType) - } - - private int bitField0_; - public static final int ERROR_FIELD_NUMBER = 1; - private com.google.rpc.Status error_; - /** - * - * - *
-   * *Output-only* If set, returns a [google.rpc.Status][google.rpc.Status] message that
-   * specifies the error for the operation.
-   * 
- * - * .google.rpc.Status error = 1; - */ - public boolean hasError() { - return error_ != null; - } - /** - * - * - *
-   * *Output-only* If set, returns a [google.rpc.Status][google.rpc.Status] message that
-   * specifies the error for the operation.
-   * 
- * - * .google.rpc.Status error = 1; - */ - public com.google.rpc.Status getError() { - return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; - } - /** - * - * - *
-   * *Output-only* If set, returns a [google.rpc.Status][google.rpc.Status] message that
-   * specifies the error for the operation.
-   * 
- * - * .google.rpc.Status error = 1; - */ - public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { - return getError(); - } - - public static final int RESULTS_FIELD_NUMBER = 2; - private java.util.List results_; - /** - * - * - *
-   * *Output-only* This repeated list contains zero or more results that
-   * correspond to consecutive portions of the audio currently being processed.
-   * It contains zero or one `is_final=true` result (the newly settled portion),
-   * followed by zero or more `is_final=false` results.
-   * 
- * - * repeated .google.cloud.speech.v1beta1.StreamingRecognitionResult results = 2; - */ - public java.util.List - getResultsList() { - return results_; - } - /** - * - * - *
-   * *Output-only* This repeated list contains zero or more results that
-   * correspond to consecutive portions of the audio currently being processed.
-   * It contains zero or one `is_final=true` result (the newly settled portion),
-   * followed by zero or more `is_final=false` results.
-   * 
- * - * repeated .google.cloud.speech.v1beta1.StreamingRecognitionResult results = 2; - */ - public java.util.List< - ? extends com.google.cloud.speech.v1beta1.StreamingRecognitionResultOrBuilder> - getResultsOrBuilderList() { - return results_; - } - /** - * - * - *
-   * *Output-only* This repeated list contains zero or more results that
-   * correspond to consecutive portions of the audio currently being processed.
-   * It contains zero or one `is_final=true` result (the newly settled portion),
-   * followed by zero or more `is_final=false` results.
-   * 
- * - * repeated .google.cloud.speech.v1beta1.StreamingRecognitionResult results = 2; - */ - public int getResultsCount() { - return results_.size(); - } - /** - * - * - *
-   * *Output-only* This repeated list contains zero or more results that
-   * correspond to consecutive portions of the audio currently being processed.
-   * It contains zero or one `is_final=true` result (the newly settled portion),
-   * followed by zero or more `is_final=false` results.
-   * 
- * - * repeated .google.cloud.speech.v1beta1.StreamingRecognitionResult results = 2; - */ - public com.google.cloud.speech.v1beta1.StreamingRecognitionResult getResults(int index) { - return results_.get(index); - } - /** - * - * - *
-   * *Output-only* This repeated list contains zero or more results that
-   * correspond to consecutive portions of the audio currently being processed.
-   * It contains zero or one `is_final=true` result (the newly settled portion),
-   * followed by zero or more `is_final=false` results.
-   * 
- * - * repeated .google.cloud.speech.v1beta1.StreamingRecognitionResult results = 2; - */ - public com.google.cloud.speech.v1beta1.StreamingRecognitionResultOrBuilder getResultsOrBuilder( - int index) { - return results_.get(index); - } - - public static final int RESULT_INDEX_FIELD_NUMBER = 3; - private int resultIndex_; - /** - * - * - *
-   * *Output-only* Indicates the lowest index in the `results` array that has
-   * changed. The repeated `StreamingRecognitionResult` results overwrite past
-   * results at this index and higher.
-   * 
- * - * int32 result_index = 3; - */ - public int getResultIndex() { - return resultIndex_; - } - - public static final int ENDPOINTER_TYPE_FIELD_NUMBER = 4; - private int endpointerType_; - /** - * - * - *
-   * *Output-only* Indicates the type of endpointer event.
-   * 
- * - * - * .google.cloud.speech.v1beta1.StreamingRecognizeResponse.EndpointerType endpointer_type = 4; - * - */ - public int getEndpointerTypeValue() { - return endpointerType_; - } - /** - * - * - *
-   * *Output-only* Indicates the type of endpointer event.
-   * 
- * - * - * .google.cloud.speech.v1beta1.StreamingRecognizeResponse.EndpointerType endpointer_type = 4; - * - */ - public com.google.cloud.speech.v1beta1.StreamingRecognizeResponse.EndpointerType - getEndpointerType() { - com.google.cloud.speech.v1beta1.StreamingRecognizeResponse.EndpointerType result = - com.google.cloud.speech.v1beta1.StreamingRecognizeResponse.EndpointerType.valueOf( - endpointerType_); - return result == null - ? com.google.cloud.speech.v1beta1.StreamingRecognizeResponse.EndpointerType.UNRECOGNIZED - : result; - } - - private byte memoizedIsInitialized = -1; - - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (error_ != null) { - output.writeMessage(1, getError()); - } - for (int i = 0; i < results_.size(); i++) { - output.writeMessage(2, results_.get(i)); - } - if (resultIndex_ != 0) { - output.writeInt32(3, resultIndex_); - } - if (endpointerType_ - != com.google.cloud.speech.v1beta1.StreamingRecognizeResponse.EndpointerType - .ENDPOINTER_EVENT_UNSPECIFIED - .getNumber()) { - output.writeEnum(4, endpointerType_); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (error_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getError()); - } - for (int i = 0; i < results_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, results_.get(i)); - } - if (resultIndex_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, resultIndex_); - } - if (endpointerType_ - != com.google.cloud.speech.v1beta1.StreamingRecognizeResponse.EndpointerType - .ENDPOINTER_EVENT_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, endpointerType_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.speech.v1beta1.StreamingRecognizeResponse)) { - return super.equals(obj); - } - com.google.cloud.speech.v1beta1.StreamingRecognizeResponse other = - (com.google.cloud.speech.v1beta1.StreamingRecognizeResponse) obj; - - boolean result = true; - result = result && (hasError() == other.hasError()); - if (hasError()) { - result = result && getError().equals(other.getError()); - } - result = result && getResultsList().equals(other.getResultsList()); - result = result && (getResultIndex() == other.getResultIndex()); - result = result && endpointerType_ == other.endpointerType_; - result = result && unknownFields.equals(other.unknownFields); - return result; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasError()) { - hash = (37 * hash) + ERROR_FIELD_NUMBER; - hash = (53 * hash) + getError().hashCode(); - } - if (getResultsCount() > 0) { - hash = (37 * hash) + RESULTS_FIELD_NUMBER; - hash = (53 * hash) + getResultsList().hashCode(); - } - hash = (37 * hash) + RESULT_INDEX_FIELD_NUMBER; - hash = (53 * hash) + getResultIndex(); - hash = (37 * hash) + ENDPOINTER_TYPE_FIELD_NUMBER; - hash = (53 * hash) + endpointerType_; - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.speech.v1beta1.StreamingRecognizeResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.speech.v1beta1.StreamingRecognizeResponse parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.StreamingRecognizeResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.speech.v1beta1.StreamingRecognizeResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.StreamingRecognizeResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.speech.v1beta1.StreamingRecognizeResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.StreamingRecognizeResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.speech.v1beta1.StreamingRecognizeResponse parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.StreamingRecognizeResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.speech.v1beta1.StreamingRecognizeResponse parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.StreamingRecognizeResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.speech.v1beta1.StreamingRecognizeResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.speech.v1beta1.StreamingRecognizeResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * `StreamingRecognizeResponse` is the only message returned to the client by
-   * `StreamingRecognize`. A series of one or more `StreamingRecognizeResponse`
-   * messages are streamed back to the client.
-   * Here's an example of a series of ten `StreamingRecognizeResponse`s that might
-   * be returned while processing audio:
-   * 1. endpointer_type: START_OF_SPEECH
-   * 2. results { alternatives { transcript: "tube" } stability: 0.01 }
-   *    result_index: 0
-   * 3. results { alternatives { transcript: "to be a" } stability: 0.01 }
-   *    result_index: 0
-   * 4. results { alternatives { transcript: "to be" } stability: 0.9 }
-   *    results { alternatives { transcript: " or not to be" } stability: 0.01 }
-   *    result_index: 0
-   * 5. results { alternatives { transcript: "to be or not to be"
-   *                             confidence: 0.92 }
-   *              alternatives { transcript: "to bee or not to bee" }
-   *              is_final: true }
-   *    result_index: 0
-   * 6. results { alternatives { transcript: " that's" } stability: 0.01 }
-   *    result_index: 1
-   * 7. results { alternatives { transcript: " that is" } stability: 0.9 }
-   *    results { alternatives { transcript: " the question" } stability: 0.01 }
-   *    result_index: 1
-   * 8. endpointer_type: END_OF_SPEECH
-   * 9. results { alternatives { transcript: " that is the question"
-   *                             confidence: 0.98 }
-   *              alternatives { transcript: " that was the question" }
-   *              is_final: true }
-   *    result_index: 1
-   * 10. endpointer_type: END_OF_AUDIO
-   * Notes:
-   * - Only two of the above responses #5 and #9 contain final results, they are
-   *   indicated by `is_final: true`. Concatenating these together generates the
-   *   full transcript: "to be or not to be that is the question".
-   * - The others contain interim `results`. #4 and #7 contain two interim
-   *   `results`, the first portion has a high stability and is less likely to
-   *   change, the second portion has a low stability and is very likely to
-   *   change. A UI designer might choose to show only high stability `results`.
-   * - The specific `stability` and `confidence` values shown above are only for
-   *   illustrative purposes. Actual values may vary.
-   * - The `result_index` indicates the portion of audio that has had final
-   *   results returned, and is no longer being processed. For example, the
-   *   `results` in #6 and later correspond to the portion of audio after
-   *   "to be or not to be".
-   * 
- * - * Protobuf type {@code google.cloud.speech.v1beta1.StreamingRecognizeResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.speech.v1beta1.StreamingRecognizeResponse) - com.google.cloud.speech.v1beta1.StreamingRecognizeResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_StreamingRecognizeResponse_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_StreamingRecognizeResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.speech.v1beta1.StreamingRecognizeResponse.class, - com.google.cloud.speech.v1beta1.StreamingRecognizeResponse.Builder.class); - } - - // Construct using com.google.cloud.speech.v1beta1.StreamingRecognizeResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getResultsFieldBuilder(); - } - } - - public Builder clear() { - super.clear(); - if (errorBuilder_ == null) { - error_ = null; - } else { - error_ = null; - errorBuilder_ = null; - } - if (resultsBuilder_ == null) { - results_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - resultsBuilder_.clear(); - } - resultIndex_ = 0; - - endpointerType_ = 0; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_StreamingRecognizeResponse_descriptor; - } - - public com.google.cloud.speech.v1beta1.StreamingRecognizeResponse getDefaultInstanceForType() { - return com.google.cloud.speech.v1beta1.StreamingRecognizeResponse.getDefaultInstance(); - } - - public com.google.cloud.speech.v1beta1.StreamingRecognizeResponse build() { - com.google.cloud.speech.v1beta1.StreamingRecognizeResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.cloud.speech.v1beta1.StreamingRecognizeResponse buildPartial() { - com.google.cloud.speech.v1beta1.StreamingRecognizeResponse result = - new com.google.cloud.speech.v1beta1.StreamingRecognizeResponse(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (errorBuilder_ == null) { - result.error_ = error_; - } else { - result.error_ = errorBuilder_.build(); - } - if (resultsBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { - results_ = java.util.Collections.unmodifiableList(results_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.results_ = results_; - } else { - result.results_ = resultsBuilder_.build(); - } - result.resultIndex_ = resultIndex_; - result.endpointerType_ = endpointerType_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder clone() { - return (Builder) super.clone(); - } - - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); - } - - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); - } - - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); - } - - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); - } - - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.speech.v1beta1.StreamingRecognizeResponse) { - return mergeFrom((com.google.cloud.speech.v1beta1.StreamingRecognizeResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.speech.v1beta1.StreamingRecognizeResponse other) { - if (other == com.google.cloud.speech.v1beta1.StreamingRecognizeResponse.getDefaultInstance()) - return this; - if (other.hasError()) { - mergeError(other.getError()); - } - if (resultsBuilder_ == null) { - if (!other.results_.isEmpty()) { - if (results_.isEmpty()) { - results_ = other.results_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureResultsIsMutable(); - results_.addAll(other.results_); - } - onChanged(); - } - } else { - if (!other.results_.isEmpty()) { - if (resultsBuilder_.isEmpty()) { - resultsBuilder_.dispose(); - resultsBuilder_ = null; - results_ = other.results_; - bitField0_ = (bitField0_ & ~0x00000002); - resultsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getResultsFieldBuilder() - : null; - } else { - resultsBuilder_.addAllMessages(other.results_); - } - } - } - if (other.getResultIndex() != 0) { - setResultIndex(other.getResultIndex()); - } - if (other.endpointerType_ != 0) { - setEndpointerTypeValue(other.getEndpointerTypeValue()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.speech.v1beta1.StreamingRecognizeResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.speech.v1beta1.StreamingRecognizeResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private com.google.rpc.Status error_ = null; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> - errorBuilder_; - /** - * - * - *
-     * *Output-only* If set, returns a [google.rpc.Status][google.rpc.Status] message that
-     * specifies the error for the operation.
-     * 
- * - * .google.rpc.Status error = 1; - */ - public boolean hasError() { - return errorBuilder_ != null || error_ != null; - } - /** - * - * - *
-     * *Output-only* If set, returns a [google.rpc.Status][google.rpc.Status] message that
-     * specifies the error for the operation.
-     * 
- * - * .google.rpc.Status error = 1; - */ - public com.google.rpc.Status getError() { - if (errorBuilder_ == null) { - return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; - } else { - return errorBuilder_.getMessage(); - } - } - /** - * - * - *
-     * *Output-only* If set, returns a [google.rpc.Status][google.rpc.Status] message that
-     * specifies the error for the operation.
-     * 
- * - * .google.rpc.Status error = 1; - */ - public Builder setError(com.google.rpc.Status value) { - if (errorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - error_ = value; - onChanged(); - } else { - errorBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * *Output-only* If set, returns a [google.rpc.Status][google.rpc.Status] message that
-     * specifies the error for the operation.
-     * 
- * - * .google.rpc.Status error = 1; - */ - public Builder setError(com.google.rpc.Status.Builder builderForValue) { - if (errorBuilder_ == null) { - error_ = builderForValue.build(); - onChanged(); - } else { - errorBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * *Output-only* If set, returns a [google.rpc.Status][google.rpc.Status] message that
-     * specifies the error for the operation.
-     * 
- * - * .google.rpc.Status error = 1; - */ - public Builder mergeError(com.google.rpc.Status value) { - if (errorBuilder_ == null) { - if (error_ != null) { - error_ = com.google.rpc.Status.newBuilder(error_).mergeFrom(value).buildPartial(); - } else { - error_ = value; - } - onChanged(); - } else { - errorBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * *Output-only* If set, returns a [google.rpc.Status][google.rpc.Status] message that
-     * specifies the error for the operation.
-     * 
- * - * .google.rpc.Status error = 1; - */ - public Builder clearError() { - if (errorBuilder_ == null) { - error_ = null; - onChanged(); - } else { - error_ = null; - errorBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * *Output-only* If set, returns a [google.rpc.Status][google.rpc.Status] message that
-     * specifies the error for the operation.
-     * 
- * - * .google.rpc.Status error = 1; - */ - public com.google.rpc.Status.Builder getErrorBuilder() { - - onChanged(); - return getErrorFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * *Output-only* If set, returns a [google.rpc.Status][google.rpc.Status] message that
-     * specifies the error for the operation.
-     * 
- * - * .google.rpc.Status error = 1; - */ - public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { - if (errorBuilder_ != null) { - return errorBuilder_.getMessageOrBuilder(); - } else { - return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; - } - } - /** - * - * - *
-     * *Output-only* If set, returns a [google.rpc.Status][google.rpc.Status] message that
-     * specifies the error for the operation.
-     * 
- * - * .google.rpc.Status error = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> - getErrorFieldBuilder() { - if (errorBuilder_ == null) { - errorBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.rpc.Status, - com.google.rpc.Status.Builder, - com.google.rpc.StatusOrBuilder>(getError(), getParentForChildren(), isClean()); - error_ = null; - } - return errorBuilder_; - } - - private java.util.List results_ = - java.util.Collections.emptyList(); - - private void ensureResultsIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { - results_ = - new java.util.ArrayList( - results_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.speech.v1beta1.StreamingRecognitionResult, - com.google.cloud.speech.v1beta1.StreamingRecognitionResult.Builder, - com.google.cloud.speech.v1beta1.StreamingRecognitionResultOrBuilder> - resultsBuilder_; - - /** - * - * - *
-     * *Output-only* This repeated list contains zero or more results that
-     * correspond to consecutive portions of the audio currently being processed.
-     * It contains zero or one `is_final=true` result (the newly settled portion),
-     * followed by zero or more `is_final=false` results.
-     * 
- * - * repeated .google.cloud.speech.v1beta1.StreamingRecognitionResult results = 2; - */ - public java.util.List - getResultsList() { - if (resultsBuilder_ == null) { - return java.util.Collections.unmodifiableList(results_); - } else { - return resultsBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * *Output-only* This repeated list contains zero or more results that
-     * correspond to consecutive portions of the audio currently being processed.
-     * It contains zero or one `is_final=true` result (the newly settled portion),
-     * followed by zero or more `is_final=false` results.
-     * 
- * - * repeated .google.cloud.speech.v1beta1.StreamingRecognitionResult results = 2; - */ - public int getResultsCount() { - if (resultsBuilder_ == null) { - return results_.size(); - } else { - return resultsBuilder_.getCount(); - } - } - /** - * - * - *
-     * *Output-only* This repeated list contains zero or more results that
-     * correspond to consecutive portions of the audio currently being processed.
-     * It contains zero or one `is_final=true` result (the newly settled portion),
-     * followed by zero or more `is_final=false` results.
-     * 
- * - * repeated .google.cloud.speech.v1beta1.StreamingRecognitionResult results = 2; - */ - public com.google.cloud.speech.v1beta1.StreamingRecognitionResult getResults(int index) { - if (resultsBuilder_ == null) { - return results_.get(index); - } else { - return resultsBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * *Output-only* This repeated list contains zero or more results that
-     * correspond to consecutive portions of the audio currently being processed.
-     * It contains zero or one `is_final=true` result (the newly settled portion),
-     * followed by zero or more `is_final=false` results.
-     * 
- * - * repeated .google.cloud.speech.v1beta1.StreamingRecognitionResult results = 2; - */ - public Builder setResults( - int index, com.google.cloud.speech.v1beta1.StreamingRecognitionResult value) { - if (resultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResultsIsMutable(); - results_.set(index, value); - onChanged(); - } else { - resultsBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * *Output-only* This repeated list contains zero or more results that
-     * correspond to consecutive portions of the audio currently being processed.
-     * It contains zero or one `is_final=true` result (the newly settled portion),
-     * followed by zero or more `is_final=false` results.
-     * 
- * - * repeated .google.cloud.speech.v1beta1.StreamingRecognitionResult results = 2; - */ - public Builder setResults( - int index, - com.google.cloud.speech.v1beta1.StreamingRecognitionResult.Builder builderForValue) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - results_.set(index, builderForValue.build()); - onChanged(); - } else { - resultsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * *Output-only* This repeated list contains zero or more results that
-     * correspond to consecutive portions of the audio currently being processed.
-     * It contains zero or one `is_final=true` result (the newly settled portion),
-     * followed by zero or more `is_final=false` results.
-     * 
- * - * repeated .google.cloud.speech.v1beta1.StreamingRecognitionResult results = 2; - */ - public Builder addResults(com.google.cloud.speech.v1beta1.StreamingRecognitionResult value) { - if (resultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResultsIsMutable(); - results_.add(value); - onChanged(); - } else { - resultsBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * *Output-only* This repeated list contains zero or more results that
-     * correspond to consecutive portions of the audio currently being processed.
-     * It contains zero or one `is_final=true` result (the newly settled portion),
-     * followed by zero or more `is_final=false` results.
-     * 
- * - * repeated .google.cloud.speech.v1beta1.StreamingRecognitionResult results = 2; - */ - public Builder addResults( - int index, com.google.cloud.speech.v1beta1.StreamingRecognitionResult value) { - if (resultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResultsIsMutable(); - results_.add(index, value); - onChanged(); - } else { - resultsBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * *Output-only* This repeated list contains zero or more results that
-     * correspond to consecutive portions of the audio currently being processed.
-     * It contains zero or one `is_final=true` result (the newly settled portion),
-     * followed by zero or more `is_final=false` results.
-     * 
- * - * repeated .google.cloud.speech.v1beta1.StreamingRecognitionResult results = 2; - */ - public Builder addResults( - com.google.cloud.speech.v1beta1.StreamingRecognitionResult.Builder builderForValue) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - results_.add(builderForValue.build()); - onChanged(); - } else { - resultsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * *Output-only* This repeated list contains zero or more results that
-     * correspond to consecutive portions of the audio currently being processed.
-     * It contains zero or one `is_final=true` result (the newly settled portion),
-     * followed by zero or more `is_final=false` results.
-     * 
- * - * repeated .google.cloud.speech.v1beta1.StreamingRecognitionResult results = 2; - */ - public Builder addResults( - int index, - com.google.cloud.speech.v1beta1.StreamingRecognitionResult.Builder builderForValue) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - results_.add(index, builderForValue.build()); - onChanged(); - } else { - resultsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * *Output-only* This repeated list contains zero or more results that
-     * correspond to consecutive portions of the audio currently being processed.
-     * It contains zero or one `is_final=true` result (the newly settled portion),
-     * followed by zero or more `is_final=false` results.
-     * 
- * - * repeated .google.cloud.speech.v1beta1.StreamingRecognitionResult results = 2; - */ - public Builder addAllResults( - java.lang.Iterable - values) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, results_); - onChanged(); - } else { - resultsBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * *Output-only* This repeated list contains zero or more results that
-     * correspond to consecutive portions of the audio currently being processed.
-     * It contains zero or one `is_final=true` result (the newly settled portion),
-     * followed by zero or more `is_final=false` results.
-     * 
- * - * repeated .google.cloud.speech.v1beta1.StreamingRecognitionResult results = 2; - */ - public Builder clearResults() { - if (resultsBuilder_ == null) { - results_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - resultsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * *Output-only* This repeated list contains zero or more results that
-     * correspond to consecutive portions of the audio currently being processed.
-     * It contains zero or one `is_final=true` result (the newly settled portion),
-     * followed by zero or more `is_final=false` results.
-     * 
- * - * repeated .google.cloud.speech.v1beta1.StreamingRecognitionResult results = 2; - */ - public Builder removeResults(int index) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - results_.remove(index); - onChanged(); - } else { - resultsBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * *Output-only* This repeated list contains zero or more results that
-     * correspond to consecutive portions of the audio currently being processed.
-     * It contains zero or one `is_final=true` result (the newly settled portion),
-     * followed by zero or more `is_final=false` results.
-     * 
- * - * repeated .google.cloud.speech.v1beta1.StreamingRecognitionResult results = 2; - */ - public com.google.cloud.speech.v1beta1.StreamingRecognitionResult.Builder getResultsBuilder( - int index) { - return getResultsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * *Output-only* This repeated list contains zero or more results that
-     * correspond to consecutive portions of the audio currently being processed.
-     * It contains zero or one `is_final=true` result (the newly settled portion),
-     * followed by zero or more `is_final=false` results.
-     * 
- * - * repeated .google.cloud.speech.v1beta1.StreamingRecognitionResult results = 2; - */ - public com.google.cloud.speech.v1beta1.StreamingRecognitionResultOrBuilder getResultsOrBuilder( - int index) { - if (resultsBuilder_ == null) { - return results_.get(index); - } else { - return resultsBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * *Output-only* This repeated list contains zero or more results that
-     * correspond to consecutive portions of the audio currently being processed.
-     * It contains zero or one `is_final=true` result (the newly settled portion),
-     * followed by zero or more `is_final=false` results.
-     * 
- * - * repeated .google.cloud.speech.v1beta1.StreamingRecognitionResult results = 2; - */ - public java.util.List< - ? extends com.google.cloud.speech.v1beta1.StreamingRecognitionResultOrBuilder> - getResultsOrBuilderList() { - if (resultsBuilder_ != null) { - return resultsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(results_); - } - } - /** - * - * - *
-     * *Output-only* This repeated list contains zero or more results that
-     * correspond to consecutive portions of the audio currently being processed.
-     * It contains zero or one `is_final=true` result (the newly settled portion),
-     * followed by zero or more `is_final=false` results.
-     * 
- * - * repeated .google.cloud.speech.v1beta1.StreamingRecognitionResult results = 2; - */ - public com.google.cloud.speech.v1beta1.StreamingRecognitionResult.Builder addResultsBuilder() { - return getResultsFieldBuilder() - .addBuilder( - com.google.cloud.speech.v1beta1.StreamingRecognitionResult.getDefaultInstance()); - } - /** - * - * - *
-     * *Output-only* This repeated list contains zero or more results that
-     * correspond to consecutive portions of the audio currently being processed.
-     * It contains zero or one `is_final=true` result (the newly settled portion),
-     * followed by zero or more `is_final=false` results.
-     * 
- * - * repeated .google.cloud.speech.v1beta1.StreamingRecognitionResult results = 2; - */ - public com.google.cloud.speech.v1beta1.StreamingRecognitionResult.Builder addResultsBuilder( - int index) { - return getResultsFieldBuilder() - .addBuilder( - index, - com.google.cloud.speech.v1beta1.StreamingRecognitionResult.getDefaultInstance()); - } - /** - * - * - *
-     * *Output-only* This repeated list contains zero or more results that
-     * correspond to consecutive portions of the audio currently being processed.
-     * It contains zero or one `is_final=true` result (the newly settled portion),
-     * followed by zero or more `is_final=false` results.
-     * 
- * - * repeated .google.cloud.speech.v1beta1.StreamingRecognitionResult results = 2; - */ - public java.util.List - getResultsBuilderList() { - return getResultsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.speech.v1beta1.StreamingRecognitionResult, - com.google.cloud.speech.v1beta1.StreamingRecognitionResult.Builder, - com.google.cloud.speech.v1beta1.StreamingRecognitionResultOrBuilder> - getResultsFieldBuilder() { - if (resultsBuilder_ == null) { - resultsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.speech.v1beta1.StreamingRecognitionResult, - com.google.cloud.speech.v1beta1.StreamingRecognitionResult.Builder, - com.google.cloud.speech.v1beta1.StreamingRecognitionResultOrBuilder>( - results_, - ((bitField0_ & 0x00000002) == 0x00000002), - getParentForChildren(), - isClean()); - results_ = null; - } - return resultsBuilder_; - } - - private int resultIndex_; - /** - * - * - *
-     * *Output-only* Indicates the lowest index in the `results` array that has
-     * changed. The repeated `StreamingRecognitionResult` results overwrite past
-     * results at this index and higher.
-     * 
- * - * int32 result_index = 3; - */ - public int getResultIndex() { - return resultIndex_; - } - /** - * - * - *
-     * *Output-only* Indicates the lowest index in the `results` array that has
-     * changed. The repeated `StreamingRecognitionResult` results overwrite past
-     * results at this index and higher.
-     * 
- * - * int32 result_index = 3; - */ - public Builder setResultIndex(int value) { - - resultIndex_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * *Output-only* Indicates the lowest index in the `results` array that has
-     * changed. The repeated `StreamingRecognitionResult` results overwrite past
-     * results at this index and higher.
-     * 
- * - * int32 result_index = 3; - */ - public Builder clearResultIndex() { - - resultIndex_ = 0; - onChanged(); - return this; - } - - private int endpointerType_ = 0; - /** - * - * - *
-     * *Output-only* Indicates the type of endpointer event.
-     * 
- * - * - * .google.cloud.speech.v1beta1.StreamingRecognizeResponse.EndpointerType endpointer_type = 4; - * - */ - public int getEndpointerTypeValue() { - return endpointerType_; - } - /** - * - * - *
-     * *Output-only* Indicates the type of endpointer event.
-     * 
- * - * - * .google.cloud.speech.v1beta1.StreamingRecognizeResponse.EndpointerType endpointer_type = 4; - * - */ - public Builder setEndpointerTypeValue(int value) { - endpointerType_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * *Output-only* Indicates the type of endpointer event.
-     * 
- * - * - * .google.cloud.speech.v1beta1.StreamingRecognizeResponse.EndpointerType endpointer_type = 4; - * - */ - public com.google.cloud.speech.v1beta1.StreamingRecognizeResponse.EndpointerType - getEndpointerType() { - com.google.cloud.speech.v1beta1.StreamingRecognizeResponse.EndpointerType result = - com.google.cloud.speech.v1beta1.StreamingRecognizeResponse.EndpointerType.valueOf( - endpointerType_); - return result == null - ? com.google.cloud.speech.v1beta1.StreamingRecognizeResponse.EndpointerType.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * *Output-only* Indicates the type of endpointer event.
-     * 
- * - * - * .google.cloud.speech.v1beta1.StreamingRecognizeResponse.EndpointerType endpointer_type = 4; - * - */ - public Builder setEndpointerType( - com.google.cloud.speech.v1beta1.StreamingRecognizeResponse.EndpointerType value) { - if (value == null) { - throw new NullPointerException(); - } - - endpointerType_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * *Output-only* Indicates the type of endpointer event.
-     * 
- * - * - * .google.cloud.speech.v1beta1.StreamingRecognizeResponse.EndpointerType endpointer_type = 4; - * - */ - public Builder clearEndpointerType() { - - endpointerType_ = 0; - onChanged(); - return this; - } - - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.speech.v1beta1.StreamingRecognizeResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.speech.v1beta1.StreamingRecognizeResponse) - private static final com.google.cloud.speech.v1beta1.StreamingRecognizeResponse DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.speech.v1beta1.StreamingRecognizeResponse(); - } - - public static com.google.cloud.speech.v1beta1.StreamingRecognizeResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public StreamingRecognizeResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new StreamingRecognizeResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.cloud.speech.v1beta1.StreamingRecognizeResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/StreamingRecognizeResponseOrBuilder.java b/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/StreamingRecognizeResponseOrBuilder.java deleted file mode 100644 index e63e31309ebc..000000000000 --- a/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/StreamingRecognizeResponseOrBuilder.java +++ /dev/null @@ -1,165 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/speech/v1beta1/cloud_speech.proto - -package com.google.cloud.speech.v1beta1; - -public interface StreamingRecognizeResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.speech.v1beta1.StreamingRecognizeResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * *Output-only* If set, returns a [google.rpc.Status][google.rpc.Status] message that
-   * specifies the error for the operation.
-   * 
- * - * .google.rpc.Status error = 1; - */ - boolean hasError(); - /** - * - * - *
-   * *Output-only* If set, returns a [google.rpc.Status][google.rpc.Status] message that
-   * specifies the error for the operation.
-   * 
- * - * .google.rpc.Status error = 1; - */ - com.google.rpc.Status getError(); - /** - * - * - *
-   * *Output-only* If set, returns a [google.rpc.Status][google.rpc.Status] message that
-   * specifies the error for the operation.
-   * 
- * - * .google.rpc.Status error = 1; - */ - com.google.rpc.StatusOrBuilder getErrorOrBuilder(); - - /** - * - * - *
-   * *Output-only* This repeated list contains zero or more results that
-   * correspond to consecutive portions of the audio currently being processed.
-   * It contains zero or one `is_final=true` result (the newly settled portion),
-   * followed by zero or more `is_final=false` results.
-   * 
- * - * repeated .google.cloud.speech.v1beta1.StreamingRecognitionResult results = 2; - */ - java.util.List getResultsList(); - /** - * - * - *
-   * *Output-only* This repeated list contains zero or more results that
-   * correspond to consecutive portions of the audio currently being processed.
-   * It contains zero or one `is_final=true` result (the newly settled portion),
-   * followed by zero or more `is_final=false` results.
-   * 
- * - * repeated .google.cloud.speech.v1beta1.StreamingRecognitionResult results = 2; - */ - com.google.cloud.speech.v1beta1.StreamingRecognitionResult getResults(int index); - /** - * - * - *
-   * *Output-only* This repeated list contains zero or more results that
-   * correspond to consecutive portions of the audio currently being processed.
-   * It contains zero or one `is_final=true` result (the newly settled portion),
-   * followed by zero or more `is_final=false` results.
-   * 
- * - * repeated .google.cloud.speech.v1beta1.StreamingRecognitionResult results = 2; - */ - int getResultsCount(); - /** - * - * - *
-   * *Output-only* This repeated list contains zero or more results that
-   * correspond to consecutive portions of the audio currently being processed.
-   * It contains zero or one `is_final=true` result (the newly settled portion),
-   * followed by zero or more `is_final=false` results.
-   * 
- * - * repeated .google.cloud.speech.v1beta1.StreamingRecognitionResult results = 2; - */ - java.util.List - getResultsOrBuilderList(); - /** - * - * - *
-   * *Output-only* This repeated list contains zero or more results that
-   * correspond to consecutive portions of the audio currently being processed.
-   * It contains zero or one `is_final=true` result (the newly settled portion),
-   * followed by zero or more `is_final=false` results.
-   * 
- * - * repeated .google.cloud.speech.v1beta1.StreamingRecognitionResult results = 2; - */ - com.google.cloud.speech.v1beta1.StreamingRecognitionResultOrBuilder getResultsOrBuilder( - int index); - - /** - * - * - *
-   * *Output-only* Indicates the lowest index in the `results` array that has
-   * changed. The repeated `StreamingRecognitionResult` results overwrite past
-   * results at this index and higher.
-   * 
- * - * int32 result_index = 3; - */ - int getResultIndex(); - - /** - * - * - *
-   * *Output-only* Indicates the type of endpointer event.
-   * 
- * - * - * .google.cloud.speech.v1beta1.StreamingRecognizeResponse.EndpointerType endpointer_type = 4; - * - */ - int getEndpointerTypeValue(); - /** - * - * - *
-   * *Output-only* Indicates the type of endpointer event.
-   * 
- * - * - * .google.cloud.speech.v1beta1.StreamingRecognizeResponse.EndpointerType endpointer_type = 4; - * - */ - com.google.cloud.speech.v1beta1.StreamingRecognizeResponse.EndpointerType getEndpointerType(); -} diff --git a/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/SyncRecognizeRequest.java b/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/SyncRecognizeRequest.java deleted file mode 100644 index e8c9f8865f2c..000000000000 --- a/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/SyncRecognizeRequest.java +++ /dev/null @@ -1,974 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/speech/v1beta1/cloud_speech.proto - -package com.google.cloud.speech.v1beta1; - -/** - * - * - *
- * The top-level message sent by the client for the `SyncRecognize` method.
- * 
- * - * Protobuf type {@code google.cloud.speech.v1beta1.SyncRecognizeRequest} - */ -public final class SyncRecognizeRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.speech.v1beta1.SyncRecognizeRequest) - SyncRecognizeRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use SyncRecognizeRequest.newBuilder() to construct. - private SyncRecognizeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private SyncRecognizeRequest() {} - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private SyncRecognizeRequest( - 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; - default: - { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - case 10: - { - com.google.cloud.speech.v1beta1.RecognitionConfig.Builder subBuilder = null; - if (config_ != null) { - subBuilder = config_.toBuilder(); - } - config_ = - input.readMessage( - com.google.cloud.speech.v1beta1.RecognitionConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(config_); - config_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.cloud.speech.v1beta1.RecognitionAudio.Builder subBuilder = null; - if (audio_ != null) { - subBuilder = audio_.toBuilder(); - } - audio_ = - input.readMessage( - com.google.cloud.speech.v1beta1.RecognitionAudio.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(audio_); - audio_ = subBuilder.buildPartial(); - } - - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_SyncRecognizeRequest_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_SyncRecognizeRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.speech.v1beta1.SyncRecognizeRequest.class, - com.google.cloud.speech.v1beta1.SyncRecognizeRequest.Builder.class); - } - - public static final int CONFIG_FIELD_NUMBER = 1; - private com.google.cloud.speech.v1beta1.RecognitionConfig config_; - /** - * - * - *
-   * *Required* Provides information to the recognizer that specifies how to
-   * process the request.
-   * 
- * - * .google.cloud.speech.v1beta1.RecognitionConfig config = 1; - */ - public boolean hasConfig() { - return config_ != null; - } - /** - * - * - *
-   * *Required* Provides information to the recognizer that specifies how to
-   * process the request.
-   * 
- * - * .google.cloud.speech.v1beta1.RecognitionConfig config = 1; - */ - public com.google.cloud.speech.v1beta1.RecognitionConfig getConfig() { - return config_ == null - ? com.google.cloud.speech.v1beta1.RecognitionConfig.getDefaultInstance() - : config_; - } - /** - * - * - *
-   * *Required* Provides information to the recognizer that specifies how to
-   * process the request.
-   * 
- * - * .google.cloud.speech.v1beta1.RecognitionConfig config = 1; - */ - public com.google.cloud.speech.v1beta1.RecognitionConfigOrBuilder getConfigOrBuilder() { - return getConfig(); - } - - public static final int AUDIO_FIELD_NUMBER = 2; - private com.google.cloud.speech.v1beta1.RecognitionAudio audio_; - /** - * - * - *
-   * *Required* The audio data to be recognized.
-   * 
- * - * .google.cloud.speech.v1beta1.RecognitionAudio audio = 2; - */ - public boolean hasAudio() { - return audio_ != null; - } - /** - * - * - *
-   * *Required* The audio data to be recognized.
-   * 
- * - * .google.cloud.speech.v1beta1.RecognitionAudio audio = 2; - */ - public com.google.cloud.speech.v1beta1.RecognitionAudio getAudio() { - return audio_ == null - ? com.google.cloud.speech.v1beta1.RecognitionAudio.getDefaultInstance() - : audio_; - } - /** - * - * - *
-   * *Required* The audio data to be recognized.
-   * 
- * - * .google.cloud.speech.v1beta1.RecognitionAudio audio = 2; - */ - public com.google.cloud.speech.v1beta1.RecognitionAudioOrBuilder getAudioOrBuilder() { - return getAudio(); - } - - private byte memoizedIsInitialized = -1; - - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (config_ != null) { - output.writeMessage(1, getConfig()); - } - if (audio_ != null) { - output.writeMessage(2, getAudio()); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (config_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getConfig()); - } - if (audio_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getAudio()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.speech.v1beta1.SyncRecognizeRequest)) { - return super.equals(obj); - } - com.google.cloud.speech.v1beta1.SyncRecognizeRequest other = - (com.google.cloud.speech.v1beta1.SyncRecognizeRequest) obj; - - boolean result = true; - result = result && (hasConfig() == other.hasConfig()); - if (hasConfig()) { - result = result && getConfig().equals(other.getConfig()); - } - result = result && (hasAudio() == other.hasAudio()); - if (hasAudio()) { - result = result && getAudio().equals(other.getAudio()); - } - result = result && unknownFields.equals(other.unknownFields); - return result; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasConfig()) { - hash = (37 * hash) + CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getConfig().hashCode(); - } - if (hasAudio()) { - hash = (37 * hash) + AUDIO_FIELD_NUMBER; - hash = (53 * hash) + getAudio().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.speech.v1beta1.SyncRecognizeRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.speech.v1beta1.SyncRecognizeRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.SyncRecognizeRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.speech.v1beta1.SyncRecognizeRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.SyncRecognizeRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.speech.v1beta1.SyncRecognizeRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.SyncRecognizeRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.speech.v1beta1.SyncRecognizeRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.SyncRecognizeRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.speech.v1beta1.SyncRecognizeRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.SyncRecognizeRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.speech.v1beta1.SyncRecognizeRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.speech.v1beta1.SyncRecognizeRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 top-level message sent by the client for the `SyncRecognize` method.
-   * 
- * - * Protobuf type {@code google.cloud.speech.v1beta1.SyncRecognizeRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.speech.v1beta1.SyncRecognizeRequest) - com.google.cloud.speech.v1beta1.SyncRecognizeRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_SyncRecognizeRequest_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_SyncRecognizeRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.speech.v1beta1.SyncRecognizeRequest.class, - com.google.cloud.speech.v1beta1.SyncRecognizeRequest.Builder.class); - } - - // Construct using com.google.cloud.speech.v1beta1.SyncRecognizeRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - public Builder clear() { - super.clear(); - if (configBuilder_ == null) { - config_ = null; - } else { - config_ = null; - configBuilder_ = null; - } - if (audioBuilder_ == null) { - audio_ = null; - } else { - audio_ = null; - audioBuilder_ = null; - } - return this; - } - - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_SyncRecognizeRequest_descriptor; - } - - public com.google.cloud.speech.v1beta1.SyncRecognizeRequest getDefaultInstanceForType() { - return com.google.cloud.speech.v1beta1.SyncRecognizeRequest.getDefaultInstance(); - } - - public com.google.cloud.speech.v1beta1.SyncRecognizeRequest build() { - com.google.cloud.speech.v1beta1.SyncRecognizeRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.cloud.speech.v1beta1.SyncRecognizeRequest buildPartial() { - com.google.cloud.speech.v1beta1.SyncRecognizeRequest result = - new com.google.cloud.speech.v1beta1.SyncRecognizeRequest(this); - if (configBuilder_ == null) { - result.config_ = config_; - } else { - result.config_ = configBuilder_.build(); - } - if (audioBuilder_ == null) { - result.audio_ = audio_; - } else { - result.audio_ = audioBuilder_.build(); - } - onBuilt(); - return result; - } - - public Builder clone() { - return (Builder) super.clone(); - } - - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); - } - - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); - } - - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); - } - - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); - } - - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.speech.v1beta1.SyncRecognizeRequest) { - return mergeFrom((com.google.cloud.speech.v1beta1.SyncRecognizeRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.speech.v1beta1.SyncRecognizeRequest other) { - if (other == com.google.cloud.speech.v1beta1.SyncRecognizeRequest.getDefaultInstance()) - return this; - if (other.hasConfig()) { - mergeConfig(other.getConfig()); - } - if (other.hasAudio()) { - mergeAudio(other.getAudio()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.speech.v1beta1.SyncRecognizeRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.speech.v1beta1.SyncRecognizeRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.speech.v1beta1.RecognitionConfig config_ = null; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.speech.v1beta1.RecognitionConfig, - com.google.cloud.speech.v1beta1.RecognitionConfig.Builder, - com.google.cloud.speech.v1beta1.RecognitionConfigOrBuilder> - configBuilder_; - /** - * - * - *
-     * *Required* Provides information to the recognizer that specifies how to
-     * process the request.
-     * 
- * - * .google.cloud.speech.v1beta1.RecognitionConfig config = 1; - */ - public boolean hasConfig() { - return configBuilder_ != null || config_ != null; - } - /** - * - * - *
-     * *Required* Provides information to the recognizer that specifies how to
-     * process the request.
-     * 
- * - * .google.cloud.speech.v1beta1.RecognitionConfig config = 1; - */ - public com.google.cloud.speech.v1beta1.RecognitionConfig getConfig() { - if (configBuilder_ == null) { - return config_ == null - ? com.google.cloud.speech.v1beta1.RecognitionConfig.getDefaultInstance() - : config_; - } else { - return configBuilder_.getMessage(); - } - } - /** - * - * - *
-     * *Required* Provides information to the recognizer that specifies how to
-     * process the request.
-     * 
- * - * .google.cloud.speech.v1beta1.RecognitionConfig config = 1; - */ - public Builder setConfig(com.google.cloud.speech.v1beta1.RecognitionConfig value) { - if (configBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - config_ = value; - onChanged(); - } else { - configBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * *Required* Provides information to the recognizer that specifies how to
-     * process the request.
-     * 
- * - * .google.cloud.speech.v1beta1.RecognitionConfig config = 1; - */ - public Builder setConfig( - com.google.cloud.speech.v1beta1.RecognitionConfig.Builder builderForValue) { - if (configBuilder_ == null) { - config_ = builderForValue.build(); - onChanged(); - } else { - configBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * *Required* Provides information to the recognizer that specifies how to
-     * process the request.
-     * 
- * - * .google.cloud.speech.v1beta1.RecognitionConfig config = 1; - */ - public Builder mergeConfig(com.google.cloud.speech.v1beta1.RecognitionConfig value) { - if (configBuilder_ == null) { - if (config_ != null) { - config_ = - com.google.cloud.speech.v1beta1.RecognitionConfig.newBuilder(config_) - .mergeFrom(value) - .buildPartial(); - } else { - config_ = value; - } - onChanged(); - } else { - configBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * *Required* Provides information to the recognizer that specifies how to
-     * process the request.
-     * 
- * - * .google.cloud.speech.v1beta1.RecognitionConfig config = 1; - */ - public Builder clearConfig() { - if (configBuilder_ == null) { - config_ = null; - onChanged(); - } else { - config_ = null; - configBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * *Required* Provides information to the recognizer that specifies how to
-     * process the request.
-     * 
- * - * .google.cloud.speech.v1beta1.RecognitionConfig config = 1; - */ - public com.google.cloud.speech.v1beta1.RecognitionConfig.Builder getConfigBuilder() { - - onChanged(); - return getConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * *Required* Provides information to the recognizer that specifies how to
-     * process the request.
-     * 
- * - * .google.cloud.speech.v1beta1.RecognitionConfig config = 1; - */ - public com.google.cloud.speech.v1beta1.RecognitionConfigOrBuilder getConfigOrBuilder() { - if (configBuilder_ != null) { - return configBuilder_.getMessageOrBuilder(); - } else { - return config_ == null - ? com.google.cloud.speech.v1beta1.RecognitionConfig.getDefaultInstance() - : config_; - } - } - /** - * - * - *
-     * *Required* Provides information to the recognizer that specifies how to
-     * process the request.
-     * 
- * - * .google.cloud.speech.v1beta1.RecognitionConfig config = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.speech.v1beta1.RecognitionConfig, - com.google.cloud.speech.v1beta1.RecognitionConfig.Builder, - com.google.cloud.speech.v1beta1.RecognitionConfigOrBuilder> - getConfigFieldBuilder() { - if (configBuilder_ == null) { - configBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.speech.v1beta1.RecognitionConfig, - com.google.cloud.speech.v1beta1.RecognitionConfig.Builder, - com.google.cloud.speech.v1beta1.RecognitionConfigOrBuilder>( - getConfig(), getParentForChildren(), isClean()); - config_ = null; - } - return configBuilder_; - } - - private com.google.cloud.speech.v1beta1.RecognitionAudio audio_ = null; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.speech.v1beta1.RecognitionAudio, - com.google.cloud.speech.v1beta1.RecognitionAudio.Builder, - com.google.cloud.speech.v1beta1.RecognitionAudioOrBuilder> - audioBuilder_; - /** - * - * - *
-     * *Required* The audio data to be recognized.
-     * 
- * - * .google.cloud.speech.v1beta1.RecognitionAudio audio = 2; - */ - public boolean hasAudio() { - return audioBuilder_ != null || audio_ != null; - } - /** - * - * - *
-     * *Required* The audio data to be recognized.
-     * 
- * - * .google.cloud.speech.v1beta1.RecognitionAudio audio = 2; - */ - public com.google.cloud.speech.v1beta1.RecognitionAudio getAudio() { - if (audioBuilder_ == null) { - return audio_ == null - ? com.google.cloud.speech.v1beta1.RecognitionAudio.getDefaultInstance() - : audio_; - } else { - return audioBuilder_.getMessage(); - } - } - /** - * - * - *
-     * *Required* The audio data to be recognized.
-     * 
- * - * .google.cloud.speech.v1beta1.RecognitionAudio audio = 2; - */ - public Builder setAudio(com.google.cloud.speech.v1beta1.RecognitionAudio value) { - if (audioBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - audio_ = value; - onChanged(); - } else { - audioBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * *Required* The audio data to be recognized.
-     * 
- * - * .google.cloud.speech.v1beta1.RecognitionAudio audio = 2; - */ - public Builder setAudio( - com.google.cloud.speech.v1beta1.RecognitionAudio.Builder builderForValue) { - if (audioBuilder_ == null) { - audio_ = builderForValue.build(); - onChanged(); - } else { - audioBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * *Required* The audio data to be recognized.
-     * 
- * - * .google.cloud.speech.v1beta1.RecognitionAudio audio = 2; - */ - public Builder mergeAudio(com.google.cloud.speech.v1beta1.RecognitionAudio value) { - if (audioBuilder_ == null) { - if (audio_ != null) { - audio_ = - com.google.cloud.speech.v1beta1.RecognitionAudio.newBuilder(audio_) - .mergeFrom(value) - .buildPartial(); - } else { - audio_ = value; - } - onChanged(); - } else { - audioBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * *Required* The audio data to be recognized.
-     * 
- * - * .google.cloud.speech.v1beta1.RecognitionAudio audio = 2; - */ - public Builder clearAudio() { - if (audioBuilder_ == null) { - audio_ = null; - onChanged(); - } else { - audio_ = null; - audioBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * *Required* The audio data to be recognized.
-     * 
- * - * .google.cloud.speech.v1beta1.RecognitionAudio audio = 2; - */ - public com.google.cloud.speech.v1beta1.RecognitionAudio.Builder getAudioBuilder() { - - onChanged(); - return getAudioFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * *Required* The audio data to be recognized.
-     * 
- * - * .google.cloud.speech.v1beta1.RecognitionAudio audio = 2; - */ - public com.google.cloud.speech.v1beta1.RecognitionAudioOrBuilder getAudioOrBuilder() { - if (audioBuilder_ != null) { - return audioBuilder_.getMessageOrBuilder(); - } else { - return audio_ == null - ? com.google.cloud.speech.v1beta1.RecognitionAudio.getDefaultInstance() - : audio_; - } - } - /** - * - * - *
-     * *Required* The audio data to be recognized.
-     * 
- * - * .google.cloud.speech.v1beta1.RecognitionAudio audio = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.speech.v1beta1.RecognitionAudio, - com.google.cloud.speech.v1beta1.RecognitionAudio.Builder, - com.google.cloud.speech.v1beta1.RecognitionAudioOrBuilder> - getAudioFieldBuilder() { - if (audioBuilder_ == null) { - audioBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.speech.v1beta1.RecognitionAudio, - com.google.cloud.speech.v1beta1.RecognitionAudio.Builder, - com.google.cloud.speech.v1beta1.RecognitionAudioOrBuilder>( - getAudio(), getParentForChildren(), isClean()); - audio_ = null; - } - return audioBuilder_; - } - - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.speech.v1beta1.SyncRecognizeRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.speech.v1beta1.SyncRecognizeRequest) - private static final com.google.cloud.speech.v1beta1.SyncRecognizeRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.speech.v1beta1.SyncRecognizeRequest(); - } - - public static com.google.cloud.speech.v1beta1.SyncRecognizeRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public SyncRecognizeRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new SyncRecognizeRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.cloud.speech.v1beta1.SyncRecognizeRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/SyncRecognizeRequestOrBuilder.java b/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/SyncRecognizeRequestOrBuilder.java deleted file mode 100644 index cc47fd2b0a52..000000000000 --- a/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/SyncRecognizeRequestOrBuilder.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/speech/v1beta1/cloud_speech.proto - -package com.google.cloud.speech.v1beta1; - -public interface SyncRecognizeRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.speech.v1beta1.SyncRecognizeRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * *Required* Provides information to the recognizer that specifies how to
-   * process the request.
-   * 
- * - * .google.cloud.speech.v1beta1.RecognitionConfig config = 1; - */ - boolean hasConfig(); - /** - * - * - *
-   * *Required* Provides information to the recognizer that specifies how to
-   * process the request.
-   * 
- * - * .google.cloud.speech.v1beta1.RecognitionConfig config = 1; - */ - com.google.cloud.speech.v1beta1.RecognitionConfig getConfig(); - /** - * - * - *
-   * *Required* Provides information to the recognizer that specifies how to
-   * process the request.
-   * 
- * - * .google.cloud.speech.v1beta1.RecognitionConfig config = 1; - */ - com.google.cloud.speech.v1beta1.RecognitionConfigOrBuilder getConfigOrBuilder(); - - /** - * - * - *
-   * *Required* The audio data to be recognized.
-   * 
- * - * .google.cloud.speech.v1beta1.RecognitionAudio audio = 2; - */ - boolean hasAudio(); - /** - * - * - *
-   * *Required* The audio data to be recognized.
-   * 
- * - * .google.cloud.speech.v1beta1.RecognitionAudio audio = 2; - */ - com.google.cloud.speech.v1beta1.RecognitionAudio getAudio(); - /** - * - * - *
-   * *Required* The audio data to be recognized.
-   * 
- * - * .google.cloud.speech.v1beta1.RecognitionAudio audio = 2; - */ - com.google.cloud.speech.v1beta1.RecognitionAudioOrBuilder getAudioOrBuilder(); -} diff --git a/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/SyncRecognizeResponse.java b/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/SyncRecognizeResponse.java deleted file mode 100644 index 6a386a0ae453..000000000000 --- a/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/SyncRecognizeResponse.java +++ /dev/null @@ -1,963 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/speech/v1beta1/cloud_speech.proto - -package com.google.cloud.speech.v1beta1; - -/** - * - * - *
- * The only message returned to the client by `SyncRecognize`. method. It
- * contains the result as zero or more sequential `SpeechRecognitionResult`
- * messages.
- * 
- * - * Protobuf type {@code google.cloud.speech.v1beta1.SyncRecognizeResponse} - */ -public final class SyncRecognizeResponse extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.speech.v1beta1.SyncRecognizeResponse) - SyncRecognizeResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use SyncRecognizeResponse.newBuilder() to construct. - private SyncRecognizeResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private SyncRecognizeResponse() { - results_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private SyncRecognizeResponse( - 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; - default: - { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - results_ = - new java.util.ArrayList< - com.google.cloud.speech.v1beta1.SpeechRecognitionResult>(); - mutable_bitField0_ |= 0x00000001; - } - results_.add( - input.readMessage( - com.google.cloud.speech.v1beta1.SpeechRecognitionResult.parser(), - extensionRegistry)); - break; - } - } - } - } catch (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) == 0x00000001)) { - results_ = java.util.Collections.unmodifiableList(results_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_SyncRecognizeResponse_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_SyncRecognizeResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.speech.v1beta1.SyncRecognizeResponse.class, - com.google.cloud.speech.v1beta1.SyncRecognizeResponse.Builder.class); - } - - public static final int RESULTS_FIELD_NUMBER = 2; - private java.util.List results_; - /** - * - * - *
-   * *Output-only* Sequential list of transcription results corresponding to
-   * sequential portions of audio.
-   * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2; - */ - public java.util.List getResultsList() { - return results_; - } - /** - * - * - *
-   * *Output-only* Sequential list of transcription results corresponding to
-   * sequential portions of audio.
-   * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2; - */ - public java.util.List - getResultsOrBuilderList() { - return results_; - } - /** - * - * - *
-   * *Output-only* Sequential list of transcription results corresponding to
-   * sequential portions of audio.
-   * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2; - */ - public int getResultsCount() { - return results_.size(); - } - /** - * - * - *
-   * *Output-only* Sequential list of transcription results corresponding to
-   * sequential portions of audio.
-   * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2; - */ - public com.google.cloud.speech.v1beta1.SpeechRecognitionResult getResults(int index) { - return results_.get(index); - } - /** - * - * - *
-   * *Output-only* Sequential list of transcription results corresponding to
-   * sequential portions of audio.
-   * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2; - */ - public com.google.cloud.speech.v1beta1.SpeechRecognitionResultOrBuilder getResultsOrBuilder( - int index) { - return results_.get(index); - } - - private byte memoizedIsInitialized = -1; - - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < results_.size(); i++) { - output.writeMessage(2, results_.get(i)); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < results_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, results_.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.speech.v1beta1.SyncRecognizeResponse)) { - return super.equals(obj); - } - com.google.cloud.speech.v1beta1.SyncRecognizeResponse other = - (com.google.cloud.speech.v1beta1.SyncRecognizeResponse) obj; - - boolean result = true; - result = result && getResultsList().equals(other.getResultsList()); - result = result && unknownFields.equals(other.unknownFields); - return result; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getResultsCount() > 0) { - hash = (37 * hash) + RESULTS_FIELD_NUMBER; - hash = (53 * hash) + getResultsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.speech.v1beta1.SyncRecognizeResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.speech.v1beta1.SyncRecognizeResponse parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.SyncRecognizeResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.speech.v1beta1.SyncRecognizeResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.SyncRecognizeResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.speech.v1beta1.SyncRecognizeResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.SyncRecognizeResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.speech.v1beta1.SyncRecognizeResponse parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.SyncRecognizeResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.speech.v1beta1.SyncRecognizeResponse parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.speech.v1beta1.SyncRecognizeResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.speech.v1beta1.SyncRecognizeResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.speech.v1beta1.SyncRecognizeResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 only message returned to the client by `SyncRecognize`. method. It
-   * contains the result as zero or more sequential `SpeechRecognitionResult`
-   * messages.
-   * 
- * - * Protobuf type {@code google.cloud.speech.v1beta1.SyncRecognizeResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.speech.v1beta1.SyncRecognizeResponse) - com.google.cloud.speech.v1beta1.SyncRecognizeResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_SyncRecognizeResponse_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_SyncRecognizeResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.speech.v1beta1.SyncRecognizeResponse.class, - com.google.cloud.speech.v1beta1.SyncRecognizeResponse.Builder.class); - } - - // Construct using com.google.cloud.speech.v1beta1.SyncRecognizeResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getResultsFieldBuilder(); - } - } - - public Builder clear() { - super.clear(); - if (resultsBuilder_ == null) { - results_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - resultsBuilder_.clear(); - } - return this; - } - - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.speech.v1beta1.SpeechProto - .internal_static_google_cloud_speech_v1beta1_SyncRecognizeResponse_descriptor; - } - - public com.google.cloud.speech.v1beta1.SyncRecognizeResponse getDefaultInstanceForType() { - return com.google.cloud.speech.v1beta1.SyncRecognizeResponse.getDefaultInstance(); - } - - public com.google.cloud.speech.v1beta1.SyncRecognizeResponse build() { - com.google.cloud.speech.v1beta1.SyncRecognizeResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.cloud.speech.v1beta1.SyncRecognizeResponse buildPartial() { - com.google.cloud.speech.v1beta1.SyncRecognizeResponse result = - new com.google.cloud.speech.v1beta1.SyncRecognizeResponse(this); - int from_bitField0_ = bitField0_; - if (resultsBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - results_ = java.util.Collections.unmodifiableList(results_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.results_ = results_; - } else { - result.results_ = resultsBuilder_.build(); - } - onBuilt(); - return result; - } - - public Builder clone() { - return (Builder) super.clone(); - } - - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); - } - - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); - } - - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); - } - - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); - } - - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.speech.v1beta1.SyncRecognizeResponse) { - return mergeFrom((com.google.cloud.speech.v1beta1.SyncRecognizeResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.speech.v1beta1.SyncRecognizeResponse other) { - if (other == com.google.cloud.speech.v1beta1.SyncRecognizeResponse.getDefaultInstance()) - return this; - if (resultsBuilder_ == null) { - if (!other.results_.isEmpty()) { - if (results_.isEmpty()) { - results_ = other.results_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureResultsIsMutable(); - results_.addAll(other.results_); - } - onChanged(); - } - } else { - if (!other.results_.isEmpty()) { - if (resultsBuilder_.isEmpty()) { - resultsBuilder_.dispose(); - resultsBuilder_ = null; - results_ = other.results_; - bitField0_ = (bitField0_ & ~0x00000001); - resultsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getResultsFieldBuilder() - : null; - } else { - resultsBuilder_.addAllMessages(other.results_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.speech.v1beta1.SyncRecognizeResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.speech.v1beta1.SyncRecognizeResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.util.List results_ = - java.util.Collections.emptyList(); - - private void ensureResultsIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - results_ = - new java.util.ArrayList( - results_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.speech.v1beta1.SpeechRecognitionResult, - com.google.cloud.speech.v1beta1.SpeechRecognitionResult.Builder, - com.google.cloud.speech.v1beta1.SpeechRecognitionResultOrBuilder> - resultsBuilder_; - - /** - * - * - *
-     * *Output-only* Sequential list of transcription results corresponding to
-     * sequential portions of audio.
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2; - */ - public java.util.List - getResultsList() { - if (resultsBuilder_ == null) { - return java.util.Collections.unmodifiableList(results_); - } else { - return resultsBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * *Output-only* Sequential list of transcription results corresponding to
-     * sequential portions of audio.
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2; - */ - public int getResultsCount() { - if (resultsBuilder_ == null) { - return results_.size(); - } else { - return resultsBuilder_.getCount(); - } - } - /** - * - * - *
-     * *Output-only* Sequential list of transcription results corresponding to
-     * sequential portions of audio.
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2; - */ - public com.google.cloud.speech.v1beta1.SpeechRecognitionResult getResults(int index) { - if (resultsBuilder_ == null) { - return results_.get(index); - } else { - return resultsBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * *Output-only* Sequential list of transcription results corresponding to
-     * sequential portions of audio.
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2; - */ - public Builder setResults( - int index, com.google.cloud.speech.v1beta1.SpeechRecognitionResult value) { - if (resultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResultsIsMutable(); - results_.set(index, value); - onChanged(); - } else { - resultsBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * *Output-only* Sequential list of transcription results corresponding to
-     * sequential portions of audio.
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2; - */ - public Builder setResults( - int index, - com.google.cloud.speech.v1beta1.SpeechRecognitionResult.Builder builderForValue) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - results_.set(index, builderForValue.build()); - onChanged(); - } else { - resultsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * *Output-only* Sequential list of transcription results corresponding to
-     * sequential portions of audio.
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2; - */ - public Builder addResults(com.google.cloud.speech.v1beta1.SpeechRecognitionResult value) { - if (resultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResultsIsMutable(); - results_.add(value); - onChanged(); - } else { - resultsBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * *Output-only* Sequential list of transcription results corresponding to
-     * sequential portions of audio.
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2; - */ - public Builder addResults( - int index, com.google.cloud.speech.v1beta1.SpeechRecognitionResult value) { - if (resultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResultsIsMutable(); - results_.add(index, value); - onChanged(); - } else { - resultsBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * *Output-only* Sequential list of transcription results corresponding to
-     * sequential portions of audio.
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2; - */ - public Builder addResults( - com.google.cloud.speech.v1beta1.SpeechRecognitionResult.Builder builderForValue) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - results_.add(builderForValue.build()); - onChanged(); - } else { - resultsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * *Output-only* Sequential list of transcription results corresponding to
-     * sequential portions of audio.
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2; - */ - public Builder addResults( - int index, - com.google.cloud.speech.v1beta1.SpeechRecognitionResult.Builder builderForValue) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - results_.add(index, builderForValue.build()); - onChanged(); - } else { - resultsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * *Output-only* Sequential list of transcription results corresponding to
-     * sequential portions of audio.
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2; - */ - public Builder addAllResults( - java.lang.Iterable - values) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, results_); - onChanged(); - } else { - resultsBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * *Output-only* Sequential list of transcription results corresponding to
-     * sequential portions of audio.
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2; - */ - public Builder clearResults() { - if (resultsBuilder_ == null) { - results_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - resultsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * *Output-only* Sequential list of transcription results corresponding to
-     * sequential portions of audio.
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2; - */ - public Builder removeResults(int index) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - results_.remove(index); - onChanged(); - } else { - resultsBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * *Output-only* Sequential list of transcription results corresponding to
-     * sequential portions of audio.
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2; - */ - public com.google.cloud.speech.v1beta1.SpeechRecognitionResult.Builder getResultsBuilder( - int index) { - return getResultsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * *Output-only* Sequential list of transcription results corresponding to
-     * sequential portions of audio.
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2; - */ - public com.google.cloud.speech.v1beta1.SpeechRecognitionResultOrBuilder getResultsOrBuilder( - int index) { - if (resultsBuilder_ == null) { - return results_.get(index); - } else { - return resultsBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * *Output-only* Sequential list of transcription results corresponding to
-     * sequential portions of audio.
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2; - */ - public java.util.List< - ? extends com.google.cloud.speech.v1beta1.SpeechRecognitionResultOrBuilder> - getResultsOrBuilderList() { - if (resultsBuilder_ != null) { - return resultsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(results_); - } - } - /** - * - * - *
-     * *Output-only* Sequential list of transcription results corresponding to
-     * sequential portions of audio.
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2; - */ - public com.google.cloud.speech.v1beta1.SpeechRecognitionResult.Builder addResultsBuilder() { - return getResultsFieldBuilder() - .addBuilder(com.google.cloud.speech.v1beta1.SpeechRecognitionResult.getDefaultInstance()); - } - /** - * - * - *
-     * *Output-only* Sequential list of transcription results corresponding to
-     * sequential portions of audio.
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2; - */ - public com.google.cloud.speech.v1beta1.SpeechRecognitionResult.Builder addResultsBuilder( - int index) { - return getResultsFieldBuilder() - .addBuilder( - index, com.google.cloud.speech.v1beta1.SpeechRecognitionResult.getDefaultInstance()); - } - /** - * - * - *
-     * *Output-only* Sequential list of transcription results corresponding to
-     * sequential portions of audio.
-     * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2; - */ - public java.util.List - getResultsBuilderList() { - return getResultsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.speech.v1beta1.SpeechRecognitionResult, - com.google.cloud.speech.v1beta1.SpeechRecognitionResult.Builder, - com.google.cloud.speech.v1beta1.SpeechRecognitionResultOrBuilder> - getResultsFieldBuilder() { - if (resultsBuilder_ == null) { - resultsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.speech.v1beta1.SpeechRecognitionResult, - com.google.cloud.speech.v1beta1.SpeechRecognitionResult.Builder, - com.google.cloud.speech.v1beta1.SpeechRecognitionResultOrBuilder>( - results_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); - results_ = null; - } - return resultsBuilder_; - } - - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.speech.v1beta1.SyncRecognizeResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.speech.v1beta1.SyncRecognizeResponse) - private static final com.google.cloud.speech.v1beta1.SyncRecognizeResponse DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.speech.v1beta1.SyncRecognizeResponse(); - } - - public static com.google.cloud.speech.v1beta1.SyncRecognizeResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public SyncRecognizeResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new SyncRecognizeResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.cloud.speech.v1beta1.SyncRecognizeResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/SyncRecognizeResponseOrBuilder.java b/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/SyncRecognizeResponseOrBuilder.java deleted file mode 100644 index 4405c3db8af6..000000000000 --- a/java-speech/proto-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/SyncRecognizeResponseOrBuilder.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/speech/v1beta1/cloud_speech.proto - -package com.google.cloud.speech.v1beta1; - -public interface SyncRecognizeResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.speech.v1beta1.SyncRecognizeResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * *Output-only* Sequential list of transcription results corresponding to
-   * sequential portions of audio.
-   * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2; - */ - java.util.List getResultsList(); - /** - * - * - *
-   * *Output-only* Sequential list of transcription results corresponding to
-   * sequential portions of audio.
-   * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2; - */ - com.google.cloud.speech.v1beta1.SpeechRecognitionResult getResults(int index); - /** - * - * - *
-   * *Output-only* Sequential list of transcription results corresponding to
-   * sequential portions of audio.
-   * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2; - */ - int getResultsCount(); - /** - * - * - *
-   * *Output-only* Sequential list of transcription results corresponding to
-   * sequential portions of audio.
-   * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2; - */ - java.util.List - getResultsOrBuilderList(); - /** - * - * - *
-   * *Output-only* Sequential list of transcription results corresponding to
-   * sequential portions of audio.
-   * 
- * - * repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2; - */ - com.google.cloud.speech.v1beta1.SpeechRecognitionResultOrBuilder getResultsOrBuilder(int index); -} diff --git a/java-speech/proto-google-cloud-speech-v1beta1/src/main/proto/google/cloud/speech/v1beta1/cloud_speech.proto b/java-speech/proto-google-cloud-speech-v1beta1/src/main/proto/google/cloud/speech/v1beta1/cloud_speech.proto deleted file mode 100644 index 82b82d3c0231..000000000000 --- a/java-speech/proto-google-cloud-speech-v1beta1/src/main/proto/google/cloud/speech/v1beta1/cloud_speech.proto +++ /dev/null @@ -1,421 +0,0 @@ -// Copyright 2017 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.speech.v1beta1; - -import "google/api/annotations.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/timestamp.proto"; -import "google/rpc/status.proto"; - -option go_package = "google.golang.org/genproto/googleapis/cloud/speech/v1beta1;speech"; -option java_multiple_files = true; -option java_outer_classname = "SpeechProto"; -option java_package = "com.google.cloud.speech.v1beta1"; - - -// Service that implements Google Cloud Speech API. -service Speech { - // Performs synchronous speech recognition: receive results after all audio - // has been sent and processed. - rpc SyncRecognize(SyncRecognizeRequest) returns (SyncRecognizeResponse) { - option (google.api.http) = { post: "/v1beta1/speech:syncrecognize" body: "*" }; - } - - // Performs asynchronous speech recognition: receive results via the - // [google.longrunning.Operations] - // (/speech/reference/rest/v1beta1/operations#Operation) - // interface. Returns either an - // `Operation.error` or an `Operation.response` which contains - // an `AsyncRecognizeResponse` message. - rpc AsyncRecognize(AsyncRecognizeRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { post: "/v1beta1/speech:asyncrecognize" body: "*" }; - } - - // Performs bidirectional streaming speech recognition: receive results while - // sending audio. This method is only available via the gRPC API (not REST). - rpc StreamingRecognize(stream StreamingRecognizeRequest) returns (stream StreamingRecognizeResponse); -} - -// The top-level message sent by the client for the `SyncRecognize` method. -message SyncRecognizeRequest { - // *Required* Provides information to the recognizer that specifies how to - // process the request. - RecognitionConfig config = 1; - - // *Required* The audio data to be recognized. - RecognitionAudio audio = 2; -} - -// The top-level message sent by the client for the `AsyncRecognize` method. -message AsyncRecognizeRequest { - // *Required* Provides information to the recognizer that specifies how to - // process the request. - RecognitionConfig config = 1; - - // *Required* The audio data to be recognized. - RecognitionAudio audio = 2; -} - -// The top-level message sent by the client for the `StreamingRecognize` method. -// Multiple `StreamingRecognizeRequest` messages are sent. The first message -// must contain a `streaming_config` message and must not contain `audio` data. -// All subsequent messages must contain `audio` data and must not contain a -// `streaming_config` message. -message StreamingRecognizeRequest { - // The streaming request, which is either a streaming config or audio content. - oneof streaming_request { - // Provides information to the recognizer that specifies how to process the - // request. The first `StreamingRecognizeRequest` message must contain a - // `streaming_config` message. - StreamingRecognitionConfig streaming_config = 1; - - // The audio data to be recognized. Sequential chunks of audio data are sent - // in sequential `StreamingRecognizeRequest` messages. The first - // `StreamingRecognizeRequest` message must not contain `audio_content` data - // and all subsequent `StreamingRecognizeRequest` messages must contain - // `audio_content` data. The audio bytes must be encoded as specified in - // `RecognitionConfig`. Note: as with all bytes fields, protobuffers use a - // pure binary representation (not base64). See - // [audio limits](https://cloud.google.com/speech/limits#content). - bytes audio_content = 2; - } -} - -// Provides information to the recognizer that specifies how to process the -// request. -message StreamingRecognitionConfig { - // *Required* Provides information to the recognizer that specifies how to - // process the request. - RecognitionConfig config = 1; - - // *Optional* If `false` or omitted, the recognizer will perform continuous - // recognition (continuing to wait for and process audio even if the user - // pauses speaking) until the client closes the input stream (gRPC API) or - // until the maximum time limit has been reached. May return multiple - // `StreamingRecognitionResult`s with the `is_final` flag set to `true`. - // - // If `true`, the recognizer will detect a single spoken utterance. When it - // detects that the user has paused or stopped speaking, it will return an - // `END_OF_UTTERANCE` event and cease recognition. It will return no more than - // one `StreamingRecognitionResult` with the `is_final` flag set to `true`. - bool single_utterance = 2; - - // *Optional* If `true`, interim results (tentative hypotheses) may be - // returned as they become available (these interim results are indicated with - // the `is_final=false` flag). - // If `false` or omitted, only `is_final=true` result(s) are returned. - bool interim_results = 3; -} - -// Provides information to the recognizer that specifies how to process the -// request. -message RecognitionConfig { - // Audio encoding of the data sent in the audio message. All encodings support - // only 1 channel (mono) audio. Only `FLAC` includes a header that describes - // the bytes of audio that follow the header. The other encodings are raw - // audio bytes with no header. - // - // For best results, the audio source should be captured and transmitted using - // a lossless encoding (`FLAC` or `LINEAR16`). Recognition accuracy may be - // reduced if lossy codecs (such as AMR, AMR_WB and MULAW) are used to capture - // or transmit the audio, particularly if background noise is present. - enum AudioEncoding { - // Not specified. Will return result [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. - ENCODING_UNSPECIFIED = 0; - - // Uncompressed 16-bit signed little-endian samples (Linear PCM). - // This is the only encoding that may be used by `AsyncRecognize`. - LINEAR16 = 1; - - // This is the recommended encoding for `SyncRecognize` and - // `StreamingRecognize` because it uses lossless compression; therefore - // recognition accuracy is not compromised by a lossy codec. - // - // The stream FLAC (Free Lossless Audio Codec) encoding is specified at: - // http://flac.sourceforge.net/documentation.html. - // 16-bit and 24-bit samples are supported. - // Not all fields in STREAMINFO are supported. - FLAC = 2; - - // 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law. - MULAW = 3; - - // Adaptive Multi-Rate Narrowband codec. `sample_rate` must be 8000 Hz. - AMR = 4; - - // Adaptive Multi-Rate Wideband codec. `sample_rate` must be 16000 Hz. - AMR_WB = 5; - } - - // *Required* Encoding of audio data sent in all `RecognitionAudio` messages. - AudioEncoding encoding = 1; - - // *Required* Sample rate in Hertz of the audio data sent in all - // `RecognitionAudio` messages. Valid values are: 8000-48000. - // 16000 is optimal. For best results, set the sampling rate of the audio - // source to 16000 Hz. If that's not possible, use the native sample rate of - // the audio source (instead of re-sampling). - int32 sample_rate = 2; - - // *Optional* The language of the supplied audio as a BCP-47 language tag. - // Example: "en-GB" https://www.rfc-editor.org/rfc/bcp/bcp47.txt - // If omitted, defaults to "en-US". See - // [Language Support](https://cloud.google.com/speech/docs/languages) - // for a list of the currently supported language codes. - string language_code = 3; - - // *Optional* Maximum number of recognition hypotheses to be returned. - // Specifically, the maximum number of `SpeechRecognitionAlternative` messages - // within each `SpeechRecognitionResult`. - // The server may return fewer than `max_alternatives`. - // Valid values are `0`-`30`. A value of `0` or `1` will return a maximum of - // one. If omitted, will return a maximum of one. - int32 max_alternatives = 4; - - // *Optional* If set to `true`, the server will attempt to filter out - // profanities, replacing all but the initial character in each filtered word - // with asterisks, e.g. "f***". If set to `false` or omitted, profanities - // won't be filtered out. - bool profanity_filter = 5; - - // *Optional* A means to provide context to assist the speech recognition. - SpeechContext speech_context = 6; -} - -// Provides "hints" to the speech recognizer to favor specific words and phrases -// in the results. -message SpeechContext { - // *Optional* A list of strings containing words and phrases "hints" so that - // the speech recognition is more likely to recognize them. This can be used - // to improve the accuracy for specific words and phrases, for example, if - // specific commands are typically spoken by the user. This can also be used - // to add additional words to the vocabulary of the recognizer. See - // [usage limits](https://cloud.google.com/speech/limits#content). - repeated string phrases = 1; -} - -// Contains audio data in the encoding specified in the `RecognitionConfig`. -// Either `content` or `uri` must be supplied. Supplying both or neither -// returns [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. See -// [audio limits](https://cloud.google.com/speech/limits#content). -message RecognitionAudio { - // The audio source, which is either inline content or a GCS uri. - oneof audio_source { - // The audio data bytes encoded as specified in - // `RecognitionConfig`. Note: as with all bytes fields, protobuffers use a - // pure binary representation, whereas JSON representations use base64. - bytes content = 1; - - // URI that points to a file that contains audio data bytes as specified in - // `RecognitionConfig`. Currently, only Google Cloud Storage URIs are - // supported, which must be specified in the following format: - // `gs://bucket_name/object_name` (other URI formats return - // [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see - // [Request URIs](https://cloud.google.com/storage/docs/reference-uris). - string uri = 2; - } -} - -// The only message returned to the client by `SyncRecognize`. method. It -// contains the result as zero or more sequential `SpeechRecognitionResult` -// messages. -message SyncRecognizeResponse { - // *Output-only* Sequential list of transcription results corresponding to - // sequential portions of audio. - repeated SpeechRecognitionResult results = 2; -} - -// The only message returned to the client by `AsyncRecognize`. It contains the -// result as zero or more sequential `SpeechRecognitionResult` messages. It is -// included in the `result.response` field of the `Operation` returned by the -// `GetOperation` call of the `google::longrunning::Operations` service. -message AsyncRecognizeResponse { - // *Output-only* Sequential list of transcription results corresponding to - // sequential portions of audio. - repeated SpeechRecognitionResult results = 2; -} - -// Describes the progress of a long-running `AsyncRecognize` call. It is -// included in the `metadata` field of the `Operation` returned by the -// `GetOperation` call of the `google::longrunning::Operations` service. -message AsyncRecognizeMetadata { - // Approximate percentage of audio processed thus far. Guaranteed to be 100 - // when the audio is fully processed and the results are available. - int32 progress_percent = 1; - - // Time when the request was received. - google.protobuf.Timestamp start_time = 2; - - // Time of the most recent processing update. - google.protobuf.Timestamp last_update_time = 3; -} - -// `StreamingRecognizeResponse` is the only message returned to the client by -// `StreamingRecognize`. A series of one or more `StreamingRecognizeResponse` -// messages are streamed back to the client. -// -// Here's an example of a series of ten `StreamingRecognizeResponse`s that might -// be returned while processing audio: -// -// 1. endpointer_type: START_OF_SPEECH -// -// 2. results { alternatives { transcript: "tube" } stability: 0.01 } -// result_index: 0 -// -// 3. results { alternatives { transcript: "to be a" } stability: 0.01 } -// result_index: 0 -// -// 4. results { alternatives { transcript: "to be" } stability: 0.9 } -// results { alternatives { transcript: " or not to be" } stability: 0.01 } -// result_index: 0 -// -// 5. results { alternatives { transcript: "to be or not to be" -// confidence: 0.92 } -// alternatives { transcript: "to bee or not to bee" } -// is_final: true } -// result_index: 0 -// -// 6. results { alternatives { transcript: " that's" } stability: 0.01 } -// result_index: 1 -// -// 7. results { alternatives { transcript: " that is" } stability: 0.9 } -// results { alternatives { transcript: " the question" } stability: 0.01 } -// result_index: 1 -// -// 8. endpointer_type: END_OF_SPEECH -// -// 9. results { alternatives { transcript: " that is the question" -// confidence: 0.98 } -// alternatives { transcript: " that was the question" } -// is_final: true } -// result_index: 1 -// -// 10. endpointer_type: END_OF_AUDIO -// -// Notes: -// -// - Only two of the above responses #5 and #9 contain final results, they are -// indicated by `is_final: true`. Concatenating these together generates the -// full transcript: "to be or not to be that is the question". -// -// - The others contain interim `results`. #4 and #7 contain two interim -// `results`, the first portion has a high stability and is less likely to -// change, the second portion has a low stability and is very likely to -// change. A UI designer might choose to show only high stability `results`. -// -// - The specific `stability` and `confidence` values shown above are only for -// illustrative purposes. Actual values may vary. -// -// - The `result_index` indicates the portion of audio that has had final -// results returned, and is no longer being processed. For example, the -// `results` in #6 and later correspond to the portion of audio after -// "to be or not to be". -message StreamingRecognizeResponse { - // Indicates the type of endpointer event. - enum EndpointerType { - // No endpointer event specified. - ENDPOINTER_EVENT_UNSPECIFIED = 0; - - // Speech has been detected in the audio stream, and the service is - // beginning to process it. - START_OF_SPEECH = 1; - - // Speech has ceased to be detected in the audio stream. (For example, the - // user may have paused after speaking.) If `single_utterance` is `false`, - // the service will continue to process audio, and if subsequent speech is - // detected, will send another START_OF_SPEECH event. - END_OF_SPEECH = 2; - - // This event is sent after the client has half-closed the input stream gRPC - // connection and the server has received all of the audio. (The server may - // still be processing the audio and may subsequently return additional - // results.) - END_OF_AUDIO = 3; - - // This event is only sent when `single_utterance` is `true`. It indicates - // that the server has detected the end of the user's speech utterance and - // expects no additional speech. Therefore, the server will not process - // additional audio (although it may subsequently return additional - // results). The client should stop sending additional audio data, - // half-close the gRPC connection, and wait for any additional results - // until the server closes the gRPC connection. - END_OF_UTTERANCE = 4; - } - - // *Output-only* If set, returns a [google.rpc.Status][google.rpc.Status] message that - // specifies the error for the operation. - google.rpc.Status error = 1; - - // *Output-only* This repeated list contains zero or more results that - // correspond to consecutive portions of the audio currently being processed. - // It contains zero or one `is_final=true` result (the newly settled portion), - // followed by zero or more `is_final=false` results. - repeated StreamingRecognitionResult results = 2; - - // *Output-only* Indicates the lowest index in the `results` array that has - // changed. The repeated `StreamingRecognitionResult` results overwrite past - // results at this index and higher. - int32 result_index = 3; - - // *Output-only* Indicates the type of endpointer event. - EndpointerType endpointer_type = 4; -} - -// A streaming speech recognition result corresponding to a portion of the audio -// that is currently being processed. -message StreamingRecognitionResult { - // *Output-only* May contain one or more recognition hypotheses (up to the - // maximum specified in `max_alternatives`). - repeated SpeechRecognitionAlternative alternatives = 1; - - // *Output-only* If `false`, this `StreamingRecognitionResult` represents an - // interim result that may change. If `true`, this is the final time the - // speech service will return this particular `StreamingRecognitionResult`, - // the recognizer will not return any further hypotheses for this portion of - // the transcript and corresponding audio. - bool is_final = 2; - - // *Output-only* An estimate of the likelihood that the recognizer will not - // change its guess about this interim result. Values range from 0.0 - // (completely unstable) to 1.0 (completely stable). - // This field is only provided for interim results (`is_final=false`). - // The default of 0.0 is a sentinel value indicating `stability` was not set. - float stability = 3; -} - -// A speech recognition result corresponding to a portion of the audio. -message SpeechRecognitionResult { - // *Output-only* May contain one or more recognition hypotheses (up to the - // maximum specified in `max_alternatives`). - repeated SpeechRecognitionAlternative alternatives = 1; -} - -// Alternative hypotheses (a.k.a. n-best list). -message SpeechRecognitionAlternative { - // *Output-only* Transcript text representing the words that the user spoke. - string transcript = 1; - - // *Output-only* The confidence estimate between 0.0 and 1.0. A higher number - // indicates an estimated greater likelihood that the recognized words are - // correct. This field is typically provided only for the top hypothesis, and - // only for `is_final=true` results. Clients should not rely on the - // `confidence` field as it is not guaranteed to be accurate, or even set, in - // any of the results. - // The default of 0.0 is a sentinel value indicating `confidence` was not set. - float confidence = 2; -} diff --git a/versions.txt b/versions.txt index 88d8a3c66cc9..cda1f106e34f 100644 --- a/versions.txt +++ b/versions.txt @@ -481,10 +481,8 @@ grpc-google-cloud-shell-v1:2.48.0:2.49.0-SNAPSHOT proto-google-cloud-shell-v1:2.48.0:2.49.0-SNAPSHOT google-cloud-speech:4.44.0:4.45.0-SNAPSHOT grpc-google-cloud-speech-v1:4.44.0:4.45.0-SNAPSHOT -grpc-google-cloud-speech-v1beta1:2.44.0:2.45.0-SNAPSHOT grpc-google-cloud-speech-v1p1beta1:2.44.0:2.45.0-SNAPSHOT proto-google-cloud-speech-v1:4.44.0:4.45.0-SNAPSHOT -proto-google-cloud-speech-v1beta1:2.44.0:2.45.0-SNAPSHOT proto-google-cloud-speech-v1p1beta1:2.44.0:2.45.0-SNAPSHOT proto-google-cloud-speech-v2:4.44.0:4.45.0-SNAPSHOT grpc-google-cloud-speech-v2:4.44.0:4.45.0-SNAPSHOT