diff --git a/google-cloud-translate/src/main/java/com/google/cloud/translate/v3/TranslationServiceClient.java b/google-cloud-translate/src/main/java/com/google/cloud/translate/v3/TranslationServiceClient.java index bcf8cf95..81e5f3db 100644 --- a/google-cloud-translate/src/main/java/com/google/cloud/translate/v3/TranslationServiceClient.java +++ b/google-cloud-translate/src/main/java/com/google/cloud/translate/v3/TranslationServiceClient.java @@ -194,7 +194,8 @@ public final OperationsClient getOperationsClient() { * @param targetLanguageCode Required. The BCP-47 language code to use for translation of the * input text, set to one of the language codes listed in Language Support. * @param contents Required. The content of the input in string format. We recommend the total - * content be less than 30k codepoints. Use BatchTranslateText for larger text. + * content be less than 30k codepoints. The max length of this field is 1024. Use + * BatchTranslateText for larger text. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final TranslateTextResponse translateText( @@ -235,7 +236,8 @@ public final TranslateTextResponse translateText( * @param targetLanguageCode Required. The BCP-47 language code to use for translation of the * input text, set to one of the language codes listed in Language Support. * @param contents Required. The content of the input in string format. We recommend the total - * content be less than 30k codepoints. Use BatchTranslateText for larger text. + * content be less than 30k codepoints. The max length of this field is 1024. Use + * BatchTranslateText for larger text. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final TranslateTextResponse translateText( @@ -283,10 +285,9 @@ public final TranslateTextResponse translateText( * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` *
- General (built-in) models: * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, - * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` *
For global (non-regionalized) requests, use `location-id` `global`. For example, * `projects/{project-number-or-id}/locations/global/models/general/nmt`. - *
If missing, the system decides which google base model to use. + *
If not provided, the default Google model (NMT) will be used. * @param mimeType Optional. The format of the source text, for example, "text/html", * "text/plain". If left blank, the MIME type defaults to "text/html". * @param sourceLanguageCode Optional. The BCP-47 language code of the input text if known, for @@ -296,7 +297,8 @@ public final TranslateTextResponse translateText( * @param targetLanguageCode Required. The BCP-47 language code to use for translation of the * input text, set to one of the language codes listed in Language Support. * @param contents Required. The content of the input in string format. We recommend the total - * content be less than 30k codepoints. Use BatchTranslateText for larger text. + * content be less than 30k codepoints. The max length of this field is 1024. Use + * BatchTranslateText for larger text. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final TranslateTextResponse translateText( @@ -352,10 +354,9 @@ public final TranslateTextResponse translateText( * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` *
- General (built-in) models: * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, - * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` *
For global (non-regionalized) requests, use `location-id` `global`. For example, * `projects/{project-number-or-id}/locations/global/models/general/nmt`. - *
If missing, the system decides which google base model to use. + *
If not provided, the default Google model (NMT) will be used. * @param mimeType Optional. The format of the source text, for example, "text/html", * "text/plain". If left blank, the MIME type defaults to "text/html". * @param sourceLanguageCode Optional. The BCP-47 language code of the input text if known, for @@ -365,7 +366,8 @@ public final TranslateTextResponse translateText( * @param targetLanguageCode Required. The BCP-47 language code to use for translation of the * input text, set to one of the language codes listed in Language Support. * @param contents Required. The content of the input in string format. We recommend the total - * content be less than 30k codepoints. Use BatchTranslateText for larger text. + * content be less than 30k codepoints. The max length of this field is 1024. Use + * BatchTranslateText for larger text. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final TranslateTextResponse translateText( @@ -624,9 +626,8 @@ public final DetectLanguageResponse detectLanguage(DetectLanguageRequest request * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` *
- General (built-in) models: * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, - * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` *
Returns languages supported by the specified model. If missing, we get supported - * languages of Google general base (PBMT) model. + * languages of Google general NMT model. * @param displayLanguageCode Optional. The language to use to return localized, human readable * names of supported languages. If missing, then display names are not returned in a * response. @@ -673,9 +674,8 @@ public final SupportedLanguages getSupportedLanguages( * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` *
- General (built-in) models: * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, - * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` *
Returns languages supported by the specified model. If missing, we get supported - * languages of Google general base (PBMT) model. + * languages of Google general NMT model. * @param displayLanguageCode Optional. The language to use to return localized, human readable * names of supported languages. If missing, then display names are not returned in a * response. @@ -743,6 +743,67 @@ public final SupportedLanguages getSupportedLanguages(GetSupportedLanguagesReque return stub.getSupportedLanguagesCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Translates documents in synchronous mode. + * + *
Sample code: + * + *
{@code + * try (TranslationServiceClient translationServiceClient = TranslationServiceClient.create()) { + * TranslateDocumentRequest request = + * TranslateDocumentRequest.newBuilder() + * .setParent("parent-995424086") + * .setSourceLanguageCode("sourceLanguageCode1645917472") + * .setTargetLanguageCode("targetLanguageCode-106414698") + * .setDocumentInputConfig(DocumentInputConfig.newBuilder().build()) + * .setDocumentOutputConfig(DocumentOutputConfig.newBuilder().build()) + * .setModel("model104069929") + * .setGlossaryConfig(TranslateTextGlossaryConfig.newBuilder().build()) + * .putAllLabels(new HashMap+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TranslateDocumentResponse translateDocument(TranslateDocumentRequest request) { + return translateDocumentCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Translates documents in synchronous mode. + * + *()) + * .build(); + * TranslateDocumentResponse response = translationServiceClient.translateDocument(request); + * } + * }
Sample code: + * + *
{@code + * try (TranslationServiceClient translationServiceClient = TranslationServiceClient.create()) { + * TranslateDocumentRequest request = + * TranslateDocumentRequest.newBuilder() + * .setParent("parent-995424086") + * .setSourceLanguageCode("sourceLanguageCode1645917472") + * .setTargetLanguageCode("targetLanguageCode-106414698") + * .setDocumentInputConfig(DocumentInputConfig.newBuilder().build()) + * .setDocumentOutputConfig(DocumentOutputConfig.newBuilder().build()) + * .setModel("model104069929") + * .setGlossaryConfig(TranslateTextGlossaryConfig.newBuilder().build()) + * .putAllLabels(new HashMap+ */ + public final UnaryCallable()) + * .build(); + * ApiFuture future = + * translationServiceClient.translateDocumentCallable().futureCall(request); + * // Do something. + * TranslateDocumentResponse response = future.get(); + * } + * }
This call returns immediately and you can use google.longrunning.Operation.name to poll the + * status of the call. + * + *
Sample code: + * + *
{@code + * try (TranslationServiceClient translationServiceClient = TranslationServiceClient.create()) { + * BatchTranslateDocumentRequest request = + * BatchTranslateDocumentRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setSourceLanguageCode("sourceLanguageCode1645917472") + * .addAllTargetLanguageCodes(new ArrayList+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture()) + * .addAllInputConfigs(new ArrayList ()) + * .setOutputConfig(BatchDocumentOutputConfig.newBuilder().build()) + * .putAllModels(new HashMap ()) + * .putAllGlossaries(new HashMap ()) + * .putAllFormatConversions(new HashMap ()) + * .build(); + * BatchTranslateDocumentResponse response = + * translationServiceClient.batchTranslateDocumentAsync(request).get(); + * } + * }
This call returns immediately and you can use google.longrunning.Operation.name to poll the + * status of the call. + * + *
Sample code: + * + *
{@code + * try (TranslationServiceClient translationServiceClient = TranslationServiceClient.create()) { + * BatchTranslateDocumentRequest request = + * BatchTranslateDocumentRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setSourceLanguageCode("sourceLanguageCode1645917472") + * .addAllTargetLanguageCodes(new ArrayList+ */ + public final OperationCallable< + BatchTranslateDocumentRequest, + BatchTranslateDocumentResponse, + BatchTranslateDocumentMetadata> + batchTranslateDocumentOperationCallable() { + return stub.batchTranslateDocumentOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Translates a large volume of document in asynchronous batch mode. This function provides + * real-time output as the inputs are being processed. If caller cancels a request, the partial + * results (for an input file, it's all or nothing) may still be available on the specified output + * location. + * + *()) + * .addAllInputConfigs(new ArrayList ()) + * .setOutputConfig(BatchDocumentOutputConfig.newBuilder().build()) + * .putAllModels(new HashMap ()) + * .putAllGlossaries(new HashMap ()) + * .putAllFormatConversions(new HashMap ()) + * .build(); + * OperationFuture future = + * translationServiceClient.batchTranslateDocumentOperationCallable().futureCall(request); + * // Do something. + * BatchTranslateDocumentResponse response = future.get(); + * } + * }
This call returns immediately and you can use google.longrunning.Operation.name to poll the + * status of the call. + * + *
Sample code: + * + *
{@code + * try (TranslationServiceClient translationServiceClient = TranslationServiceClient.create()) { + * BatchTranslateDocumentRequest request = + * BatchTranslateDocumentRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setSourceLanguageCode("sourceLanguageCode1645917472") + * .addAllTargetLanguageCodes(new ArrayList+ */ + public final UnaryCallable()) + * .addAllInputConfigs(new ArrayList ()) + * .setOutputConfig(BatchDocumentOutputConfig.newBuilder().build()) + * .putAllModels(new HashMap ()) + * .putAllGlossaries(new HashMap ()) + * .putAllFormatConversions(new HashMap ()) + * .build(); + * ApiFuture future = + * translationServiceClient.batchTranslateDocumentCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); + * } + * }
The interfaces provided are listed below, along with usage samples. * *
======================= TranslationServiceClient =======================
*
diff --git a/google-cloud-translate/src/main/java/com/google/cloud/translate/v3/stub/GrpcTranslationServiceStub.java b/google-cloud-translate/src/main/java/com/google/cloud/translate/v3/stub/GrpcTranslationServiceStub.java
index caf3bf31..6ab9785c 100644
--- a/google-cloud-translate/src/main/java/com/google/cloud/translate/v3/stub/GrpcTranslationServiceStub.java
+++ b/google-cloud-translate/src/main/java/com/google/cloud/translate/v3/stub/GrpcTranslationServiceStub.java
@@ -25,6 +25,9 @@
import com.google.api.gax.rpc.ClientContext;
import com.google.api.gax.rpc.OperationCallable;
import com.google.api.gax.rpc.UnaryCallable;
+import com.google.cloud.translate.v3.BatchTranslateDocumentMetadata;
+import com.google.cloud.translate.v3.BatchTranslateDocumentRequest;
+import com.google.cloud.translate.v3.BatchTranslateDocumentResponse;
import com.google.cloud.translate.v3.BatchTranslateMetadata;
import com.google.cloud.translate.v3.BatchTranslateResponse;
import com.google.cloud.translate.v3.BatchTranslateTextRequest;
@@ -41,6 +44,8 @@
import com.google.cloud.translate.v3.ListGlossariesRequest;
import com.google.cloud.translate.v3.ListGlossariesResponse;
import com.google.cloud.translate.v3.SupportedLanguages;
+import com.google.cloud.translate.v3.TranslateDocumentRequest;
+import com.google.cloud.translate.v3.TranslateDocumentResponse;
import com.google.cloud.translate.v3.TranslateTextRequest;
import com.google.cloud.translate.v3.TranslateTextResponse;
import com.google.common.collect.ImmutableMap;
@@ -93,6 +98,17 @@ public class GrpcTranslationServiceStub extends TranslationServiceStub {
.setResponseMarshaller(ProtoUtils.marshaller(SupportedLanguages.getDefaultInstance()))
.build();
+ private static final MethodDescriptor The interfaces provided are listed below, along with usage samples.
*
* ======================= TranslationServiceClient =======================
*
diff --git a/google-cloud-translate/src/test/java/com/google/cloud/translate/v3/MockTranslationServiceImpl.java b/google-cloud-translate/src/test/java/com/google/cloud/translate/v3/MockTranslationServiceImpl.java
index c3fa20d7..12d19540 100644
--- a/google-cloud-translate/src/test/java/com/google/cloud/translate/v3/MockTranslationServiceImpl.java
+++ b/google-cloud-translate/src/test/java/com/google/cloud/translate/v3/MockTranslationServiceImpl.java
@@ -122,6 +122,28 @@ public void getSupportedLanguages(
}
}
+ @Override
+ public void translateDocument(
+ TranslateDocumentRequest request,
+ StreamObserver
+ * An abstract interface that provides location-related information for
+ * a service. Service-specific metadata is provided through the
+ * [Location.metadata][google.cloud.location.Location.metadata] field.
+ *
+ */
+@javax.annotation.Generated(
+ value = "by gRPC proto compiler",
+ comments = "Source: google/cloud/location/locations.proto")
+public final class LocationsGrpc {
+
+ private LocationsGrpc() {}
+
+ public static final String SERVICE_NAME = "google.cloud.location.Locations";
+
+ // Static method descriptors that strictly reflect the proto.
+ private static volatile io.grpc.MethodDescriptor<
+ com.google.cloud.location.ListLocationsRequest,
+ com.google.cloud.location.ListLocationsResponse>
+ getListLocationsMethod;
+
+ @io.grpc.stub.annotations.RpcMethod(
+ fullMethodName = SERVICE_NAME + '/' + "ListLocations",
+ requestType = com.google.cloud.location.ListLocationsRequest.class,
+ responseType = com.google.cloud.location.ListLocationsResponse.class,
+ methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
+ public static io.grpc.MethodDescriptor<
+ com.google.cloud.location.ListLocationsRequest,
+ com.google.cloud.location.ListLocationsResponse>
+ getListLocationsMethod() {
+ io.grpc.MethodDescriptor<
+ com.google.cloud.location.ListLocationsRequest,
+ com.google.cloud.location.ListLocationsResponse>
+ getListLocationsMethod;
+ if ((getListLocationsMethod = LocationsGrpc.getListLocationsMethod) == null) {
+ synchronized (LocationsGrpc.class) {
+ if ((getListLocationsMethod = LocationsGrpc.getListLocationsMethod) == null) {
+ LocationsGrpc.getListLocationsMethod =
+ getListLocationsMethod =
+ io.grpc.MethodDescriptor
+ .
+ * An abstract interface that provides location-related information for
+ * a service. Service-specific metadata is provided through the
+ * [Location.metadata][google.cloud.location.Location.metadata] field.
+ *
+ */
+ public abstract static class LocationsImplBase implements io.grpc.BindableService {
+
+ /**
+ *
+ *
+ *
+ * Lists information about the supported locations for this service.
+ *
+ */
+ public void listLocations(
+ com.google.cloud.location.ListLocationsRequest request,
+ io.grpc.stub.StreamObserver
+ * Gets information about a location.
+ *
+ */
+ public void getLocation(
+ com.google.cloud.location.GetLocationRequest request,
+ io.grpc.stub.StreamObserver
+ * An abstract interface that provides location-related information for
+ * a service. Service-specific metadata is provided through the
+ * [Location.metadata][google.cloud.location.Location.metadata] field.
+ *
+ */
+ public static final class LocationsStub extends io.grpc.stub.AbstractAsyncStub
+ * Lists information about the supported locations for this service.
+ *
+ */
+ public void listLocations(
+ com.google.cloud.location.ListLocationsRequest request,
+ io.grpc.stub.StreamObserver
+ * Gets information about a location.
+ *
+ */
+ public void getLocation(
+ com.google.cloud.location.GetLocationRequest request,
+ io.grpc.stub.StreamObserver
+ * An abstract interface that provides location-related information for
+ * a service. Service-specific metadata is provided through the
+ * [Location.metadata][google.cloud.location.Location.metadata] field.
+ *
+ */
+ public static final class LocationsBlockingStub
+ extends io.grpc.stub.AbstractBlockingStub
+ * Lists information about the supported locations for this service.
+ *
+ */
+ public com.google.cloud.location.ListLocationsResponse listLocations(
+ com.google.cloud.location.ListLocationsRequest request) {
+ return io.grpc.stub.ClientCalls.blockingUnaryCall(
+ getChannel(), getListLocationsMethod(), getCallOptions(), request);
+ }
+
+ /**
+ *
+ *
+ *
+ * Gets information about a location.
+ *
+ */
+ public com.google.cloud.location.Location getLocation(
+ com.google.cloud.location.GetLocationRequest request) {
+ return io.grpc.stub.ClientCalls.blockingUnaryCall(
+ getChannel(), getGetLocationMethod(), getCallOptions(), request);
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * An abstract interface that provides location-related information for
+ * a service. Service-specific metadata is provided through the
+ * [Location.metadata][google.cloud.location.Location.metadata] field.
+ *
+ */
+ public static final class LocationsFutureStub
+ extends io.grpc.stub.AbstractFutureStub
+ * Lists information about the supported locations for this service.
+ *
+ */
+ public com.google.common.util.concurrent.ListenableFuture<
+ com.google.cloud.location.ListLocationsResponse>
+ listLocations(com.google.cloud.location.ListLocationsRequest request) {
+ return io.grpc.stub.ClientCalls.futureUnaryCall(
+ getChannel().newCall(getListLocationsMethod(), getCallOptions()), request);
+ }
+
+ /**
+ *
+ *
+ *
+ * Gets information about a location.
+ *
+ */
+ public com.google.common.util.concurrent.ListenableFuture
+ * Translates documents in synchronous mode.
+ *
+ */
+ public void translateDocument(
+ com.google.cloud.translate.v3.TranslateDocumentRequest request,
+ io.grpc.stub.StreamObserver
+ * Translates a large volume of document in asynchronous batch mode.
+ * This function provides real-time output as the inputs are being processed.
+ * If caller cancels a request, the partial results (for an input file, it's
+ * all or nothing) may still be available on the specified output location.
+ * This call returns immediately and you can use
+ * google.longrunning.Operation.name to poll the status of the call.
+ *
+ */
+ public void batchTranslateDocument(
+ com.google.cloud.translate.v3.BatchTranslateDocumentRequest request,
+ io.grpc.stub.StreamObserver
+ * Translates documents in synchronous mode.
+ *
+ */
+ public void translateDocument(
+ com.google.cloud.translate.v3.TranslateDocumentRequest request,
+ io.grpc.stub.StreamObserver
+ * Translates a large volume of document in asynchronous batch mode.
+ * This function provides real-time output as the inputs are being processed.
+ * If caller cancels a request, the partial results (for an input file, it's
+ * all or nothing) may still be available on the specified output location.
+ * This call returns immediately and you can use
+ * google.longrunning.Operation.name to poll the status of the call.
+ *
+ */
+ public void batchTranslateDocument(
+ com.google.cloud.translate.v3.BatchTranslateDocumentRequest request,
+ io.grpc.stub.StreamObserver
+ * Translates documents in synchronous mode.
+ *
+ */
+ public com.google.cloud.translate.v3.TranslateDocumentResponse translateDocument(
+ com.google.cloud.translate.v3.TranslateDocumentRequest request) {
+ return io.grpc.stub.ClientCalls.blockingUnaryCall(
+ getChannel(), getTranslateDocumentMethod(), getCallOptions(), request);
+ }
+
/**
*
*
@@ -875,6 +1071,24 @@ public com.google.longrunning.Operation batchTranslateText(
getChannel(), getBatchTranslateTextMethod(), getCallOptions(), request);
}
+ /**
+ *
+ *
+ *
+ * Translates a large volume of document in asynchronous batch mode.
+ * This function provides real-time output as the inputs are being processed.
+ * If caller cancels a request, the partial results (for an input file, it's
+ * all or nothing) may still be available on the specified output location.
+ * This call returns immediately and you can use
+ * google.longrunning.Operation.name to poll the status of the call.
+ *
+ */
+ public com.google.longrunning.Operation batchTranslateDocument(
+ com.google.cloud.translate.v3.BatchTranslateDocumentRequest request) {
+ return io.grpc.stub.ClientCalls.blockingUnaryCall(
+ getChannel(), getBatchTranslateDocumentMethod(), getCallOptions(), request);
+ }
+
/**
*
*
@@ -994,6 +1208,20 @@ protected TranslationServiceFutureStub build(
getChannel().newCall(getGetSupportedLanguagesMethod(), getCallOptions()), request);
}
+ /**
+ *
+ *
+ *
+ * Translates documents in synchronous mode.
+ *
+ */
+ public com.google.common.util.concurrent.ListenableFuture<
+ com.google.cloud.translate.v3.TranslateDocumentResponse>
+ translateDocument(com.google.cloud.translate.v3.TranslateDocumentRequest request) {
+ return io.grpc.stub.ClientCalls.futureUnaryCall(
+ getChannel().newCall(getTranslateDocumentMethod(), getCallOptions()), request);
+ }
+
/**
*
*
@@ -1012,6 +1240,25 @@ protected TranslationServiceFutureStub build(
getChannel().newCall(getBatchTranslateTextMethod(), getCallOptions()), request);
}
+ /**
+ *
+ *
+ *
+ * Translates a large volume of document in asynchronous batch mode.
+ * This function provides real-time output as the inputs are being processed.
+ * If caller cancels a request, the partial results (for an input file, it's
+ * all or nothing) may still be available on the specified output location.
+ * This call returns immediately and you can use
+ * google.longrunning.Operation.name to poll the status of the call.
+ *
+ */
+ public com.google.common.util.concurrent.ListenableFuture
+ * An abstract interface that provides location-related information for
+ * a service. Service-specific metadata is provided through the
+ * [Location.metadata][google.cloud.location.Location.metadata] field.
+ *
+ */
+@javax.annotation.Generated(
+ value = "by gRPC proto compiler",
+ comments = "Source: google/cloud/location/locations.proto")
+public final class LocationsGrpc {
+
+ private LocationsGrpc() {}
+
+ public static final String SERVICE_NAME = "google.cloud.location.Locations";
+
+ // Static method descriptors that strictly reflect the proto.
+ private static volatile io.grpc.MethodDescriptor<
+ com.google.cloud.location.ListLocationsRequest,
+ com.google.cloud.location.ListLocationsResponse>
+ getListLocationsMethod;
+
+ @io.grpc.stub.annotations.RpcMethod(
+ fullMethodName = SERVICE_NAME + '/' + "ListLocations",
+ requestType = com.google.cloud.location.ListLocationsRequest.class,
+ responseType = com.google.cloud.location.ListLocationsResponse.class,
+ methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
+ public static io.grpc.MethodDescriptor<
+ com.google.cloud.location.ListLocationsRequest,
+ com.google.cloud.location.ListLocationsResponse>
+ getListLocationsMethod() {
+ io.grpc.MethodDescriptor<
+ com.google.cloud.location.ListLocationsRequest,
+ com.google.cloud.location.ListLocationsResponse>
+ getListLocationsMethod;
+ if ((getListLocationsMethod = LocationsGrpc.getListLocationsMethod) == null) {
+ synchronized (LocationsGrpc.class) {
+ if ((getListLocationsMethod = LocationsGrpc.getListLocationsMethod) == null) {
+ LocationsGrpc.getListLocationsMethod =
+ getListLocationsMethod =
+ io.grpc.MethodDescriptor
+ .
+ * An abstract interface that provides location-related information for
+ * a service. Service-specific metadata is provided through the
+ * [Location.metadata][google.cloud.location.Location.metadata] field.
+ *
+ */
+ public abstract static class LocationsImplBase implements io.grpc.BindableService {
+
+ /**
+ *
+ *
+ *
+ * Lists information about the supported locations for this service.
+ *
+ */
+ public void listLocations(
+ com.google.cloud.location.ListLocationsRequest request,
+ io.grpc.stub.StreamObserver
+ * Gets information about a location.
+ *
+ */
+ public void getLocation(
+ com.google.cloud.location.GetLocationRequest request,
+ io.grpc.stub.StreamObserver
+ * An abstract interface that provides location-related information for
+ * a service. Service-specific metadata is provided through the
+ * [Location.metadata][google.cloud.location.Location.metadata] field.
+ *
+ */
+ public static final class LocationsStub extends io.grpc.stub.AbstractAsyncStub
+ * Lists information about the supported locations for this service.
+ *
+ */
+ public void listLocations(
+ com.google.cloud.location.ListLocationsRequest request,
+ io.grpc.stub.StreamObserver
+ * Gets information about a location.
+ *
+ */
+ public void getLocation(
+ com.google.cloud.location.GetLocationRequest request,
+ io.grpc.stub.StreamObserver
+ * An abstract interface that provides location-related information for
+ * a service. Service-specific metadata is provided through the
+ * [Location.metadata][google.cloud.location.Location.metadata] field.
+ *
+ */
+ public static final class LocationsBlockingStub
+ extends io.grpc.stub.AbstractBlockingStub
+ * Lists information about the supported locations for this service.
+ *
+ */
+ public com.google.cloud.location.ListLocationsResponse listLocations(
+ com.google.cloud.location.ListLocationsRequest request) {
+ return io.grpc.stub.ClientCalls.blockingUnaryCall(
+ getChannel(), getListLocationsMethod(), getCallOptions(), request);
+ }
+
+ /**
+ *
+ *
+ *
+ * Gets information about a location.
+ *
+ */
+ public com.google.cloud.location.Location getLocation(
+ com.google.cloud.location.GetLocationRequest request) {
+ return io.grpc.stub.ClientCalls.blockingUnaryCall(
+ getChannel(), getGetLocationMethod(), getCallOptions(), request);
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * An abstract interface that provides location-related information for
+ * a service. Service-specific metadata is provided through the
+ * [Location.metadata][google.cloud.location.Location.metadata] field.
+ *
+ */
+ public static final class LocationsFutureStub
+ extends io.grpc.stub.AbstractFutureStub
+ * Lists information about the supported locations for this service.
+ *
+ */
+ public com.google.common.util.concurrent.ListenableFuture<
+ com.google.cloud.location.ListLocationsResponse>
+ listLocations(com.google.cloud.location.ListLocationsRequest request) {
+ return io.grpc.stub.ClientCalls.futureUnaryCall(
+ getChannel().newCall(getListLocationsMethod(), getCallOptions()), request);
+ }
+
+ /**
+ *
+ *
+ *
+ * Gets information about a location.
+ *
+ */
+ public com.google.common.util.concurrent.ListenableFuture
+ * The request message for [Locations.GetLocation][google.cloud.location.Locations.GetLocation].
+ *
+ *
+ * Protobuf type {@code google.cloud.location.GetLocationRequest}
+ */
+public final class GetLocationRequest extends com.google.protobuf.GeneratedMessageV3
+ implements
+ // @@protoc_insertion_point(message_implements:google.cloud.location.GetLocationRequest)
+ GetLocationRequestOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use GetLocationRequest.newBuilder() to construct.
+ private GetLocationRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+
+ private GetLocationRequest() {
+ name_ = "";
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
+ return new GetLocationRequest();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
+ return this.unknownFields;
+ }
+
+ private GetLocationRequest(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ 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.location.LocationsProto
+ .internal_static_google_cloud_location_GetLocationRequest_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.cloud.location.LocationsProto
+ .internal_static_google_cloud_location_GetLocationRequest_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.cloud.location.GetLocationRequest.class,
+ com.google.cloud.location.GetLocationRequest.Builder.class);
+ }
+
+ public static final int NAME_FIELD_NUMBER = 1;
+ private volatile java.lang.Object name_;
+ /**
+ *
+ *
+ *
+ * Resource name for the location.
+ *
+ *
+ * string name = 1;
+ *
+ * @return The name.
+ */
+ @java.lang.Override
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ name_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Resource name for the location.
+ *
+ *
+ * string name = 1;
+ *
+ * @return The bytes for name.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (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.location.GetLocationRequest)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.location.GetLocationRequest other =
+ (com.google.cloud.location.GetLocationRequest) 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.location.GetLocationRequest parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.location.GetLocationRequest parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.location.GetLocationRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.location.GetLocationRequest parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.location.GetLocationRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.location.GetLocationRequest parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.location.GetLocationRequest parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.location.GetLocationRequest parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.location.GetLocationRequest parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.location.GetLocationRequest parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.location.GetLocationRequest parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.location.GetLocationRequest parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(com.google.cloud.location.GetLocationRequest prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new 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 request message for [Locations.GetLocation][google.cloud.location.Locations.GetLocation].
+ *
+ *
+ * Protobuf type {@code google.cloud.location.GetLocationRequest}
+ */
+ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Resource name for the location.
+ *
+ *
+ * string name = 1;
+ *
+ * @return The name.
+ */
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ name_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Resource name for the location.
+ *
+ *
+ * string name = 1;
+ *
+ * @return The bytes for name.
+ */
+ public com.google.protobuf.ByteString getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Resource name for the location.
+ *
+ *
+ * string name = 1;
+ *
+ * @param value The name to set.
+ * @return This builder for chaining.
+ */
+ public Builder setName(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Resource name for the location.
+ *
+ *
+ * string name = 1;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearName() {
+
+ name_ = getDefaultInstance().getName();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Resource name for the location.
+ *
+ *
+ * string name = 1;
+ *
+ * @param value The bytes for name to set.
+ * @return This builder for chaining.
+ */
+ public Builder setNameBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.location.GetLocationRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.location.GetLocationRequest)
+ private static final com.google.cloud.location.GetLocationRequest DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.location.GetLocationRequest();
+ }
+
+ public static com.google.cloud.location.GetLocationRequest getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ * Resource name for the location.
+ *
+ *
+ * string name = 1;
+ *
+ * @return The name.
+ */
+ java.lang.String getName();
+ /**
+ *
+ *
+ *
+ * Resource name for the location.
+ *
+ *
+ * string name = 1;
+ *
+ * @return The bytes for name.
+ */
+ com.google.protobuf.ByteString getNameBytes();
+}
diff --git a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/location/ListLocationsRequest.java b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/location/ListLocationsRequest.java
new file mode 100644
index 00000000..e1b3af7f
--- /dev/null
+++ b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/location/ListLocationsRequest.java
@@ -0,0 +1,1082 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/location/locations.proto
+
+package com.google.cloud.location;
+
+/**
+ *
+ *
+ *
+ * The request message for [Locations.ListLocations][google.cloud.location.Locations.ListLocations].
+ *
+ *
+ * Protobuf type {@code google.cloud.location.ListLocationsRequest}
+ */
+public final class ListLocationsRequest extends com.google.protobuf.GeneratedMessageV3
+ implements
+ // @@protoc_insertion_point(message_implements:google.cloud.location.ListLocationsRequest)
+ ListLocationsRequestOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use ListLocationsRequest.newBuilder() to construct.
+ private ListLocationsRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+
+ private ListLocationsRequest() {
+ name_ = "";
+ filter_ = "";
+ pageToken_ = "";
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
+ return new ListLocationsRequest();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
+ return this.unknownFields;
+ }
+
+ private ListLocationsRequest(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10:
+ {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ name_ = s;
+ break;
+ }
+ case 18:
+ {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ filter_ = s;
+ break;
+ }
+ case 24:
+ {
+ pageSize_ = input.readInt32();
+ break;
+ }
+ case 34:
+ {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ pageToken_ = s;
+ break;
+ }
+ default:
+ {
+ if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
+ } finally {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.cloud.location.LocationsProto
+ .internal_static_google_cloud_location_ListLocationsRequest_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.cloud.location.LocationsProto
+ .internal_static_google_cloud_location_ListLocationsRequest_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.cloud.location.ListLocationsRequest.class,
+ com.google.cloud.location.ListLocationsRequest.Builder.class);
+ }
+
+ public static final int NAME_FIELD_NUMBER = 1;
+ private volatile java.lang.Object name_;
+ /**
+ *
+ *
+ *
+ * The resource that owns the locations collection, if applicable.
+ *
+ *
+ * string name = 1;
+ *
+ * @return The name.
+ */
+ @java.lang.Override
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ name_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The resource that owns the locations collection, if applicable.
+ *
+ *
+ * string name = 1;
+ *
+ * @return The bytes for name.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int FILTER_FIELD_NUMBER = 2;
+ private volatile java.lang.Object filter_;
+ /**
+ *
+ *
+ *
+ * The standard list filter.
+ *
+ *
+ * string filter = 2;
+ *
+ * @return The filter.
+ */
+ @java.lang.Override
+ public java.lang.String getFilter() {
+ java.lang.Object ref = filter_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ filter_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The standard list filter.
+ *
+ *
+ * string filter = 2;
+ *
+ * @return The bytes for filter.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getFilterBytes() {
+ java.lang.Object ref = filter_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ filter_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int PAGE_SIZE_FIELD_NUMBER = 3;
+ private int pageSize_;
+ /**
+ *
+ *
+ *
+ * The standard list page size.
+ *
+ *
+ * int32 page_size = 3;
+ *
+ * @return The pageSize.
+ */
+ @java.lang.Override
+ public int getPageSize() {
+ return pageSize_;
+ }
+
+ public static final int PAGE_TOKEN_FIELD_NUMBER = 4;
+ private volatile java.lang.Object pageToken_;
+ /**
+ *
+ *
+ *
+ * The standard list page token.
+ *
+ *
+ * string page_token = 4;
+ *
+ * @return The pageToken.
+ */
+ @java.lang.Override
+ public java.lang.String getPageToken() {
+ java.lang.Object ref = pageToken_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ pageToken_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The standard list page token.
+ *
+ *
+ * string page_token = 4;
+ *
+ * @return The bytes for pageToken.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getPageTokenBytes() {
+ java.lang.Object ref = pageToken_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ pageToken_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (!getNameBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
+ }
+ if (!getFilterBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_);
+ }
+ if (pageSize_ != 0) {
+ output.writeInt32(3, pageSize_);
+ }
+ if (!getPageTokenBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getNameBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
+ }
+ if (!getFilterBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_);
+ }
+ if (pageSize_ != 0) {
+ size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_);
+ }
+ if (!getPageTokenBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.location.ListLocationsRequest)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.location.ListLocationsRequest other =
+ (com.google.cloud.location.ListLocationsRequest) obj;
+
+ if (!getName().equals(other.getName())) return false;
+ if (!getFilter().equals(other.getFilter())) return false;
+ if (getPageSize() != other.getPageSize()) return false;
+ if (!getPageToken().equals(other.getPageToken())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + NAME_FIELD_NUMBER;
+ hash = (53 * hash) + getName().hashCode();
+ hash = (37 * hash) + FILTER_FIELD_NUMBER;
+ hash = (53 * hash) + getFilter().hashCode();
+ hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER;
+ hash = (53 * hash) + getPageSize();
+ hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER;
+ hash = (53 * hash) + getPageToken().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.location.ListLocationsRequest parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.location.ListLocationsRequest parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.location.ListLocationsRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.location.ListLocationsRequest parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.location.ListLocationsRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.location.ListLocationsRequest parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.location.ListLocationsRequest parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.location.ListLocationsRequest parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.location.ListLocationsRequest parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.location.ListLocationsRequest parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.location.ListLocationsRequest parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.location.ListLocationsRequest parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(com.google.cloud.location.ListLocationsRequest prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new 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 request message for [Locations.ListLocations][google.cloud.location.Locations.ListLocations].
+ *
+ *
+ * Protobuf type {@code google.cloud.location.ListLocationsRequest}
+ */
+ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * The resource that owns the locations collection, if applicable.
+ *
+ *
+ * string name = 1;
+ *
+ * @return The name.
+ */
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ name_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The resource that owns the locations collection, if applicable.
+ *
+ *
+ * string name = 1;
+ *
+ * @return The bytes for name.
+ */
+ public com.google.protobuf.ByteString getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The resource that owns the locations collection, if applicable.
+ *
+ *
+ * string name = 1;
+ *
+ * @param value The name to set.
+ * @return This builder for chaining.
+ */
+ public Builder setName(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The resource that owns the locations collection, if applicable.
+ *
+ *
+ * string name = 1;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearName() {
+
+ name_ = getDefaultInstance().getName();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The resource that owns the locations collection, if applicable.
+ *
+ *
+ * string name = 1;
+ *
+ * @param value The bytes for name to set.
+ * @return This builder for chaining.
+ */
+ public Builder setNameBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object filter_ = "";
+ /**
+ *
+ *
+ *
+ * The standard list filter.
+ *
+ *
+ * string filter = 2;
+ *
+ * @return The filter.
+ */
+ public java.lang.String getFilter() {
+ java.lang.Object ref = filter_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ filter_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The standard list filter.
+ *
+ *
+ * string filter = 2;
+ *
+ * @return The bytes for filter.
+ */
+ public com.google.protobuf.ByteString getFilterBytes() {
+ java.lang.Object ref = filter_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ filter_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The standard list filter.
+ *
+ *
+ * string filter = 2;
+ *
+ * @param value The filter to set.
+ * @return This builder for chaining.
+ */
+ public Builder setFilter(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ filter_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The standard list filter.
+ *
+ *
+ * string filter = 2;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearFilter() {
+
+ filter_ = getDefaultInstance().getFilter();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The standard list filter.
+ *
+ *
+ * string filter = 2;
+ *
+ * @param value The bytes for filter to set.
+ * @return This builder for chaining.
+ */
+ public Builder setFilterBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ filter_ = value;
+ onChanged();
+ return this;
+ }
+
+ private int pageSize_;
+ /**
+ *
+ *
+ *
+ * The standard list page size.
+ *
+ *
+ * int32 page_size = 3;
+ *
+ * @return The pageSize.
+ */
+ @java.lang.Override
+ public int getPageSize() {
+ return pageSize_;
+ }
+ /**
+ *
+ *
+ *
+ * The standard list page size.
+ *
+ *
+ * int32 page_size = 3;
+ *
+ * @param value The pageSize to set.
+ * @return This builder for chaining.
+ */
+ public Builder setPageSize(int value) {
+
+ pageSize_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The standard list page size.
+ *
+ *
+ * int32 page_size = 3;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearPageSize() {
+
+ pageSize_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object pageToken_ = "";
+ /**
+ *
+ *
+ *
+ * The standard list page token.
+ *
+ *
+ * string page_token = 4;
+ *
+ * @return The pageToken.
+ */
+ public java.lang.String getPageToken() {
+ java.lang.Object ref = pageToken_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ pageToken_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The standard list page token.
+ *
+ *
+ * string page_token = 4;
+ *
+ * @return The bytes for pageToken.
+ */
+ public com.google.protobuf.ByteString getPageTokenBytes() {
+ java.lang.Object ref = pageToken_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ pageToken_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The standard list page token.
+ *
+ *
+ * string page_token = 4;
+ *
+ * @param value The pageToken to set.
+ * @return This builder for chaining.
+ */
+ public Builder setPageToken(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ pageToken_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The standard list page token.
+ *
+ *
+ * string page_token = 4;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearPageToken() {
+
+ pageToken_ = getDefaultInstance().getPageToken();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The standard list page token.
+ *
+ *
+ * string page_token = 4;
+ *
+ * @param value The bytes for pageToken to set.
+ * @return This builder for chaining.
+ */
+ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ pageToken_ = value;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.location.ListLocationsRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.location.ListLocationsRequest)
+ private static final com.google.cloud.location.ListLocationsRequest DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.location.ListLocationsRequest();
+ }
+
+ public static com.google.cloud.location.ListLocationsRequest getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ * The resource that owns the locations collection, if applicable.
+ *
+ *
+ * string name = 1;
+ *
+ * @return The name.
+ */
+ java.lang.String getName();
+ /**
+ *
+ *
+ *
+ * The resource that owns the locations collection, if applicable.
+ *
+ *
+ * string name = 1;
+ *
+ * @return The bytes for name.
+ */
+ com.google.protobuf.ByteString getNameBytes();
+
+ /**
+ *
+ *
+ *
+ * The standard list filter.
+ *
+ *
+ * string filter = 2;
+ *
+ * @return The filter.
+ */
+ java.lang.String getFilter();
+ /**
+ *
+ *
+ *
+ * The standard list filter.
+ *
+ *
+ * string filter = 2;
+ *
+ * @return The bytes for filter.
+ */
+ com.google.protobuf.ByteString getFilterBytes();
+
+ /**
+ *
+ *
+ *
+ * The standard list page size.
+ *
+ *
+ * int32 page_size = 3;
+ *
+ * @return The pageSize.
+ */
+ int getPageSize();
+
+ /**
+ *
+ *
+ *
+ * The standard list page token.
+ *
+ *
+ * string page_token = 4;
+ *
+ * @return The pageToken.
+ */
+ java.lang.String getPageToken();
+ /**
+ *
+ *
+ *
+ * The standard list page token.
+ *
+ *
+ * string page_token = 4;
+ *
+ * @return The bytes for pageToken.
+ */
+ com.google.protobuf.ByteString getPageTokenBytes();
+}
diff --git a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/location/ListLocationsResponse.java b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/location/ListLocationsResponse.java
new file mode 100644
index 00000000..8e7553c0
--- /dev/null
+++ b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/location/ListLocationsResponse.java
@@ -0,0 +1,1126 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/location/locations.proto
+
+package com.google.cloud.location;
+
+/**
+ *
+ *
+ *
+ * The response message for [Locations.ListLocations][google.cloud.location.Locations.ListLocations].
+ *
+ *
+ * Protobuf type {@code google.cloud.location.ListLocationsResponse}
+ */
+public final class ListLocationsResponse extends com.google.protobuf.GeneratedMessageV3
+ implements
+ // @@protoc_insertion_point(message_implements:google.cloud.location.ListLocationsResponse)
+ ListLocationsResponseOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use ListLocationsResponse.newBuilder() to construct.
+ private ListLocationsResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+
+ private ListLocationsResponse() {
+ locations_ = java.util.Collections.emptyList();
+ nextPageToken_ = "";
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
+ return new ListLocationsResponse();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
+ return this.unknownFields;
+ }
+
+ private ListLocationsResponse(
+ 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)) {
+ locations_ = new java.util.ArrayList
+ * A list of locations that matches the specified filter in the request.
+ *
+ *
+ * repeated .google.cloud.location.Location locations = 1;
+ */
+ @java.lang.Override
+ public java.util.List
+ * A list of locations that matches the specified filter in the request.
+ *
+ *
+ * repeated .google.cloud.location.Location locations = 1;
+ */
+ @java.lang.Override
+ public java.util.List extends com.google.cloud.location.LocationOrBuilder>
+ getLocationsOrBuilderList() {
+ return locations_;
+ }
+ /**
+ *
+ *
+ *
+ * A list of locations that matches the specified filter in the request.
+ *
+ *
+ * repeated .google.cloud.location.Location locations = 1;
+ */
+ @java.lang.Override
+ public int getLocationsCount() {
+ return locations_.size();
+ }
+ /**
+ *
+ *
+ *
+ * A list of locations that matches the specified filter in the request.
+ *
+ *
+ * repeated .google.cloud.location.Location locations = 1;
+ */
+ @java.lang.Override
+ public com.google.cloud.location.Location getLocations(int index) {
+ return locations_.get(index);
+ }
+ /**
+ *
+ *
+ *
+ * A list of locations that matches the specified filter in the request.
+ *
+ *
+ * repeated .google.cloud.location.Location locations = 1;
+ */
+ @java.lang.Override
+ public com.google.cloud.location.LocationOrBuilder getLocationsOrBuilder(int index) {
+ return locations_.get(index);
+ }
+
+ public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2;
+ private volatile java.lang.Object nextPageToken_;
+ /**
+ *
+ *
+ *
+ * The standard List next-page token.
+ *
+ *
+ * string next_page_token = 2;
+ *
+ * @return The nextPageToken.
+ */
+ @java.lang.Override
+ public java.lang.String getNextPageToken() {
+ java.lang.Object ref = nextPageToken_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ nextPageToken_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The standard List next-page token.
+ *
+ *
+ * string next_page_token = 2;
+ *
+ * @return The bytes for nextPageToken.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getNextPageTokenBytes() {
+ java.lang.Object ref = nextPageToken_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ nextPageToken_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ for (int i = 0; i < locations_.size(); i++) {
+ output.writeMessage(1, locations_.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 < locations_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, locations_.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.location.ListLocationsResponse)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.location.ListLocationsResponse other =
+ (com.google.cloud.location.ListLocationsResponse) obj;
+
+ if (!getLocationsList().equals(other.getLocationsList())) 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 (getLocationsCount() > 0) {
+ hash = (37 * hash) + LOCATIONS_FIELD_NUMBER;
+ hash = (53 * hash) + getLocationsList().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.location.ListLocationsResponse parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.location.ListLocationsResponse parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.location.ListLocationsResponse parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.location.ListLocationsResponse parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.location.ListLocationsResponse parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.location.ListLocationsResponse parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.location.ListLocationsResponse parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.location.ListLocationsResponse parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.location.ListLocationsResponse parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.location.ListLocationsResponse parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.location.ListLocationsResponse parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.location.ListLocationsResponse parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(com.google.cloud.location.ListLocationsResponse prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new 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 response message for [Locations.ListLocations][google.cloud.location.Locations.ListLocations].
+ *
+ *
+ * Protobuf type {@code google.cloud.location.ListLocationsResponse}
+ */
+ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * A list of locations that matches the specified filter in the request.
+ *
+ *
+ * repeated .google.cloud.location.Location locations = 1;
+ */
+ public java.util.List
+ * A list of locations that matches the specified filter in the request.
+ *
+ *
+ * repeated .google.cloud.location.Location locations = 1;
+ */
+ public int getLocationsCount() {
+ if (locationsBuilder_ == null) {
+ return locations_.size();
+ } else {
+ return locationsBuilder_.getCount();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * A list of locations that matches the specified filter in the request.
+ *
+ *
+ * repeated .google.cloud.location.Location locations = 1;
+ */
+ public com.google.cloud.location.Location getLocations(int index) {
+ if (locationsBuilder_ == null) {
+ return locations_.get(index);
+ } else {
+ return locationsBuilder_.getMessage(index);
+ }
+ }
+ /**
+ *
+ *
+ *
+ * A list of locations that matches the specified filter in the request.
+ *
+ *
+ * repeated .google.cloud.location.Location locations = 1;
+ */
+ public Builder setLocations(int index, com.google.cloud.location.Location value) {
+ if (locationsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureLocationsIsMutable();
+ locations_.set(index, value);
+ onChanged();
+ } else {
+ locationsBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A list of locations that matches the specified filter in the request.
+ *
+ *
+ * repeated .google.cloud.location.Location locations = 1;
+ */
+ public Builder setLocations(
+ int index, com.google.cloud.location.Location.Builder builderForValue) {
+ if (locationsBuilder_ == null) {
+ ensureLocationsIsMutable();
+ locations_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ locationsBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A list of locations that matches the specified filter in the request.
+ *
+ *
+ * repeated .google.cloud.location.Location locations = 1;
+ */
+ public Builder addLocations(com.google.cloud.location.Location value) {
+ if (locationsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureLocationsIsMutable();
+ locations_.add(value);
+ onChanged();
+ } else {
+ locationsBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A list of locations that matches the specified filter in the request.
+ *
+ *
+ * repeated .google.cloud.location.Location locations = 1;
+ */
+ public Builder addLocations(int index, com.google.cloud.location.Location value) {
+ if (locationsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureLocationsIsMutable();
+ locations_.add(index, value);
+ onChanged();
+ } else {
+ locationsBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A list of locations that matches the specified filter in the request.
+ *
+ *
+ * repeated .google.cloud.location.Location locations = 1;
+ */
+ public Builder addLocations(com.google.cloud.location.Location.Builder builderForValue) {
+ if (locationsBuilder_ == null) {
+ ensureLocationsIsMutable();
+ locations_.add(builderForValue.build());
+ onChanged();
+ } else {
+ locationsBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A list of locations that matches the specified filter in the request.
+ *
+ *
+ * repeated .google.cloud.location.Location locations = 1;
+ */
+ public Builder addLocations(
+ int index, com.google.cloud.location.Location.Builder builderForValue) {
+ if (locationsBuilder_ == null) {
+ ensureLocationsIsMutable();
+ locations_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ locationsBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A list of locations that matches the specified filter in the request.
+ *
+ *
+ * repeated .google.cloud.location.Location locations = 1;
+ */
+ public Builder addAllLocations(
+ java.lang.Iterable extends com.google.cloud.location.Location> values) {
+ if (locationsBuilder_ == null) {
+ ensureLocationsIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, locations_);
+ onChanged();
+ } else {
+ locationsBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A list of locations that matches the specified filter in the request.
+ *
+ *
+ * repeated .google.cloud.location.Location locations = 1;
+ */
+ public Builder clearLocations() {
+ if (locationsBuilder_ == null) {
+ locations_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ } else {
+ locationsBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A list of locations that matches the specified filter in the request.
+ *
+ *
+ * repeated .google.cloud.location.Location locations = 1;
+ */
+ public Builder removeLocations(int index) {
+ if (locationsBuilder_ == null) {
+ ensureLocationsIsMutable();
+ locations_.remove(index);
+ onChanged();
+ } else {
+ locationsBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A list of locations that matches the specified filter in the request.
+ *
+ *
+ * repeated .google.cloud.location.Location locations = 1;
+ */
+ public com.google.cloud.location.Location.Builder getLocationsBuilder(int index) {
+ return getLocationsFieldBuilder().getBuilder(index);
+ }
+ /**
+ *
+ *
+ *
+ * A list of locations that matches the specified filter in the request.
+ *
+ *
+ * repeated .google.cloud.location.Location locations = 1;
+ */
+ public com.google.cloud.location.LocationOrBuilder getLocationsOrBuilder(int index) {
+ if (locationsBuilder_ == null) {
+ return locations_.get(index);
+ } else {
+ return locationsBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ *
+ *
+ *
+ * A list of locations that matches the specified filter in the request.
+ *
+ *
+ * repeated .google.cloud.location.Location locations = 1;
+ */
+ public java.util.List extends com.google.cloud.location.LocationOrBuilder>
+ getLocationsOrBuilderList() {
+ if (locationsBuilder_ != null) {
+ return locationsBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(locations_);
+ }
+ }
+ /**
+ *
+ *
+ *
+ * A list of locations that matches the specified filter in the request.
+ *
+ *
+ * repeated .google.cloud.location.Location locations = 1;
+ */
+ public com.google.cloud.location.Location.Builder addLocationsBuilder() {
+ return getLocationsFieldBuilder()
+ .addBuilder(com.google.cloud.location.Location.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ *
+ * A list of locations that matches the specified filter in the request.
+ *
+ *
+ * repeated .google.cloud.location.Location locations = 1;
+ */
+ public com.google.cloud.location.Location.Builder addLocationsBuilder(int index) {
+ return getLocationsFieldBuilder()
+ .addBuilder(index, com.google.cloud.location.Location.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ *
+ * A list of locations that matches the specified filter in the request.
+ *
+ *
+ * repeated .google.cloud.location.Location locations = 1;
+ */
+ public java.util.List
+ * The standard List next-page token.
+ *
+ *
+ * string next_page_token = 2;
+ *
+ * @return The nextPageToken.
+ */
+ public java.lang.String getNextPageToken() {
+ java.lang.Object ref = nextPageToken_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ nextPageToken_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The standard List next-page token.
+ *
+ *
+ * string next_page_token = 2;
+ *
+ * @return The bytes for nextPageToken.
+ */
+ public com.google.protobuf.ByteString getNextPageTokenBytes() {
+ java.lang.Object ref = nextPageToken_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ nextPageToken_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The standard List next-page token.
+ *
+ *
+ * string next_page_token = 2;
+ *
+ * @param value The nextPageToken to set.
+ * @return This builder for chaining.
+ */
+ public Builder setNextPageToken(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ nextPageToken_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The standard List next-page token.
+ *
+ *
+ * string next_page_token = 2;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearNextPageToken() {
+
+ nextPageToken_ = getDefaultInstance().getNextPageToken();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The standard List next-page token.
+ *
+ *
+ * string next_page_token = 2;
+ *
+ * @param value The bytes for nextPageToken to set.
+ * @return This builder for chaining.
+ */
+ public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ nextPageToken_ = value;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.location.ListLocationsResponse)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.location.ListLocationsResponse)
+ private static final com.google.cloud.location.ListLocationsResponse DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.location.ListLocationsResponse();
+ }
+
+ public static com.google.cloud.location.ListLocationsResponse getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ * A list of locations that matches the specified filter in the request.
+ *
+ *
+ * repeated .google.cloud.location.Location locations = 1;
+ */
+ java.util.List
+ * A list of locations that matches the specified filter in the request.
+ *
+ *
+ * repeated .google.cloud.location.Location locations = 1;
+ */
+ com.google.cloud.location.Location getLocations(int index);
+ /**
+ *
+ *
+ *
+ * A list of locations that matches the specified filter in the request.
+ *
+ *
+ * repeated .google.cloud.location.Location locations = 1;
+ */
+ int getLocationsCount();
+ /**
+ *
+ *
+ *
+ * A list of locations that matches the specified filter in the request.
+ *
+ *
+ * repeated .google.cloud.location.Location locations = 1;
+ */
+ java.util.List extends com.google.cloud.location.LocationOrBuilder> getLocationsOrBuilderList();
+ /**
+ *
+ *
+ *
+ * A list of locations that matches the specified filter in the request.
+ *
+ *
+ * repeated .google.cloud.location.Location locations = 1;
+ */
+ com.google.cloud.location.LocationOrBuilder getLocationsOrBuilder(int index);
+
+ /**
+ *
+ *
+ *
+ * The standard List next-page token.
+ *
+ *
+ * string next_page_token = 2;
+ *
+ * @return The nextPageToken.
+ */
+ java.lang.String getNextPageToken();
+ /**
+ *
+ *
+ *
+ * The standard List next-page token.
+ *
+ *
+ * string next_page_token = 2;
+ *
+ * @return The bytes for nextPageToken.
+ */
+ com.google.protobuf.ByteString getNextPageTokenBytes();
+}
diff --git a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/location/Location.java b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/location/Location.java
new file mode 100644
index 00000000..7b7bfc86
--- /dev/null
+++ b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/location/Location.java
@@ -0,0 +1,1615 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/location/locations.proto
+
+package com.google.cloud.location;
+
+/**
+ *
+ *
+ *
+ * A resource that represents Google Cloud Platform location.
+ *
+ *
+ * Protobuf type {@code google.cloud.location.Location}
+ */
+public final class Location extends com.google.protobuf.GeneratedMessageV3
+ implements
+ // @@protoc_insertion_point(message_implements:google.cloud.location.Location)
+ LocationOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use Location.newBuilder() to construct.
+ private Location(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+
+ private Location() {
+ name_ = "";
+ locationId_ = "";
+ displayName_ = "";
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
+ return new Location();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
+ return this.unknownFields;
+ }
+
+ private Location(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10:
+ {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ name_ = s;
+ break;
+ }
+ case 18:
+ {
+ if (!((mutable_bitField0_ & 0x00000001) != 0)) {
+ labels_ =
+ com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry);
+ mutable_bitField0_ |= 0x00000001;
+ }
+ com.google.protobuf.MapEntry
+ * Resource name for the location, which may vary between implementations.
+ * For example: `"projects/example-project/locations/us-east1"`
+ *
+ *
+ * string name = 1;
+ *
+ * @return The name.
+ */
+ @java.lang.Override
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ name_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Resource name for the location, which may vary between implementations.
+ * For example: `"projects/example-project/locations/us-east1"`
+ *
+ *
+ * string name = 1;
+ *
+ * @return The bytes for name.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int LOCATION_ID_FIELD_NUMBER = 4;
+ private volatile java.lang.Object locationId_;
+ /**
+ *
+ *
+ *
+ * The canonical id for this location. For example: `"us-east1"`.
+ *
+ *
+ * string location_id = 4;
+ *
+ * @return The locationId.
+ */
+ @java.lang.Override
+ public java.lang.String getLocationId() {
+ java.lang.Object ref = locationId_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ locationId_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The canonical id for this location. For example: `"us-east1"`.
+ *
+ *
+ * string location_id = 4;
+ *
+ * @return The bytes for locationId.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getLocationIdBytes() {
+ java.lang.Object ref = locationId_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ locationId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int DISPLAY_NAME_FIELD_NUMBER = 5;
+ private volatile java.lang.Object displayName_;
+ /**
+ *
+ *
+ *
+ * The friendly name for this location, typically a nearby city name.
+ * For example, "Tokyo".
+ *
+ *
+ * string display_name = 5;
+ *
+ * @return The displayName.
+ */
+ @java.lang.Override
+ public java.lang.String getDisplayName() {
+ java.lang.Object ref = displayName_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ displayName_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The friendly name for this location, typically a nearby city name.
+ * For example, "Tokyo".
+ *
+ *
+ * string display_name = 5;
+ *
+ * @return The bytes for displayName.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getDisplayNameBytes() {
+ java.lang.Object ref = displayName_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ displayName_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int LABELS_FIELD_NUMBER = 2;
+
+ private static final class LabelsDefaultEntryHolder {
+ static final com.google.protobuf.MapEntry
+ * Cross-service attributes for the location. For example
+ * {"cloud.googleapis.com/region": "us-east1"}
+ *
+ *
+ * map<string, string> labels = 2;
+ */
+ @java.lang.Override
+ public boolean containsLabels(java.lang.String key) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ return internalGetLabels().getMap().containsKey(key);
+ }
+ /** Use {@link #getLabelsMap()} instead. */
+ @java.lang.Override
+ @java.lang.Deprecated
+ public java.util.Map
+ * Cross-service attributes for the location. For example
+ * {"cloud.googleapis.com/region": "us-east1"}
+ *
+ *
+ * map<string, string> labels = 2;
+ */
+ @java.lang.Override
+ public java.util.Map
+ * Cross-service attributes for the location. For example
+ * {"cloud.googleapis.com/region": "us-east1"}
+ *
+ *
+ * map<string, string> labels = 2;
+ */
+ @java.lang.Override
+ public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ java.util.Map
+ * Cross-service attributes for the location. For example
+ * {"cloud.googleapis.com/region": "us-east1"}
+ *
+ *
+ * map<string, string> labels = 2;
+ */
+ @java.lang.Override
+ public java.lang.String getLabelsOrThrow(java.lang.String key) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ java.util.Map
+ * Service-specific metadata. For example the available capacity at the given
+ * location.
+ *
+ *
+ * .google.protobuf.Any metadata = 3;
+ *
+ * @return Whether the metadata field is set.
+ */
+ @java.lang.Override
+ public boolean hasMetadata() {
+ return metadata_ != null;
+ }
+ /**
+ *
+ *
+ *
+ * Service-specific metadata. For example the available capacity at the given
+ * location.
+ *
+ *
+ * .google.protobuf.Any metadata = 3;
+ *
+ * @return The metadata.
+ */
+ @java.lang.Override
+ public com.google.protobuf.Any getMetadata() {
+ return metadata_ == null ? com.google.protobuf.Any.getDefaultInstance() : metadata_;
+ }
+ /**
+ *
+ *
+ *
+ * Service-specific metadata. For example the available capacity at the given
+ * location.
+ *
+ *
+ * .google.protobuf.Any metadata = 3;
+ */
+ @java.lang.Override
+ public com.google.protobuf.AnyOrBuilder getMetadataOrBuilder() {
+ return getMetadata();
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (!getNameBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
+ }
+ com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
+ output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 2);
+ if (metadata_ != null) {
+ output.writeMessage(3, getMetadata());
+ }
+ if (!getLocationIdBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 4, locationId_);
+ }
+ if (!getDisplayNameBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 5, displayName_);
+ }
+ 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 (java.util.Map.Entry
+ * A resource that represents Google Cloud Platform location.
+ *
+ *
+ * Protobuf type {@code google.cloud.location.Location}
+ */
+ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Resource name for the location, which may vary between implementations.
+ * For example: `"projects/example-project/locations/us-east1"`
+ *
+ *
+ * string name = 1;
+ *
+ * @return The name.
+ */
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ name_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Resource name for the location, which may vary between implementations.
+ * For example: `"projects/example-project/locations/us-east1"`
+ *
+ *
+ * string name = 1;
+ *
+ * @return The bytes for name.
+ */
+ public com.google.protobuf.ByteString getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Resource name for the location, which may vary between implementations.
+ * For example: `"projects/example-project/locations/us-east1"`
+ *
+ *
+ * string name = 1;
+ *
+ * @param value The name to set.
+ * @return This builder for chaining.
+ */
+ public Builder setName(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Resource name for the location, which may vary between implementations.
+ * For example: `"projects/example-project/locations/us-east1"`
+ *
+ *
+ * string name = 1;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearName() {
+
+ name_ = getDefaultInstance().getName();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Resource name for the location, which may vary between implementations.
+ * For example: `"projects/example-project/locations/us-east1"`
+ *
+ *
+ * string name = 1;
+ *
+ * @param value The bytes for name to set.
+ * @return This builder for chaining.
+ */
+ public Builder setNameBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object locationId_ = "";
+ /**
+ *
+ *
+ *
+ * The canonical id for this location. For example: `"us-east1"`.
+ *
+ *
+ * string location_id = 4;
+ *
+ * @return The locationId.
+ */
+ public java.lang.String getLocationId() {
+ java.lang.Object ref = locationId_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ locationId_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The canonical id for this location. For example: `"us-east1"`.
+ *
+ *
+ * string location_id = 4;
+ *
+ * @return The bytes for locationId.
+ */
+ public com.google.protobuf.ByteString getLocationIdBytes() {
+ java.lang.Object ref = locationId_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ locationId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The canonical id for this location. For example: `"us-east1"`.
+ *
+ *
+ * string location_id = 4;
+ *
+ * @param value The locationId to set.
+ * @return This builder for chaining.
+ */
+ public Builder setLocationId(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ locationId_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The canonical id for this location. For example: `"us-east1"`.
+ *
+ *
+ * string location_id = 4;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearLocationId() {
+
+ locationId_ = getDefaultInstance().getLocationId();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The canonical id for this location. For example: `"us-east1"`.
+ *
+ *
+ * string location_id = 4;
+ *
+ * @param value The bytes for locationId to set.
+ * @return This builder for chaining.
+ */
+ public Builder setLocationIdBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ locationId_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object displayName_ = "";
+ /**
+ *
+ *
+ *
+ * The friendly name for this location, typically a nearby city name.
+ * For example, "Tokyo".
+ *
+ *
+ * string display_name = 5;
+ *
+ * @return The displayName.
+ */
+ public java.lang.String getDisplayName() {
+ java.lang.Object ref = displayName_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ displayName_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The friendly name for this location, typically a nearby city name.
+ * For example, "Tokyo".
+ *
+ *
+ * string display_name = 5;
+ *
+ * @return The bytes for displayName.
+ */
+ public com.google.protobuf.ByteString getDisplayNameBytes() {
+ java.lang.Object ref = displayName_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ displayName_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The friendly name for this location, typically a nearby city name.
+ * For example, "Tokyo".
+ *
+ *
+ * string display_name = 5;
+ *
+ * @param value The displayName to set.
+ * @return This builder for chaining.
+ */
+ public Builder setDisplayName(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ displayName_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The friendly name for this location, typically a nearby city name.
+ * For example, "Tokyo".
+ *
+ *
+ * string display_name = 5;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearDisplayName() {
+
+ displayName_ = getDefaultInstance().getDisplayName();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The friendly name for this location, typically a nearby city name.
+ * For example, "Tokyo".
+ *
+ *
+ * string display_name = 5;
+ *
+ * @param value The bytes for displayName to set.
+ * @return This builder for chaining.
+ */
+ public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ displayName_ = value;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.MapField
+ * Cross-service attributes for the location. For example
+ * {"cloud.googleapis.com/region": "us-east1"}
+ *
+ *
+ * map<string, string> labels = 2;
+ */
+ @java.lang.Override
+ public boolean containsLabels(java.lang.String key) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ return internalGetLabels().getMap().containsKey(key);
+ }
+ /** Use {@link #getLabelsMap()} instead. */
+ @java.lang.Override
+ @java.lang.Deprecated
+ public java.util.Map
+ * Cross-service attributes for the location. For example
+ * {"cloud.googleapis.com/region": "us-east1"}
+ *
+ *
+ * map<string, string> labels = 2;
+ */
+ @java.lang.Override
+ public java.util.Map
+ * Cross-service attributes for the location. For example
+ * {"cloud.googleapis.com/region": "us-east1"}
+ *
+ *
+ * map<string, string> labels = 2;
+ */
+ @java.lang.Override
+ public java.lang.String getLabelsOrDefault(
+ java.lang.String key, java.lang.String defaultValue) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ java.util.Map
+ * Cross-service attributes for the location. For example
+ * {"cloud.googleapis.com/region": "us-east1"}
+ *
+ *
+ * map<string, string> labels = 2;
+ */
+ @java.lang.Override
+ public java.lang.String getLabelsOrThrow(java.lang.String key) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ java.util.Map
+ * Cross-service attributes for the location. For example
+ * {"cloud.googleapis.com/region": "us-east1"}
+ *
+ *
+ * map<string, string> labels = 2;
+ */
+ public Builder removeLabels(java.lang.String key) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ internalGetMutableLabels().getMutableMap().remove(key);
+ return this;
+ }
+ /** Use alternate mutation accessors instead. */
+ @java.lang.Deprecated
+ public java.util.Map
+ * Cross-service attributes for the location. For example
+ * {"cloud.googleapis.com/region": "us-east1"}
+ *
+ *
+ * map<string, string> labels = 2;
+ */
+ public Builder putLabels(java.lang.String key, java.lang.String value) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ if (value == null) {
+ throw new java.lang.NullPointerException();
+ }
+ internalGetMutableLabels().getMutableMap().put(key, value);
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Cross-service attributes for the location. For example
+ * {"cloud.googleapis.com/region": "us-east1"}
+ *
+ *
+ * map<string, string> labels = 2;
+ */
+ public Builder putAllLabels(java.util.Map
+ * Service-specific metadata. For example the available capacity at the given
+ * location.
+ *
+ *
+ * .google.protobuf.Any metadata = 3;
+ *
+ * @return Whether the metadata field is set.
+ */
+ public boolean hasMetadata() {
+ return metadataBuilder_ != null || metadata_ != null;
+ }
+ /**
+ *
+ *
+ *
+ * Service-specific metadata. For example the available capacity at the given
+ * location.
+ *
+ *
+ * .google.protobuf.Any metadata = 3;
+ *
+ * @return The metadata.
+ */
+ public com.google.protobuf.Any getMetadata() {
+ if (metadataBuilder_ == null) {
+ return metadata_ == null ? com.google.protobuf.Any.getDefaultInstance() : metadata_;
+ } else {
+ return metadataBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Service-specific metadata. For example the available capacity at the given
+ * location.
+ *
+ *
+ * .google.protobuf.Any metadata = 3;
+ */
+ public Builder setMetadata(com.google.protobuf.Any value) {
+ if (metadataBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ metadata_ = value;
+ onChanged();
+ } else {
+ metadataBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Service-specific metadata. For example the available capacity at the given
+ * location.
+ *
+ *
+ * .google.protobuf.Any metadata = 3;
+ */
+ public Builder setMetadata(com.google.protobuf.Any.Builder builderForValue) {
+ if (metadataBuilder_ == null) {
+ metadata_ = builderForValue.build();
+ onChanged();
+ } else {
+ metadataBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Service-specific metadata. For example the available capacity at the given
+ * location.
+ *
+ *
+ * .google.protobuf.Any metadata = 3;
+ */
+ public Builder mergeMetadata(com.google.protobuf.Any value) {
+ if (metadataBuilder_ == null) {
+ if (metadata_ != null) {
+ metadata_ = com.google.protobuf.Any.newBuilder(metadata_).mergeFrom(value).buildPartial();
+ } else {
+ metadata_ = value;
+ }
+ onChanged();
+ } else {
+ metadataBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Service-specific metadata. For example the available capacity at the given
+ * location.
+ *
+ *
+ * .google.protobuf.Any metadata = 3;
+ */
+ public Builder clearMetadata() {
+ if (metadataBuilder_ == null) {
+ metadata_ = null;
+ onChanged();
+ } else {
+ metadata_ = null;
+ metadataBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Service-specific metadata. For example the available capacity at the given
+ * location.
+ *
+ *
+ * .google.protobuf.Any metadata = 3;
+ */
+ public com.google.protobuf.Any.Builder getMetadataBuilder() {
+
+ onChanged();
+ return getMetadataFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ *
+ * Service-specific metadata. For example the available capacity at the given
+ * location.
+ *
+ *
+ * .google.protobuf.Any metadata = 3;
+ */
+ public com.google.protobuf.AnyOrBuilder getMetadataOrBuilder() {
+ if (metadataBuilder_ != null) {
+ return metadataBuilder_.getMessageOrBuilder();
+ } else {
+ return metadata_ == null ? com.google.protobuf.Any.getDefaultInstance() : metadata_;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Service-specific metadata. For example the available capacity at the given
+ * location.
+ *
+ *
+ * .google.protobuf.Any metadata = 3;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Any,
+ com.google.protobuf.Any.Builder,
+ com.google.protobuf.AnyOrBuilder>
+ getMetadataFieldBuilder() {
+ if (metadataBuilder_ == null) {
+ metadataBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Any,
+ com.google.protobuf.Any.Builder,
+ com.google.protobuf.AnyOrBuilder>(getMetadata(), getParentForChildren(), isClean());
+ metadata_ = null;
+ }
+ return metadataBuilder_;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.location.Location)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.location.Location)
+ private static final com.google.cloud.location.Location DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.location.Location();
+ }
+
+ public static com.google.cloud.location.Location getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ * Resource name for the location, which may vary between implementations.
+ * For example: `"projects/example-project/locations/us-east1"`
+ *
+ *
+ * string name = 1;
+ *
+ * @return The name.
+ */
+ java.lang.String getName();
+ /**
+ *
+ *
+ *
+ * Resource name for the location, which may vary between implementations.
+ * For example: `"projects/example-project/locations/us-east1"`
+ *
+ *
+ * string name = 1;
+ *
+ * @return The bytes for name.
+ */
+ com.google.protobuf.ByteString getNameBytes();
+
+ /**
+ *
+ *
+ *
+ * The canonical id for this location. For example: `"us-east1"`.
+ *
+ *
+ * string location_id = 4;
+ *
+ * @return The locationId.
+ */
+ java.lang.String getLocationId();
+ /**
+ *
+ *
+ *
+ * The canonical id for this location. For example: `"us-east1"`.
+ *
+ *
+ * string location_id = 4;
+ *
+ * @return The bytes for locationId.
+ */
+ com.google.protobuf.ByteString getLocationIdBytes();
+
+ /**
+ *
+ *
+ *
+ * The friendly name for this location, typically a nearby city name.
+ * For example, "Tokyo".
+ *
+ *
+ * string display_name = 5;
+ *
+ * @return The displayName.
+ */
+ java.lang.String getDisplayName();
+ /**
+ *
+ *
+ *
+ * The friendly name for this location, typically a nearby city name.
+ * For example, "Tokyo".
+ *
+ *
+ * string display_name = 5;
+ *
+ * @return The bytes for displayName.
+ */
+ com.google.protobuf.ByteString getDisplayNameBytes();
+
+ /**
+ *
+ *
+ *
+ * Cross-service attributes for the location. For example
+ * {"cloud.googleapis.com/region": "us-east1"}
+ *
+ *
+ * map<string, string> labels = 2;
+ */
+ int getLabelsCount();
+ /**
+ *
+ *
+ *
+ * Cross-service attributes for the location. For example
+ * {"cloud.googleapis.com/region": "us-east1"}
+ *
+ *
+ * map<string, string> labels = 2;
+ */
+ boolean containsLabels(java.lang.String key);
+ /** Use {@link #getLabelsMap()} instead. */
+ @java.lang.Deprecated
+ java.util.Map
+ * Cross-service attributes for the location. For example
+ * {"cloud.googleapis.com/region": "us-east1"}
+ *
+ *
+ * map<string, string> labels = 2;
+ */
+ java.util.Map
+ * Cross-service attributes for the location. For example
+ * {"cloud.googleapis.com/region": "us-east1"}
+ *
+ *
+ * map<string, string> labels = 2;
+ */
+ java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue);
+ /**
+ *
+ *
+ *
+ * Cross-service attributes for the location. For example
+ * {"cloud.googleapis.com/region": "us-east1"}
+ *
+ *
+ * map<string, string> labels = 2;
+ */
+ java.lang.String getLabelsOrThrow(java.lang.String key);
+
+ /**
+ *
+ *
+ *
+ * Service-specific metadata. For example the available capacity at the given
+ * location.
+ *
+ *
+ * .google.protobuf.Any metadata = 3;
+ *
+ * @return Whether the metadata field is set.
+ */
+ boolean hasMetadata();
+ /**
+ *
+ *
+ *
+ * Service-specific metadata. For example the available capacity at the given
+ * location.
+ *
+ *
+ * .google.protobuf.Any metadata = 3;
+ *
+ * @return The metadata.
+ */
+ com.google.protobuf.Any getMetadata();
+ /**
+ *
+ *
+ *
+ * Service-specific metadata. For example the available capacity at the given
+ * location.
+ *
+ *
+ * .google.protobuf.Any metadata = 3;
+ */
+ com.google.protobuf.AnyOrBuilder getMetadataOrBuilder();
+}
diff --git a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/location/LocationsProto.java b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/location/LocationsProto.java
new file mode 100644
index 00000000..d2b6da30
--- /dev/null
+++ b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/location/LocationsProto.java
@@ -0,0 +1,150 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/location/locations.proto
+
+package com.google.cloud.location;
+
+public final class LocationsProto {
+ private LocationsProto() {}
+
+ 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_location_ListLocationsRequest_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_location_ListLocationsRequest_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_location_ListLocationsResponse_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_location_ListLocationsResponse_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_location_GetLocationRequest_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_location_GetLocationRequest_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_location_Location_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_location_Location_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_location_Location_LabelsEntry_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_location_Location_LabelsEntry_fieldAccessorTable;
+
+ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ return descriptor;
+ }
+
+ private static com.google.protobuf.Descriptors.FileDescriptor descriptor;
+
+ static {
+ java.lang.String[] descriptorData = {
+ "\n%google/cloud/location/locations.proto\022"
+ + "\025google.cloud.location\032\034google/api/annot"
+ + "ations.proto\032\031google/protobuf/any.proto\032"
+ + "\027google/api/client.proto\"[\n\024ListLocation"
+ + "sRequest\022\014\n\004name\030\001 \001(\t\022\016\n\006filter\030\002 \001(\t\022\021"
+ + "\n\tpage_size\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\"d\n"
+ + "\025ListLocationsResponse\0222\n\tlocations\030\001 \003("
+ + "\0132\037.google.cloud.location.Location\022\027\n\017ne"
+ + "xt_page_token\030\002 \001(\t\"\"\n\022GetLocationReques"
+ + "t\022\014\n\004name\030\001 \001(\t\"\327\001\n\010Location\022\014\n\004name\030\001 \001"
+ + "(\t\022\023\n\013location_id\030\004 \001(\t\022\024\n\014display_name\030"
+ + "\005 \001(\t\022;\n\006labels\030\002 \003(\0132+.google.cloud.loc"
+ + "ation.Location.LabelsEntry\022&\n\010metadata\030\003"
+ + " \001(\0132\024.google.protobuf.Any\032-\n\013LabelsEntr"
+ + "y\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\0012\244\003\n\tLo"
+ + "cations\022\253\001\n\rListLocations\022+.google.cloud"
+ + ".location.ListLocationsRequest\032,.google."
+ + "cloud.location.ListLocationsResponse\"?\202\323"
+ + "\344\223\0029\022\024/v1/{name=locations}Z!\022\037/v1/{name="
+ + "projects/*}/locations\022\236\001\n\013GetLocation\022)."
+ + "google.cloud.location.GetLocationRequest"
+ + "\032\037.google.cloud.location.Location\"C\202\323\344\223\002"
+ + "=\022\026/v1/{name=locations/*}Z#\022!/v1/{name=p"
+ + "rojects/*/locations/*}\032H\312A\024cloud.googlea"
+ + "pis.com\322A.https://www.googleapis.com/aut"
+ + "h/cloud-platformBo\n\031com.google.cloud.loc"
+ + "ationB\016LocationsProtoP\001Z=google.golang.o"
+ + "rg/genproto/googleapis/cloud/location;lo"
+ + "cation\370\001\001b\006proto3"
+ };
+ descriptor =
+ com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
+ descriptorData,
+ new com.google.protobuf.Descriptors.FileDescriptor[] {
+ com.google.api.AnnotationsProto.getDescriptor(),
+ com.google.protobuf.AnyProto.getDescriptor(),
+ com.google.api.ClientProto.getDescriptor(),
+ });
+ internal_static_google_cloud_location_ListLocationsRequest_descriptor =
+ getDescriptor().getMessageTypes().get(0);
+ internal_static_google_cloud_location_ListLocationsRequest_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_cloud_location_ListLocationsRequest_descriptor,
+ new java.lang.String[] {
+ "Name", "Filter", "PageSize", "PageToken",
+ });
+ internal_static_google_cloud_location_ListLocationsResponse_descriptor =
+ getDescriptor().getMessageTypes().get(1);
+ internal_static_google_cloud_location_ListLocationsResponse_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_cloud_location_ListLocationsResponse_descriptor,
+ new java.lang.String[] {
+ "Locations", "NextPageToken",
+ });
+ internal_static_google_cloud_location_GetLocationRequest_descriptor =
+ getDescriptor().getMessageTypes().get(2);
+ internal_static_google_cloud_location_GetLocationRequest_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_cloud_location_GetLocationRequest_descriptor,
+ new java.lang.String[] {
+ "Name",
+ });
+ internal_static_google_cloud_location_Location_descriptor =
+ getDescriptor().getMessageTypes().get(3);
+ internal_static_google_cloud_location_Location_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_cloud_location_Location_descriptor,
+ new java.lang.String[] {
+ "Name", "LocationId", "DisplayName", "Labels", "Metadata",
+ });
+ internal_static_google_cloud_location_Location_LabelsEntry_descriptor =
+ internal_static_google_cloud_location_Location_descriptor.getNestedTypes().get(0);
+ internal_static_google_cloud_location_Location_LabelsEntry_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_cloud_location_Location_LabelsEntry_descriptor,
+ new java.lang.String[] {
+ "Key", "Value",
+ });
+ com.google.protobuf.ExtensionRegistry registry =
+ com.google.protobuf.ExtensionRegistry.newInstance();
+ registry.add(com.google.api.ClientProto.defaultHost);
+ registry.add(com.google.api.AnnotationsProto.http);
+ registry.add(com.google.api.ClientProto.oauthScopes);
+ com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor(
+ descriptor, registry);
+ com.google.api.AnnotationsProto.getDescriptor();
+ com.google.protobuf.AnyProto.getDescriptor();
+ com.google.api.ClientProto.getDescriptor();
+ }
+
+ // @@protoc_insertion_point(outer_class_scope)
+}
diff --git a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/BatchDocumentInputConfig.java b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/BatchDocumentInputConfig.java
new file mode 100644
index 00000000..652d1a1d
--- /dev/null
+++ b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/BatchDocumentInputConfig.java
@@ -0,0 +1,1027 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/translate/v3/translation_service.proto
+
+package com.google.cloud.translate.v3;
+
+/**
+ *
+ *
+ *
+ * Input configuration for BatchTranslateDocument request.
+ *
+ *
+ * Protobuf type {@code google.cloud.translation.v3.BatchDocumentInputConfig}
+ */
+public final class BatchDocumentInputConfig extends com.google.protobuf.GeneratedMessageV3
+ implements
+ // @@protoc_insertion_point(message_implements:google.cloud.translation.v3.BatchDocumentInputConfig)
+ BatchDocumentInputConfigOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use BatchDocumentInputConfig.newBuilder() to construct.
+ private BatchDocumentInputConfig(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+
+ private BatchDocumentInputConfig() {}
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
+ return new BatchDocumentInputConfig();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
+ return this.unknownFields;
+ }
+
+ private BatchDocumentInputConfig(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ 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.translate.v3.GcsSource.Builder subBuilder = null;
+ if (sourceCase_ == 1) {
+ subBuilder = ((com.google.cloud.translate.v3.GcsSource) source_).toBuilder();
+ }
+ source_ =
+ input.readMessage(
+ com.google.cloud.translate.v3.GcsSource.parser(), extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom((com.google.cloud.translate.v3.GcsSource) source_);
+ source_ = subBuilder.buildPartial();
+ }
+ sourceCase_ = 1;
+ break;
+ }
+ default:
+ {
+ if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
+ } finally {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.cloud.translate.v3.TranslationServiceProto
+ .internal_static_google_cloud_translation_v3_BatchDocumentInputConfig_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.cloud.translate.v3.TranslationServiceProto
+ .internal_static_google_cloud_translation_v3_BatchDocumentInputConfig_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.cloud.translate.v3.BatchDocumentInputConfig.class,
+ com.google.cloud.translate.v3.BatchDocumentInputConfig.Builder.class);
+ }
+
+ private int sourceCase_ = 0;
+ private java.lang.Object source_;
+
+ public enum SourceCase
+ implements
+ com.google.protobuf.Internal.EnumLite,
+ com.google.protobuf.AbstractMessage.InternalOneOfEnum {
+ GCS_SOURCE(1),
+ SOURCE_NOT_SET(0);
+ private final int value;
+
+ private SourceCase(int value) {
+ this.value = value;
+ }
+ /**
+ * @param value The number of the enum to look for.
+ * @return The enum associated with the given number.
+ * @deprecated Use {@link #forNumber(int)} instead.
+ */
+ @java.lang.Deprecated
+ public static SourceCase valueOf(int value) {
+ return forNumber(value);
+ }
+
+ public static SourceCase forNumber(int value) {
+ switch (value) {
+ case 1:
+ return GCS_SOURCE;
+ case 0:
+ return SOURCE_NOT_SET;
+ default:
+ return null;
+ }
+ }
+
+ public int getNumber() {
+ return this.value;
+ }
+ };
+
+ public SourceCase getSourceCase() {
+ return SourceCase.forNumber(sourceCase_);
+ }
+
+ public static final int GCS_SOURCE_FIELD_NUMBER = 1;
+ /**
+ *
+ *
+ *
+ * Google Cloud Storage location for the source input.
+ * This can be a single file (for example,
+ * `gs://translation-test/input.docx`) or a wildcard (for example,
+ * `gs://translation-test/*`).
+ * File mime type is determined based on extension. Supported mime type
+ * includes:
+ * - `pdf`, application/pdf
+ * - `docx`,
+ * application/vnd.openxmlformats-officedocument.wordprocessingml.document
+ * - `pptx`,
+ * application/vnd.openxmlformats-officedocument.presentationml.presentation
+ * - `xlsx`,
+ * application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
+ * The max file size to support for `.docx`, `.pptx` and `.xlsx` is 100MB.
+ * The max file size to support for `.pdf` is 1GB and the max page limit is
+ * 1000 pages.
+ * The max file size to support for all input documents is 1GB.
+ *
+ *
+ * .google.cloud.translation.v3.GcsSource gcs_source = 1;
+ *
+ * @return Whether the gcsSource field is set.
+ */
+ @java.lang.Override
+ public boolean hasGcsSource() {
+ return sourceCase_ == 1;
+ }
+ /**
+ *
+ *
+ *
+ * Google Cloud Storage location for the source input.
+ * This can be a single file (for example,
+ * `gs://translation-test/input.docx`) or a wildcard (for example,
+ * `gs://translation-test/*`).
+ * File mime type is determined based on extension. Supported mime type
+ * includes:
+ * - `pdf`, application/pdf
+ * - `docx`,
+ * application/vnd.openxmlformats-officedocument.wordprocessingml.document
+ * - `pptx`,
+ * application/vnd.openxmlformats-officedocument.presentationml.presentation
+ * - `xlsx`,
+ * application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
+ * The max file size to support for `.docx`, `.pptx` and `.xlsx` is 100MB.
+ * The max file size to support for `.pdf` is 1GB and the max page limit is
+ * 1000 pages.
+ * The max file size to support for all input documents is 1GB.
+ *
+ *
+ * .google.cloud.translation.v3.GcsSource gcs_source = 1;
+ *
+ * @return The gcsSource.
+ */
+ @java.lang.Override
+ public com.google.cloud.translate.v3.GcsSource getGcsSource() {
+ if (sourceCase_ == 1) {
+ return (com.google.cloud.translate.v3.GcsSource) source_;
+ }
+ return com.google.cloud.translate.v3.GcsSource.getDefaultInstance();
+ }
+ /**
+ *
+ *
+ *
+ * Google Cloud Storage location for the source input.
+ * This can be a single file (for example,
+ * `gs://translation-test/input.docx`) or a wildcard (for example,
+ * `gs://translation-test/*`).
+ * File mime type is determined based on extension. Supported mime type
+ * includes:
+ * - `pdf`, application/pdf
+ * - `docx`,
+ * application/vnd.openxmlformats-officedocument.wordprocessingml.document
+ * - `pptx`,
+ * application/vnd.openxmlformats-officedocument.presentationml.presentation
+ * - `xlsx`,
+ * application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
+ * The max file size to support for `.docx`, `.pptx` and `.xlsx` is 100MB.
+ * The max file size to support for `.pdf` is 1GB and the max page limit is
+ * 1000 pages.
+ * The max file size to support for all input documents is 1GB.
+ *
+ *
+ * .google.cloud.translation.v3.GcsSource gcs_source = 1;
+ */
+ @java.lang.Override
+ public com.google.cloud.translate.v3.GcsSourceOrBuilder getGcsSourceOrBuilder() {
+ if (sourceCase_ == 1) {
+ return (com.google.cloud.translate.v3.GcsSource) source_;
+ }
+ return com.google.cloud.translate.v3.GcsSource.getDefaultInstance();
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (sourceCase_ == 1) {
+ output.writeMessage(1, (com.google.cloud.translate.v3.GcsSource) source_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (sourceCase_ == 1) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 1, (com.google.cloud.translate.v3.GcsSource) source_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.translate.v3.BatchDocumentInputConfig)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.translate.v3.BatchDocumentInputConfig other =
+ (com.google.cloud.translate.v3.BatchDocumentInputConfig) obj;
+
+ if (!getSourceCase().equals(other.getSourceCase())) return false;
+ switch (sourceCase_) {
+ case 1:
+ if (!getGcsSource().equals(other.getGcsSource())) return false;
+ break;
+ case 0:
+ default:
+ }
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ switch (sourceCase_) {
+ case 1:
+ hash = (37 * hash) + GCS_SOURCE_FIELD_NUMBER;
+ hash = (53 * hash) + getGcsSource().hashCode();
+ break;
+ case 0:
+ default:
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.translate.v3.BatchDocumentInputConfig parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3.BatchDocumentInputConfig parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3.BatchDocumentInputConfig parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3.BatchDocumentInputConfig parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3.BatchDocumentInputConfig parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3.BatchDocumentInputConfig parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3.BatchDocumentInputConfig parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3.BatchDocumentInputConfig parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3.BatchDocumentInputConfig parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3.BatchDocumentInputConfig parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3.BatchDocumentInputConfig parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3.BatchDocumentInputConfig parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(
+ com.google.cloud.translate.v3.BatchDocumentInputConfig prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ *
+ * Input configuration for BatchTranslateDocument request.
+ *
+ *
+ * Protobuf type {@code google.cloud.translation.v3.BatchDocumentInputConfig}
+ */
+ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Google Cloud Storage location for the source input.
+ * This can be a single file (for example,
+ * `gs://translation-test/input.docx`) or a wildcard (for example,
+ * `gs://translation-test/*`).
+ * File mime type is determined based on extension. Supported mime type
+ * includes:
+ * - `pdf`, application/pdf
+ * - `docx`,
+ * application/vnd.openxmlformats-officedocument.wordprocessingml.document
+ * - `pptx`,
+ * application/vnd.openxmlformats-officedocument.presentationml.presentation
+ * - `xlsx`,
+ * application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
+ * The max file size to support for `.docx`, `.pptx` and `.xlsx` is 100MB.
+ * The max file size to support for `.pdf` is 1GB and the max page limit is
+ * 1000 pages.
+ * The max file size to support for all input documents is 1GB.
+ *
+ *
+ * .google.cloud.translation.v3.GcsSource gcs_source = 1;
+ *
+ * @return Whether the gcsSource field is set.
+ */
+ @java.lang.Override
+ public boolean hasGcsSource() {
+ return sourceCase_ == 1;
+ }
+ /**
+ *
+ *
+ *
+ * Google Cloud Storage location for the source input.
+ * This can be a single file (for example,
+ * `gs://translation-test/input.docx`) or a wildcard (for example,
+ * `gs://translation-test/*`).
+ * File mime type is determined based on extension. Supported mime type
+ * includes:
+ * - `pdf`, application/pdf
+ * - `docx`,
+ * application/vnd.openxmlformats-officedocument.wordprocessingml.document
+ * - `pptx`,
+ * application/vnd.openxmlformats-officedocument.presentationml.presentation
+ * - `xlsx`,
+ * application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
+ * The max file size to support for `.docx`, `.pptx` and `.xlsx` is 100MB.
+ * The max file size to support for `.pdf` is 1GB and the max page limit is
+ * 1000 pages.
+ * The max file size to support for all input documents is 1GB.
+ *
+ *
+ * .google.cloud.translation.v3.GcsSource gcs_source = 1;
+ *
+ * @return The gcsSource.
+ */
+ @java.lang.Override
+ public com.google.cloud.translate.v3.GcsSource getGcsSource() {
+ if (gcsSourceBuilder_ == null) {
+ if (sourceCase_ == 1) {
+ return (com.google.cloud.translate.v3.GcsSource) source_;
+ }
+ return com.google.cloud.translate.v3.GcsSource.getDefaultInstance();
+ } else {
+ if (sourceCase_ == 1) {
+ return gcsSourceBuilder_.getMessage();
+ }
+ return com.google.cloud.translate.v3.GcsSource.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Google Cloud Storage location for the source input.
+ * This can be a single file (for example,
+ * `gs://translation-test/input.docx`) or a wildcard (for example,
+ * `gs://translation-test/*`).
+ * File mime type is determined based on extension. Supported mime type
+ * includes:
+ * - `pdf`, application/pdf
+ * - `docx`,
+ * application/vnd.openxmlformats-officedocument.wordprocessingml.document
+ * - `pptx`,
+ * application/vnd.openxmlformats-officedocument.presentationml.presentation
+ * - `xlsx`,
+ * application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
+ * The max file size to support for `.docx`, `.pptx` and `.xlsx` is 100MB.
+ * The max file size to support for `.pdf` is 1GB and the max page limit is
+ * 1000 pages.
+ * The max file size to support for all input documents is 1GB.
+ *
+ *
+ * .google.cloud.translation.v3.GcsSource gcs_source = 1;
+ */
+ public Builder setGcsSource(com.google.cloud.translate.v3.GcsSource value) {
+ if (gcsSourceBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ source_ = value;
+ onChanged();
+ } else {
+ gcsSourceBuilder_.setMessage(value);
+ }
+ sourceCase_ = 1;
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Google Cloud Storage location for the source input.
+ * This can be a single file (for example,
+ * `gs://translation-test/input.docx`) or a wildcard (for example,
+ * `gs://translation-test/*`).
+ * File mime type is determined based on extension. Supported mime type
+ * includes:
+ * - `pdf`, application/pdf
+ * - `docx`,
+ * application/vnd.openxmlformats-officedocument.wordprocessingml.document
+ * - `pptx`,
+ * application/vnd.openxmlformats-officedocument.presentationml.presentation
+ * - `xlsx`,
+ * application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
+ * The max file size to support for `.docx`, `.pptx` and `.xlsx` is 100MB.
+ * The max file size to support for `.pdf` is 1GB and the max page limit is
+ * 1000 pages.
+ * The max file size to support for all input documents is 1GB.
+ *
+ *
+ * .google.cloud.translation.v3.GcsSource gcs_source = 1;
+ */
+ public Builder setGcsSource(com.google.cloud.translate.v3.GcsSource.Builder builderForValue) {
+ if (gcsSourceBuilder_ == null) {
+ source_ = builderForValue.build();
+ onChanged();
+ } else {
+ gcsSourceBuilder_.setMessage(builderForValue.build());
+ }
+ sourceCase_ = 1;
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Google Cloud Storage location for the source input.
+ * This can be a single file (for example,
+ * `gs://translation-test/input.docx`) or a wildcard (for example,
+ * `gs://translation-test/*`).
+ * File mime type is determined based on extension. Supported mime type
+ * includes:
+ * - `pdf`, application/pdf
+ * - `docx`,
+ * application/vnd.openxmlformats-officedocument.wordprocessingml.document
+ * - `pptx`,
+ * application/vnd.openxmlformats-officedocument.presentationml.presentation
+ * - `xlsx`,
+ * application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
+ * The max file size to support for `.docx`, `.pptx` and `.xlsx` is 100MB.
+ * The max file size to support for `.pdf` is 1GB and the max page limit is
+ * 1000 pages.
+ * The max file size to support for all input documents is 1GB.
+ *
+ *
+ * .google.cloud.translation.v3.GcsSource gcs_source = 1;
+ */
+ public Builder mergeGcsSource(com.google.cloud.translate.v3.GcsSource value) {
+ if (gcsSourceBuilder_ == null) {
+ if (sourceCase_ == 1
+ && source_ != com.google.cloud.translate.v3.GcsSource.getDefaultInstance()) {
+ source_ =
+ com.google.cloud.translate.v3.GcsSource.newBuilder(
+ (com.google.cloud.translate.v3.GcsSource) source_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ source_ = value;
+ }
+ onChanged();
+ } else {
+ if (sourceCase_ == 1) {
+ gcsSourceBuilder_.mergeFrom(value);
+ }
+ gcsSourceBuilder_.setMessage(value);
+ }
+ sourceCase_ = 1;
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Google Cloud Storage location for the source input.
+ * This can be a single file (for example,
+ * `gs://translation-test/input.docx`) or a wildcard (for example,
+ * `gs://translation-test/*`).
+ * File mime type is determined based on extension. Supported mime type
+ * includes:
+ * - `pdf`, application/pdf
+ * - `docx`,
+ * application/vnd.openxmlformats-officedocument.wordprocessingml.document
+ * - `pptx`,
+ * application/vnd.openxmlformats-officedocument.presentationml.presentation
+ * - `xlsx`,
+ * application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
+ * The max file size to support for `.docx`, `.pptx` and `.xlsx` is 100MB.
+ * The max file size to support for `.pdf` is 1GB and the max page limit is
+ * 1000 pages.
+ * The max file size to support for all input documents is 1GB.
+ *
+ *
+ * .google.cloud.translation.v3.GcsSource gcs_source = 1;
+ */
+ public Builder clearGcsSource() {
+ if (gcsSourceBuilder_ == null) {
+ if (sourceCase_ == 1) {
+ sourceCase_ = 0;
+ source_ = null;
+ onChanged();
+ }
+ } else {
+ if (sourceCase_ == 1) {
+ sourceCase_ = 0;
+ source_ = null;
+ }
+ gcsSourceBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Google Cloud Storage location for the source input.
+ * This can be a single file (for example,
+ * `gs://translation-test/input.docx`) or a wildcard (for example,
+ * `gs://translation-test/*`).
+ * File mime type is determined based on extension. Supported mime type
+ * includes:
+ * - `pdf`, application/pdf
+ * - `docx`,
+ * application/vnd.openxmlformats-officedocument.wordprocessingml.document
+ * - `pptx`,
+ * application/vnd.openxmlformats-officedocument.presentationml.presentation
+ * - `xlsx`,
+ * application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
+ * The max file size to support for `.docx`, `.pptx` and `.xlsx` is 100MB.
+ * The max file size to support for `.pdf` is 1GB and the max page limit is
+ * 1000 pages.
+ * The max file size to support for all input documents is 1GB.
+ *
+ *
+ * .google.cloud.translation.v3.GcsSource gcs_source = 1;
+ */
+ public com.google.cloud.translate.v3.GcsSource.Builder getGcsSourceBuilder() {
+ return getGcsSourceFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ *
+ * Google Cloud Storage location for the source input.
+ * This can be a single file (for example,
+ * `gs://translation-test/input.docx`) or a wildcard (for example,
+ * `gs://translation-test/*`).
+ * File mime type is determined based on extension. Supported mime type
+ * includes:
+ * - `pdf`, application/pdf
+ * - `docx`,
+ * application/vnd.openxmlformats-officedocument.wordprocessingml.document
+ * - `pptx`,
+ * application/vnd.openxmlformats-officedocument.presentationml.presentation
+ * - `xlsx`,
+ * application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
+ * The max file size to support for `.docx`, `.pptx` and `.xlsx` is 100MB.
+ * The max file size to support for `.pdf` is 1GB and the max page limit is
+ * 1000 pages.
+ * The max file size to support for all input documents is 1GB.
+ *
+ *
+ * .google.cloud.translation.v3.GcsSource gcs_source = 1;
+ */
+ @java.lang.Override
+ public com.google.cloud.translate.v3.GcsSourceOrBuilder getGcsSourceOrBuilder() {
+ if ((sourceCase_ == 1) && (gcsSourceBuilder_ != null)) {
+ return gcsSourceBuilder_.getMessageOrBuilder();
+ } else {
+ if (sourceCase_ == 1) {
+ return (com.google.cloud.translate.v3.GcsSource) source_;
+ }
+ return com.google.cloud.translate.v3.GcsSource.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Google Cloud Storage location for the source input.
+ * This can be a single file (for example,
+ * `gs://translation-test/input.docx`) or a wildcard (for example,
+ * `gs://translation-test/*`).
+ * File mime type is determined based on extension. Supported mime type
+ * includes:
+ * - `pdf`, application/pdf
+ * - `docx`,
+ * application/vnd.openxmlformats-officedocument.wordprocessingml.document
+ * - `pptx`,
+ * application/vnd.openxmlformats-officedocument.presentationml.presentation
+ * - `xlsx`,
+ * application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
+ * The max file size to support for `.docx`, `.pptx` and `.xlsx` is 100MB.
+ * The max file size to support for `.pdf` is 1GB and the max page limit is
+ * 1000 pages.
+ * The max file size to support for all input documents is 1GB.
+ *
+ *
+ * .google.cloud.translation.v3.GcsSource gcs_source = 1;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.translate.v3.GcsSource,
+ com.google.cloud.translate.v3.GcsSource.Builder,
+ com.google.cloud.translate.v3.GcsSourceOrBuilder>
+ getGcsSourceFieldBuilder() {
+ if (gcsSourceBuilder_ == null) {
+ if (!(sourceCase_ == 1)) {
+ source_ = com.google.cloud.translate.v3.GcsSource.getDefaultInstance();
+ }
+ gcsSourceBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.translate.v3.GcsSource,
+ com.google.cloud.translate.v3.GcsSource.Builder,
+ com.google.cloud.translate.v3.GcsSourceOrBuilder>(
+ (com.google.cloud.translate.v3.GcsSource) source_,
+ getParentForChildren(),
+ isClean());
+ source_ = null;
+ }
+ sourceCase_ = 1;
+ onChanged();
+ ;
+ return gcsSourceBuilder_;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.translation.v3.BatchDocumentInputConfig)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.translation.v3.BatchDocumentInputConfig)
+ private static final com.google.cloud.translate.v3.BatchDocumentInputConfig DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.translate.v3.BatchDocumentInputConfig();
+ }
+
+ public static com.google.cloud.translate.v3.BatchDocumentInputConfig getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ * Google Cloud Storage location for the source input.
+ * This can be a single file (for example,
+ * `gs://translation-test/input.docx`) or a wildcard (for example,
+ * `gs://translation-test/*`).
+ * File mime type is determined based on extension. Supported mime type
+ * includes:
+ * - `pdf`, application/pdf
+ * - `docx`,
+ * application/vnd.openxmlformats-officedocument.wordprocessingml.document
+ * - `pptx`,
+ * application/vnd.openxmlformats-officedocument.presentationml.presentation
+ * - `xlsx`,
+ * application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
+ * The max file size to support for `.docx`, `.pptx` and `.xlsx` is 100MB.
+ * The max file size to support for `.pdf` is 1GB and the max page limit is
+ * 1000 pages.
+ * The max file size to support for all input documents is 1GB.
+ *
+ *
+ * .google.cloud.translation.v3.GcsSource gcs_source = 1;
+ *
+ * @return Whether the gcsSource field is set.
+ */
+ boolean hasGcsSource();
+ /**
+ *
+ *
+ *
+ * Google Cloud Storage location for the source input.
+ * This can be a single file (for example,
+ * `gs://translation-test/input.docx`) or a wildcard (for example,
+ * `gs://translation-test/*`).
+ * File mime type is determined based on extension. Supported mime type
+ * includes:
+ * - `pdf`, application/pdf
+ * - `docx`,
+ * application/vnd.openxmlformats-officedocument.wordprocessingml.document
+ * - `pptx`,
+ * application/vnd.openxmlformats-officedocument.presentationml.presentation
+ * - `xlsx`,
+ * application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
+ * The max file size to support for `.docx`, `.pptx` and `.xlsx` is 100MB.
+ * The max file size to support for `.pdf` is 1GB and the max page limit is
+ * 1000 pages.
+ * The max file size to support for all input documents is 1GB.
+ *
+ *
+ * .google.cloud.translation.v3.GcsSource gcs_source = 1;
+ *
+ * @return The gcsSource.
+ */
+ com.google.cloud.translate.v3.GcsSource getGcsSource();
+ /**
+ *
+ *
+ *
+ * Google Cloud Storage location for the source input.
+ * This can be a single file (for example,
+ * `gs://translation-test/input.docx`) or a wildcard (for example,
+ * `gs://translation-test/*`).
+ * File mime type is determined based on extension. Supported mime type
+ * includes:
+ * - `pdf`, application/pdf
+ * - `docx`,
+ * application/vnd.openxmlformats-officedocument.wordprocessingml.document
+ * - `pptx`,
+ * application/vnd.openxmlformats-officedocument.presentationml.presentation
+ * - `xlsx`,
+ * application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
+ * The max file size to support for `.docx`, `.pptx` and `.xlsx` is 100MB.
+ * The max file size to support for `.pdf` is 1GB and the max page limit is
+ * 1000 pages.
+ * The max file size to support for all input documents is 1GB.
+ *
+ *
+ * .google.cloud.translation.v3.GcsSource gcs_source = 1;
+ */
+ com.google.cloud.translate.v3.GcsSourceOrBuilder getGcsSourceOrBuilder();
+
+ public com.google.cloud.translate.v3.BatchDocumentInputConfig.SourceCase getSourceCase();
+}
diff --git a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/BatchDocumentOutputConfig.java b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/BatchDocumentOutputConfig.java
new file mode 100644
index 00000000..b96860b3
--- /dev/null
+++ b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/BatchDocumentOutputConfig.java
@@ -0,0 +1,1281 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/translate/v3/translation_service.proto
+
+package com.google.cloud.translate.v3;
+
+/**
+ *
+ *
+ *
+ * Output configuration for BatchTranslateDocument request.
+ *
+ *
+ * Protobuf type {@code google.cloud.translation.v3.BatchDocumentOutputConfig}
+ */
+public final class BatchDocumentOutputConfig extends com.google.protobuf.GeneratedMessageV3
+ implements
+ // @@protoc_insertion_point(message_implements:google.cloud.translation.v3.BatchDocumentOutputConfig)
+ BatchDocumentOutputConfigOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use BatchDocumentOutputConfig.newBuilder() to construct.
+ private BatchDocumentOutputConfig(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+
+ private BatchDocumentOutputConfig() {}
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
+ return new BatchDocumentOutputConfig();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
+ return this.unknownFields;
+ }
+
+ private BatchDocumentOutputConfig(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ 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.translate.v3.GcsDestination.Builder subBuilder = null;
+ if (destinationCase_ == 1) {
+ subBuilder =
+ ((com.google.cloud.translate.v3.GcsDestination) destination_).toBuilder();
+ }
+ destination_ =
+ input.readMessage(
+ com.google.cloud.translate.v3.GcsDestination.parser(), extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom((com.google.cloud.translate.v3.GcsDestination) destination_);
+ destination_ = subBuilder.buildPartial();
+ }
+ destinationCase_ = 1;
+ break;
+ }
+ default:
+ {
+ if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
+ } finally {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.cloud.translate.v3.TranslationServiceProto
+ .internal_static_google_cloud_translation_v3_BatchDocumentOutputConfig_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.cloud.translate.v3.TranslationServiceProto
+ .internal_static_google_cloud_translation_v3_BatchDocumentOutputConfig_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.cloud.translate.v3.BatchDocumentOutputConfig.class,
+ com.google.cloud.translate.v3.BatchDocumentOutputConfig.Builder.class);
+ }
+
+ private int destinationCase_ = 0;
+ private java.lang.Object destination_;
+
+ public enum DestinationCase
+ implements
+ com.google.protobuf.Internal.EnumLite,
+ com.google.protobuf.AbstractMessage.InternalOneOfEnum {
+ GCS_DESTINATION(1),
+ DESTINATION_NOT_SET(0);
+ private final int value;
+
+ private DestinationCase(int value) {
+ this.value = value;
+ }
+ /**
+ * @param value The number of the enum to look for.
+ * @return The enum associated with the given number.
+ * @deprecated Use {@link #forNumber(int)} instead.
+ */
+ @java.lang.Deprecated
+ public static DestinationCase valueOf(int value) {
+ return forNumber(value);
+ }
+
+ public static DestinationCase forNumber(int value) {
+ switch (value) {
+ case 1:
+ return GCS_DESTINATION;
+ case 0:
+ return DESTINATION_NOT_SET;
+ default:
+ return null;
+ }
+ }
+
+ public int getNumber() {
+ return this.value;
+ }
+ };
+
+ public DestinationCase getDestinationCase() {
+ return DestinationCase.forNumber(destinationCase_);
+ }
+
+ public static final int GCS_DESTINATION_FIELD_NUMBER = 1;
+ /**
+ *
+ *
+ *
+ * Google Cloud Storage destination for output content.
+ * For every single input document (for example, gs://a/b/c.[extension]), we
+ * generate at most 2 * n output files. (n is the # of target_language_codes
+ * in the BatchTranslateDocumentRequest).
+ * While the input documents are being processed, we write/update an index
+ * file `index.csv` under `gcs_destination.output_uri_prefix` (for example,
+ * gs://translation_output/index.csv) The index file is generated/updated as
+ * new files are being translated. The format is:
+ * input_document,target_language_code,translation_output,error_output,
+ * glossary_translation_output,glossary_error_output
+ * `input_document` is one file we matched using gcs_source.input_uri.
+ * `target_language_code` is provided in the request.
+ * `translation_output` contains the translations. (details provided below)
+ * `error_output` contains the error message during processing of the file.
+ * Both translations_file and errors_file could be empty strings if we have
+ * no content to output.
+ * `glossary_translation_output` and `glossary_error_output` are the
+ * translated output/error when we apply glossaries. They could also be
+ * empty if we have no content to output.
+ * Once a row is present in index.csv, the input/output matching never
+ * changes. Callers should also expect all the content in input_file are
+ * processed and ready to be consumed (that is, no partial output file is
+ * written).
+ * Since index.csv will be keeping updated during the process, please make
+ * sure there is no custom retention policy applied on the output bucket
+ * that may avoid file updating.
+ * (https://cloud.google.com/storage/docs/bucket-lock?hl=en#retention-policy)
+ * The naming format of translation output files follows (for target
+ * language code [trg]): `translation_output`:
+ * gs://translation_output/a_b_c_[trg]_translation.[extension]
+ * `glossary_translation_output`:
+ * gs://translation_test/a_b_c_[trg]_glossary_translation.[extension] The
+ * output document will maintain the same file format as the input document.
+ * The naming format of error output files follows (for target language code
+ * [trg]): `error_output`: gs://translation_test/a_b_c_[trg]_errors.txt
+ * `glossary_error_output`:
+ * gs://translation_test/a_b_c_[trg]_glossary_translation.txt The error
+ * output is a txt file containing error details.
+ *
+ *
+ * .google.cloud.translation.v3.GcsDestination gcs_destination = 1;
+ *
+ * @return Whether the gcsDestination field is set.
+ */
+ @java.lang.Override
+ public boolean hasGcsDestination() {
+ return destinationCase_ == 1;
+ }
+ /**
+ *
+ *
+ *
+ * Google Cloud Storage destination for output content.
+ * For every single input document (for example, gs://a/b/c.[extension]), we
+ * generate at most 2 * n output files. (n is the # of target_language_codes
+ * in the BatchTranslateDocumentRequest).
+ * While the input documents are being processed, we write/update an index
+ * file `index.csv` under `gcs_destination.output_uri_prefix` (for example,
+ * gs://translation_output/index.csv) The index file is generated/updated as
+ * new files are being translated. The format is:
+ * input_document,target_language_code,translation_output,error_output,
+ * glossary_translation_output,glossary_error_output
+ * `input_document` is one file we matched using gcs_source.input_uri.
+ * `target_language_code` is provided in the request.
+ * `translation_output` contains the translations. (details provided below)
+ * `error_output` contains the error message during processing of the file.
+ * Both translations_file and errors_file could be empty strings if we have
+ * no content to output.
+ * `glossary_translation_output` and `glossary_error_output` are the
+ * translated output/error when we apply glossaries. They could also be
+ * empty if we have no content to output.
+ * Once a row is present in index.csv, the input/output matching never
+ * changes. Callers should also expect all the content in input_file are
+ * processed and ready to be consumed (that is, no partial output file is
+ * written).
+ * Since index.csv will be keeping updated during the process, please make
+ * sure there is no custom retention policy applied on the output bucket
+ * that may avoid file updating.
+ * (https://cloud.google.com/storage/docs/bucket-lock?hl=en#retention-policy)
+ * The naming format of translation output files follows (for target
+ * language code [trg]): `translation_output`:
+ * gs://translation_output/a_b_c_[trg]_translation.[extension]
+ * `glossary_translation_output`:
+ * gs://translation_test/a_b_c_[trg]_glossary_translation.[extension] The
+ * output document will maintain the same file format as the input document.
+ * The naming format of error output files follows (for target language code
+ * [trg]): `error_output`: gs://translation_test/a_b_c_[trg]_errors.txt
+ * `glossary_error_output`:
+ * gs://translation_test/a_b_c_[trg]_glossary_translation.txt The error
+ * output is a txt file containing error details.
+ *
+ *
+ * .google.cloud.translation.v3.GcsDestination gcs_destination = 1;
+ *
+ * @return The gcsDestination.
+ */
+ @java.lang.Override
+ public com.google.cloud.translate.v3.GcsDestination getGcsDestination() {
+ if (destinationCase_ == 1) {
+ return (com.google.cloud.translate.v3.GcsDestination) destination_;
+ }
+ return com.google.cloud.translate.v3.GcsDestination.getDefaultInstance();
+ }
+ /**
+ *
+ *
+ *
+ * Google Cloud Storage destination for output content.
+ * For every single input document (for example, gs://a/b/c.[extension]), we
+ * generate at most 2 * n output files. (n is the # of target_language_codes
+ * in the BatchTranslateDocumentRequest).
+ * While the input documents are being processed, we write/update an index
+ * file `index.csv` under `gcs_destination.output_uri_prefix` (for example,
+ * gs://translation_output/index.csv) The index file is generated/updated as
+ * new files are being translated. The format is:
+ * input_document,target_language_code,translation_output,error_output,
+ * glossary_translation_output,glossary_error_output
+ * `input_document` is one file we matched using gcs_source.input_uri.
+ * `target_language_code` is provided in the request.
+ * `translation_output` contains the translations. (details provided below)
+ * `error_output` contains the error message during processing of the file.
+ * Both translations_file and errors_file could be empty strings if we have
+ * no content to output.
+ * `glossary_translation_output` and `glossary_error_output` are the
+ * translated output/error when we apply glossaries. They could also be
+ * empty if we have no content to output.
+ * Once a row is present in index.csv, the input/output matching never
+ * changes. Callers should also expect all the content in input_file are
+ * processed and ready to be consumed (that is, no partial output file is
+ * written).
+ * Since index.csv will be keeping updated during the process, please make
+ * sure there is no custom retention policy applied on the output bucket
+ * that may avoid file updating.
+ * (https://cloud.google.com/storage/docs/bucket-lock?hl=en#retention-policy)
+ * The naming format of translation output files follows (for target
+ * language code [trg]): `translation_output`:
+ * gs://translation_output/a_b_c_[trg]_translation.[extension]
+ * `glossary_translation_output`:
+ * gs://translation_test/a_b_c_[trg]_glossary_translation.[extension] The
+ * output document will maintain the same file format as the input document.
+ * The naming format of error output files follows (for target language code
+ * [trg]): `error_output`: gs://translation_test/a_b_c_[trg]_errors.txt
+ * `glossary_error_output`:
+ * gs://translation_test/a_b_c_[trg]_glossary_translation.txt The error
+ * output is a txt file containing error details.
+ *
+ *
+ * .google.cloud.translation.v3.GcsDestination gcs_destination = 1;
+ */
+ @java.lang.Override
+ public com.google.cloud.translate.v3.GcsDestinationOrBuilder getGcsDestinationOrBuilder() {
+ if (destinationCase_ == 1) {
+ return (com.google.cloud.translate.v3.GcsDestination) destination_;
+ }
+ return com.google.cloud.translate.v3.GcsDestination.getDefaultInstance();
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (destinationCase_ == 1) {
+ output.writeMessage(1, (com.google.cloud.translate.v3.GcsDestination) destination_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (destinationCase_ == 1) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 1, (com.google.cloud.translate.v3.GcsDestination) destination_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.translate.v3.BatchDocumentOutputConfig)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.translate.v3.BatchDocumentOutputConfig other =
+ (com.google.cloud.translate.v3.BatchDocumentOutputConfig) obj;
+
+ if (!getDestinationCase().equals(other.getDestinationCase())) return false;
+ switch (destinationCase_) {
+ case 1:
+ if (!getGcsDestination().equals(other.getGcsDestination())) return false;
+ break;
+ case 0:
+ default:
+ }
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ switch (destinationCase_) {
+ case 1:
+ hash = (37 * hash) + GCS_DESTINATION_FIELD_NUMBER;
+ hash = (53 * hash) + getGcsDestination().hashCode();
+ break;
+ case 0:
+ default:
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.translate.v3.BatchDocumentOutputConfig parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3.BatchDocumentOutputConfig parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3.BatchDocumentOutputConfig parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3.BatchDocumentOutputConfig parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3.BatchDocumentOutputConfig parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3.BatchDocumentOutputConfig parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3.BatchDocumentOutputConfig parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3.BatchDocumentOutputConfig parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3.BatchDocumentOutputConfig parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3.BatchDocumentOutputConfig parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3.BatchDocumentOutputConfig parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3.BatchDocumentOutputConfig parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(
+ com.google.cloud.translate.v3.BatchDocumentOutputConfig prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ *
+ * Output configuration for BatchTranslateDocument request.
+ *
+ *
+ * Protobuf type {@code google.cloud.translation.v3.BatchDocumentOutputConfig}
+ */
+ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Google Cloud Storage destination for output content.
+ * For every single input document (for example, gs://a/b/c.[extension]), we
+ * generate at most 2 * n output files. (n is the # of target_language_codes
+ * in the BatchTranslateDocumentRequest).
+ * While the input documents are being processed, we write/update an index
+ * file `index.csv` under `gcs_destination.output_uri_prefix` (for example,
+ * gs://translation_output/index.csv) The index file is generated/updated as
+ * new files are being translated. The format is:
+ * input_document,target_language_code,translation_output,error_output,
+ * glossary_translation_output,glossary_error_output
+ * `input_document` is one file we matched using gcs_source.input_uri.
+ * `target_language_code` is provided in the request.
+ * `translation_output` contains the translations. (details provided below)
+ * `error_output` contains the error message during processing of the file.
+ * Both translations_file and errors_file could be empty strings if we have
+ * no content to output.
+ * `glossary_translation_output` and `glossary_error_output` are the
+ * translated output/error when we apply glossaries. They could also be
+ * empty if we have no content to output.
+ * Once a row is present in index.csv, the input/output matching never
+ * changes. Callers should also expect all the content in input_file are
+ * processed and ready to be consumed (that is, no partial output file is
+ * written).
+ * Since index.csv will be keeping updated during the process, please make
+ * sure there is no custom retention policy applied on the output bucket
+ * that may avoid file updating.
+ * (https://cloud.google.com/storage/docs/bucket-lock?hl=en#retention-policy)
+ * The naming format of translation output files follows (for target
+ * language code [trg]): `translation_output`:
+ * gs://translation_output/a_b_c_[trg]_translation.[extension]
+ * `glossary_translation_output`:
+ * gs://translation_test/a_b_c_[trg]_glossary_translation.[extension] The
+ * output document will maintain the same file format as the input document.
+ * The naming format of error output files follows (for target language code
+ * [trg]): `error_output`: gs://translation_test/a_b_c_[trg]_errors.txt
+ * `glossary_error_output`:
+ * gs://translation_test/a_b_c_[trg]_glossary_translation.txt The error
+ * output is a txt file containing error details.
+ *
+ *
+ * .google.cloud.translation.v3.GcsDestination gcs_destination = 1;
+ *
+ * @return Whether the gcsDestination field is set.
+ */
+ @java.lang.Override
+ public boolean hasGcsDestination() {
+ return destinationCase_ == 1;
+ }
+ /**
+ *
+ *
+ *
+ * Google Cloud Storage destination for output content.
+ * For every single input document (for example, gs://a/b/c.[extension]), we
+ * generate at most 2 * n output files. (n is the # of target_language_codes
+ * in the BatchTranslateDocumentRequest).
+ * While the input documents are being processed, we write/update an index
+ * file `index.csv` under `gcs_destination.output_uri_prefix` (for example,
+ * gs://translation_output/index.csv) The index file is generated/updated as
+ * new files are being translated. The format is:
+ * input_document,target_language_code,translation_output,error_output,
+ * glossary_translation_output,glossary_error_output
+ * `input_document` is one file we matched using gcs_source.input_uri.
+ * `target_language_code` is provided in the request.
+ * `translation_output` contains the translations. (details provided below)
+ * `error_output` contains the error message during processing of the file.
+ * Both translations_file and errors_file could be empty strings if we have
+ * no content to output.
+ * `glossary_translation_output` and `glossary_error_output` are the
+ * translated output/error when we apply glossaries. They could also be
+ * empty if we have no content to output.
+ * Once a row is present in index.csv, the input/output matching never
+ * changes. Callers should also expect all the content in input_file are
+ * processed and ready to be consumed (that is, no partial output file is
+ * written).
+ * Since index.csv will be keeping updated during the process, please make
+ * sure there is no custom retention policy applied on the output bucket
+ * that may avoid file updating.
+ * (https://cloud.google.com/storage/docs/bucket-lock?hl=en#retention-policy)
+ * The naming format of translation output files follows (for target
+ * language code [trg]): `translation_output`:
+ * gs://translation_output/a_b_c_[trg]_translation.[extension]
+ * `glossary_translation_output`:
+ * gs://translation_test/a_b_c_[trg]_glossary_translation.[extension] The
+ * output document will maintain the same file format as the input document.
+ * The naming format of error output files follows (for target language code
+ * [trg]): `error_output`: gs://translation_test/a_b_c_[trg]_errors.txt
+ * `glossary_error_output`:
+ * gs://translation_test/a_b_c_[trg]_glossary_translation.txt The error
+ * output is a txt file containing error details.
+ *
+ *
+ * .google.cloud.translation.v3.GcsDestination gcs_destination = 1;
+ *
+ * @return The gcsDestination.
+ */
+ @java.lang.Override
+ public com.google.cloud.translate.v3.GcsDestination getGcsDestination() {
+ if (gcsDestinationBuilder_ == null) {
+ if (destinationCase_ == 1) {
+ return (com.google.cloud.translate.v3.GcsDestination) destination_;
+ }
+ return com.google.cloud.translate.v3.GcsDestination.getDefaultInstance();
+ } else {
+ if (destinationCase_ == 1) {
+ return gcsDestinationBuilder_.getMessage();
+ }
+ return com.google.cloud.translate.v3.GcsDestination.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Google Cloud Storage destination for output content.
+ * For every single input document (for example, gs://a/b/c.[extension]), we
+ * generate at most 2 * n output files. (n is the # of target_language_codes
+ * in the BatchTranslateDocumentRequest).
+ * While the input documents are being processed, we write/update an index
+ * file `index.csv` under `gcs_destination.output_uri_prefix` (for example,
+ * gs://translation_output/index.csv) The index file is generated/updated as
+ * new files are being translated. The format is:
+ * input_document,target_language_code,translation_output,error_output,
+ * glossary_translation_output,glossary_error_output
+ * `input_document` is one file we matched using gcs_source.input_uri.
+ * `target_language_code` is provided in the request.
+ * `translation_output` contains the translations. (details provided below)
+ * `error_output` contains the error message during processing of the file.
+ * Both translations_file and errors_file could be empty strings if we have
+ * no content to output.
+ * `glossary_translation_output` and `glossary_error_output` are the
+ * translated output/error when we apply glossaries. They could also be
+ * empty if we have no content to output.
+ * Once a row is present in index.csv, the input/output matching never
+ * changes. Callers should also expect all the content in input_file are
+ * processed and ready to be consumed (that is, no partial output file is
+ * written).
+ * Since index.csv will be keeping updated during the process, please make
+ * sure there is no custom retention policy applied on the output bucket
+ * that may avoid file updating.
+ * (https://cloud.google.com/storage/docs/bucket-lock?hl=en#retention-policy)
+ * The naming format of translation output files follows (for target
+ * language code [trg]): `translation_output`:
+ * gs://translation_output/a_b_c_[trg]_translation.[extension]
+ * `glossary_translation_output`:
+ * gs://translation_test/a_b_c_[trg]_glossary_translation.[extension] The
+ * output document will maintain the same file format as the input document.
+ * The naming format of error output files follows (for target language code
+ * [trg]): `error_output`: gs://translation_test/a_b_c_[trg]_errors.txt
+ * `glossary_error_output`:
+ * gs://translation_test/a_b_c_[trg]_glossary_translation.txt The error
+ * output is a txt file containing error details.
+ *
+ *
+ * .google.cloud.translation.v3.GcsDestination gcs_destination = 1;
+ */
+ public Builder setGcsDestination(com.google.cloud.translate.v3.GcsDestination value) {
+ if (gcsDestinationBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ destination_ = value;
+ onChanged();
+ } else {
+ gcsDestinationBuilder_.setMessage(value);
+ }
+ destinationCase_ = 1;
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Google Cloud Storage destination for output content.
+ * For every single input document (for example, gs://a/b/c.[extension]), we
+ * generate at most 2 * n output files. (n is the # of target_language_codes
+ * in the BatchTranslateDocumentRequest).
+ * While the input documents are being processed, we write/update an index
+ * file `index.csv` under `gcs_destination.output_uri_prefix` (for example,
+ * gs://translation_output/index.csv) The index file is generated/updated as
+ * new files are being translated. The format is:
+ * input_document,target_language_code,translation_output,error_output,
+ * glossary_translation_output,glossary_error_output
+ * `input_document` is one file we matched using gcs_source.input_uri.
+ * `target_language_code` is provided in the request.
+ * `translation_output` contains the translations. (details provided below)
+ * `error_output` contains the error message during processing of the file.
+ * Both translations_file and errors_file could be empty strings if we have
+ * no content to output.
+ * `glossary_translation_output` and `glossary_error_output` are the
+ * translated output/error when we apply glossaries. They could also be
+ * empty if we have no content to output.
+ * Once a row is present in index.csv, the input/output matching never
+ * changes. Callers should also expect all the content in input_file are
+ * processed and ready to be consumed (that is, no partial output file is
+ * written).
+ * Since index.csv will be keeping updated during the process, please make
+ * sure there is no custom retention policy applied on the output bucket
+ * that may avoid file updating.
+ * (https://cloud.google.com/storage/docs/bucket-lock?hl=en#retention-policy)
+ * The naming format of translation output files follows (for target
+ * language code [trg]): `translation_output`:
+ * gs://translation_output/a_b_c_[trg]_translation.[extension]
+ * `glossary_translation_output`:
+ * gs://translation_test/a_b_c_[trg]_glossary_translation.[extension] The
+ * output document will maintain the same file format as the input document.
+ * The naming format of error output files follows (for target language code
+ * [trg]): `error_output`: gs://translation_test/a_b_c_[trg]_errors.txt
+ * `glossary_error_output`:
+ * gs://translation_test/a_b_c_[trg]_glossary_translation.txt The error
+ * output is a txt file containing error details.
+ *
+ *
+ * .google.cloud.translation.v3.GcsDestination gcs_destination = 1;
+ */
+ public Builder setGcsDestination(
+ com.google.cloud.translate.v3.GcsDestination.Builder builderForValue) {
+ if (gcsDestinationBuilder_ == null) {
+ destination_ = builderForValue.build();
+ onChanged();
+ } else {
+ gcsDestinationBuilder_.setMessage(builderForValue.build());
+ }
+ destinationCase_ = 1;
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Google Cloud Storage destination for output content.
+ * For every single input document (for example, gs://a/b/c.[extension]), we
+ * generate at most 2 * n output files. (n is the # of target_language_codes
+ * in the BatchTranslateDocumentRequest).
+ * While the input documents are being processed, we write/update an index
+ * file `index.csv` under `gcs_destination.output_uri_prefix` (for example,
+ * gs://translation_output/index.csv) The index file is generated/updated as
+ * new files are being translated. The format is:
+ * input_document,target_language_code,translation_output,error_output,
+ * glossary_translation_output,glossary_error_output
+ * `input_document` is one file we matched using gcs_source.input_uri.
+ * `target_language_code` is provided in the request.
+ * `translation_output` contains the translations. (details provided below)
+ * `error_output` contains the error message during processing of the file.
+ * Both translations_file and errors_file could be empty strings if we have
+ * no content to output.
+ * `glossary_translation_output` and `glossary_error_output` are the
+ * translated output/error when we apply glossaries. They could also be
+ * empty if we have no content to output.
+ * Once a row is present in index.csv, the input/output matching never
+ * changes. Callers should also expect all the content in input_file are
+ * processed and ready to be consumed (that is, no partial output file is
+ * written).
+ * Since index.csv will be keeping updated during the process, please make
+ * sure there is no custom retention policy applied on the output bucket
+ * that may avoid file updating.
+ * (https://cloud.google.com/storage/docs/bucket-lock?hl=en#retention-policy)
+ * The naming format of translation output files follows (for target
+ * language code [trg]): `translation_output`:
+ * gs://translation_output/a_b_c_[trg]_translation.[extension]
+ * `glossary_translation_output`:
+ * gs://translation_test/a_b_c_[trg]_glossary_translation.[extension] The
+ * output document will maintain the same file format as the input document.
+ * The naming format of error output files follows (for target language code
+ * [trg]): `error_output`: gs://translation_test/a_b_c_[trg]_errors.txt
+ * `glossary_error_output`:
+ * gs://translation_test/a_b_c_[trg]_glossary_translation.txt The error
+ * output is a txt file containing error details.
+ *
+ *
+ * .google.cloud.translation.v3.GcsDestination gcs_destination = 1;
+ */
+ public Builder mergeGcsDestination(com.google.cloud.translate.v3.GcsDestination value) {
+ if (gcsDestinationBuilder_ == null) {
+ if (destinationCase_ == 1
+ && destination_ != com.google.cloud.translate.v3.GcsDestination.getDefaultInstance()) {
+ destination_ =
+ com.google.cloud.translate.v3.GcsDestination.newBuilder(
+ (com.google.cloud.translate.v3.GcsDestination) destination_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ destination_ = value;
+ }
+ onChanged();
+ } else {
+ if (destinationCase_ == 1) {
+ gcsDestinationBuilder_.mergeFrom(value);
+ }
+ gcsDestinationBuilder_.setMessage(value);
+ }
+ destinationCase_ = 1;
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Google Cloud Storage destination for output content.
+ * For every single input document (for example, gs://a/b/c.[extension]), we
+ * generate at most 2 * n output files. (n is the # of target_language_codes
+ * in the BatchTranslateDocumentRequest).
+ * While the input documents are being processed, we write/update an index
+ * file `index.csv` under `gcs_destination.output_uri_prefix` (for example,
+ * gs://translation_output/index.csv) The index file is generated/updated as
+ * new files are being translated. The format is:
+ * input_document,target_language_code,translation_output,error_output,
+ * glossary_translation_output,glossary_error_output
+ * `input_document` is one file we matched using gcs_source.input_uri.
+ * `target_language_code` is provided in the request.
+ * `translation_output` contains the translations. (details provided below)
+ * `error_output` contains the error message during processing of the file.
+ * Both translations_file and errors_file could be empty strings if we have
+ * no content to output.
+ * `glossary_translation_output` and `glossary_error_output` are the
+ * translated output/error when we apply glossaries. They could also be
+ * empty if we have no content to output.
+ * Once a row is present in index.csv, the input/output matching never
+ * changes. Callers should also expect all the content in input_file are
+ * processed and ready to be consumed (that is, no partial output file is
+ * written).
+ * Since index.csv will be keeping updated during the process, please make
+ * sure there is no custom retention policy applied on the output bucket
+ * that may avoid file updating.
+ * (https://cloud.google.com/storage/docs/bucket-lock?hl=en#retention-policy)
+ * The naming format of translation output files follows (for target
+ * language code [trg]): `translation_output`:
+ * gs://translation_output/a_b_c_[trg]_translation.[extension]
+ * `glossary_translation_output`:
+ * gs://translation_test/a_b_c_[trg]_glossary_translation.[extension] The
+ * output document will maintain the same file format as the input document.
+ * The naming format of error output files follows (for target language code
+ * [trg]): `error_output`: gs://translation_test/a_b_c_[trg]_errors.txt
+ * `glossary_error_output`:
+ * gs://translation_test/a_b_c_[trg]_glossary_translation.txt The error
+ * output is a txt file containing error details.
+ *
+ *
+ * .google.cloud.translation.v3.GcsDestination gcs_destination = 1;
+ */
+ public Builder clearGcsDestination() {
+ if (gcsDestinationBuilder_ == null) {
+ if (destinationCase_ == 1) {
+ destinationCase_ = 0;
+ destination_ = null;
+ onChanged();
+ }
+ } else {
+ if (destinationCase_ == 1) {
+ destinationCase_ = 0;
+ destination_ = null;
+ }
+ gcsDestinationBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Google Cloud Storage destination for output content.
+ * For every single input document (for example, gs://a/b/c.[extension]), we
+ * generate at most 2 * n output files. (n is the # of target_language_codes
+ * in the BatchTranslateDocumentRequest).
+ * While the input documents are being processed, we write/update an index
+ * file `index.csv` under `gcs_destination.output_uri_prefix` (for example,
+ * gs://translation_output/index.csv) The index file is generated/updated as
+ * new files are being translated. The format is:
+ * input_document,target_language_code,translation_output,error_output,
+ * glossary_translation_output,glossary_error_output
+ * `input_document` is one file we matched using gcs_source.input_uri.
+ * `target_language_code` is provided in the request.
+ * `translation_output` contains the translations. (details provided below)
+ * `error_output` contains the error message during processing of the file.
+ * Both translations_file and errors_file could be empty strings if we have
+ * no content to output.
+ * `glossary_translation_output` and `glossary_error_output` are the
+ * translated output/error when we apply glossaries. They could also be
+ * empty if we have no content to output.
+ * Once a row is present in index.csv, the input/output matching never
+ * changes. Callers should also expect all the content in input_file are
+ * processed and ready to be consumed (that is, no partial output file is
+ * written).
+ * Since index.csv will be keeping updated during the process, please make
+ * sure there is no custom retention policy applied on the output bucket
+ * that may avoid file updating.
+ * (https://cloud.google.com/storage/docs/bucket-lock?hl=en#retention-policy)
+ * The naming format of translation output files follows (for target
+ * language code [trg]): `translation_output`:
+ * gs://translation_output/a_b_c_[trg]_translation.[extension]
+ * `glossary_translation_output`:
+ * gs://translation_test/a_b_c_[trg]_glossary_translation.[extension] The
+ * output document will maintain the same file format as the input document.
+ * The naming format of error output files follows (for target language code
+ * [trg]): `error_output`: gs://translation_test/a_b_c_[trg]_errors.txt
+ * `glossary_error_output`:
+ * gs://translation_test/a_b_c_[trg]_glossary_translation.txt The error
+ * output is a txt file containing error details.
+ *
+ *
+ * .google.cloud.translation.v3.GcsDestination gcs_destination = 1;
+ */
+ public com.google.cloud.translate.v3.GcsDestination.Builder getGcsDestinationBuilder() {
+ return getGcsDestinationFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ *
+ * Google Cloud Storage destination for output content.
+ * For every single input document (for example, gs://a/b/c.[extension]), we
+ * generate at most 2 * n output files. (n is the # of target_language_codes
+ * in the BatchTranslateDocumentRequest).
+ * While the input documents are being processed, we write/update an index
+ * file `index.csv` under `gcs_destination.output_uri_prefix` (for example,
+ * gs://translation_output/index.csv) The index file is generated/updated as
+ * new files are being translated. The format is:
+ * input_document,target_language_code,translation_output,error_output,
+ * glossary_translation_output,glossary_error_output
+ * `input_document` is one file we matched using gcs_source.input_uri.
+ * `target_language_code` is provided in the request.
+ * `translation_output` contains the translations. (details provided below)
+ * `error_output` contains the error message during processing of the file.
+ * Both translations_file and errors_file could be empty strings if we have
+ * no content to output.
+ * `glossary_translation_output` and `glossary_error_output` are the
+ * translated output/error when we apply glossaries. They could also be
+ * empty if we have no content to output.
+ * Once a row is present in index.csv, the input/output matching never
+ * changes. Callers should also expect all the content in input_file are
+ * processed and ready to be consumed (that is, no partial output file is
+ * written).
+ * Since index.csv will be keeping updated during the process, please make
+ * sure there is no custom retention policy applied on the output bucket
+ * that may avoid file updating.
+ * (https://cloud.google.com/storage/docs/bucket-lock?hl=en#retention-policy)
+ * The naming format of translation output files follows (for target
+ * language code [trg]): `translation_output`:
+ * gs://translation_output/a_b_c_[trg]_translation.[extension]
+ * `glossary_translation_output`:
+ * gs://translation_test/a_b_c_[trg]_glossary_translation.[extension] The
+ * output document will maintain the same file format as the input document.
+ * The naming format of error output files follows (for target language code
+ * [trg]): `error_output`: gs://translation_test/a_b_c_[trg]_errors.txt
+ * `glossary_error_output`:
+ * gs://translation_test/a_b_c_[trg]_glossary_translation.txt The error
+ * output is a txt file containing error details.
+ *
+ *
+ * .google.cloud.translation.v3.GcsDestination gcs_destination = 1;
+ */
+ @java.lang.Override
+ public com.google.cloud.translate.v3.GcsDestinationOrBuilder getGcsDestinationOrBuilder() {
+ if ((destinationCase_ == 1) && (gcsDestinationBuilder_ != null)) {
+ return gcsDestinationBuilder_.getMessageOrBuilder();
+ } else {
+ if (destinationCase_ == 1) {
+ return (com.google.cloud.translate.v3.GcsDestination) destination_;
+ }
+ return com.google.cloud.translate.v3.GcsDestination.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Google Cloud Storage destination for output content.
+ * For every single input document (for example, gs://a/b/c.[extension]), we
+ * generate at most 2 * n output files. (n is the # of target_language_codes
+ * in the BatchTranslateDocumentRequest).
+ * While the input documents are being processed, we write/update an index
+ * file `index.csv` under `gcs_destination.output_uri_prefix` (for example,
+ * gs://translation_output/index.csv) The index file is generated/updated as
+ * new files are being translated. The format is:
+ * input_document,target_language_code,translation_output,error_output,
+ * glossary_translation_output,glossary_error_output
+ * `input_document` is one file we matched using gcs_source.input_uri.
+ * `target_language_code` is provided in the request.
+ * `translation_output` contains the translations. (details provided below)
+ * `error_output` contains the error message during processing of the file.
+ * Both translations_file and errors_file could be empty strings if we have
+ * no content to output.
+ * `glossary_translation_output` and `glossary_error_output` are the
+ * translated output/error when we apply glossaries. They could also be
+ * empty if we have no content to output.
+ * Once a row is present in index.csv, the input/output matching never
+ * changes. Callers should also expect all the content in input_file are
+ * processed and ready to be consumed (that is, no partial output file is
+ * written).
+ * Since index.csv will be keeping updated during the process, please make
+ * sure there is no custom retention policy applied on the output bucket
+ * that may avoid file updating.
+ * (https://cloud.google.com/storage/docs/bucket-lock?hl=en#retention-policy)
+ * The naming format of translation output files follows (for target
+ * language code [trg]): `translation_output`:
+ * gs://translation_output/a_b_c_[trg]_translation.[extension]
+ * `glossary_translation_output`:
+ * gs://translation_test/a_b_c_[trg]_glossary_translation.[extension] The
+ * output document will maintain the same file format as the input document.
+ * The naming format of error output files follows (for target language code
+ * [trg]): `error_output`: gs://translation_test/a_b_c_[trg]_errors.txt
+ * `glossary_error_output`:
+ * gs://translation_test/a_b_c_[trg]_glossary_translation.txt The error
+ * output is a txt file containing error details.
+ *
+ *
+ * .google.cloud.translation.v3.GcsDestination gcs_destination = 1;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.translate.v3.GcsDestination,
+ com.google.cloud.translate.v3.GcsDestination.Builder,
+ com.google.cloud.translate.v3.GcsDestinationOrBuilder>
+ getGcsDestinationFieldBuilder() {
+ if (gcsDestinationBuilder_ == null) {
+ if (!(destinationCase_ == 1)) {
+ destination_ = com.google.cloud.translate.v3.GcsDestination.getDefaultInstance();
+ }
+ gcsDestinationBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.translate.v3.GcsDestination,
+ com.google.cloud.translate.v3.GcsDestination.Builder,
+ com.google.cloud.translate.v3.GcsDestinationOrBuilder>(
+ (com.google.cloud.translate.v3.GcsDestination) destination_,
+ getParentForChildren(),
+ isClean());
+ destination_ = null;
+ }
+ destinationCase_ = 1;
+ onChanged();
+ ;
+ return gcsDestinationBuilder_;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.translation.v3.BatchDocumentOutputConfig)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.translation.v3.BatchDocumentOutputConfig)
+ private static final com.google.cloud.translate.v3.BatchDocumentOutputConfig DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.translate.v3.BatchDocumentOutputConfig();
+ }
+
+ public static com.google.cloud.translate.v3.BatchDocumentOutputConfig getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ * Google Cloud Storage destination for output content.
+ * For every single input document (for example, gs://a/b/c.[extension]), we
+ * generate at most 2 * n output files. (n is the # of target_language_codes
+ * in the BatchTranslateDocumentRequest).
+ * While the input documents are being processed, we write/update an index
+ * file `index.csv` under `gcs_destination.output_uri_prefix` (for example,
+ * gs://translation_output/index.csv) The index file is generated/updated as
+ * new files are being translated. The format is:
+ * input_document,target_language_code,translation_output,error_output,
+ * glossary_translation_output,glossary_error_output
+ * `input_document` is one file we matched using gcs_source.input_uri.
+ * `target_language_code` is provided in the request.
+ * `translation_output` contains the translations. (details provided below)
+ * `error_output` contains the error message during processing of the file.
+ * Both translations_file and errors_file could be empty strings if we have
+ * no content to output.
+ * `glossary_translation_output` and `glossary_error_output` are the
+ * translated output/error when we apply glossaries. They could also be
+ * empty if we have no content to output.
+ * Once a row is present in index.csv, the input/output matching never
+ * changes. Callers should also expect all the content in input_file are
+ * processed and ready to be consumed (that is, no partial output file is
+ * written).
+ * Since index.csv will be keeping updated during the process, please make
+ * sure there is no custom retention policy applied on the output bucket
+ * that may avoid file updating.
+ * (https://cloud.google.com/storage/docs/bucket-lock?hl=en#retention-policy)
+ * The naming format of translation output files follows (for target
+ * language code [trg]): `translation_output`:
+ * gs://translation_output/a_b_c_[trg]_translation.[extension]
+ * `glossary_translation_output`:
+ * gs://translation_test/a_b_c_[trg]_glossary_translation.[extension] The
+ * output document will maintain the same file format as the input document.
+ * The naming format of error output files follows (for target language code
+ * [trg]): `error_output`: gs://translation_test/a_b_c_[trg]_errors.txt
+ * `glossary_error_output`:
+ * gs://translation_test/a_b_c_[trg]_glossary_translation.txt The error
+ * output is a txt file containing error details.
+ *
+ *
+ * .google.cloud.translation.v3.GcsDestination gcs_destination = 1;
+ *
+ * @return Whether the gcsDestination field is set.
+ */
+ boolean hasGcsDestination();
+ /**
+ *
+ *
+ *
+ * Google Cloud Storage destination for output content.
+ * For every single input document (for example, gs://a/b/c.[extension]), we
+ * generate at most 2 * n output files. (n is the # of target_language_codes
+ * in the BatchTranslateDocumentRequest).
+ * While the input documents are being processed, we write/update an index
+ * file `index.csv` under `gcs_destination.output_uri_prefix` (for example,
+ * gs://translation_output/index.csv) The index file is generated/updated as
+ * new files are being translated. The format is:
+ * input_document,target_language_code,translation_output,error_output,
+ * glossary_translation_output,glossary_error_output
+ * `input_document` is one file we matched using gcs_source.input_uri.
+ * `target_language_code` is provided in the request.
+ * `translation_output` contains the translations. (details provided below)
+ * `error_output` contains the error message during processing of the file.
+ * Both translations_file and errors_file could be empty strings if we have
+ * no content to output.
+ * `glossary_translation_output` and `glossary_error_output` are the
+ * translated output/error when we apply glossaries. They could also be
+ * empty if we have no content to output.
+ * Once a row is present in index.csv, the input/output matching never
+ * changes. Callers should also expect all the content in input_file are
+ * processed and ready to be consumed (that is, no partial output file is
+ * written).
+ * Since index.csv will be keeping updated during the process, please make
+ * sure there is no custom retention policy applied on the output bucket
+ * that may avoid file updating.
+ * (https://cloud.google.com/storage/docs/bucket-lock?hl=en#retention-policy)
+ * The naming format of translation output files follows (for target
+ * language code [trg]): `translation_output`:
+ * gs://translation_output/a_b_c_[trg]_translation.[extension]
+ * `glossary_translation_output`:
+ * gs://translation_test/a_b_c_[trg]_glossary_translation.[extension] The
+ * output document will maintain the same file format as the input document.
+ * The naming format of error output files follows (for target language code
+ * [trg]): `error_output`: gs://translation_test/a_b_c_[trg]_errors.txt
+ * `glossary_error_output`:
+ * gs://translation_test/a_b_c_[trg]_glossary_translation.txt The error
+ * output is a txt file containing error details.
+ *
+ *
+ * .google.cloud.translation.v3.GcsDestination gcs_destination = 1;
+ *
+ * @return The gcsDestination.
+ */
+ com.google.cloud.translate.v3.GcsDestination getGcsDestination();
+ /**
+ *
+ *
+ *
+ * Google Cloud Storage destination for output content.
+ * For every single input document (for example, gs://a/b/c.[extension]), we
+ * generate at most 2 * n output files. (n is the # of target_language_codes
+ * in the BatchTranslateDocumentRequest).
+ * While the input documents are being processed, we write/update an index
+ * file `index.csv` under `gcs_destination.output_uri_prefix` (for example,
+ * gs://translation_output/index.csv) The index file is generated/updated as
+ * new files are being translated. The format is:
+ * input_document,target_language_code,translation_output,error_output,
+ * glossary_translation_output,glossary_error_output
+ * `input_document` is one file we matched using gcs_source.input_uri.
+ * `target_language_code` is provided in the request.
+ * `translation_output` contains the translations. (details provided below)
+ * `error_output` contains the error message during processing of the file.
+ * Both translations_file and errors_file could be empty strings if we have
+ * no content to output.
+ * `glossary_translation_output` and `glossary_error_output` are the
+ * translated output/error when we apply glossaries. They could also be
+ * empty if we have no content to output.
+ * Once a row is present in index.csv, the input/output matching never
+ * changes. Callers should also expect all the content in input_file are
+ * processed and ready to be consumed (that is, no partial output file is
+ * written).
+ * Since index.csv will be keeping updated during the process, please make
+ * sure there is no custom retention policy applied on the output bucket
+ * that may avoid file updating.
+ * (https://cloud.google.com/storage/docs/bucket-lock?hl=en#retention-policy)
+ * The naming format of translation output files follows (for target
+ * language code [trg]): `translation_output`:
+ * gs://translation_output/a_b_c_[trg]_translation.[extension]
+ * `glossary_translation_output`:
+ * gs://translation_test/a_b_c_[trg]_glossary_translation.[extension] The
+ * output document will maintain the same file format as the input document.
+ * The naming format of error output files follows (for target language code
+ * [trg]): `error_output`: gs://translation_test/a_b_c_[trg]_errors.txt
+ * `glossary_error_output`:
+ * gs://translation_test/a_b_c_[trg]_glossary_translation.txt The error
+ * output is a txt file containing error details.
+ *
+ *
+ * .google.cloud.translation.v3.GcsDestination gcs_destination = 1;
+ */
+ com.google.cloud.translate.v3.GcsDestinationOrBuilder getGcsDestinationOrBuilder();
+
+ public com.google.cloud.translate.v3.BatchDocumentOutputConfig.DestinationCase
+ getDestinationCase();
+}
diff --git a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/BatchTranslateDocumentMetadata.java b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/BatchTranslateDocumentMetadata.java
new file mode 100644
index 00000000..38517ed0
--- /dev/null
+++ b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/BatchTranslateDocumentMetadata.java
@@ -0,0 +1,1872 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/translate/v3/translation_service.proto
+
+package com.google.cloud.translate.v3;
+
+/**
+ *
+ *
+ *
+ * State metadata for the batch translation operation.
+ *
+ *
+ * Protobuf type {@code google.cloud.translation.v3.BatchTranslateDocumentMetadata}
+ */
+public final class BatchTranslateDocumentMetadata extends com.google.protobuf.GeneratedMessageV3
+ implements
+ // @@protoc_insertion_point(message_implements:google.cloud.translation.v3.BatchTranslateDocumentMetadata)
+ BatchTranslateDocumentMetadataOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use BatchTranslateDocumentMetadata.newBuilder() to construct.
+ private BatchTranslateDocumentMetadata(
+ com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+
+ private BatchTranslateDocumentMetadata() {
+ state_ = 0;
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
+ return new BatchTranslateDocumentMetadata();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
+ return this.unknownFields;
+ }
+
+ private BatchTranslateDocumentMetadata(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 8:
+ {
+ int rawValue = input.readEnum();
+
+ state_ = rawValue;
+ break;
+ }
+ case 16:
+ {
+ totalPages_ = input.readInt64();
+ break;
+ }
+ case 24:
+ {
+ translatedPages_ = input.readInt64();
+ break;
+ }
+ case 32:
+ {
+ failedPages_ = input.readInt64();
+ break;
+ }
+ case 40:
+ {
+ totalBillablePages_ = input.readInt64();
+ break;
+ }
+ case 48:
+ {
+ totalCharacters_ = input.readInt64();
+ break;
+ }
+ case 56:
+ {
+ translatedCharacters_ = input.readInt64();
+ break;
+ }
+ case 64:
+ {
+ failedCharacters_ = input.readInt64();
+ break;
+ }
+ case 72:
+ {
+ totalBillableCharacters_ = input.readInt64();
+ break;
+ }
+ case 82:
+ {
+ com.google.protobuf.Timestamp.Builder subBuilder = null;
+ if (submitTime_ != null) {
+ subBuilder = submitTime_.toBuilder();
+ }
+ submitTime_ =
+ input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(submitTime_);
+ submitTime_ = 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.translate.v3.TranslationServiceProto
+ .internal_static_google_cloud_translation_v3_BatchTranslateDocumentMetadata_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.cloud.translate.v3.TranslationServiceProto
+ .internal_static_google_cloud_translation_v3_BatchTranslateDocumentMetadata_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.cloud.translate.v3.BatchTranslateDocumentMetadata.class,
+ com.google.cloud.translate.v3.BatchTranslateDocumentMetadata.Builder.class);
+ }
+
+ /**
+ *
+ *
+ *
+ * State of the job.
+ *
+ *
+ * Protobuf enum {@code google.cloud.translation.v3.BatchTranslateDocumentMetadata.State}
+ */
+ public enum State implements com.google.protobuf.ProtocolMessageEnum {
+ /**
+ *
+ *
+ *
+ * Invalid.
+ *
+ *
+ * STATE_UNSPECIFIED = 0;
+ */
+ STATE_UNSPECIFIED(0),
+ /**
+ *
+ *
+ *
+ * Request is being processed.
+ *
+ *
+ * RUNNING = 1;
+ */
+ RUNNING(1),
+ /**
+ *
+ *
+ *
+ * The batch is processed, and at least one item was successfully processed.
+ *
+ *
+ * SUCCEEDED = 2;
+ */
+ SUCCEEDED(2),
+ /**
+ *
+ *
+ *
+ * The batch is done and no item was successfully processed.
+ *
+ *
+ * FAILED = 3;
+ */
+ FAILED(3),
+ /**
+ *
+ *
+ *
+ * Request is in the process of being canceled after caller invoked
+ * longrunning.Operations.CancelOperation on the request id.
+ *
+ *
+ * CANCELLING = 4;
+ */
+ CANCELLING(4),
+ /**
+ *
+ *
+ *
+ * The batch is done after the user has called the
+ * longrunning.Operations.CancelOperation. Any records processed before the
+ * cancel command are output as specified in the request.
+ *
+ *
+ * CANCELLED = 5;
+ */
+ CANCELLED(5),
+ UNRECOGNIZED(-1),
+ ;
+
+ /**
+ *
+ *
+ *
+ * Invalid.
+ *
+ *
+ * STATE_UNSPECIFIED = 0;
+ */
+ public static final int STATE_UNSPECIFIED_VALUE = 0;
+ /**
+ *
+ *
+ *
+ * Request is being processed.
+ *
+ *
+ * RUNNING = 1;
+ */
+ public static final int RUNNING_VALUE = 1;
+ /**
+ *
+ *
+ *
+ * The batch is processed, and at least one item was successfully processed.
+ *
+ *
+ * SUCCEEDED = 2;
+ */
+ public static final int SUCCEEDED_VALUE = 2;
+ /**
+ *
+ *
+ *
+ * The batch is done and no item was successfully processed.
+ *
+ *
+ * FAILED = 3;
+ */
+ public static final int FAILED_VALUE = 3;
+ /**
+ *
+ *
+ *
+ * Request is in the process of being canceled after caller invoked
+ * longrunning.Operations.CancelOperation on the request id.
+ *
+ *
+ * CANCELLING = 4;
+ */
+ public static final int CANCELLING_VALUE = 4;
+ /**
+ *
+ *
+ *
+ * The batch is done after the user has called the
+ * longrunning.Operations.CancelOperation. Any records processed before the
+ * cancel command are output as specified in the request.
+ *
+ *
+ * CANCELLED = 5;
+ */
+ public static final int CANCELLED_VALUE = 5;
+
+ public final int getNumber() {
+ if (this == UNRECOGNIZED) {
+ throw new java.lang.IllegalArgumentException(
+ "Can't get the number of an unknown enum value.");
+ }
+ return value;
+ }
+
+ /**
+ * @param value The numeric wire value of the corresponding enum entry.
+ * @return The enum associated with the given numeric wire value.
+ * @deprecated Use {@link #forNumber(int)} instead.
+ */
+ @java.lang.Deprecated
+ public static State valueOf(int value) {
+ return forNumber(value);
+ }
+
+ /**
+ * @param value The numeric wire value of the corresponding enum entry.
+ * @return The enum associated with the given numeric wire value.
+ */
+ public static State forNumber(int value) {
+ switch (value) {
+ case 0:
+ return STATE_UNSPECIFIED;
+ case 1:
+ return RUNNING;
+ case 2:
+ return SUCCEEDED;
+ case 3:
+ return FAILED;
+ case 4:
+ return CANCELLING;
+ case 5:
+ return CANCELLED;
+ default:
+ return null;
+ }
+ }
+
+ public static com.google.protobuf.Internal.EnumLiteMap
+ * The state of the operation.
+ *
+ *
+ * .google.cloud.translation.v3.BatchTranslateDocumentMetadata.State state = 1;
+ *
+ * @return The enum numeric value on the wire for state.
+ */
+ @java.lang.Override
+ public int getStateValue() {
+ return state_;
+ }
+ /**
+ *
+ *
+ *
+ * The state of the operation.
+ *
+ *
+ * .google.cloud.translation.v3.BatchTranslateDocumentMetadata.State state = 1;
+ *
+ * @return The state.
+ */
+ @java.lang.Override
+ public com.google.cloud.translate.v3.BatchTranslateDocumentMetadata.State getState() {
+ @SuppressWarnings("deprecation")
+ com.google.cloud.translate.v3.BatchTranslateDocumentMetadata.State result =
+ com.google.cloud.translate.v3.BatchTranslateDocumentMetadata.State.valueOf(state_);
+ return result == null
+ ? com.google.cloud.translate.v3.BatchTranslateDocumentMetadata.State.UNRECOGNIZED
+ : result;
+ }
+
+ public static final int TOTAL_PAGES_FIELD_NUMBER = 2;
+ private long totalPages_;
+ /**
+ *
+ *
+ *
+ * Total number of pages to translate in all documents so far. Documents
+ * without clear page definition (such as XLSX) are not counted.
+ *
+ *
+ * int64 total_pages = 2;
+ *
+ * @return The totalPages.
+ */
+ @java.lang.Override
+ public long getTotalPages() {
+ return totalPages_;
+ }
+
+ public static final int TRANSLATED_PAGES_FIELD_NUMBER = 3;
+ private long translatedPages_;
+ /**
+ *
+ *
+ *
+ * Number of successfully translated pages in all documents so far. Documents
+ * without clear page definition (such as XLSX) are not counted.
+ *
+ *
+ * int64 translated_pages = 3;
+ *
+ * @return The translatedPages.
+ */
+ @java.lang.Override
+ public long getTranslatedPages() {
+ return translatedPages_;
+ }
+
+ public static final int FAILED_PAGES_FIELD_NUMBER = 4;
+ private long failedPages_;
+ /**
+ *
+ *
+ *
+ * Number of pages that failed to process in all documents so far. Documents
+ * without clear page definition (such as XLSX) are not counted.
+ *
+ *
+ * int64 failed_pages = 4;
+ *
+ * @return The failedPages.
+ */
+ @java.lang.Override
+ public long getFailedPages() {
+ return failedPages_;
+ }
+
+ public static final int TOTAL_BILLABLE_PAGES_FIELD_NUMBER = 5;
+ private long totalBillablePages_;
+ /**
+ *
+ *
+ *
+ * Number of billable pages in documents with clear page definition (such as
+ * PDF, DOCX, PPTX) so far.
+ *
+ *
+ * int64 total_billable_pages = 5;
+ *
+ * @return The totalBillablePages.
+ */
+ @java.lang.Override
+ public long getTotalBillablePages() {
+ return totalBillablePages_;
+ }
+
+ public static final int TOTAL_CHARACTERS_FIELD_NUMBER = 6;
+ private long totalCharacters_;
+ /**
+ *
+ *
+ *
+ * Total number of characters (Unicode codepoints) in all documents so far.
+ *
+ *
+ * int64 total_characters = 6;
+ *
+ * @return The totalCharacters.
+ */
+ @java.lang.Override
+ public long getTotalCharacters() {
+ return totalCharacters_;
+ }
+
+ public static final int TRANSLATED_CHARACTERS_FIELD_NUMBER = 7;
+ private long translatedCharacters_;
+ /**
+ *
+ *
+ *
+ * Number of successfully translated characters (Unicode codepoints) in all
+ * documents so far.
+ *
+ *
+ * int64 translated_characters = 7;
+ *
+ * @return The translatedCharacters.
+ */
+ @java.lang.Override
+ public long getTranslatedCharacters() {
+ return translatedCharacters_;
+ }
+
+ public static final int FAILED_CHARACTERS_FIELD_NUMBER = 8;
+ private long failedCharacters_;
+ /**
+ *
+ *
+ *
+ * Number of characters that have failed to process (Unicode codepoints) in
+ * all documents so far.
+ *
+ *
+ * int64 failed_characters = 8;
+ *
+ * @return The failedCharacters.
+ */
+ @java.lang.Override
+ public long getFailedCharacters() {
+ return failedCharacters_;
+ }
+
+ public static final int TOTAL_BILLABLE_CHARACTERS_FIELD_NUMBER = 9;
+ private long totalBillableCharacters_;
+ /**
+ *
+ *
+ *
+ * Number of billable characters (Unicode codepoints) in documents without
+ * clear page definition (such as XLSX) so far.
+ *
+ *
+ * int64 total_billable_characters = 9;
+ *
+ * @return The totalBillableCharacters.
+ */
+ @java.lang.Override
+ public long getTotalBillableCharacters() {
+ return totalBillableCharacters_;
+ }
+
+ public static final int SUBMIT_TIME_FIELD_NUMBER = 10;
+ private com.google.protobuf.Timestamp submitTime_;
+ /**
+ *
+ *
+ *
+ * Time when the operation was submitted.
+ *
+ *
+ * .google.protobuf.Timestamp submit_time = 10;
+ *
+ * @return Whether the submitTime field is set.
+ */
+ @java.lang.Override
+ public boolean hasSubmitTime() {
+ return submitTime_ != null;
+ }
+ /**
+ *
+ *
+ *
+ * Time when the operation was submitted.
+ *
+ *
+ * .google.protobuf.Timestamp submit_time = 10;
+ *
+ * @return The submitTime.
+ */
+ @java.lang.Override
+ public com.google.protobuf.Timestamp getSubmitTime() {
+ return submitTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : submitTime_;
+ }
+ /**
+ *
+ *
+ *
+ * Time when the operation was submitted.
+ *
+ *
+ * .google.protobuf.Timestamp submit_time = 10;
+ */
+ @java.lang.Override
+ public com.google.protobuf.TimestampOrBuilder getSubmitTimeOrBuilder() {
+ return getSubmitTime();
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (state_
+ != com.google.cloud.translate.v3.BatchTranslateDocumentMetadata.State.STATE_UNSPECIFIED
+ .getNumber()) {
+ output.writeEnum(1, state_);
+ }
+ if (totalPages_ != 0L) {
+ output.writeInt64(2, totalPages_);
+ }
+ if (translatedPages_ != 0L) {
+ output.writeInt64(3, translatedPages_);
+ }
+ if (failedPages_ != 0L) {
+ output.writeInt64(4, failedPages_);
+ }
+ if (totalBillablePages_ != 0L) {
+ output.writeInt64(5, totalBillablePages_);
+ }
+ if (totalCharacters_ != 0L) {
+ output.writeInt64(6, totalCharacters_);
+ }
+ if (translatedCharacters_ != 0L) {
+ output.writeInt64(7, translatedCharacters_);
+ }
+ if (failedCharacters_ != 0L) {
+ output.writeInt64(8, failedCharacters_);
+ }
+ if (totalBillableCharacters_ != 0L) {
+ output.writeInt64(9, totalBillableCharacters_);
+ }
+ if (submitTime_ != null) {
+ output.writeMessage(10, getSubmitTime());
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (state_
+ != com.google.cloud.translate.v3.BatchTranslateDocumentMetadata.State.STATE_UNSPECIFIED
+ .getNumber()) {
+ size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, state_);
+ }
+ if (totalPages_ != 0L) {
+ size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, totalPages_);
+ }
+ if (translatedPages_ != 0L) {
+ size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, translatedPages_);
+ }
+ if (failedPages_ != 0L) {
+ size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, failedPages_);
+ }
+ if (totalBillablePages_ != 0L) {
+ size += com.google.protobuf.CodedOutputStream.computeInt64Size(5, totalBillablePages_);
+ }
+ if (totalCharacters_ != 0L) {
+ size += com.google.protobuf.CodedOutputStream.computeInt64Size(6, totalCharacters_);
+ }
+ if (translatedCharacters_ != 0L) {
+ size += com.google.protobuf.CodedOutputStream.computeInt64Size(7, translatedCharacters_);
+ }
+ if (failedCharacters_ != 0L) {
+ size += com.google.protobuf.CodedOutputStream.computeInt64Size(8, failedCharacters_);
+ }
+ if (totalBillableCharacters_ != 0L) {
+ size += com.google.protobuf.CodedOutputStream.computeInt64Size(9, totalBillableCharacters_);
+ }
+ if (submitTime_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getSubmitTime());
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.translate.v3.BatchTranslateDocumentMetadata)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.translate.v3.BatchTranslateDocumentMetadata other =
+ (com.google.cloud.translate.v3.BatchTranslateDocumentMetadata) obj;
+
+ if (state_ != other.state_) return false;
+ if (getTotalPages() != other.getTotalPages()) return false;
+ if (getTranslatedPages() != other.getTranslatedPages()) return false;
+ if (getFailedPages() != other.getFailedPages()) return false;
+ if (getTotalBillablePages() != other.getTotalBillablePages()) return false;
+ if (getTotalCharacters() != other.getTotalCharacters()) return false;
+ if (getTranslatedCharacters() != other.getTranslatedCharacters()) return false;
+ if (getFailedCharacters() != other.getFailedCharacters()) return false;
+ if (getTotalBillableCharacters() != other.getTotalBillableCharacters()) return false;
+ if (hasSubmitTime() != other.hasSubmitTime()) return false;
+ if (hasSubmitTime()) {
+ if (!getSubmitTime().equals(other.getSubmitTime())) return false;
+ }
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + STATE_FIELD_NUMBER;
+ hash = (53 * hash) + state_;
+ hash = (37 * hash) + TOTAL_PAGES_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTotalPages());
+ hash = (37 * hash) + TRANSLATED_PAGES_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTranslatedPages());
+ hash = (37 * hash) + FAILED_PAGES_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getFailedPages());
+ hash = (37 * hash) + TOTAL_BILLABLE_PAGES_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTotalBillablePages());
+ hash = (37 * hash) + TOTAL_CHARACTERS_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTotalCharacters());
+ hash = (37 * hash) + TRANSLATED_CHARACTERS_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTranslatedCharacters());
+ hash = (37 * hash) + FAILED_CHARACTERS_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getFailedCharacters());
+ hash = (37 * hash) + TOTAL_BILLABLE_CHARACTERS_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTotalBillableCharacters());
+ if (hasSubmitTime()) {
+ hash = (37 * hash) + SUBMIT_TIME_FIELD_NUMBER;
+ hash = (53 * hash) + getSubmitTime().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.translate.v3.BatchTranslateDocumentMetadata parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3.BatchTranslateDocumentMetadata parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3.BatchTranslateDocumentMetadata parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3.BatchTranslateDocumentMetadata parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3.BatchTranslateDocumentMetadata parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3.BatchTranslateDocumentMetadata parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3.BatchTranslateDocumentMetadata parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3.BatchTranslateDocumentMetadata parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3.BatchTranslateDocumentMetadata parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3.BatchTranslateDocumentMetadata parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3.BatchTranslateDocumentMetadata parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3.BatchTranslateDocumentMetadata parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(
+ com.google.cloud.translate.v3.BatchTranslateDocumentMetadata prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ *
+ * State metadata for the batch translation operation.
+ *
+ *
+ * Protobuf type {@code google.cloud.translation.v3.BatchTranslateDocumentMetadata}
+ */
+ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * The state of the operation.
+ *
+ *
+ * .google.cloud.translation.v3.BatchTranslateDocumentMetadata.State state = 1;
+ *
+ * @return The enum numeric value on the wire for state.
+ */
+ @java.lang.Override
+ public int getStateValue() {
+ return state_;
+ }
+ /**
+ *
+ *
+ *
+ * The state of the operation.
+ *
+ *
+ * .google.cloud.translation.v3.BatchTranslateDocumentMetadata.State state = 1;
+ *
+ * @param value The enum numeric value on the wire for state to set.
+ * @return This builder for chaining.
+ */
+ public Builder setStateValue(int value) {
+
+ state_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The state of the operation.
+ *
+ *
+ * .google.cloud.translation.v3.BatchTranslateDocumentMetadata.State state = 1;
+ *
+ * @return The state.
+ */
+ @java.lang.Override
+ public com.google.cloud.translate.v3.BatchTranslateDocumentMetadata.State getState() {
+ @SuppressWarnings("deprecation")
+ com.google.cloud.translate.v3.BatchTranslateDocumentMetadata.State result =
+ com.google.cloud.translate.v3.BatchTranslateDocumentMetadata.State.valueOf(state_);
+ return result == null
+ ? com.google.cloud.translate.v3.BatchTranslateDocumentMetadata.State.UNRECOGNIZED
+ : result;
+ }
+ /**
+ *
+ *
+ *
+ * The state of the operation.
+ *
+ *
+ * .google.cloud.translation.v3.BatchTranslateDocumentMetadata.State state = 1;
+ *
+ * @param value The state to set.
+ * @return This builder for chaining.
+ */
+ public Builder setState(
+ com.google.cloud.translate.v3.BatchTranslateDocumentMetadata.State value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ state_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The state of the operation.
+ *
+ *
+ * .google.cloud.translation.v3.BatchTranslateDocumentMetadata.State state = 1;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearState() {
+
+ state_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private long totalPages_;
+ /**
+ *
+ *
+ *
+ * Total number of pages to translate in all documents so far. Documents
+ * without clear page definition (such as XLSX) are not counted.
+ *
+ *
+ * int64 total_pages = 2;
+ *
+ * @return The totalPages.
+ */
+ @java.lang.Override
+ public long getTotalPages() {
+ return totalPages_;
+ }
+ /**
+ *
+ *
+ *
+ * Total number of pages to translate in all documents so far. Documents
+ * without clear page definition (such as XLSX) are not counted.
+ *
+ *
+ * int64 total_pages = 2;
+ *
+ * @param value The totalPages to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTotalPages(long value) {
+
+ totalPages_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Total number of pages to translate in all documents so far. Documents
+ * without clear page definition (such as XLSX) are not counted.
+ *
+ *
+ * int64 total_pages = 2;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearTotalPages() {
+
+ totalPages_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ private long translatedPages_;
+ /**
+ *
+ *
+ *
+ * Number of successfully translated pages in all documents so far. Documents
+ * without clear page definition (such as XLSX) are not counted.
+ *
+ *
+ * int64 translated_pages = 3;
+ *
+ * @return The translatedPages.
+ */
+ @java.lang.Override
+ public long getTranslatedPages() {
+ return translatedPages_;
+ }
+ /**
+ *
+ *
+ *
+ * Number of successfully translated pages in all documents so far. Documents
+ * without clear page definition (such as XLSX) are not counted.
+ *
+ *
+ * int64 translated_pages = 3;
+ *
+ * @param value The translatedPages to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTranslatedPages(long value) {
+
+ translatedPages_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Number of successfully translated pages in all documents so far. Documents
+ * without clear page definition (such as XLSX) are not counted.
+ *
+ *
+ * int64 translated_pages = 3;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearTranslatedPages() {
+
+ translatedPages_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ private long failedPages_;
+ /**
+ *
+ *
+ *
+ * Number of pages that failed to process in all documents so far. Documents
+ * without clear page definition (such as XLSX) are not counted.
+ *
+ *
+ * int64 failed_pages = 4;
+ *
+ * @return The failedPages.
+ */
+ @java.lang.Override
+ public long getFailedPages() {
+ return failedPages_;
+ }
+ /**
+ *
+ *
+ *
+ * Number of pages that failed to process in all documents so far. Documents
+ * without clear page definition (such as XLSX) are not counted.
+ *
+ *
+ * int64 failed_pages = 4;
+ *
+ * @param value The failedPages to set.
+ * @return This builder for chaining.
+ */
+ public Builder setFailedPages(long value) {
+
+ failedPages_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Number of pages that failed to process in all documents so far. Documents
+ * without clear page definition (such as XLSX) are not counted.
+ *
+ *
+ * int64 failed_pages = 4;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearFailedPages() {
+
+ failedPages_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ private long totalBillablePages_;
+ /**
+ *
+ *
+ *
+ * Number of billable pages in documents with clear page definition (such as
+ * PDF, DOCX, PPTX) so far.
+ *
+ *
+ * int64 total_billable_pages = 5;
+ *
+ * @return The totalBillablePages.
+ */
+ @java.lang.Override
+ public long getTotalBillablePages() {
+ return totalBillablePages_;
+ }
+ /**
+ *
+ *
+ *
+ * Number of billable pages in documents with clear page definition (such as
+ * PDF, DOCX, PPTX) so far.
+ *
+ *
+ * int64 total_billable_pages = 5;
+ *
+ * @param value The totalBillablePages to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTotalBillablePages(long value) {
+
+ totalBillablePages_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Number of billable pages in documents with clear page definition (such as
+ * PDF, DOCX, PPTX) so far.
+ *
+ *
+ * int64 total_billable_pages = 5;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearTotalBillablePages() {
+
+ totalBillablePages_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ private long totalCharacters_;
+ /**
+ *
+ *
+ *
+ * Total number of characters (Unicode codepoints) in all documents so far.
+ *
+ *
+ * int64 total_characters = 6;
+ *
+ * @return The totalCharacters.
+ */
+ @java.lang.Override
+ public long getTotalCharacters() {
+ return totalCharacters_;
+ }
+ /**
+ *
+ *
+ *
+ * Total number of characters (Unicode codepoints) in all documents so far.
+ *
+ *
+ * int64 total_characters = 6;
+ *
+ * @param value The totalCharacters to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTotalCharacters(long value) {
+
+ totalCharacters_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Total number of characters (Unicode codepoints) in all documents so far.
+ *
+ *
+ * int64 total_characters = 6;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearTotalCharacters() {
+
+ totalCharacters_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ private long translatedCharacters_;
+ /**
+ *
+ *
+ *
+ * Number of successfully translated characters (Unicode codepoints) in all
+ * documents so far.
+ *
+ *
+ * int64 translated_characters = 7;
+ *
+ * @return The translatedCharacters.
+ */
+ @java.lang.Override
+ public long getTranslatedCharacters() {
+ return translatedCharacters_;
+ }
+ /**
+ *
+ *
+ *
+ * Number of successfully translated characters (Unicode codepoints) in all
+ * documents so far.
+ *
+ *
+ * int64 translated_characters = 7;
+ *
+ * @param value The translatedCharacters to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTranslatedCharacters(long value) {
+
+ translatedCharacters_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Number of successfully translated characters (Unicode codepoints) in all
+ * documents so far.
+ *
+ *
+ * int64 translated_characters = 7;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearTranslatedCharacters() {
+
+ translatedCharacters_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ private long failedCharacters_;
+ /**
+ *
+ *
+ *
+ * Number of characters that have failed to process (Unicode codepoints) in
+ * all documents so far.
+ *
+ *
+ * int64 failed_characters = 8;
+ *
+ * @return The failedCharacters.
+ */
+ @java.lang.Override
+ public long getFailedCharacters() {
+ return failedCharacters_;
+ }
+ /**
+ *
+ *
+ *
+ * Number of characters that have failed to process (Unicode codepoints) in
+ * all documents so far.
+ *
+ *
+ * int64 failed_characters = 8;
+ *
+ * @param value The failedCharacters to set.
+ * @return This builder for chaining.
+ */
+ public Builder setFailedCharacters(long value) {
+
+ failedCharacters_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Number of characters that have failed to process (Unicode codepoints) in
+ * all documents so far.
+ *
+ *
+ * int64 failed_characters = 8;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearFailedCharacters() {
+
+ failedCharacters_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ private long totalBillableCharacters_;
+ /**
+ *
+ *
+ *
+ * Number of billable characters (Unicode codepoints) in documents without
+ * clear page definition (such as XLSX) so far.
+ *
+ *
+ * int64 total_billable_characters = 9;
+ *
+ * @return The totalBillableCharacters.
+ */
+ @java.lang.Override
+ public long getTotalBillableCharacters() {
+ return totalBillableCharacters_;
+ }
+ /**
+ *
+ *
+ *
+ * Number of billable characters (Unicode codepoints) in documents without
+ * clear page definition (such as XLSX) so far.
+ *
+ *
+ * int64 total_billable_characters = 9;
+ *
+ * @param value The totalBillableCharacters to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTotalBillableCharacters(long value) {
+
+ totalBillableCharacters_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Number of billable characters (Unicode codepoints) in documents without
+ * clear page definition (such as XLSX) so far.
+ *
+ *
+ * int64 total_billable_characters = 9;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearTotalBillableCharacters() {
+
+ totalBillableCharacters_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.Timestamp submitTime_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ submitTimeBuilder_;
+ /**
+ *
+ *
+ *
+ * Time when the operation was submitted.
+ *
+ *
+ * .google.protobuf.Timestamp submit_time = 10;
+ *
+ * @return Whether the submitTime field is set.
+ */
+ public boolean hasSubmitTime() {
+ return submitTimeBuilder_ != null || submitTime_ != null;
+ }
+ /**
+ *
+ *
+ *
+ * Time when the operation was submitted.
+ *
+ *
+ * .google.protobuf.Timestamp submit_time = 10;
+ *
+ * @return The submitTime.
+ */
+ public com.google.protobuf.Timestamp getSubmitTime() {
+ if (submitTimeBuilder_ == null) {
+ return submitTime_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : submitTime_;
+ } else {
+ return submitTimeBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Time when the operation was submitted.
+ *
+ *
+ * .google.protobuf.Timestamp submit_time = 10;
+ */
+ public Builder setSubmitTime(com.google.protobuf.Timestamp value) {
+ if (submitTimeBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ submitTime_ = value;
+ onChanged();
+ } else {
+ submitTimeBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Time when the operation was submitted.
+ *
+ *
+ * .google.protobuf.Timestamp submit_time = 10;
+ */
+ public Builder setSubmitTime(com.google.protobuf.Timestamp.Builder builderForValue) {
+ if (submitTimeBuilder_ == null) {
+ submitTime_ = builderForValue.build();
+ onChanged();
+ } else {
+ submitTimeBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Time when the operation was submitted.
+ *
+ *
+ * .google.protobuf.Timestamp submit_time = 10;
+ */
+ public Builder mergeSubmitTime(com.google.protobuf.Timestamp value) {
+ if (submitTimeBuilder_ == null) {
+ if (submitTime_ != null) {
+ submitTime_ =
+ com.google.protobuf.Timestamp.newBuilder(submitTime_).mergeFrom(value).buildPartial();
+ } else {
+ submitTime_ = value;
+ }
+ onChanged();
+ } else {
+ submitTimeBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Time when the operation was submitted.
+ *
+ *
+ * .google.protobuf.Timestamp submit_time = 10;
+ */
+ public Builder clearSubmitTime() {
+ if (submitTimeBuilder_ == null) {
+ submitTime_ = null;
+ onChanged();
+ } else {
+ submitTime_ = null;
+ submitTimeBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Time when the operation was submitted.
+ *
+ *
+ * .google.protobuf.Timestamp submit_time = 10;
+ */
+ public com.google.protobuf.Timestamp.Builder getSubmitTimeBuilder() {
+
+ onChanged();
+ return getSubmitTimeFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ *
+ * Time when the operation was submitted.
+ *
+ *
+ * .google.protobuf.Timestamp submit_time = 10;
+ */
+ public com.google.protobuf.TimestampOrBuilder getSubmitTimeOrBuilder() {
+ if (submitTimeBuilder_ != null) {
+ return submitTimeBuilder_.getMessageOrBuilder();
+ } else {
+ return submitTime_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : submitTime_;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Time when the operation was submitted.
+ *
+ *
+ * .google.protobuf.Timestamp submit_time = 10;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ getSubmitTimeFieldBuilder() {
+ if (submitTimeBuilder_ == null) {
+ submitTimeBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>(
+ getSubmitTime(), getParentForChildren(), isClean());
+ submitTime_ = null;
+ }
+ return submitTimeBuilder_;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.translation.v3.BatchTranslateDocumentMetadata)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.translation.v3.BatchTranslateDocumentMetadata)
+ private static final com.google.cloud.translate.v3.BatchTranslateDocumentMetadata
+ DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.translate.v3.BatchTranslateDocumentMetadata();
+ }
+
+ public static com.google.cloud.translate.v3.BatchTranslateDocumentMetadata getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ * The state of the operation.
+ *
+ *
+ * .google.cloud.translation.v3.BatchTranslateDocumentMetadata.State state = 1;
+ *
+ * @return The enum numeric value on the wire for state.
+ */
+ int getStateValue();
+ /**
+ *
+ *
+ *
+ * The state of the operation.
+ *
+ *
+ * .google.cloud.translation.v3.BatchTranslateDocumentMetadata.State state = 1;
+ *
+ * @return The state.
+ */
+ com.google.cloud.translate.v3.BatchTranslateDocumentMetadata.State getState();
+
+ /**
+ *
+ *
+ *
+ * Total number of pages to translate in all documents so far. Documents
+ * without clear page definition (such as XLSX) are not counted.
+ *
+ *
+ * int64 total_pages = 2;
+ *
+ * @return The totalPages.
+ */
+ long getTotalPages();
+
+ /**
+ *
+ *
+ *
+ * Number of successfully translated pages in all documents so far. Documents
+ * without clear page definition (such as XLSX) are not counted.
+ *
+ *
+ * int64 translated_pages = 3;
+ *
+ * @return The translatedPages.
+ */
+ long getTranslatedPages();
+
+ /**
+ *
+ *
+ *
+ * Number of pages that failed to process in all documents so far. Documents
+ * without clear page definition (such as XLSX) are not counted.
+ *
+ *
+ * int64 failed_pages = 4;
+ *
+ * @return The failedPages.
+ */
+ long getFailedPages();
+
+ /**
+ *
+ *
+ *
+ * Number of billable pages in documents with clear page definition (such as
+ * PDF, DOCX, PPTX) so far.
+ *
+ *
+ * int64 total_billable_pages = 5;
+ *
+ * @return The totalBillablePages.
+ */
+ long getTotalBillablePages();
+
+ /**
+ *
+ *
+ *
+ * Total number of characters (Unicode codepoints) in all documents so far.
+ *
+ *
+ * int64 total_characters = 6;
+ *
+ * @return The totalCharacters.
+ */
+ long getTotalCharacters();
+
+ /**
+ *
+ *
+ *
+ * Number of successfully translated characters (Unicode codepoints) in all
+ * documents so far.
+ *
+ *
+ * int64 translated_characters = 7;
+ *
+ * @return The translatedCharacters.
+ */
+ long getTranslatedCharacters();
+
+ /**
+ *
+ *
+ *
+ * Number of characters that have failed to process (Unicode codepoints) in
+ * all documents so far.
+ *
+ *
+ * int64 failed_characters = 8;
+ *
+ * @return The failedCharacters.
+ */
+ long getFailedCharacters();
+
+ /**
+ *
+ *
+ *
+ * Number of billable characters (Unicode codepoints) in documents without
+ * clear page definition (such as XLSX) so far.
+ *
+ *
+ * int64 total_billable_characters = 9;
+ *
+ * @return The totalBillableCharacters.
+ */
+ long getTotalBillableCharacters();
+
+ /**
+ *
+ *
+ *
+ * Time when the operation was submitted.
+ *
+ *
+ * .google.protobuf.Timestamp submit_time = 10;
+ *
+ * @return Whether the submitTime field is set.
+ */
+ boolean hasSubmitTime();
+ /**
+ *
+ *
+ *
+ * Time when the operation was submitted.
+ *
+ *
+ * .google.protobuf.Timestamp submit_time = 10;
+ *
+ * @return The submitTime.
+ */
+ com.google.protobuf.Timestamp getSubmitTime();
+ /**
+ *
+ *
+ *
+ * Time when the operation was submitted.
+ *
+ *
+ * .google.protobuf.Timestamp submit_time = 10;
+ */
+ com.google.protobuf.TimestampOrBuilder getSubmitTimeOrBuilder();
+}
diff --git a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/BatchTranslateDocumentRequest.java b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/BatchTranslateDocumentRequest.java
new file mode 100644
index 00000000..3b92ddf5
--- /dev/null
+++ b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/BatchTranslateDocumentRequest.java
@@ -0,0 +1,3325 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/translate/v3/translation_service.proto
+
+package com.google.cloud.translate.v3;
+
+/**
+ *
+ *
+ *
+ * The BatchTranslateDocument request.
+ *
+ *
+ * Protobuf type {@code google.cloud.translation.v3.BatchTranslateDocumentRequest}
+ */
+public final class BatchTranslateDocumentRequest extends com.google.protobuf.GeneratedMessageV3
+ implements
+ // @@protoc_insertion_point(message_implements:google.cloud.translation.v3.BatchTranslateDocumentRequest)
+ BatchTranslateDocumentRequestOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use BatchTranslateDocumentRequest.newBuilder() to construct.
+ private BatchTranslateDocumentRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+
+ private BatchTranslateDocumentRequest() {
+ parent_ = "";
+ sourceLanguageCode_ = "";
+ targetLanguageCodes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+ inputConfigs_ = java.util.Collections.emptyList();
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
+ return new BatchTranslateDocumentRequest();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
+ return this.unknownFields;
+ }
+
+ private BatchTranslateDocumentRequest(
+ 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();
+
+ sourceLanguageCode_ = s;
+ break;
+ }
+ case 26:
+ {
+ java.lang.String s = input.readStringRequireUtf8();
+ if (!((mutable_bitField0_ & 0x00000001) != 0)) {
+ targetLanguageCodes_ = new com.google.protobuf.LazyStringArrayList();
+ mutable_bitField0_ |= 0x00000001;
+ }
+ targetLanguageCodes_.add(s);
+ break;
+ }
+ case 34:
+ {
+ if (!((mutable_bitField0_ & 0x00000002) != 0)) {
+ inputConfigs_ =
+ new java.util.ArrayList<
+ com.google.cloud.translate.v3.BatchDocumentInputConfig>();
+ mutable_bitField0_ |= 0x00000002;
+ }
+ inputConfigs_.add(
+ input.readMessage(
+ com.google.cloud.translate.v3.BatchDocumentInputConfig.parser(),
+ extensionRegistry));
+ break;
+ }
+ case 42:
+ {
+ com.google.cloud.translate.v3.BatchDocumentOutputConfig.Builder subBuilder = null;
+ if (outputConfig_ != null) {
+ subBuilder = outputConfig_.toBuilder();
+ }
+ outputConfig_ =
+ input.readMessage(
+ com.google.cloud.translate.v3.BatchDocumentOutputConfig.parser(),
+ extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(outputConfig_);
+ outputConfig_ = subBuilder.buildPartial();
+ }
+
+ break;
+ }
+ case 50:
+ {
+ if (!((mutable_bitField0_ & 0x00000004) != 0)) {
+ models_ =
+ com.google.protobuf.MapField.newMapField(ModelsDefaultEntryHolder.defaultEntry);
+ mutable_bitField0_ |= 0x00000004;
+ }
+ com.google.protobuf.MapEntry
+ * Required. Location to make a regional call.
+ * Format: `projects/{project-number-or-id}/locations/{location-id}`.
+ * The `global` location is not supported for batch translation.
+ * Only AutoML Translation models or glossaries within the same region (have
+ * the same location-id) can be used, otherwise an INVALID_ARGUMENT (400)
+ * error is returned.
+ *
+ *
+ *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The parent.
+ */
+ @java.lang.Override
+ public java.lang.String getParent() {
+ java.lang.Object ref = parent_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ parent_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Required. Location to make a regional call.
+ * Format: `projects/{project-number-or-id}/locations/{location-id}`.
+ * The `global` location is not supported for batch translation.
+ * Only AutoML Translation models or glossaries within the same region (have
+ * the same location-id) can be used, otherwise an INVALID_ARGUMENT (400)
+ * error is returned.
+ *
+ *
+ *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The bytes for parent.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getParentBytes() {
+ java.lang.Object ref = parent_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ parent_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int SOURCE_LANGUAGE_CODE_FIELD_NUMBER = 2;
+ private volatile java.lang.Object sourceLanguageCode_;
+ /**
+ *
+ *
+ *
+ * Required. The BCP-47 language code of the input document if known, for
+ * example, "en-US" or "sr-Latn". Supported language codes are listed in
+ * Language Support (https://cloud.google.com/translate/docs/languages).
+ *
+ *
+ * string source_language_code = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The sourceLanguageCode.
+ */
+ @java.lang.Override
+ public java.lang.String getSourceLanguageCode() {
+ java.lang.Object ref = sourceLanguageCode_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ sourceLanguageCode_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Required. The BCP-47 language code of the input document if known, for
+ * example, "en-US" or "sr-Latn". Supported language codes are listed in
+ * Language Support (https://cloud.google.com/translate/docs/languages).
+ *
+ *
+ * string source_language_code = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The bytes for sourceLanguageCode.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getSourceLanguageCodeBytes() {
+ java.lang.Object ref = sourceLanguageCode_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ sourceLanguageCode_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int TARGET_LANGUAGE_CODES_FIELD_NUMBER = 3;
+ private com.google.protobuf.LazyStringList targetLanguageCodes_;
+ /**
+ *
+ *
+ *
+ * Required. The BCP-47 language code to use for translation of the input
+ * document. Specify up to 10 language codes here.
+ *
+ *
+ * repeated string target_language_codes = 3 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return A list containing the targetLanguageCodes.
+ */
+ public com.google.protobuf.ProtocolStringList getTargetLanguageCodesList() {
+ return targetLanguageCodes_;
+ }
+ /**
+ *
+ *
+ *
+ * Required. The BCP-47 language code to use for translation of the input
+ * document. Specify up to 10 language codes here.
+ *
+ *
+ * repeated string target_language_codes = 3 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return The count of targetLanguageCodes.
+ */
+ public int getTargetLanguageCodesCount() {
+ return targetLanguageCodes_.size();
+ }
+ /**
+ *
+ *
+ *
+ * Required. The BCP-47 language code to use for translation of the input
+ * document. Specify up to 10 language codes here.
+ *
+ *
+ * repeated string target_language_codes = 3 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @param index The index of the element to return.
+ * @return The targetLanguageCodes at the given index.
+ */
+ public java.lang.String getTargetLanguageCodes(int index) {
+ return targetLanguageCodes_.get(index);
+ }
+ /**
+ *
+ *
+ *
+ * Required. The BCP-47 language code to use for translation of the input
+ * document. Specify up to 10 language codes here.
+ *
+ *
+ * repeated string target_language_codes = 3 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @param index The index of the value to return.
+ * @return The bytes of the targetLanguageCodes at the given index.
+ */
+ public com.google.protobuf.ByteString getTargetLanguageCodesBytes(int index) {
+ return targetLanguageCodes_.getByteString(index);
+ }
+
+ public static final int INPUT_CONFIGS_FIELD_NUMBER = 4;
+ private java.util.List
+ * Required. Input configurations.
+ * The total number of files matched should be <= 100.
+ * The total content size to translate should be <= 100M Unicode codepoints.
+ * The files must use UTF-8 encoding.
+ *
+ *
+ *
+ * repeated .google.cloud.translation.v3.BatchDocumentInputConfig input_configs = 4 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ @java.lang.Override
+ public java.util.List
+ * Required. Input configurations.
+ * The total number of files matched should be <= 100.
+ * The total content size to translate should be <= 100M Unicode codepoints.
+ * The files must use UTF-8 encoding.
+ *
+ *
+ *
+ * repeated .google.cloud.translation.v3.BatchDocumentInputConfig input_configs = 4 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ @java.lang.Override
+ public java.util.List extends com.google.cloud.translate.v3.BatchDocumentInputConfigOrBuilder>
+ getInputConfigsOrBuilderList() {
+ return inputConfigs_;
+ }
+ /**
+ *
+ *
+ *
+ * Required. Input configurations.
+ * The total number of files matched should be <= 100.
+ * The total content size to translate should be <= 100M Unicode codepoints.
+ * The files must use UTF-8 encoding.
+ *
+ *
+ *
+ * repeated .google.cloud.translation.v3.BatchDocumentInputConfig input_configs = 4 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ @java.lang.Override
+ public int getInputConfigsCount() {
+ return inputConfigs_.size();
+ }
+ /**
+ *
+ *
+ *
+ * Required. Input configurations.
+ * The total number of files matched should be <= 100.
+ * The total content size to translate should be <= 100M Unicode codepoints.
+ * The files must use UTF-8 encoding.
+ *
+ *
+ *
+ * repeated .google.cloud.translation.v3.BatchDocumentInputConfig input_configs = 4 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ @java.lang.Override
+ public com.google.cloud.translate.v3.BatchDocumentInputConfig getInputConfigs(int index) {
+ return inputConfigs_.get(index);
+ }
+ /**
+ *
+ *
+ *
+ * Required. Input configurations.
+ * The total number of files matched should be <= 100.
+ * The total content size to translate should be <= 100M Unicode codepoints.
+ * The files must use UTF-8 encoding.
+ *
+ *
+ *
+ * repeated .google.cloud.translation.v3.BatchDocumentInputConfig input_configs = 4 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ @java.lang.Override
+ public com.google.cloud.translate.v3.BatchDocumentInputConfigOrBuilder getInputConfigsOrBuilder(
+ int index) {
+ return inputConfigs_.get(index);
+ }
+
+ public static final int OUTPUT_CONFIG_FIELD_NUMBER = 5;
+ private com.google.cloud.translate.v3.BatchDocumentOutputConfig outputConfig_;
+ /**
+ *
+ *
+ *
+ * Required. Output configuration.
+ * If 2 input configs match to the same file (that is, same input path),
+ * we don't generate output for duplicate inputs.
+ *
+ *
+ *
+ * .google.cloud.translation.v3.BatchDocumentOutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return Whether the outputConfig field is set.
+ */
+ @java.lang.Override
+ public boolean hasOutputConfig() {
+ return outputConfig_ != null;
+ }
+ /**
+ *
+ *
+ *
+ * Required. Output configuration.
+ * If 2 input configs match to the same file (that is, same input path),
+ * we don't generate output for duplicate inputs.
+ *
+ *
+ *
+ * .google.cloud.translation.v3.BatchDocumentOutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return The outputConfig.
+ */
+ @java.lang.Override
+ public com.google.cloud.translate.v3.BatchDocumentOutputConfig getOutputConfig() {
+ return outputConfig_ == null
+ ? com.google.cloud.translate.v3.BatchDocumentOutputConfig.getDefaultInstance()
+ : outputConfig_;
+ }
+ /**
+ *
+ *
+ *
+ * Required. Output configuration.
+ * If 2 input configs match to the same file (that is, same input path),
+ * we don't generate output for duplicate inputs.
+ *
+ *
+ *
+ * .google.cloud.translation.v3.BatchDocumentOutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ @java.lang.Override
+ public com.google.cloud.translate.v3.BatchDocumentOutputConfigOrBuilder
+ getOutputConfigOrBuilder() {
+ return getOutputConfig();
+ }
+
+ public static final int MODELS_FIELD_NUMBER = 6;
+
+ private static final class ModelsDefaultEntryHolder {
+ static final com.google.protobuf.MapEntry
+ * Optional. The models to use for translation. Map's key is target language
+ * code. Map's value is the model name. Value can be a built-in general model,
+ * or an AutoML Translation model.
+ * The value format depends on model type:
+ * - AutoML Translation models:
+ * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}`
+ * - General (built-in) models:
+ * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`,
+ * If the map is empty or a specific model is
+ * not requested for a language pair, then default google model (nmt) is used.
+ *
+ *
+ * map<string, string> models = 6 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ @java.lang.Override
+ public boolean containsModels(java.lang.String key) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ return internalGetModels().getMap().containsKey(key);
+ }
+ /** Use {@link #getModelsMap()} instead. */
+ @java.lang.Override
+ @java.lang.Deprecated
+ public java.util.Map