diff --git a/google-api-grpc/grpc-google-cloud-translate-v3beta1/pom.xml b/google-api-grpc/grpc-google-cloud-translate-v3beta1/pom.xml
new file mode 100644
index 000000000000..e2a8251e7a53
--- /dev/null
+++ b/google-api-grpc/grpc-google-cloud-translate-v3beta1/pom.xml
@@ -0,0 +1,31 @@
+
+ * Provides natural language translation operations. + *+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler (version 1.10.0)", + comments = "Source: google/cloud/translate/v3beta1/translation_service.proto") +public final class TranslationServiceGrpc { + + private TranslationServiceGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.translation.v3beta1.TranslationService"; + + // Static method descriptors that strictly reflect the proto. + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getTranslateTextMethod()} instead. + public static final io.grpc.MethodDescriptor< + com.google.cloud.translate.v3beta1.TranslateTextRequest, + com.google.cloud.translate.v3beta1.TranslateTextResponse> + METHOD_TRANSLATE_TEXT = getTranslateTextMethodHelper(); + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.translate.v3beta1.TranslateTextRequest, + com.google.cloud.translate.v3beta1.TranslateTextResponse> + getTranslateTextMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor< + com.google.cloud.translate.v3beta1.TranslateTextRequest, + com.google.cloud.translate.v3beta1.TranslateTextResponse> + getTranslateTextMethod() { + return getTranslateTextMethodHelper(); + } + + private static io.grpc.MethodDescriptor< + com.google.cloud.translate.v3beta1.TranslateTextRequest, + com.google.cloud.translate.v3beta1.TranslateTextResponse> + getTranslateTextMethodHelper() { + io.grpc.MethodDescriptor< + com.google.cloud.translate.v3beta1.TranslateTextRequest, + com.google.cloud.translate.v3beta1.TranslateTextResponse> + getTranslateTextMethod; + if ((getTranslateTextMethod = TranslationServiceGrpc.getTranslateTextMethod) == null) { + synchronized (TranslationServiceGrpc.class) { + if ((getTranslateTextMethod = TranslationServiceGrpc.getTranslateTextMethod) == null) { + TranslationServiceGrpc.getTranslateTextMethod = + getTranslateTextMethod = + io.grpc.MethodDescriptor + .
+ * Provides natural language translation operations. + *+ */ + public abstract static class TranslationServiceImplBase implements io.grpc.BindableService { + + /** + * + * + *
+ * Translates input text and returns translated text. + *+ */ + public void translateText( + com.google.cloud.translate.v3beta1.TranslateTextRequest request, + io.grpc.stub.StreamObserver
+ * Detects the language of text within a request. + *+ */ + public void detectLanguage( + com.google.cloud.translate.v3beta1.DetectLanguageRequest request, + io.grpc.stub.StreamObserver
+ * Returns a list of supported languages for translation. + *+ */ + public void getSupportedLanguages( + com.google.cloud.translate.v3beta1.GetSupportedLanguagesRequest request, + io.grpc.stub.StreamObserver
+ * Translates a large volume of text 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 batchTranslateText( + com.google.cloud.translate.v3beta1.BatchTranslateTextRequest request, + io.grpc.stub.StreamObserver
+ * Creates a glossary and returns the long-running operation. Returns + * NOT_FOUND, if the project doesn't exist. + *+ */ + public void createGlossary( + com.google.cloud.translate.v3beta1.CreateGlossaryRequest request, + io.grpc.stub.StreamObserver
+ * Lists glossaries in a project. Returns NOT_FOUND, if the project doesn't + * exist. + *+ */ + public void listGlossaries( + com.google.cloud.translate.v3beta1.ListGlossariesRequest request, + io.grpc.stub.StreamObserver
+ * Gets a glossary. Returns NOT_FOUND, if the glossary doesn't + * exist. + *+ */ + public void getGlossary( + com.google.cloud.translate.v3beta1.GetGlossaryRequest request, + io.grpc.stub.StreamObserver
+ * Deletes a glossary, or cancels glossary construction + * if the glossary isn't created yet. + * Returns NOT_FOUND, if the glossary doesn't exist. + *+ */ + public void deleteGlossary( + com.google.cloud.translate.v3beta1.DeleteGlossaryRequest request, + io.grpc.stub.StreamObserver
+ * Provides natural language translation operations. + *+ */ + public static final class TranslationServiceStub + extends io.grpc.stub.AbstractStub
+ * Translates input text and returns translated text. + *+ */ + public void translateText( + com.google.cloud.translate.v3beta1.TranslateTextRequest request, + io.grpc.stub.StreamObserver
+ * Detects the language of text within a request. + *+ */ + public void detectLanguage( + com.google.cloud.translate.v3beta1.DetectLanguageRequest request, + io.grpc.stub.StreamObserver
+ * Returns a list of supported languages for translation. + *+ */ + public void getSupportedLanguages( + com.google.cloud.translate.v3beta1.GetSupportedLanguagesRequest request, + io.grpc.stub.StreamObserver
+ * Translates a large volume of text 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 batchTranslateText( + com.google.cloud.translate.v3beta1.BatchTranslateTextRequest request, + io.grpc.stub.StreamObserver
+ * Creates a glossary and returns the long-running operation. Returns + * NOT_FOUND, if the project doesn't exist. + *+ */ + public void createGlossary( + com.google.cloud.translate.v3beta1.CreateGlossaryRequest request, + io.grpc.stub.StreamObserver
+ * Lists glossaries in a project. Returns NOT_FOUND, if the project doesn't + * exist. + *+ */ + public void listGlossaries( + com.google.cloud.translate.v3beta1.ListGlossariesRequest request, + io.grpc.stub.StreamObserver
+ * Gets a glossary. Returns NOT_FOUND, if the glossary doesn't + * exist. + *+ */ + public void getGlossary( + com.google.cloud.translate.v3beta1.GetGlossaryRequest request, + io.grpc.stub.StreamObserver
+ * Deletes a glossary, or cancels glossary construction + * if the glossary isn't created yet. + * Returns NOT_FOUND, if the glossary doesn't exist. + *+ */ + public void deleteGlossary( + com.google.cloud.translate.v3beta1.DeleteGlossaryRequest request, + io.grpc.stub.StreamObserver
+ * Provides natural language translation operations. + *+ */ + public static final class TranslationServiceBlockingStub + extends io.grpc.stub.AbstractStub
+ * Translates input text and returns translated text. + *+ */ + public com.google.cloud.translate.v3beta1.TranslateTextResponse translateText( + com.google.cloud.translate.v3beta1.TranslateTextRequest request) { + return blockingUnaryCall( + getChannel(), getTranslateTextMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+ * Detects the language of text within a request. + *+ */ + public com.google.cloud.translate.v3beta1.DetectLanguageResponse detectLanguage( + com.google.cloud.translate.v3beta1.DetectLanguageRequest request) { + return blockingUnaryCall( + getChannel(), getDetectLanguageMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+ * Returns a list of supported languages for translation. + *+ */ + public com.google.cloud.translate.v3beta1.SupportedLanguages getSupportedLanguages( + com.google.cloud.translate.v3beta1.GetSupportedLanguagesRequest request) { + return blockingUnaryCall( + getChannel(), getGetSupportedLanguagesMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+ * Translates a large volume of text 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 batchTranslateText( + com.google.cloud.translate.v3beta1.BatchTranslateTextRequest request) { + return blockingUnaryCall( + getChannel(), getBatchTranslateTextMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+ * Creates a glossary and returns the long-running operation. Returns + * NOT_FOUND, if the project doesn't exist. + *+ */ + public com.google.longrunning.Operation createGlossary( + com.google.cloud.translate.v3beta1.CreateGlossaryRequest request) { + return blockingUnaryCall( + getChannel(), getCreateGlossaryMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+ * Lists glossaries in a project. Returns NOT_FOUND, if the project doesn't + * exist. + *+ */ + public com.google.cloud.translate.v3beta1.ListGlossariesResponse listGlossaries( + com.google.cloud.translate.v3beta1.ListGlossariesRequest request) { + return blockingUnaryCall( + getChannel(), getListGlossariesMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+ * Gets a glossary. Returns NOT_FOUND, if the glossary doesn't + * exist. + *+ */ + public com.google.cloud.translate.v3beta1.Glossary getGlossary( + com.google.cloud.translate.v3beta1.GetGlossaryRequest request) { + return blockingUnaryCall( + getChannel(), getGetGlossaryMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+ * Deletes a glossary, or cancels glossary construction + * if the glossary isn't created yet. + * Returns NOT_FOUND, if the glossary doesn't exist. + *+ */ + public com.google.longrunning.Operation deleteGlossary( + com.google.cloud.translate.v3beta1.DeleteGlossaryRequest request) { + return blockingUnaryCall( + getChannel(), getDeleteGlossaryMethodHelper(), getCallOptions(), request); + } + } + + /** + * + * + *
+ * Provides natural language translation operations. + *+ */ + public static final class TranslationServiceFutureStub + extends io.grpc.stub.AbstractStub
+ * Translates input text and returns translated text. + *+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.translate.v3beta1.TranslateTextResponse> + translateText(com.google.cloud.translate.v3beta1.TranslateTextRequest request) { + return futureUnaryCall( + getChannel().newCall(getTranslateTextMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+ * Detects the language of text within a request. + *+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.translate.v3beta1.DetectLanguageResponse> + detectLanguage(com.google.cloud.translate.v3beta1.DetectLanguageRequest request) { + return futureUnaryCall( + getChannel().newCall(getDetectLanguageMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+ * Returns a list of supported languages for translation. + *+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.translate.v3beta1.SupportedLanguages> + getSupportedLanguages( + com.google.cloud.translate.v3beta1.GetSupportedLanguagesRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetSupportedLanguagesMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+ * Translates a large volume of text 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
+ * Creates a glossary and returns the long-running operation. Returns + * NOT_FOUND, if the project doesn't exist. + *+ */ + public com.google.common.util.concurrent.ListenableFuture
+ * Lists glossaries in a project. Returns NOT_FOUND, if the project doesn't + * exist. + *+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.translate.v3beta1.ListGlossariesResponse> + listGlossaries(com.google.cloud.translate.v3beta1.ListGlossariesRequest request) { + return futureUnaryCall( + getChannel().newCall(getListGlossariesMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+ * Gets a glossary. Returns NOT_FOUND, if the glossary doesn't + * exist. + *+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.translate.v3beta1.Glossary> + getGlossary(com.google.cloud.translate.v3beta1.GetGlossaryRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetGlossaryMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+ * Deletes a glossary, or cancels glossary construction + * if the glossary isn't created yet. + * Returns NOT_FOUND, if the glossary doesn't exist. + *+ */ + public com.google.common.util.concurrent.ListenableFuture
+ * State metadata for the batch translation operation. + *+ * + * Protobuf type {@code google.cloud.translation.v3beta1.BatchTranslateMetadata} + */ +public final class BatchTranslateMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.translation.v3beta1.BatchTranslateMetadata) + BatchTranslateMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchTranslateMetadata.newBuilder() to construct. + private BatchTranslateMetadata(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private BatchTranslateMetadata() { + state_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BatchTranslateMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + state_ = rawValue; + break; + } + case 16: + { + translatedCharacters_ = input.readInt64(); + break; + } + case 24: + { + failedCharacters_ = input.readInt64(); + break; + } + case 32: + { + totalCharacters_ = input.readInt64(); + break; + } + case 42: + { + 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.v3beta1.TranslationServiceProto + .internal_static_google_cloud_translation_v3beta1_BatchTranslateMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.translate.v3beta1.TranslationServiceProto + .internal_static_google_cloud_translation_v3beta1_BatchTranslateMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.translate.v3beta1.BatchTranslateMetadata.class, + com.google.cloud.translate.v3beta1.BatchTranslateMetadata.Builder.class); + } + + /** + * + * + *
+ * State of the job. + *+ * + * Protobuf enum {@code google.cloud.translation.v3beta1.BatchTranslateMetadata.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 has been successfully + * processed. + *+ * + *
SUCCEEDED = 2;
+ */
+ SUCCEEDED(2),
+ /**
+ *
+ *
+ * + * The batch is done and no item has been 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 has been successfully + * processed. + *+ * + *
SUCCEEDED = 2;
+ */
+ public static final int SUCCEEDED_VALUE = 2;
+ /**
+ *
+ *
+ * + * The batch is done and no item has been 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;
+ }
+
+ /** @deprecated Use {@link #forNumber(int)} instead. */
+ @java.lang.Deprecated
+ public static State valueOf(int value) {
+ return forNumber(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.v3beta1.BatchTranslateMetadata.State state = 1;
+ */
+ public int getStateValue() {
+ return state_;
+ }
+ /**
+ *
+ *
+ * + * The state of the operation. + *+ * + *
.google.cloud.translation.v3beta1.BatchTranslateMetadata.State state = 1;
+ */
+ public com.google.cloud.translate.v3beta1.BatchTranslateMetadata.State getState() {
+ @SuppressWarnings("deprecation")
+ com.google.cloud.translate.v3beta1.BatchTranslateMetadata.State result =
+ com.google.cloud.translate.v3beta1.BatchTranslateMetadata.State.valueOf(state_);
+ return result == null
+ ? com.google.cloud.translate.v3beta1.BatchTranslateMetadata.State.UNRECOGNIZED
+ : result;
+ }
+
+ public static final int TRANSLATED_CHARACTERS_FIELD_NUMBER = 2;
+ private long translatedCharacters_;
+ /**
+ *
+ *
+ * + * Number of successfully translated characters so far (Unicode codepoints). + *+ * + *
int64 translated_characters = 2;
+ */
+ public long getTranslatedCharacters() {
+ return translatedCharacters_;
+ }
+
+ public static final int FAILED_CHARACTERS_FIELD_NUMBER = 3;
+ private long failedCharacters_;
+ /**
+ *
+ *
+ * + * Number of characters that have failed to process so far (Unicode + * codepoints). + *+ * + *
int64 failed_characters = 3;
+ */
+ public long getFailedCharacters() {
+ return failedCharacters_;
+ }
+
+ public static final int TOTAL_CHARACTERS_FIELD_NUMBER = 4;
+ private long totalCharacters_;
+ /**
+ *
+ *
+ * + * Total number of characters (Unicode codepoints). + * This is the total number of codepoints from input files times the number of + * target languages. It appears here shortly after the call is submitted. + *+ * + *
int64 total_characters = 4;
+ */
+ public long getTotalCharacters() {
+ return totalCharacters_;
+ }
+
+ public static final int SUBMIT_TIME_FIELD_NUMBER = 5;
+ private com.google.protobuf.Timestamp submitTime_;
+ /**
+ *
+ *
+ * + * Time when the operation was submitted. + *+ * + *
.google.protobuf.Timestamp submit_time = 5;
+ */
+ public boolean hasSubmitTime() {
+ return submitTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * Time when the operation was submitted. + *+ * + *
.google.protobuf.Timestamp submit_time = 5;
+ */
+ 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 = 5;
+ */
+ 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.v3beta1.BatchTranslateMetadata.State.STATE_UNSPECIFIED
+ .getNumber()) {
+ output.writeEnum(1, state_);
+ }
+ if (translatedCharacters_ != 0L) {
+ output.writeInt64(2, translatedCharacters_);
+ }
+ if (failedCharacters_ != 0L) {
+ output.writeInt64(3, failedCharacters_);
+ }
+ if (totalCharacters_ != 0L) {
+ output.writeInt64(4, totalCharacters_);
+ }
+ if (submitTime_ != null) {
+ output.writeMessage(5, 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.v3beta1.BatchTranslateMetadata.State.STATE_UNSPECIFIED
+ .getNumber()) {
+ size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, state_);
+ }
+ if (translatedCharacters_ != 0L) {
+ size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, translatedCharacters_);
+ }
+ if (failedCharacters_ != 0L) {
+ size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, failedCharacters_);
+ }
+ if (totalCharacters_ != 0L) {
+ size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, totalCharacters_);
+ }
+ if (submitTime_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, 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.v3beta1.BatchTranslateMetadata)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.translate.v3beta1.BatchTranslateMetadata other =
+ (com.google.cloud.translate.v3beta1.BatchTranslateMetadata) obj;
+
+ if (state_ != other.state_) return false;
+ if (getTranslatedCharacters() != other.getTranslatedCharacters()) return false;
+ if (getFailedCharacters() != other.getFailedCharacters()) return false;
+ if (getTotalCharacters() != other.getTotalCharacters()) 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) + 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_CHARACTERS_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTotalCharacters());
+ 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.v3beta1.BatchTranslateMetadata parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchTranslateMetadata parseFrom(
+ 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.v3beta1.BatchTranslateMetadata parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchTranslateMetadata parseFrom(
+ com.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.v3beta1.BatchTranslateMetadata parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchTranslateMetadata parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchTranslateMetadata parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchTranslateMetadata parseFrom(
+ java.io.InputStream 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.v3beta1.BatchTranslateMetadata parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchTranslateMetadata parseDelimitedFrom(
+ java.io.InputStream 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.v3beta1.BatchTranslateMetadata parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchTranslateMetadata parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, 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.v3beta1.BatchTranslateMetadata prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new 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.v3beta1.BatchTranslateMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * The state of the operation. + *+ * + *
.google.cloud.translation.v3beta1.BatchTranslateMetadata.State state = 1;
+ */
+ public int getStateValue() {
+ return state_;
+ }
+ /**
+ *
+ *
+ * + * The state of the operation. + *+ * + *
.google.cloud.translation.v3beta1.BatchTranslateMetadata.State state = 1;
+ */
+ public Builder setStateValue(int value) {
+ state_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The state of the operation. + *+ * + *
.google.cloud.translation.v3beta1.BatchTranslateMetadata.State state = 1;
+ */
+ public com.google.cloud.translate.v3beta1.BatchTranslateMetadata.State getState() {
+ @SuppressWarnings("deprecation")
+ com.google.cloud.translate.v3beta1.BatchTranslateMetadata.State result =
+ com.google.cloud.translate.v3beta1.BatchTranslateMetadata.State.valueOf(state_);
+ return result == null
+ ? com.google.cloud.translate.v3beta1.BatchTranslateMetadata.State.UNRECOGNIZED
+ : result;
+ }
+ /**
+ *
+ *
+ * + * The state of the operation. + *+ * + *
.google.cloud.translation.v3beta1.BatchTranslateMetadata.State state = 1;
+ */
+ public Builder setState(com.google.cloud.translate.v3beta1.BatchTranslateMetadata.State value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ state_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The state of the operation. + *+ * + *
.google.cloud.translation.v3beta1.BatchTranslateMetadata.State state = 1;
+ */
+ public Builder clearState() {
+
+ state_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private long translatedCharacters_;
+ /**
+ *
+ *
+ * + * Number of successfully translated characters so far (Unicode codepoints). + *+ * + *
int64 translated_characters = 2;
+ */
+ public long getTranslatedCharacters() {
+ return translatedCharacters_;
+ }
+ /**
+ *
+ *
+ * + * Number of successfully translated characters so far (Unicode codepoints). + *+ * + *
int64 translated_characters = 2;
+ */
+ public Builder setTranslatedCharacters(long value) {
+
+ translatedCharacters_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Number of successfully translated characters so far (Unicode codepoints). + *+ * + *
int64 translated_characters = 2;
+ */
+ public Builder clearTranslatedCharacters() {
+
+ translatedCharacters_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ private long failedCharacters_;
+ /**
+ *
+ *
+ * + * Number of characters that have failed to process so far (Unicode + * codepoints). + *+ * + *
int64 failed_characters = 3;
+ */
+ public long getFailedCharacters() {
+ return failedCharacters_;
+ }
+ /**
+ *
+ *
+ * + * Number of characters that have failed to process so far (Unicode + * codepoints). + *+ * + *
int64 failed_characters = 3;
+ */
+ public Builder setFailedCharacters(long value) {
+
+ failedCharacters_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Number of characters that have failed to process so far (Unicode + * codepoints). + *+ * + *
int64 failed_characters = 3;
+ */
+ public Builder clearFailedCharacters() {
+
+ failedCharacters_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ private long totalCharacters_;
+ /**
+ *
+ *
+ * + * Total number of characters (Unicode codepoints). + * This is the total number of codepoints from input files times the number of + * target languages. It appears here shortly after the call is submitted. + *+ * + *
int64 total_characters = 4;
+ */
+ public long getTotalCharacters() {
+ return totalCharacters_;
+ }
+ /**
+ *
+ *
+ * + * Total number of characters (Unicode codepoints). + * This is the total number of codepoints from input files times the number of + * target languages. It appears here shortly after the call is submitted. + *+ * + *
int64 total_characters = 4;
+ */
+ public Builder setTotalCharacters(long value) {
+
+ totalCharacters_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Total number of characters (Unicode codepoints). + * This is the total number of codepoints from input files times the number of + * target languages. It appears here shortly after the call is submitted. + *+ * + *
int64 total_characters = 4;
+ */
+ public Builder clearTotalCharacters() {
+
+ totalCharacters_ = 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 = 5;
+ */
+ public boolean hasSubmitTime() {
+ return submitTimeBuilder_ != null || submitTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * Time when the operation was submitted. + *+ * + *
.google.protobuf.Timestamp submit_time = 5;
+ */
+ 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 = 5;
+ */
+ 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 = 5;
+ */
+ 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 = 5;
+ */
+ 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 = 5;
+ */
+ 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 = 5;
+ */
+ public com.google.protobuf.Timestamp.Builder getSubmitTimeBuilder() {
+
+ onChanged();
+ return getSubmitTimeFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Time when the operation was submitted. + *+ * + *
.google.protobuf.Timestamp submit_time = 5;
+ */
+ 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 = 5;
+ */
+ 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.v3beta1.BatchTranslateMetadata)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.BatchTranslateMetadata)
+ private static final com.google.cloud.translate.v3beta1.BatchTranslateMetadata DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.translate.v3beta1.BatchTranslateMetadata();
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchTranslateMetadata getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * The state of the operation. + *+ * + *
.google.cloud.translation.v3beta1.BatchTranslateMetadata.State state = 1;
+ */
+ int getStateValue();
+ /**
+ *
+ *
+ * + * The state of the operation. + *+ * + *
.google.cloud.translation.v3beta1.BatchTranslateMetadata.State state = 1;
+ */
+ com.google.cloud.translate.v3beta1.BatchTranslateMetadata.State getState();
+
+ /**
+ *
+ *
+ * + * Number of successfully translated characters so far (Unicode codepoints). + *+ * + *
int64 translated_characters = 2;
+ */
+ long getTranslatedCharacters();
+
+ /**
+ *
+ *
+ * + * Number of characters that have failed to process so far (Unicode + * codepoints). + *+ * + *
int64 failed_characters = 3;
+ */
+ long getFailedCharacters();
+
+ /**
+ *
+ *
+ * + * Total number of characters (Unicode codepoints). + * This is the total number of codepoints from input files times the number of + * target languages. It appears here shortly after the call is submitted. + *+ * + *
int64 total_characters = 4;
+ */
+ long getTotalCharacters();
+
+ /**
+ *
+ *
+ * + * Time when the operation was submitted. + *+ * + *
.google.protobuf.Timestamp submit_time = 5;
+ */
+ boolean hasSubmitTime();
+ /**
+ *
+ *
+ * + * Time when the operation was submitted. + *+ * + *
.google.protobuf.Timestamp submit_time = 5;
+ */
+ com.google.protobuf.Timestamp getSubmitTime();
+ /**
+ *
+ *
+ * + * Time when the operation was submitted. + *+ * + *
.google.protobuf.Timestamp submit_time = 5;
+ */
+ com.google.protobuf.TimestampOrBuilder getSubmitTimeOrBuilder();
+}
diff --git a/google-api-grpc/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/BatchTranslateResponse.java b/google-api-grpc/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/BatchTranslateResponse.java
new file mode 100644
index 000000000000..d0931eb9cf68
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/BatchTranslateResponse.java
@@ -0,0 +1,1206 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/translate/v3beta1/translation_service.proto
+
+package com.google.cloud.translate.v3beta1;
+
+/**
+ *
+ *
+ * + * Stored in the [google.longrunning.Operation.response][google.longrunning.Operation.response] field returned by + * BatchTranslateText if at least one sentence is translated successfully. + *+ * + * Protobuf type {@code google.cloud.translation.v3beta1.BatchTranslateResponse} + */ +public final class BatchTranslateResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.translation.v3beta1.BatchTranslateResponse) + BatchTranslateResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchTranslateResponse.newBuilder() to construct. + private BatchTranslateResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private BatchTranslateResponse() {} + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BatchTranslateResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + totalCharacters_ = input.readInt64(); + break; + } + case 16: + { + translatedCharacters_ = input.readInt64(); + break; + } + case 24: + { + failedCharacters_ = input.readInt64(); + break; + } + case 34: + { + 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; + } + case 42: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (endTime_ != null) { + subBuilder = endTime_.toBuilder(); + } + endTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(endTime_); + endTime_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.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.v3beta1.TranslationServiceProto + .internal_static_google_cloud_translation_v3beta1_BatchTranslateResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.translate.v3beta1.TranslationServiceProto + .internal_static_google_cloud_translation_v3beta1_BatchTranslateResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.translate.v3beta1.BatchTranslateResponse.class, + com.google.cloud.translate.v3beta1.BatchTranslateResponse.Builder.class); + } + + public static final int TOTAL_CHARACTERS_FIELD_NUMBER = 1; + private long totalCharacters_; + /** + * + * + *
+ * Total number of characters (Unicode codepoints). + *+ * + *
int64 total_characters = 1;
+ */
+ public long getTotalCharacters() {
+ return totalCharacters_;
+ }
+
+ public static final int TRANSLATED_CHARACTERS_FIELD_NUMBER = 2;
+ private long translatedCharacters_;
+ /**
+ *
+ *
+ * + * Number of successfully translated characters (Unicode codepoints). + *+ * + *
int64 translated_characters = 2;
+ */
+ public long getTranslatedCharacters() {
+ return translatedCharacters_;
+ }
+
+ public static final int FAILED_CHARACTERS_FIELD_NUMBER = 3;
+ private long failedCharacters_;
+ /**
+ *
+ *
+ * + * Number of characters that have failed to process (Unicode codepoints). + *+ * + *
int64 failed_characters = 3;
+ */
+ public long getFailedCharacters() {
+ return failedCharacters_;
+ }
+
+ public static final int SUBMIT_TIME_FIELD_NUMBER = 4;
+ private com.google.protobuf.Timestamp submitTime_;
+ /**
+ *
+ *
+ * + * Time when the operation was submitted. + *+ * + *
.google.protobuf.Timestamp submit_time = 4;
+ */
+ public boolean hasSubmitTime() {
+ return submitTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * Time when the operation was submitted. + *+ * + *
.google.protobuf.Timestamp submit_time = 4;
+ */
+ 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 = 4;
+ */
+ public com.google.protobuf.TimestampOrBuilder getSubmitTimeOrBuilder() {
+ return getSubmitTime();
+ }
+
+ public static final int END_TIME_FIELD_NUMBER = 5;
+ private com.google.protobuf.Timestamp endTime_;
+ /**
+ *
+ *
+ * + * The time when the operation is finished and + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. + *+ * + *
.google.protobuf.Timestamp end_time = 5;
+ */
+ public boolean hasEndTime() {
+ return endTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * The time when the operation is finished and + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. + *+ * + *
.google.protobuf.Timestamp end_time = 5;
+ */
+ public com.google.protobuf.Timestamp getEndTime() {
+ return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_;
+ }
+ /**
+ *
+ *
+ * + * The time when the operation is finished and + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. + *+ * + *
.google.protobuf.Timestamp end_time = 5;
+ */
+ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() {
+ return getEndTime();
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (totalCharacters_ != 0L) {
+ output.writeInt64(1, totalCharacters_);
+ }
+ if (translatedCharacters_ != 0L) {
+ output.writeInt64(2, translatedCharacters_);
+ }
+ if (failedCharacters_ != 0L) {
+ output.writeInt64(3, failedCharacters_);
+ }
+ if (submitTime_ != null) {
+ output.writeMessage(4, getSubmitTime());
+ }
+ if (endTime_ != null) {
+ output.writeMessage(5, getEndTime());
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (totalCharacters_ != 0L) {
+ size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, totalCharacters_);
+ }
+ if (translatedCharacters_ != 0L) {
+ size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, translatedCharacters_);
+ }
+ if (failedCharacters_ != 0L) {
+ size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, failedCharacters_);
+ }
+ if (submitTime_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getSubmitTime());
+ }
+ if (endTime_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getEndTime());
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ 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.v3beta1.BatchTranslateResponse)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.translate.v3beta1.BatchTranslateResponse other =
+ (com.google.cloud.translate.v3beta1.BatchTranslateResponse) obj;
+
+ if (getTotalCharacters() != other.getTotalCharacters()) return false;
+ if (getTranslatedCharacters() != other.getTranslatedCharacters()) return false;
+ if (getFailedCharacters() != other.getFailedCharacters()) return false;
+ if (hasSubmitTime() != other.hasSubmitTime()) return false;
+ if (hasSubmitTime()) {
+ if (!getSubmitTime().equals(other.getSubmitTime())) return false;
+ }
+ if (hasEndTime() != other.hasEndTime()) return false;
+ if (hasEndTime()) {
+ if (!getEndTime().equals(other.getEndTime())) return false;
+ }
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ 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());
+ if (hasSubmitTime()) {
+ hash = (37 * hash) + SUBMIT_TIME_FIELD_NUMBER;
+ hash = (53 * hash) + getSubmitTime().hashCode();
+ }
+ if (hasEndTime()) {
+ hash = (37 * hash) + END_TIME_FIELD_NUMBER;
+ hash = (53 * hash) + getEndTime().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchTranslateResponse parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchTranslateResponse parseFrom(
+ 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.v3beta1.BatchTranslateResponse parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchTranslateResponse parseFrom(
+ com.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.v3beta1.BatchTranslateResponse parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchTranslateResponse parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchTranslateResponse parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchTranslateResponse parseFrom(
+ java.io.InputStream 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.v3beta1.BatchTranslateResponse parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchTranslateResponse parseDelimitedFrom(
+ java.io.InputStream 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.v3beta1.BatchTranslateResponse parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchTranslateResponse parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, 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.v3beta1.BatchTranslateResponse prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ * + * Stored in the [google.longrunning.Operation.response][google.longrunning.Operation.response] field returned by + * BatchTranslateText if at least one sentence is translated successfully. + *+ * + * Protobuf type {@code google.cloud.translation.v3beta1.BatchTranslateResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Total number of characters (Unicode codepoints). + *+ * + *
int64 total_characters = 1;
+ */
+ public long getTotalCharacters() {
+ return totalCharacters_;
+ }
+ /**
+ *
+ *
+ * + * Total number of characters (Unicode codepoints). + *+ * + *
int64 total_characters = 1;
+ */
+ public Builder setTotalCharacters(long value) {
+
+ totalCharacters_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Total number of characters (Unicode codepoints). + *+ * + *
int64 total_characters = 1;
+ */
+ public Builder clearTotalCharacters() {
+
+ totalCharacters_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ private long translatedCharacters_;
+ /**
+ *
+ *
+ * + * Number of successfully translated characters (Unicode codepoints). + *+ * + *
int64 translated_characters = 2;
+ */
+ public long getTranslatedCharacters() {
+ return translatedCharacters_;
+ }
+ /**
+ *
+ *
+ * + * Number of successfully translated characters (Unicode codepoints). + *+ * + *
int64 translated_characters = 2;
+ */
+ public Builder setTranslatedCharacters(long value) {
+
+ translatedCharacters_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Number of successfully translated characters (Unicode codepoints). + *+ * + *
int64 translated_characters = 2;
+ */
+ public Builder clearTranslatedCharacters() {
+
+ translatedCharacters_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ private long failedCharacters_;
+ /**
+ *
+ *
+ * + * Number of characters that have failed to process (Unicode codepoints). + *+ * + *
int64 failed_characters = 3;
+ */
+ public long getFailedCharacters() {
+ return failedCharacters_;
+ }
+ /**
+ *
+ *
+ * + * Number of characters that have failed to process (Unicode codepoints). + *+ * + *
int64 failed_characters = 3;
+ */
+ public Builder setFailedCharacters(long value) {
+
+ failedCharacters_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Number of characters that have failed to process (Unicode codepoints). + *+ * + *
int64 failed_characters = 3;
+ */
+ public Builder clearFailedCharacters() {
+
+ failedCharacters_ = 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 = 4;
+ */
+ public boolean hasSubmitTime() {
+ return submitTimeBuilder_ != null || submitTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * Time when the operation was submitted. + *+ * + *
.google.protobuf.Timestamp submit_time = 4;
+ */
+ 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 = 4;
+ */
+ 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 = 4;
+ */
+ 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 = 4;
+ */
+ 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 = 4;
+ */
+ 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 = 4;
+ */
+ public com.google.protobuf.Timestamp.Builder getSubmitTimeBuilder() {
+
+ onChanged();
+ return getSubmitTimeFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Time when the operation was submitted. + *+ * + *
.google.protobuf.Timestamp submit_time = 4;
+ */
+ 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 = 4;
+ */
+ 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_;
+ }
+
+ private com.google.protobuf.Timestamp endTime_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ endTimeBuilder_;
+ /**
+ *
+ *
+ * + * The time when the operation is finished and + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. + *+ * + *
.google.protobuf.Timestamp end_time = 5;
+ */
+ public boolean hasEndTime() {
+ return endTimeBuilder_ != null || endTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * The time when the operation is finished and + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. + *+ * + *
.google.protobuf.Timestamp end_time = 5;
+ */
+ public com.google.protobuf.Timestamp getEndTime() {
+ if (endTimeBuilder_ == null) {
+ return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_;
+ } else {
+ return endTimeBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * The time when the operation is finished and + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. + *+ * + *
.google.protobuf.Timestamp end_time = 5;
+ */
+ public Builder setEndTime(com.google.protobuf.Timestamp value) {
+ if (endTimeBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ endTime_ = value;
+ onChanged();
+ } else {
+ endTimeBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The time when the operation is finished and + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. + *+ * + *
.google.protobuf.Timestamp end_time = 5;
+ */
+ public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) {
+ if (endTimeBuilder_ == null) {
+ endTime_ = builderForValue.build();
+ onChanged();
+ } else {
+ endTimeBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The time when the operation is finished and + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. + *+ * + *
.google.protobuf.Timestamp end_time = 5;
+ */
+ public Builder mergeEndTime(com.google.protobuf.Timestamp value) {
+ if (endTimeBuilder_ == null) {
+ if (endTime_ != null) {
+ endTime_ =
+ com.google.protobuf.Timestamp.newBuilder(endTime_).mergeFrom(value).buildPartial();
+ } else {
+ endTime_ = value;
+ }
+ onChanged();
+ } else {
+ endTimeBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The time when the operation is finished and + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. + *+ * + *
.google.protobuf.Timestamp end_time = 5;
+ */
+ public Builder clearEndTime() {
+ if (endTimeBuilder_ == null) {
+ endTime_ = null;
+ onChanged();
+ } else {
+ endTime_ = null;
+ endTimeBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The time when the operation is finished and + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. + *+ * + *
.google.protobuf.Timestamp end_time = 5;
+ */
+ public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() {
+
+ onChanged();
+ return getEndTimeFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * The time when the operation is finished and + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. + *+ * + *
.google.protobuf.Timestamp end_time = 5;
+ */
+ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() {
+ if (endTimeBuilder_ != null) {
+ return endTimeBuilder_.getMessageOrBuilder();
+ } else {
+ return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_;
+ }
+ }
+ /**
+ *
+ *
+ * + * The time when the operation is finished and + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. + *+ * + *
.google.protobuf.Timestamp end_time = 5;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ getEndTimeFieldBuilder() {
+ if (endTimeBuilder_ == null) {
+ endTimeBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>(
+ getEndTime(), getParentForChildren(), isClean());
+ endTime_ = null;
+ }
+ return endTimeBuilder_;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @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.v3beta1.BatchTranslateResponse)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.BatchTranslateResponse)
+ private static final com.google.cloud.translate.v3beta1.BatchTranslateResponse DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.translate.v3beta1.BatchTranslateResponse();
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchTranslateResponse getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Total number of characters (Unicode codepoints). + *+ * + *
int64 total_characters = 1;
+ */
+ long getTotalCharacters();
+
+ /**
+ *
+ *
+ * + * Number of successfully translated characters (Unicode codepoints). + *+ * + *
int64 translated_characters = 2;
+ */
+ long getTranslatedCharacters();
+
+ /**
+ *
+ *
+ * + * Number of characters that have failed to process (Unicode codepoints). + *+ * + *
int64 failed_characters = 3;
+ */
+ long getFailedCharacters();
+
+ /**
+ *
+ *
+ * + * Time when the operation was submitted. + *+ * + *
.google.protobuf.Timestamp submit_time = 4;
+ */
+ boolean hasSubmitTime();
+ /**
+ *
+ *
+ * + * Time when the operation was submitted. + *+ * + *
.google.protobuf.Timestamp submit_time = 4;
+ */
+ com.google.protobuf.Timestamp getSubmitTime();
+ /**
+ *
+ *
+ * + * Time when the operation was submitted. + *+ * + *
.google.protobuf.Timestamp submit_time = 4;
+ */
+ com.google.protobuf.TimestampOrBuilder getSubmitTimeOrBuilder();
+
+ /**
+ *
+ *
+ * + * The time when the operation is finished and + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. + *+ * + *
.google.protobuf.Timestamp end_time = 5;
+ */
+ boolean hasEndTime();
+ /**
+ *
+ *
+ * + * The time when the operation is finished and + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. + *+ * + *
.google.protobuf.Timestamp end_time = 5;
+ */
+ com.google.protobuf.Timestamp getEndTime();
+ /**
+ *
+ *
+ * + * The time when the operation is finished and + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. + *+ * + *
.google.protobuf.Timestamp end_time = 5;
+ */
+ com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder();
+}
diff --git a/google-api-grpc/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/BatchTranslateTextRequest.java b/google-api-grpc/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/BatchTranslateTextRequest.java
new file mode 100644
index 000000000000..14c6c68b8286
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/BatchTranslateTextRequest.java
@@ -0,0 +1,2678 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/translate/v3beta1/translation_service.proto
+
+package com.google.cloud.translate.v3beta1;
+
+/**
+ *
+ *
+ * + * The batch translation request. + *+ * + * Protobuf type {@code google.cloud.translation.v3beta1.BatchTranslateTextRequest} + */ +public final class BatchTranslateTextRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.translation.v3beta1.BatchTranslateTextRequest) + BatchTranslateTextRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchTranslateTextRequest.newBuilder() to construct. + private BatchTranslateTextRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private BatchTranslateTextRequest() { + parent_ = ""; + sourceLanguageCode_ = ""; + targetLanguageCodes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + inputConfigs_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BatchTranslateTextRequest( + 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_ & 0x00000004) != 0)) { + targetLanguageCodes_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000004; + } + targetLanguageCodes_.add(s); + break; + } + case 34: + { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { + models_ = + com.google.protobuf.MapField.newMapField(ModelsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000008; + } + com.google.protobuf.MapEntry
+ * Optional. Only used when making regionalized call.
+ * Format:
+ * projects/{project-id}/locations/{location-id}.
+ * Only custom models/glossaries within the same location-id can be used.
+ * Otherwise 400 is returned.
+ *
+ *
+ * string parent = 1;
+ */
+ public java.lang.String getParent() {
+ java.lang.Object ref = parent_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ parent_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Optional. Only used when making regionalized call.
+ * Format:
+ * projects/{project-id}/locations/{location-id}.
+ * Only custom models/glossaries within the same location-id can be used.
+ * Otherwise 400 is returned.
+ *
+ *
+ * string parent = 1;
+ */
+ public com.google.protobuf.ByteString getParentBytes() {
+ java.lang.Object ref = parent_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ parent_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int SOURCE_LANGUAGE_CODE_FIELD_NUMBER = 2;
+ private volatile java.lang.Object sourceLanguageCode_;
+ /**
+ *
+ *
+ * + * Required. Source language code. + *+ * + *
string source_language_code = 2;
+ */
+ 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. Source language code. + *+ * + *
string source_language_code = 2;
+ */
+ 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. Specify up to 10 language codes here. + *+ * + *
repeated string target_language_codes = 3;
+ */
+ public com.google.protobuf.ProtocolStringList getTargetLanguageCodesList() {
+ return targetLanguageCodes_;
+ }
+ /**
+ *
+ *
+ * + * Required. Specify up to 10 language codes here. + *+ * + *
repeated string target_language_codes = 3;
+ */
+ public int getTargetLanguageCodesCount() {
+ return targetLanguageCodes_.size();
+ }
+ /**
+ *
+ *
+ * + * Required. Specify up to 10 language codes here. + *+ * + *
repeated string target_language_codes = 3;
+ */
+ public java.lang.String getTargetLanguageCodes(int index) {
+ return targetLanguageCodes_.get(index);
+ }
+ /**
+ *
+ *
+ * + * Required. Specify up to 10 language codes here. + *+ * + *
repeated string target_language_codes = 3;
+ */
+ public com.google.protobuf.ByteString getTargetLanguageCodesBytes(int index) {
+ return targetLanguageCodes_.getByteString(index);
+ }
+
+ public static final int MODELS_FIELD_NUMBER = 4;
+
+ 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 model name. Value can be a built-in general model,
+ * or a custom model built by AutoML.
+ * The value format depends on model type:
+ * 1. Custom models:
+ * projects/{project-id}/locations/{location-id}/models/{model-id}.
+ * 2. General (built-in) models:
+ * projects/{project-id}/locations/{location-id}/models/general/nmt
+ * projects/{project-id}/locations/{location-id}/models/general/base
+ * If the map is empty or a specific model is
+ * not requested for a language pair, then default google model is used.
+ *
+ *
+ * map<string, string> models = 4;
+ */
+ 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.Deprecated
+ public java.util.Map
+ * Optional. The models to use for translation. Map's key is target language
+ * code. Map's value is model name. Value can be a built-in general model,
+ * or a custom model built by AutoML.
+ * The value format depends on model type:
+ * 1. Custom models:
+ * projects/{project-id}/locations/{location-id}/models/{model-id}.
+ * 2. General (built-in) models:
+ * projects/{project-id}/locations/{location-id}/models/general/nmt
+ * projects/{project-id}/locations/{location-id}/models/general/base
+ * If the map is empty or a specific model is
+ * not requested for a language pair, then default google model is used.
+ *
+ *
+ * map<string, string> models = 4;
+ */
+ public java.util.Map
+ * Optional. The models to use for translation. Map's key is target language
+ * code. Map's value is model name. Value can be a built-in general model,
+ * or a custom model built by AutoML.
+ * The value format depends on model type:
+ * 1. Custom models:
+ * projects/{project-id}/locations/{location-id}/models/{model-id}.
+ * 2. General (built-in) models:
+ * projects/{project-id}/locations/{location-id}/models/general/nmt
+ * projects/{project-id}/locations/{location-id}/models/general/base
+ * If the map is empty or a specific model is
+ * not requested for a language pair, then default google model is used.
+ *
+ *
+ * map<string, string> models = 4;
+ */
+ public java.lang.String getModelsOrDefault(java.lang.String key, java.lang.String defaultValue) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ java.util.Map
+ * Optional. The models to use for translation. Map's key is target language
+ * code. Map's value is model name. Value can be a built-in general model,
+ * or a custom model built by AutoML.
+ * The value format depends on model type:
+ * 1. Custom models:
+ * projects/{project-id}/locations/{location-id}/models/{model-id}.
+ * 2. General (built-in) models:
+ * projects/{project-id}/locations/{location-id}/models/general/nmt
+ * projects/{project-id}/locations/{location-id}/models/general/base
+ * If the map is empty or a specific model is
+ * not requested for a language pair, then default google model is used.
+ *
+ *
+ * map<string, string> models = 4;
+ */
+ public java.lang.String getModelsOrThrow(java.lang.String key) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ java.util.Map+ * Required. Input configurations. + * The total number of files matched should be <= 1000. + * The total content size should be <= 100M Unicode codepoints. + * The files must use UTF-8 encoding. + *+ * + *
repeated .google.cloud.translation.v3beta1.InputConfig input_configs = 5;
+ */
+ public java.util.List+ * Required. Input configurations. + * The total number of files matched should be <= 1000. + * The total content size should be <= 100M Unicode codepoints. + * The files must use UTF-8 encoding. + *+ * + *
repeated .google.cloud.translation.v3beta1.InputConfig input_configs = 5;
+ */
+ public java.util.List extends com.google.cloud.translate.v3beta1.InputConfigOrBuilder>
+ getInputConfigsOrBuilderList() {
+ return inputConfigs_;
+ }
+ /**
+ *
+ *
+ * + * Required. Input configurations. + * The total number of files matched should be <= 1000. + * The total content size should be <= 100M Unicode codepoints. + * The files must use UTF-8 encoding. + *+ * + *
repeated .google.cloud.translation.v3beta1.InputConfig input_configs = 5;
+ */
+ public int getInputConfigsCount() {
+ return inputConfigs_.size();
+ }
+ /**
+ *
+ *
+ * + * Required. Input configurations. + * The total number of files matched should be <= 1000. + * The total content size should be <= 100M Unicode codepoints. + * The files must use UTF-8 encoding. + *+ * + *
repeated .google.cloud.translation.v3beta1.InputConfig input_configs = 5;
+ */
+ public com.google.cloud.translate.v3beta1.InputConfig getInputConfigs(int index) {
+ return inputConfigs_.get(index);
+ }
+ /**
+ *
+ *
+ * + * Required. Input configurations. + * The total number of files matched should be <= 1000. + * The total content size should be <= 100M Unicode codepoints. + * The files must use UTF-8 encoding. + *+ * + *
repeated .google.cloud.translation.v3beta1.InputConfig input_configs = 5;
+ */
+ public com.google.cloud.translate.v3beta1.InputConfigOrBuilder getInputConfigsOrBuilder(
+ int index) {
+ return inputConfigs_.get(index);
+ }
+
+ public static final int OUTPUT_CONFIG_FIELD_NUMBER = 6;
+ private com.google.cloud.translate.v3beta1.OutputConfig 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.v3beta1.OutputConfig output_config = 6;
+ */
+ 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.v3beta1.OutputConfig output_config = 6;
+ */
+ public com.google.cloud.translate.v3beta1.OutputConfig getOutputConfig() {
+ return outputConfig_ == null
+ ? com.google.cloud.translate.v3beta1.OutputConfig.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.v3beta1.OutputConfig output_config = 6;
+ */
+ public com.google.cloud.translate.v3beta1.OutputConfigOrBuilder getOutputConfigOrBuilder() {
+ return getOutputConfig();
+ }
+
+ public static final int GLOSSARIES_FIELD_NUMBER = 7;
+
+ private static final class GlossariesDefaultEntryHolder {
+ static final com.google.protobuf.MapEntry<
+ java.lang.String, com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig>
+ defaultEntry =
+ com.google.protobuf.MapEntry
+ .+ * Optional. Glossaries to be applied for translation. + * It's keyed by target language code. + *+ * + *
+ * map<string, .google.cloud.translation.v3beta1.TranslateTextGlossaryConfig> glossaries = 7;
+ *
+ */
+ public boolean containsGlossaries(java.lang.String key) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ return internalGetGlossaries().getMap().containsKey(key);
+ }
+ /** Use {@link #getGlossariesMap()} instead. */
+ @java.lang.Deprecated
+ public java.util.Map<
+ java.lang.String, com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig>
+ getGlossaries() {
+ return getGlossariesMap();
+ }
+ /**
+ *
+ *
+ * + * Optional. Glossaries to be applied for translation. + * It's keyed by target language code. + *+ * + *
+ * map<string, .google.cloud.translation.v3beta1.TranslateTextGlossaryConfig> glossaries = 7;
+ *
+ */
+ public java.util.Map<
+ java.lang.String, com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig>
+ getGlossariesMap() {
+ return internalGetGlossaries().getMap();
+ }
+ /**
+ *
+ *
+ * + * Optional. Glossaries to be applied for translation. + * It's keyed by target language code. + *+ * + *
+ * map<string, .google.cloud.translation.v3beta1.TranslateTextGlossaryConfig> glossaries = 7;
+ *
+ */
+ public com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig getGlossariesOrDefault(
+ java.lang.String key,
+ com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig defaultValue) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ java.util.Map+ * Optional. Glossaries to be applied for translation. + * It's keyed by target language code. + *+ * + *
+ * map<string, .google.cloud.translation.v3beta1.TranslateTextGlossaryConfig> glossaries = 7;
+ *
+ */
+ public com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig getGlossariesOrThrow(
+ java.lang.String key) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ java.util.Map+ * The batch translation request. + *+ * + * Protobuf type {@code google.cloud.translation.v3beta1.BatchTranslateTextRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Optional. Only used when making regionalized call.
+ * Format:
+ * projects/{project-id}/locations/{location-id}.
+ * Only custom models/glossaries within the same location-id can be used.
+ * Otherwise 400 is returned.
+ *
+ *
+ * string parent = 1;
+ */
+ public java.lang.String getParent() {
+ java.lang.Object ref = parent_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ parent_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Optional. Only used when making regionalized call.
+ * Format:
+ * projects/{project-id}/locations/{location-id}.
+ * Only custom models/glossaries within the same location-id can be used.
+ * Otherwise 400 is returned.
+ *
+ *
+ * string parent = 1;
+ */
+ public com.google.protobuf.ByteString getParentBytes() {
+ java.lang.Object ref = parent_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ parent_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Optional. Only used when making regionalized call.
+ * Format:
+ * projects/{project-id}/locations/{location-id}.
+ * Only custom models/glossaries within the same location-id can be used.
+ * Otherwise 400 is returned.
+ *
+ *
+ * string parent = 1;
+ */
+ public Builder setParent(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ parent_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. Only used when making regionalized call.
+ * Format:
+ * projects/{project-id}/locations/{location-id}.
+ * Only custom models/glossaries within the same location-id can be used.
+ * Otherwise 400 is returned.
+ *
+ *
+ * string parent = 1;
+ */
+ public Builder clearParent() {
+
+ parent_ = getDefaultInstance().getParent();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. Only used when making regionalized call.
+ * Format:
+ * projects/{project-id}/locations/{location-id}.
+ * Only custom models/glossaries within the same location-id can be used.
+ * Otherwise 400 is returned.
+ *
+ *
+ * string parent = 1;
+ */
+ public Builder setParentBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ parent_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object sourceLanguageCode_ = "";
+ /**
+ *
+ *
+ * + * Required. Source language code. + *+ * + *
string source_language_code = 2;
+ */
+ public java.lang.String getSourceLanguageCode() {
+ java.lang.Object ref = sourceLanguageCode_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ sourceLanguageCode_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. Source language code. + *+ * + *
string source_language_code = 2;
+ */
+ public com.google.protobuf.ByteString getSourceLanguageCodeBytes() {
+ java.lang.Object ref = sourceLanguageCode_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ sourceLanguageCode_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. Source language code. + *+ * + *
string source_language_code = 2;
+ */
+ public Builder setSourceLanguageCode(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ sourceLanguageCode_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Source language code. + *+ * + *
string source_language_code = 2;
+ */
+ public Builder clearSourceLanguageCode() {
+
+ sourceLanguageCode_ = getDefaultInstance().getSourceLanguageCode();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Source language code. + *+ * + *
string source_language_code = 2;
+ */
+ public Builder setSourceLanguageCodeBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ sourceLanguageCode_ = value;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.LazyStringList targetLanguageCodes_ =
+ com.google.protobuf.LazyStringArrayList.EMPTY;
+
+ private void ensureTargetLanguageCodesIsMutable() {
+ if (!((bitField0_ & 0x00000004) != 0)) {
+ targetLanguageCodes_ = new com.google.protobuf.LazyStringArrayList(targetLanguageCodes_);
+ bitField0_ |= 0x00000004;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. Specify up to 10 language codes here. + *+ * + *
repeated string target_language_codes = 3;
+ */
+ public com.google.protobuf.ProtocolStringList getTargetLanguageCodesList() {
+ return targetLanguageCodes_.getUnmodifiableView();
+ }
+ /**
+ *
+ *
+ * + * Required. Specify up to 10 language codes here. + *+ * + *
repeated string target_language_codes = 3;
+ */
+ public int getTargetLanguageCodesCount() {
+ return targetLanguageCodes_.size();
+ }
+ /**
+ *
+ *
+ * + * Required. Specify up to 10 language codes here. + *+ * + *
repeated string target_language_codes = 3;
+ */
+ public java.lang.String getTargetLanguageCodes(int index) {
+ return targetLanguageCodes_.get(index);
+ }
+ /**
+ *
+ *
+ * + * Required. Specify up to 10 language codes here. + *+ * + *
repeated string target_language_codes = 3;
+ */
+ public com.google.protobuf.ByteString getTargetLanguageCodesBytes(int index) {
+ return targetLanguageCodes_.getByteString(index);
+ }
+ /**
+ *
+ *
+ * + * Required. Specify up to 10 language codes here. + *+ * + *
repeated string target_language_codes = 3;
+ */
+ public Builder setTargetLanguageCodes(int index, java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureTargetLanguageCodesIsMutable();
+ targetLanguageCodes_.set(index, value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Specify up to 10 language codes here. + *+ * + *
repeated string target_language_codes = 3;
+ */
+ public Builder addTargetLanguageCodes(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureTargetLanguageCodesIsMutable();
+ targetLanguageCodes_.add(value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Specify up to 10 language codes here. + *+ * + *
repeated string target_language_codes = 3;
+ */
+ public Builder addAllTargetLanguageCodes(java.lang.Iterable+ * Required. Specify up to 10 language codes here. + *+ * + *
repeated string target_language_codes = 3;
+ */
+ public Builder clearTargetLanguageCodes() {
+ targetLanguageCodes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+ bitField0_ = (bitField0_ & ~0x00000004);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Specify up to 10 language codes here. + *+ * + *
repeated string target_language_codes = 3;
+ */
+ public Builder addTargetLanguageCodesBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+ ensureTargetLanguageCodesIsMutable();
+ targetLanguageCodes_.add(value);
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.MapField
+ * Optional. The models to use for translation. Map's key is target language
+ * code. Map's value is model name. Value can be a built-in general model,
+ * or a custom model built by AutoML.
+ * The value format depends on model type:
+ * 1. Custom models:
+ * projects/{project-id}/locations/{location-id}/models/{model-id}.
+ * 2. General (built-in) models:
+ * projects/{project-id}/locations/{location-id}/models/general/nmt
+ * projects/{project-id}/locations/{location-id}/models/general/base
+ * If the map is empty or a specific model is
+ * not requested for a language pair, then default google model is used.
+ *
+ *
+ * map<string, string> models = 4;
+ */
+ 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.Deprecated
+ public java.util.Map
+ * Optional. The models to use for translation. Map's key is target language
+ * code. Map's value is model name. Value can be a built-in general model,
+ * or a custom model built by AutoML.
+ * The value format depends on model type:
+ * 1. Custom models:
+ * projects/{project-id}/locations/{location-id}/models/{model-id}.
+ * 2. General (built-in) models:
+ * projects/{project-id}/locations/{location-id}/models/general/nmt
+ * projects/{project-id}/locations/{location-id}/models/general/base
+ * If the map is empty or a specific model is
+ * not requested for a language pair, then default google model is used.
+ *
+ *
+ * map<string, string> models = 4;
+ */
+ public java.util.Map
+ * Optional. The models to use for translation. Map's key is target language
+ * code. Map's value is model name. Value can be a built-in general model,
+ * or a custom model built by AutoML.
+ * The value format depends on model type:
+ * 1. Custom models:
+ * projects/{project-id}/locations/{location-id}/models/{model-id}.
+ * 2. General (built-in) models:
+ * projects/{project-id}/locations/{location-id}/models/general/nmt
+ * projects/{project-id}/locations/{location-id}/models/general/base
+ * If the map is empty or a specific model is
+ * not requested for a language pair, then default google model is used.
+ *
+ *
+ * map<string, string> models = 4;
+ */
+ public java.lang.String getModelsOrDefault(
+ java.lang.String key, java.lang.String defaultValue) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ java.util.Map
+ * Optional. The models to use for translation. Map's key is target language
+ * code. Map's value is model name. Value can be a built-in general model,
+ * or a custom model built by AutoML.
+ * The value format depends on model type:
+ * 1. Custom models:
+ * projects/{project-id}/locations/{location-id}/models/{model-id}.
+ * 2. General (built-in) models:
+ * projects/{project-id}/locations/{location-id}/models/general/nmt
+ * projects/{project-id}/locations/{location-id}/models/general/base
+ * If the map is empty or a specific model is
+ * not requested for a language pair, then default google model is used.
+ *
+ *
+ * map<string, string> models = 4;
+ */
+ public java.lang.String getModelsOrThrow(java.lang.String key) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ java.util.Map
+ * Optional. The models to use for translation. Map's key is target language
+ * code. Map's value is model name. Value can be a built-in general model,
+ * or a custom model built by AutoML.
+ * The value format depends on model type:
+ * 1. Custom models:
+ * projects/{project-id}/locations/{location-id}/models/{model-id}.
+ * 2. General (built-in) models:
+ * projects/{project-id}/locations/{location-id}/models/general/nmt
+ * projects/{project-id}/locations/{location-id}/models/general/base
+ * If the map is empty or a specific model is
+ * not requested for a language pair, then default google model is used.
+ *
+ *
+ * map<string, string> models = 4;
+ */
+ public Builder removeModels(java.lang.String key) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ internalGetMutableModels().getMutableMap().remove(key);
+ return this;
+ }
+ /** Use alternate mutation accessors instead. */
+ @java.lang.Deprecated
+ public java.util.Map
+ * Optional. The models to use for translation. Map's key is target language
+ * code. Map's value is model name. Value can be a built-in general model,
+ * or a custom model built by AutoML.
+ * The value format depends on model type:
+ * 1. Custom models:
+ * projects/{project-id}/locations/{location-id}/models/{model-id}.
+ * 2. General (built-in) models:
+ * projects/{project-id}/locations/{location-id}/models/general/nmt
+ * projects/{project-id}/locations/{location-id}/models/general/base
+ * If the map is empty or a specific model is
+ * not requested for a language pair, then default google model is used.
+ *
+ *
+ * map<string, string> models = 4;
+ */
+ public Builder putModels(java.lang.String key, java.lang.String value) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ if (value == null) {
+ throw new java.lang.NullPointerException();
+ }
+ internalGetMutableModels().getMutableMap().put(key, value);
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The models to use for translation. Map's key is target language
+ * code. Map's value is model name. Value can be a built-in general model,
+ * or a custom model built by AutoML.
+ * The value format depends on model type:
+ * 1. Custom models:
+ * projects/{project-id}/locations/{location-id}/models/{model-id}.
+ * 2. General (built-in) models:
+ * projects/{project-id}/locations/{location-id}/models/general/nmt
+ * projects/{project-id}/locations/{location-id}/models/general/base
+ * If the map is empty or a specific model is
+ * not requested for a language pair, then default google model is used.
+ *
+ *
+ * map<string, string> models = 4;
+ */
+ public Builder putAllModels(java.util.Map+ * Required. Input configurations. + * The total number of files matched should be <= 1000. + * The total content size should be <= 100M Unicode codepoints. + * The files must use UTF-8 encoding. + *+ * + *
repeated .google.cloud.translation.v3beta1.InputConfig input_configs = 5;
+ */
+ public java.util.List+ * Required. Input configurations. + * The total number of files matched should be <= 1000. + * The total content size should be <= 100M Unicode codepoints. + * The files must use UTF-8 encoding. + *+ * + *
repeated .google.cloud.translation.v3beta1.InputConfig input_configs = 5;
+ */
+ public int getInputConfigsCount() {
+ if (inputConfigsBuilder_ == null) {
+ return inputConfigs_.size();
+ } else {
+ return inputConfigsBuilder_.getCount();
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. Input configurations. + * The total number of files matched should be <= 1000. + * The total content size should be <= 100M Unicode codepoints. + * The files must use UTF-8 encoding. + *+ * + *
repeated .google.cloud.translation.v3beta1.InputConfig input_configs = 5;
+ */
+ public com.google.cloud.translate.v3beta1.InputConfig getInputConfigs(int index) {
+ if (inputConfigsBuilder_ == null) {
+ return inputConfigs_.get(index);
+ } else {
+ return inputConfigsBuilder_.getMessage(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. Input configurations. + * The total number of files matched should be <= 1000. + * The total content size should be <= 100M Unicode codepoints. + * The files must use UTF-8 encoding. + *+ * + *
repeated .google.cloud.translation.v3beta1.InputConfig input_configs = 5;
+ */
+ public Builder setInputConfigs(
+ int index, com.google.cloud.translate.v3beta1.InputConfig value) {
+ if (inputConfigsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureInputConfigsIsMutable();
+ inputConfigs_.set(index, value);
+ onChanged();
+ } else {
+ inputConfigsBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Input configurations. + * The total number of files matched should be <= 1000. + * The total content size should be <= 100M Unicode codepoints. + * The files must use UTF-8 encoding. + *+ * + *
repeated .google.cloud.translation.v3beta1.InputConfig input_configs = 5;
+ */
+ public Builder setInputConfigs(
+ int index, com.google.cloud.translate.v3beta1.InputConfig.Builder builderForValue) {
+ if (inputConfigsBuilder_ == null) {
+ ensureInputConfigsIsMutable();
+ inputConfigs_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ inputConfigsBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Input configurations. + * The total number of files matched should be <= 1000. + * The total content size should be <= 100M Unicode codepoints. + * The files must use UTF-8 encoding. + *+ * + *
repeated .google.cloud.translation.v3beta1.InputConfig input_configs = 5;
+ */
+ public Builder addInputConfigs(com.google.cloud.translate.v3beta1.InputConfig value) {
+ if (inputConfigsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureInputConfigsIsMutable();
+ inputConfigs_.add(value);
+ onChanged();
+ } else {
+ inputConfigsBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Input configurations. + * The total number of files matched should be <= 1000. + * The total content size should be <= 100M Unicode codepoints. + * The files must use UTF-8 encoding. + *+ * + *
repeated .google.cloud.translation.v3beta1.InputConfig input_configs = 5;
+ */
+ public Builder addInputConfigs(
+ int index, com.google.cloud.translate.v3beta1.InputConfig value) {
+ if (inputConfigsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureInputConfigsIsMutable();
+ inputConfigs_.add(index, value);
+ onChanged();
+ } else {
+ inputConfigsBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Input configurations. + * The total number of files matched should be <= 1000. + * The total content size should be <= 100M Unicode codepoints. + * The files must use UTF-8 encoding. + *+ * + *
repeated .google.cloud.translation.v3beta1.InputConfig input_configs = 5;
+ */
+ public Builder addInputConfigs(
+ com.google.cloud.translate.v3beta1.InputConfig.Builder builderForValue) {
+ if (inputConfigsBuilder_ == null) {
+ ensureInputConfigsIsMutable();
+ inputConfigs_.add(builderForValue.build());
+ onChanged();
+ } else {
+ inputConfigsBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Input configurations. + * The total number of files matched should be <= 1000. + * The total content size should be <= 100M Unicode codepoints. + * The files must use UTF-8 encoding. + *+ * + *
repeated .google.cloud.translation.v3beta1.InputConfig input_configs = 5;
+ */
+ public Builder addInputConfigs(
+ int index, com.google.cloud.translate.v3beta1.InputConfig.Builder builderForValue) {
+ if (inputConfigsBuilder_ == null) {
+ ensureInputConfigsIsMutable();
+ inputConfigs_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ inputConfigsBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Input configurations. + * The total number of files matched should be <= 1000. + * The total content size should be <= 100M Unicode codepoints. + * The files must use UTF-8 encoding. + *+ * + *
repeated .google.cloud.translation.v3beta1.InputConfig input_configs = 5;
+ */
+ public Builder addAllInputConfigs(
+ java.lang.Iterable extends com.google.cloud.translate.v3beta1.InputConfig> values) {
+ if (inputConfigsBuilder_ == null) {
+ ensureInputConfigsIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, inputConfigs_);
+ onChanged();
+ } else {
+ inputConfigsBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Input configurations. + * The total number of files matched should be <= 1000. + * The total content size should be <= 100M Unicode codepoints. + * The files must use UTF-8 encoding. + *+ * + *
repeated .google.cloud.translation.v3beta1.InputConfig input_configs = 5;
+ */
+ public Builder clearInputConfigs() {
+ if (inputConfigsBuilder_ == null) {
+ inputConfigs_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000010);
+ onChanged();
+ } else {
+ inputConfigsBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Input configurations. + * The total number of files matched should be <= 1000. + * The total content size should be <= 100M Unicode codepoints. + * The files must use UTF-8 encoding. + *+ * + *
repeated .google.cloud.translation.v3beta1.InputConfig input_configs = 5;
+ */
+ public Builder removeInputConfigs(int index) {
+ if (inputConfigsBuilder_ == null) {
+ ensureInputConfigsIsMutable();
+ inputConfigs_.remove(index);
+ onChanged();
+ } else {
+ inputConfigsBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Input configurations. + * The total number of files matched should be <= 1000. + * The total content size should be <= 100M Unicode codepoints. + * The files must use UTF-8 encoding. + *+ * + *
repeated .google.cloud.translation.v3beta1.InputConfig input_configs = 5;
+ */
+ public com.google.cloud.translate.v3beta1.InputConfig.Builder getInputConfigsBuilder(
+ int index) {
+ return getInputConfigsFieldBuilder().getBuilder(index);
+ }
+ /**
+ *
+ *
+ * + * Required. Input configurations. + * The total number of files matched should be <= 1000. + * The total content size should be <= 100M Unicode codepoints. + * The files must use UTF-8 encoding. + *+ * + *
repeated .google.cloud.translation.v3beta1.InputConfig input_configs = 5;
+ */
+ public com.google.cloud.translate.v3beta1.InputConfigOrBuilder getInputConfigsOrBuilder(
+ int index) {
+ if (inputConfigsBuilder_ == null) {
+ return inputConfigs_.get(index);
+ } else {
+ return inputConfigsBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. Input configurations. + * The total number of files matched should be <= 1000. + * The total content size should be <= 100M Unicode codepoints. + * The files must use UTF-8 encoding. + *+ * + *
repeated .google.cloud.translation.v3beta1.InputConfig input_configs = 5;
+ */
+ public java.util.List extends com.google.cloud.translate.v3beta1.InputConfigOrBuilder>
+ getInputConfigsOrBuilderList() {
+ if (inputConfigsBuilder_ != null) {
+ return inputConfigsBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(inputConfigs_);
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. Input configurations. + * The total number of files matched should be <= 1000. + * The total content size should be <= 100M Unicode codepoints. + * The files must use UTF-8 encoding. + *+ * + *
repeated .google.cloud.translation.v3beta1.InputConfig input_configs = 5;
+ */
+ public com.google.cloud.translate.v3beta1.InputConfig.Builder addInputConfigsBuilder() {
+ return getInputConfigsFieldBuilder()
+ .addBuilder(com.google.cloud.translate.v3beta1.InputConfig.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * Required. Input configurations. + * The total number of files matched should be <= 1000. + * The total content size should be <= 100M Unicode codepoints. + * The files must use UTF-8 encoding. + *+ * + *
repeated .google.cloud.translation.v3beta1.InputConfig input_configs = 5;
+ */
+ public com.google.cloud.translate.v3beta1.InputConfig.Builder addInputConfigsBuilder(
+ int index) {
+ return getInputConfigsFieldBuilder()
+ .addBuilder(index, com.google.cloud.translate.v3beta1.InputConfig.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * Required. Input configurations. + * The total number of files matched should be <= 1000. + * The total content size should be <= 100M Unicode codepoints. + * The files must use UTF-8 encoding. + *+ * + *
repeated .google.cloud.translation.v3beta1.InputConfig input_configs = 5;
+ */
+ public java.util.List+ * 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.v3beta1.OutputConfig output_config = 6;
+ */
+ public boolean hasOutputConfig() {
+ return outputConfigBuilder_ != null || 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.v3beta1.OutputConfig output_config = 6;
+ */
+ public com.google.cloud.translate.v3beta1.OutputConfig getOutputConfig() {
+ if (outputConfigBuilder_ == null) {
+ return outputConfig_ == null
+ ? com.google.cloud.translate.v3beta1.OutputConfig.getDefaultInstance()
+ : outputConfig_;
+ } else {
+ return outputConfigBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * 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.v3beta1.OutputConfig output_config = 6;
+ */
+ public Builder setOutputConfig(com.google.cloud.translate.v3beta1.OutputConfig value) {
+ if (outputConfigBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ outputConfig_ = value;
+ onChanged();
+ } else {
+ outputConfigBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * 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.v3beta1.OutputConfig output_config = 6;
+ */
+ public Builder setOutputConfig(
+ com.google.cloud.translate.v3beta1.OutputConfig.Builder builderForValue) {
+ if (outputConfigBuilder_ == null) {
+ outputConfig_ = builderForValue.build();
+ onChanged();
+ } else {
+ outputConfigBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * 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.v3beta1.OutputConfig output_config = 6;
+ */
+ public Builder mergeOutputConfig(com.google.cloud.translate.v3beta1.OutputConfig value) {
+ if (outputConfigBuilder_ == null) {
+ if (outputConfig_ != null) {
+ outputConfig_ =
+ com.google.cloud.translate.v3beta1.OutputConfig.newBuilder(outputConfig_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ outputConfig_ = value;
+ }
+ onChanged();
+ } else {
+ outputConfigBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * 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.v3beta1.OutputConfig output_config = 6;
+ */
+ public Builder clearOutputConfig() {
+ if (outputConfigBuilder_ == null) {
+ outputConfig_ = null;
+ onChanged();
+ } else {
+ outputConfig_ = null;
+ outputConfigBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * 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.v3beta1.OutputConfig output_config = 6;
+ */
+ public com.google.cloud.translate.v3beta1.OutputConfig.Builder getOutputConfigBuilder() {
+
+ onChanged();
+ return getOutputConfigFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * 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.v3beta1.OutputConfig output_config = 6;
+ */
+ public com.google.cloud.translate.v3beta1.OutputConfigOrBuilder getOutputConfigOrBuilder() {
+ if (outputConfigBuilder_ != null) {
+ return outputConfigBuilder_.getMessageOrBuilder();
+ } else {
+ return outputConfig_ == null
+ ? com.google.cloud.translate.v3beta1.OutputConfig.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.v3beta1.OutputConfig output_config = 6;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.translate.v3beta1.OutputConfig,
+ com.google.cloud.translate.v3beta1.OutputConfig.Builder,
+ com.google.cloud.translate.v3beta1.OutputConfigOrBuilder>
+ getOutputConfigFieldBuilder() {
+ if (outputConfigBuilder_ == null) {
+ outputConfigBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.translate.v3beta1.OutputConfig,
+ com.google.cloud.translate.v3beta1.OutputConfig.Builder,
+ com.google.cloud.translate.v3beta1.OutputConfigOrBuilder>(
+ getOutputConfig(), getParentForChildren(), isClean());
+ outputConfig_ = null;
+ }
+ return outputConfigBuilder_;
+ }
+
+ private com.google.protobuf.MapField<
+ java.lang.String, com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig>
+ glossaries_;
+
+ private com.google.protobuf.MapField<
+ java.lang.String, com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig>
+ internalGetGlossaries() {
+ if (glossaries_ == null) {
+ return com.google.protobuf.MapField.emptyMapField(
+ GlossariesDefaultEntryHolder.defaultEntry);
+ }
+ return glossaries_;
+ }
+
+ private com.google.protobuf.MapField<
+ java.lang.String, com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig>
+ internalGetMutableGlossaries() {
+ onChanged();
+ ;
+ if (glossaries_ == null) {
+ glossaries_ =
+ com.google.protobuf.MapField.newMapField(GlossariesDefaultEntryHolder.defaultEntry);
+ }
+ if (!glossaries_.isMutable()) {
+ glossaries_ = glossaries_.copy();
+ }
+ return glossaries_;
+ }
+
+ public int getGlossariesCount() {
+ return internalGetGlossaries().getMap().size();
+ }
+ /**
+ *
+ *
+ * + * Optional. Glossaries to be applied for translation. + * It's keyed by target language code. + *+ * + *
+ * map<string, .google.cloud.translation.v3beta1.TranslateTextGlossaryConfig> glossaries = 7;
+ *
+ */
+ public boolean containsGlossaries(java.lang.String key) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ return internalGetGlossaries().getMap().containsKey(key);
+ }
+ /** Use {@link #getGlossariesMap()} instead. */
+ @java.lang.Deprecated
+ public java.util.Map<
+ java.lang.String, com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig>
+ getGlossaries() {
+ return getGlossariesMap();
+ }
+ /**
+ *
+ *
+ * + * Optional. Glossaries to be applied for translation. + * It's keyed by target language code. + *+ * + *
+ * map<string, .google.cloud.translation.v3beta1.TranslateTextGlossaryConfig> glossaries = 7;
+ *
+ */
+ public java.util.Map<
+ java.lang.String, com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig>
+ getGlossariesMap() {
+ return internalGetGlossaries().getMap();
+ }
+ /**
+ *
+ *
+ * + * Optional. Glossaries to be applied for translation. + * It's keyed by target language code. + *+ * + *
+ * map<string, .google.cloud.translation.v3beta1.TranslateTextGlossaryConfig> glossaries = 7;
+ *
+ */
+ public com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig getGlossariesOrDefault(
+ java.lang.String key,
+ com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig defaultValue) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ java.util.Map<
+ java.lang.String, com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig>
+ map = internalGetGlossaries().getMap();
+ return map.containsKey(key) ? map.get(key) : defaultValue;
+ }
+ /**
+ *
+ *
+ * + * Optional. Glossaries to be applied for translation. + * It's keyed by target language code. + *+ * + *
+ * map<string, .google.cloud.translation.v3beta1.TranslateTextGlossaryConfig> glossaries = 7;
+ *
+ */
+ public com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig getGlossariesOrThrow(
+ java.lang.String key) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ java.util.Map<
+ java.lang.String, com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig>
+ map = internalGetGlossaries().getMap();
+ if (!map.containsKey(key)) {
+ throw new java.lang.IllegalArgumentException();
+ }
+ return map.get(key);
+ }
+
+ public Builder clearGlossaries() {
+ internalGetMutableGlossaries().getMutableMap().clear();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. Glossaries to be applied for translation. + * It's keyed by target language code. + *+ * + *
+ * map<string, .google.cloud.translation.v3beta1.TranslateTextGlossaryConfig> glossaries = 7;
+ *
+ */
+ public Builder removeGlossaries(java.lang.String key) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ internalGetMutableGlossaries().getMutableMap().remove(key);
+ return this;
+ }
+ /** Use alternate mutation accessors instead. */
+ @java.lang.Deprecated
+ public java.util.Map<
+ java.lang.String, com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig>
+ getMutableGlossaries() {
+ return internalGetMutableGlossaries().getMutableMap();
+ }
+ /**
+ *
+ *
+ * + * Optional. Glossaries to be applied for translation. + * It's keyed by target language code. + *+ * + *
+ * map<string, .google.cloud.translation.v3beta1.TranslateTextGlossaryConfig> glossaries = 7;
+ *
+ */
+ public Builder putGlossaries(
+ java.lang.String key,
+ com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig value) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ if (value == null) {
+ throw new java.lang.NullPointerException();
+ }
+ internalGetMutableGlossaries().getMutableMap().put(key, value);
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. Glossaries to be applied for translation. + * It's keyed by target language code. + *+ * + *
+ * map<string, .google.cloud.translation.v3beta1.TranslateTextGlossaryConfig> glossaries = 7;
+ *
+ */
+ public Builder putAllGlossaries(
+ java.util.Map<
+ java.lang.String, com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig>
+ values) {
+ internalGetMutableGlossaries().getMutableMap().putAll(values);
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.translation.v3beta1.BatchTranslateTextRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.BatchTranslateTextRequest)
+ private static final com.google.cloud.translate.v3beta1.BatchTranslateTextRequest
+ DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.translate.v3beta1.BatchTranslateTextRequest();
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchTranslateTextRequest getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ * Optional. Only used when making regionalized call.
+ * Format:
+ * projects/{project-id}/locations/{location-id}.
+ * Only custom models/glossaries within the same location-id can be used.
+ * Otherwise 400 is returned.
+ *
+ *
+ * string parent = 1;
+ */
+ java.lang.String getParent();
+ /**
+ *
+ *
+ *
+ * Optional. Only used when making regionalized call.
+ * Format:
+ * projects/{project-id}/locations/{location-id}.
+ * Only custom models/glossaries within the same location-id can be used.
+ * Otherwise 400 is returned.
+ *
+ *
+ * string parent = 1;
+ */
+ com.google.protobuf.ByteString getParentBytes();
+
+ /**
+ *
+ *
+ * + * Required. Source language code. + *+ * + *
string source_language_code = 2;
+ */
+ java.lang.String getSourceLanguageCode();
+ /**
+ *
+ *
+ * + * Required. Source language code. + *+ * + *
string source_language_code = 2;
+ */
+ com.google.protobuf.ByteString getSourceLanguageCodeBytes();
+
+ /**
+ *
+ *
+ * + * Required. Specify up to 10 language codes here. + *+ * + *
repeated string target_language_codes = 3;
+ */
+ java.util.List+ * Required. Specify up to 10 language codes here. + *+ * + *
repeated string target_language_codes = 3;
+ */
+ int getTargetLanguageCodesCount();
+ /**
+ *
+ *
+ * + * Required. Specify up to 10 language codes here. + *+ * + *
repeated string target_language_codes = 3;
+ */
+ java.lang.String getTargetLanguageCodes(int index);
+ /**
+ *
+ *
+ * + * Required. Specify up to 10 language codes here. + *+ * + *
repeated string target_language_codes = 3;
+ */
+ com.google.protobuf.ByteString getTargetLanguageCodesBytes(int index);
+
+ /**
+ *
+ *
+ *
+ * Optional. The models to use for translation. Map's key is target language
+ * code. Map's value is model name. Value can be a built-in general model,
+ * or a custom model built by AutoML.
+ * The value format depends on model type:
+ * 1. Custom models:
+ * projects/{project-id}/locations/{location-id}/models/{model-id}.
+ * 2. General (built-in) models:
+ * projects/{project-id}/locations/{location-id}/models/general/nmt
+ * projects/{project-id}/locations/{location-id}/models/general/base
+ * If the map is empty or a specific model is
+ * not requested for a language pair, then default google model is used.
+ *
+ *
+ * map<string, string> models = 4;
+ */
+ int getModelsCount();
+ /**
+ *
+ *
+ *
+ * Optional. The models to use for translation. Map's key is target language
+ * code. Map's value is model name. Value can be a built-in general model,
+ * or a custom model built by AutoML.
+ * The value format depends on model type:
+ * 1. Custom models:
+ * projects/{project-id}/locations/{location-id}/models/{model-id}.
+ * 2. General (built-in) models:
+ * projects/{project-id}/locations/{location-id}/models/general/nmt
+ * projects/{project-id}/locations/{location-id}/models/general/base
+ * If the map is empty or a specific model is
+ * not requested for a language pair, then default google model is used.
+ *
+ *
+ * map<string, string> models = 4;
+ */
+ boolean containsModels(java.lang.String key);
+ /** Use {@link #getModelsMap()} instead. */
+ @java.lang.Deprecated
+ java.util.Map
+ * Optional. The models to use for translation. Map's key is target language
+ * code. Map's value is model name. Value can be a built-in general model,
+ * or a custom model built by AutoML.
+ * The value format depends on model type:
+ * 1. Custom models:
+ * projects/{project-id}/locations/{location-id}/models/{model-id}.
+ * 2. General (built-in) models:
+ * projects/{project-id}/locations/{location-id}/models/general/nmt
+ * projects/{project-id}/locations/{location-id}/models/general/base
+ * If the map is empty or a specific model is
+ * not requested for a language pair, then default google model is used.
+ *
+ *
+ * map<string, string> models = 4;
+ */
+ java.util.Map
+ * Optional. The models to use for translation. Map's key is target language
+ * code. Map's value is model name. Value can be a built-in general model,
+ * or a custom model built by AutoML.
+ * The value format depends on model type:
+ * 1. Custom models:
+ * projects/{project-id}/locations/{location-id}/models/{model-id}.
+ * 2. General (built-in) models:
+ * projects/{project-id}/locations/{location-id}/models/general/nmt
+ * projects/{project-id}/locations/{location-id}/models/general/base
+ * If the map is empty or a specific model is
+ * not requested for a language pair, then default google model is used.
+ *
+ *
+ * map<string, string> models = 4;
+ */
+ java.lang.String getModelsOrDefault(java.lang.String key, java.lang.String defaultValue);
+ /**
+ *
+ *
+ *
+ * Optional. The models to use for translation. Map's key is target language
+ * code. Map's value is model name. Value can be a built-in general model,
+ * or a custom model built by AutoML.
+ * The value format depends on model type:
+ * 1. Custom models:
+ * projects/{project-id}/locations/{location-id}/models/{model-id}.
+ * 2. General (built-in) models:
+ * projects/{project-id}/locations/{location-id}/models/general/nmt
+ * projects/{project-id}/locations/{location-id}/models/general/base
+ * If the map is empty or a specific model is
+ * not requested for a language pair, then default google model is used.
+ *
+ *
+ * map<string, string> models = 4;
+ */
+ java.lang.String getModelsOrThrow(java.lang.String key);
+
+ /**
+ *
+ *
+ * + * Required. Input configurations. + * The total number of files matched should be <= 1000. + * The total content size should be <= 100M Unicode codepoints. + * The files must use UTF-8 encoding. + *+ * + *
repeated .google.cloud.translation.v3beta1.InputConfig input_configs = 5;
+ */
+ java.util.List+ * Required. Input configurations. + * The total number of files matched should be <= 1000. + * The total content size should be <= 100M Unicode codepoints. + * The files must use UTF-8 encoding. + *+ * + *
repeated .google.cloud.translation.v3beta1.InputConfig input_configs = 5;
+ */
+ com.google.cloud.translate.v3beta1.InputConfig getInputConfigs(int index);
+ /**
+ *
+ *
+ * + * Required. Input configurations. + * The total number of files matched should be <= 1000. + * The total content size should be <= 100M Unicode codepoints. + * The files must use UTF-8 encoding. + *+ * + *
repeated .google.cloud.translation.v3beta1.InputConfig input_configs = 5;
+ */
+ int getInputConfigsCount();
+ /**
+ *
+ *
+ * + * Required. Input configurations. + * The total number of files matched should be <= 1000. + * The total content size should be <= 100M Unicode codepoints. + * The files must use UTF-8 encoding. + *+ * + *
repeated .google.cloud.translation.v3beta1.InputConfig input_configs = 5;
+ */
+ java.util.List extends com.google.cloud.translate.v3beta1.InputConfigOrBuilder>
+ getInputConfigsOrBuilderList();
+ /**
+ *
+ *
+ * + * Required. Input configurations. + * The total number of files matched should be <= 1000. + * The total content size should be <= 100M Unicode codepoints. + * The files must use UTF-8 encoding. + *+ * + *
repeated .google.cloud.translation.v3beta1.InputConfig input_configs = 5;
+ */
+ com.google.cloud.translate.v3beta1.InputConfigOrBuilder getInputConfigsOrBuilder(int index);
+
+ /**
+ *
+ *
+ * + * 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.v3beta1.OutputConfig output_config = 6;
+ */
+ boolean hasOutputConfig();
+ /**
+ *
+ *
+ * + * 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.v3beta1.OutputConfig output_config = 6;
+ */
+ com.google.cloud.translate.v3beta1.OutputConfig getOutputConfig();
+ /**
+ *
+ *
+ * + * 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.v3beta1.OutputConfig output_config = 6;
+ */
+ com.google.cloud.translate.v3beta1.OutputConfigOrBuilder getOutputConfigOrBuilder();
+
+ /**
+ *
+ *
+ * + * Optional. Glossaries to be applied for translation. + * It's keyed by target language code. + *+ * + *
+ * map<string, .google.cloud.translation.v3beta1.TranslateTextGlossaryConfig> glossaries = 7;
+ *
+ */
+ int getGlossariesCount();
+ /**
+ *
+ *
+ * + * Optional. Glossaries to be applied for translation. + * It's keyed by target language code. + *+ * + *
+ * map<string, .google.cloud.translation.v3beta1.TranslateTextGlossaryConfig> glossaries = 7;
+ *
+ */
+ boolean containsGlossaries(java.lang.String key);
+ /** Use {@link #getGlossariesMap()} instead. */
+ @java.lang.Deprecated
+ java.util.Map+ * Optional. Glossaries to be applied for translation. + * It's keyed by target language code. + *+ * + *
+ * map<string, .google.cloud.translation.v3beta1.TranslateTextGlossaryConfig> glossaries = 7;
+ *
+ */
+ java.util.Map+ * Optional. Glossaries to be applied for translation. + * It's keyed by target language code. + *+ * + *
+ * map<string, .google.cloud.translation.v3beta1.TranslateTextGlossaryConfig> glossaries = 7;
+ *
+ */
+ com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig getGlossariesOrDefault(
+ java.lang.String key,
+ com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig defaultValue);
+ /**
+ *
+ *
+ * + * Optional. Glossaries to be applied for translation. + * It's keyed by target language code. + *+ * + *
+ * map<string, .google.cloud.translation.v3beta1.TranslateTextGlossaryConfig> glossaries = 7;
+ *
+ */
+ com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig getGlossariesOrThrow(
+ java.lang.String key);
+}
diff --git a/google-api-grpc/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/CreateGlossaryMetadata.java b/google-api-grpc/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/CreateGlossaryMetadata.java
new file mode 100644
index 000000000000..218bec6d6c10
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/CreateGlossaryMetadata.java
@@ -0,0 +1,1214 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/translate/v3beta1/translation_service.proto
+
+package com.google.cloud.translate.v3beta1;
+
+/**
+ *
+ *
+ * + * Stored in the [google.longrunning.Operation.metadata][google.longrunning.Operation.metadata] field returned by + * CreateGlossary. + *+ * + * Protobuf type {@code google.cloud.translation.v3beta1.CreateGlossaryMetadata} + */ +public final class CreateGlossaryMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.translation.v3beta1.CreateGlossaryMetadata) + CreateGlossaryMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateGlossaryMetadata.newBuilder() to construct. + private CreateGlossaryMetadata(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private CreateGlossaryMetadata() { + name_ = ""; + state_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateGlossaryMetadata( + 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 16: + { + int rawValue = input.readEnum(); + + state_ = rawValue; + break; + } + case 26: + { + 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.v3beta1.TranslationServiceProto + .internal_static_google_cloud_translation_v3beta1_CreateGlossaryMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.translate.v3beta1.TranslationServiceProto + .internal_static_google_cloud_translation_v3beta1_CreateGlossaryMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.translate.v3beta1.CreateGlossaryMetadata.class, + com.google.cloud.translate.v3beta1.CreateGlossaryMetadata.Builder.class); + } + + /** + * + * + *
+ * Enumerates the possible states that the creation request can be in. + *+ * + * Protobuf enum {@code google.cloud.translation.v3beta1.CreateGlossaryMetadata.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 glossary has been successfully created. + *+ * + *
SUCCEEDED = 2;
+ */
+ SUCCEEDED(2),
+ /**
+ *
+ *
+ * + * Failed to create the glossary. + *+ * + *
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 glossary creation request has been successfully canceled. + *+ * + *
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 glossary has been successfully created. + *+ * + *
SUCCEEDED = 2;
+ */
+ public static final int SUCCEEDED_VALUE = 2;
+ /**
+ *
+ *
+ * + * Failed to create the glossary. + *+ * + *
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 glossary creation request has been successfully canceled. + *+ * + *
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;
+ }
+
+ /** @deprecated Use {@link #forNumber(int)} instead. */
+ @java.lang.Deprecated
+ public static State valueOf(int value) {
+ return forNumber(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 name of the glossary that is being created. + *+ * + *
string name = 1;
+ */
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ name_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * The name of the glossary that is being created. + *+ * + *
string name = 1;
+ */
+ public com.google.protobuf.ByteString getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int STATE_FIELD_NUMBER = 2;
+ private int state_;
+ /**
+ *
+ *
+ * + * The current state of the glossary creation operation. + *+ * + *
.google.cloud.translation.v3beta1.CreateGlossaryMetadata.State state = 2;
+ */
+ public int getStateValue() {
+ return state_;
+ }
+ /**
+ *
+ *
+ * + * The current state of the glossary creation operation. + *+ * + *
.google.cloud.translation.v3beta1.CreateGlossaryMetadata.State state = 2;
+ */
+ public com.google.cloud.translate.v3beta1.CreateGlossaryMetadata.State getState() {
+ @SuppressWarnings("deprecation")
+ com.google.cloud.translate.v3beta1.CreateGlossaryMetadata.State result =
+ com.google.cloud.translate.v3beta1.CreateGlossaryMetadata.State.valueOf(state_);
+ return result == null
+ ? com.google.cloud.translate.v3beta1.CreateGlossaryMetadata.State.UNRECOGNIZED
+ : result;
+ }
+
+ public static final int SUBMIT_TIME_FIELD_NUMBER = 3;
+ private com.google.protobuf.Timestamp submitTime_;
+ /**
+ *
+ *
+ * + * The time when the operation was submitted to the server. + *+ * + *
.google.protobuf.Timestamp submit_time = 3;
+ */
+ public boolean hasSubmitTime() {
+ return submitTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * The time when the operation was submitted to the server. + *+ * + *
.google.protobuf.Timestamp submit_time = 3;
+ */
+ public com.google.protobuf.Timestamp getSubmitTime() {
+ return submitTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : submitTime_;
+ }
+ /**
+ *
+ *
+ * + * The time when the operation was submitted to the server. + *+ * + *
.google.protobuf.Timestamp submit_time = 3;
+ */
+ 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 (!getNameBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
+ }
+ if (state_
+ != com.google.cloud.translate.v3beta1.CreateGlossaryMetadata.State.STATE_UNSPECIFIED
+ .getNumber()) {
+ output.writeEnum(2, state_);
+ }
+ if (submitTime_ != null) {
+ output.writeMessage(3, getSubmitTime());
+ }
+ 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 (state_
+ != com.google.cloud.translate.v3beta1.CreateGlossaryMetadata.State.STATE_UNSPECIFIED
+ .getNumber()) {
+ size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, state_);
+ }
+ if (submitTime_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, 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.v3beta1.CreateGlossaryMetadata)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.translate.v3beta1.CreateGlossaryMetadata other =
+ (com.google.cloud.translate.v3beta1.CreateGlossaryMetadata) obj;
+
+ if (!getName().equals(other.getName())) return false;
+ if (state_ != other.state_) 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) + NAME_FIELD_NUMBER;
+ hash = (53 * hash) + getName().hashCode();
+ hash = (37 * hash) + STATE_FIELD_NUMBER;
+ hash = (53 * hash) + state_;
+ 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.v3beta1.CreateGlossaryMetadata parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.CreateGlossaryMetadata parseFrom(
+ 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.v3beta1.CreateGlossaryMetadata parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.CreateGlossaryMetadata parseFrom(
+ com.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.v3beta1.CreateGlossaryMetadata parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.CreateGlossaryMetadata parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.CreateGlossaryMetadata parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.CreateGlossaryMetadata parseFrom(
+ java.io.InputStream 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.v3beta1.CreateGlossaryMetadata parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.CreateGlossaryMetadata parseDelimitedFrom(
+ java.io.InputStream 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.v3beta1.CreateGlossaryMetadata parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.CreateGlossaryMetadata parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, 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.v3beta1.CreateGlossaryMetadata prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ * + * Stored in the [google.longrunning.Operation.metadata][google.longrunning.Operation.metadata] field returned by + * CreateGlossary. + *+ * + * Protobuf type {@code google.cloud.translation.v3beta1.CreateGlossaryMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * The name of the glossary that is being created. + *+ * + *
string name = 1;
+ */
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ name_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The name of the glossary that is being created. + *+ * + *
string name = 1;
+ */
+ public com.google.protobuf.ByteString getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The name of the glossary that is being created. + *+ * + *
string name = 1;
+ */
+ public Builder setName(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The name of the glossary that is being created. + *+ * + *
string name = 1;
+ */
+ public Builder clearName() {
+
+ name_ = getDefaultInstance().getName();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The name of the glossary that is being created. + *+ * + *
string name = 1;
+ */
+ public Builder setNameBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+
+ private int state_ = 0;
+ /**
+ *
+ *
+ * + * The current state of the glossary creation operation. + *+ * + *
.google.cloud.translation.v3beta1.CreateGlossaryMetadata.State state = 2;
+ */
+ public int getStateValue() {
+ return state_;
+ }
+ /**
+ *
+ *
+ * + * The current state of the glossary creation operation. + *+ * + *
.google.cloud.translation.v3beta1.CreateGlossaryMetadata.State state = 2;
+ */
+ public Builder setStateValue(int value) {
+ state_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The current state of the glossary creation operation. + *+ * + *
.google.cloud.translation.v3beta1.CreateGlossaryMetadata.State state = 2;
+ */
+ public com.google.cloud.translate.v3beta1.CreateGlossaryMetadata.State getState() {
+ @SuppressWarnings("deprecation")
+ com.google.cloud.translate.v3beta1.CreateGlossaryMetadata.State result =
+ com.google.cloud.translate.v3beta1.CreateGlossaryMetadata.State.valueOf(state_);
+ return result == null
+ ? com.google.cloud.translate.v3beta1.CreateGlossaryMetadata.State.UNRECOGNIZED
+ : result;
+ }
+ /**
+ *
+ *
+ * + * The current state of the glossary creation operation. + *+ * + *
.google.cloud.translation.v3beta1.CreateGlossaryMetadata.State state = 2;
+ */
+ public Builder setState(com.google.cloud.translate.v3beta1.CreateGlossaryMetadata.State value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ state_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The current state of the glossary creation operation. + *+ * + *
.google.cloud.translation.v3beta1.CreateGlossaryMetadata.State state = 2;
+ */
+ public Builder clearState() {
+
+ state_ = 0;
+ 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_;
+ /**
+ *
+ *
+ * + * The time when the operation was submitted to the server. + *+ * + *
.google.protobuf.Timestamp submit_time = 3;
+ */
+ public boolean hasSubmitTime() {
+ return submitTimeBuilder_ != null || submitTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * The time when the operation was submitted to the server. + *+ * + *
.google.protobuf.Timestamp submit_time = 3;
+ */
+ public com.google.protobuf.Timestamp getSubmitTime() {
+ if (submitTimeBuilder_ == null) {
+ return submitTime_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : submitTime_;
+ } else {
+ return submitTimeBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * The time when the operation was submitted to the server. + *+ * + *
.google.protobuf.Timestamp submit_time = 3;
+ */
+ 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;
+ }
+ /**
+ *
+ *
+ * + * The time when the operation was submitted to the server. + *+ * + *
.google.protobuf.Timestamp submit_time = 3;
+ */
+ public Builder setSubmitTime(com.google.protobuf.Timestamp.Builder builderForValue) {
+ if (submitTimeBuilder_ == null) {
+ submitTime_ = builderForValue.build();
+ onChanged();
+ } else {
+ submitTimeBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The time when the operation was submitted to the server. + *+ * + *
.google.protobuf.Timestamp submit_time = 3;
+ */
+ 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;
+ }
+ /**
+ *
+ *
+ * + * The time when the operation was submitted to the server. + *+ * + *
.google.protobuf.Timestamp submit_time = 3;
+ */
+ public Builder clearSubmitTime() {
+ if (submitTimeBuilder_ == null) {
+ submitTime_ = null;
+ onChanged();
+ } else {
+ submitTime_ = null;
+ submitTimeBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The time when the operation was submitted to the server. + *+ * + *
.google.protobuf.Timestamp submit_time = 3;
+ */
+ public com.google.protobuf.Timestamp.Builder getSubmitTimeBuilder() {
+
+ onChanged();
+ return getSubmitTimeFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * The time when the operation was submitted to the server. + *+ * + *
.google.protobuf.Timestamp submit_time = 3;
+ */
+ public com.google.protobuf.TimestampOrBuilder getSubmitTimeOrBuilder() {
+ if (submitTimeBuilder_ != null) {
+ return submitTimeBuilder_.getMessageOrBuilder();
+ } else {
+ return submitTime_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : submitTime_;
+ }
+ }
+ /**
+ *
+ *
+ * + * The time when the operation was submitted to the server. + *+ * + *
.google.protobuf.Timestamp submit_time = 3;
+ */
+ 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.v3beta1.CreateGlossaryMetadata)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.CreateGlossaryMetadata)
+ private static final com.google.cloud.translate.v3beta1.CreateGlossaryMetadata DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.translate.v3beta1.CreateGlossaryMetadata();
+ }
+
+ public static com.google.cloud.translate.v3beta1.CreateGlossaryMetadata getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * The name of the glossary that is being created. + *+ * + *
string name = 1;
+ */
+ java.lang.String getName();
+ /**
+ *
+ *
+ * + * The name of the glossary that is being created. + *+ * + *
string name = 1;
+ */
+ com.google.protobuf.ByteString getNameBytes();
+
+ /**
+ *
+ *
+ * + * The current state of the glossary creation operation. + *+ * + *
.google.cloud.translation.v3beta1.CreateGlossaryMetadata.State state = 2;
+ */
+ int getStateValue();
+ /**
+ *
+ *
+ * + * The current state of the glossary creation operation. + *+ * + *
.google.cloud.translation.v3beta1.CreateGlossaryMetadata.State state = 2;
+ */
+ com.google.cloud.translate.v3beta1.CreateGlossaryMetadata.State getState();
+
+ /**
+ *
+ *
+ * + * The time when the operation was submitted to the server. + *+ * + *
.google.protobuf.Timestamp submit_time = 3;
+ */
+ boolean hasSubmitTime();
+ /**
+ *
+ *
+ * + * The time when the operation was submitted to the server. + *+ * + *
.google.protobuf.Timestamp submit_time = 3;
+ */
+ com.google.protobuf.Timestamp getSubmitTime();
+ /**
+ *
+ *
+ * + * The time when the operation was submitted to the server. + *+ * + *
.google.protobuf.Timestamp submit_time = 3;
+ */
+ com.google.protobuf.TimestampOrBuilder getSubmitTimeOrBuilder();
+}
diff --git a/google-api-grpc/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/CreateGlossaryRequest.java b/google-api-grpc/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/CreateGlossaryRequest.java
new file mode 100644
index 000000000000..c666db9e8a84
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/CreateGlossaryRequest.java
@@ -0,0 +1,866 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/translate/v3beta1/translation_service.proto
+
+package com.google.cloud.translate.v3beta1;
+
+/**
+ *
+ *
+ * + * Request message for CreateGlossary. + *+ * + * Protobuf type {@code google.cloud.translation.v3beta1.CreateGlossaryRequest} + */ +public final class CreateGlossaryRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.translation.v3beta1.CreateGlossaryRequest) + CreateGlossaryRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateGlossaryRequest.newBuilder() to construct. + private CreateGlossaryRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private CreateGlossaryRequest() { + parent_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateGlossaryRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + com.google.cloud.translate.v3beta1.Glossary.Builder subBuilder = null; + if (glossary_ != null) { + subBuilder = glossary_.toBuilder(); + } + glossary_ = + input.readMessage( + com.google.cloud.translate.v3beta1.Glossary.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(glossary_); + glossary_ = 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.v3beta1.TranslationServiceProto + .internal_static_google_cloud_translation_v3beta1_CreateGlossaryRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.translate.v3beta1.TranslationServiceProto + .internal_static_google_cloud_translation_v3beta1_CreateGlossaryRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.translate.v3beta1.CreateGlossaryRequest.class, + com.google.cloud.translate.v3beta1.CreateGlossaryRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+ * Required. The project name. + *+ * + *
string parent = 1;
+ */
+ public java.lang.String getParent() {
+ java.lang.Object ref = parent_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ parent_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. The project name. + *+ * + *
string parent = 1;
+ */
+ public com.google.protobuf.ByteString getParentBytes() {
+ java.lang.Object ref = parent_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ parent_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int GLOSSARY_FIELD_NUMBER = 2;
+ private com.google.cloud.translate.v3beta1.Glossary glossary_;
+ /**
+ *
+ *
+ * + * Required. The glossary to create. + *+ * + *
.google.cloud.translation.v3beta1.Glossary glossary = 2;
+ */
+ public boolean hasGlossary() {
+ return glossary_ != null;
+ }
+ /**
+ *
+ *
+ * + * Required. The glossary to create. + *+ * + *
.google.cloud.translation.v3beta1.Glossary glossary = 2;
+ */
+ public com.google.cloud.translate.v3beta1.Glossary getGlossary() {
+ return glossary_ == null
+ ? com.google.cloud.translate.v3beta1.Glossary.getDefaultInstance()
+ : glossary_;
+ }
+ /**
+ *
+ *
+ * + * Required. The glossary to create. + *+ * + *
.google.cloud.translation.v3beta1.Glossary glossary = 2;
+ */
+ public com.google.cloud.translate.v3beta1.GlossaryOrBuilder getGlossaryOrBuilder() {
+ return getGlossary();
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (!getParentBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_);
+ }
+ if (glossary_ != null) {
+ output.writeMessage(2, getGlossary());
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getParentBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_);
+ }
+ if (glossary_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getGlossary());
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ 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.v3beta1.CreateGlossaryRequest)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.translate.v3beta1.CreateGlossaryRequest other =
+ (com.google.cloud.translate.v3beta1.CreateGlossaryRequest) obj;
+
+ if (!getParent().equals(other.getParent())) return false;
+ if (hasGlossary() != other.hasGlossary()) return false;
+ if (hasGlossary()) {
+ if (!getGlossary().equals(other.getGlossary())) return false;
+ }
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + PARENT_FIELD_NUMBER;
+ hash = (53 * hash) + getParent().hashCode();
+ if (hasGlossary()) {
+ hash = (37 * hash) + GLOSSARY_FIELD_NUMBER;
+ hash = (53 * hash) + getGlossary().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.translate.v3beta1.CreateGlossaryRequest parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.CreateGlossaryRequest parseFrom(
+ 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.v3beta1.CreateGlossaryRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.CreateGlossaryRequest parseFrom(
+ com.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.v3beta1.CreateGlossaryRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.CreateGlossaryRequest parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.CreateGlossaryRequest parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.CreateGlossaryRequest parseFrom(
+ java.io.InputStream 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.v3beta1.CreateGlossaryRequest parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.CreateGlossaryRequest parseDelimitedFrom(
+ java.io.InputStream 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.v3beta1.CreateGlossaryRequest parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.CreateGlossaryRequest parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, 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.v3beta1.CreateGlossaryRequest prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ * + * Request message for CreateGlossary. + *+ * + * Protobuf type {@code google.cloud.translation.v3beta1.CreateGlossaryRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Required. The project name. + *+ * + *
string parent = 1;
+ */
+ public java.lang.String getParent() {
+ java.lang.Object ref = parent_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ parent_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. The project name. + *+ * + *
string parent = 1;
+ */
+ public com.google.protobuf.ByteString getParentBytes() {
+ java.lang.Object ref = parent_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ parent_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. The project name. + *+ * + *
string parent = 1;
+ */
+ public Builder setParent(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ parent_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The project name. + *+ * + *
string parent = 1;
+ */
+ public Builder clearParent() {
+
+ parent_ = getDefaultInstance().getParent();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The project name. + *+ * + *
string parent = 1;
+ */
+ public Builder setParentBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ parent_ = value;
+ onChanged();
+ return this;
+ }
+
+ private com.google.cloud.translate.v3beta1.Glossary glossary_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.translate.v3beta1.Glossary,
+ com.google.cloud.translate.v3beta1.Glossary.Builder,
+ com.google.cloud.translate.v3beta1.GlossaryOrBuilder>
+ glossaryBuilder_;
+ /**
+ *
+ *
+ * + * Required. The glossary to create. + *+ * + *
.google.cloud.translation.v3beta1.Glossary glossary = 2;
+ */
+ public boolean hasGlossary() {
+ return glossaryBuilder_ != null || glossary_ != null;
+ }
+ /**
+ *
+ *
+ * + * Required. The glossary to create. + *+ * + *
.google.cloud.translation.v3beta1.Glossary glossary = 2;
+ */
+ public com.google.cloud.translate.v3beta1.Glossary getGlossary() {
+ if (glossaryBuilder_ == null) {
+ return glossary_ == null
+ ? com.google.cloud.translate.v3beta1.Glossary.getDefaultInstance()
+ : glossary_;
+ } else {
+ return glossaryBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. The glossary to create. + *+ * + *
.google.cloud.translation.v3beta1.Glossary glossary = 2;
+ */
+ public Builder setGlossary(com.google.cloud.translate.v3beta1.Glossary value) {
+ if (glossaryBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ glossary_ = value;
+ onChanged();
+ } else {
+ glossaryBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The glossary to create. + *+ * + *
.google.cloud.translation.v3beta1.Glossary glossary = 2;
+ */
+ public Builder setGlossary(
+ com.google.cloud.translate.v3beta1.Glossary.Builder builderForValue) {
+ if (glossaryBuilder_ == null) {
+ glossary_ = builderForValue.build();
+ onChanged();
+ } else {
+ glossaryBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The glossary to create. + *+ * + *
.google.cloud.translation.v3beta1.Glossary glossary = 2;
+ */
+ public Builder mergeGlossary(com.google.cloud.translate.v3beta1.Glossary value) {
+ if (glossaryBuilder_ == null) {
+ if (glossary_ != null) {
+ glossary_ =
+ com.google.cloud.translate.v3beta1.Glossary.newBuilder(glossary_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ glossary_ = value;
+ }
+ onChanged();
+ } else {
+ glossaryBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The glossary to create. + *+ * + *
.google.cloud.translation.v3beta1.Glossary glossary = 2;
+ */
+ public Builder clearGlossary() {
+ if (glossaryBuilder_ == null) {
+ glossary_ = null;
+ onChanged();
+ } else {
+ glossary_ = null;
+ glossaryBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The glossary to create. + *+ * + *
.google.cloud.translation.v3beta1.Glossary glossary = 2;
+ */
+ public com.google.cloud.translate.v3beta1.Glossary.Builder getGlossaryBuilder() {
+
+ onChanged();
+ return getGlossaryFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Required. The glossary to create. + *+ * + *
.google.cloud.translation.v3beta1.Glossary glossary = 2;
+ */
+ public com.google.cloud.translate.v3beta1.GlossaryOrBuilder getGlossaryOrBuilder() {
+ if (glossaryBuilder_ != null) {
+ return glossaryBuilder_.getMessageOrBuilder();
+ } else {
+ return glossary_ == null
+ ? com.google.cloud.translate.v3beta1.Glossary.getDefaultInstance()
+ : glossary_;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. The glossary to create. + *+ * + *
.google.cloud.translation.v3beta1.Glossary glossary = 2;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.translate.v3beta1.Glossary,
+ com.google.cloud.translate.v3beta1.Glossary.Builder,
+ com.google.cloud.translate.v3beta1.GlossaryOrBuilder>
+ getGlossaryFieldBuilder() {
+ if (glossaryBuilder_ == null) {
+ glossaryBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.translate.v3beta1.Glossary,
+ com.google.cloud.translate.v3beta1.Glossary.Builder,
+ com.google.cloud.translate.v3beta1.GlossaryOrBuilder>(
+ getGlossary(), getParentForChildren(), isClean());
+ glossary_ = null;
+ }
+ return glossaryBuilder_;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @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.v3beta1.CreateGlossaryRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.CreateGlossaryRequest)
+ private static final com.google.cloud.translate.v3beta1.CreateGlossaryRequest DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.translate.v3beta1.CreateGlossaryRequest();
+ }
+
+ public static com.google.cloud.translate.v3beta1.CreateGlossaryRequest getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Required. The project name. + *+ * + *
string parent = 1;
+ */
+ java.lang.String getParent();
+ /**
+ *
+ *
+ * + * Required. The project name. + *+ * + *
string parent = 1;
+ */
+ com.google.protobuf.ByteString getParentBytes();
+
+ /**
+ *
+ *
+ * + * Required. The glossary to create. + *+ * + *
.google.cloud.translation.v3beta1.Glossary glossary = 2;
+ */
+ boolean hasGlossary();
+ /**
+ *
+ *
+ * + * Required. The glossary to create. + *+ * + *
.google.cloud.translation.v3beta1.Glossary glossary = 2;
+ */
+ com.google.cloud.translate.v3beta1.Glossary getGlossary();
+ /**
+ *
+ *
+ * + * Required. The glossary to create. + *+ * + *
.google.cloud.translation.v3beta1.Glossary glossary = 2;
+ */
+ com.google.cloud.translate.v3beta1.GlossaryOrBuilder getGlossaryOrBuilder();
+}
diff --git a/google-api-grpc/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/DeleteGlossaryMetadata.java b/google-api-grpc/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/DeleteGlossaryMetadata.java
new file mode 100644
index 000000000000..9861645ba8cf
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/DeleteGlossaryMetadata.java
@@ -0,0 +1,1214 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/translate/v3beta1/translation_service.proto
+
+package com.google.cloud.translate.v3beta1;
+
+/**
+ *
+ *
+ * + * Stored in the [google.longrunning.Operation.metadata][google.longrunning.Operation.metadata] field returned by + * DeleteGlossary. + *+ * + * Protobuf type {@code google.cloud.translation.v3beta1.DeleteGlossaryMetadata} + */ +public final class DeleteGlossaryMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.translation.v3beta1.DeleteGlossaryMetadata) + DeleteGlossaryMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteGlossaryMetadata.newBuilder() to construct. + private DeleteGlossaryMetadata(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private DeleteGlossaryMetadata() { + name_ = ""; + state_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteGlossaryMetadata( + 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 16: + { + int rawValue = input.readEnum(); + + state_ = rawValue; + break; + } + case 26: + { + 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.v3beta1.TranslationServiceProto + .internal_static_google_cloud_translation_v3beta1_DeleteGlossaryMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.translate.v3beta1.TranslationServiceProto + .internal_static_google_cloud_translation_v3beta1_DeleteGlossaryMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.translate.v3beta1.DeleteGlossaryMetadata.class, + com.google.cloud.translate.v3beta1.DeleteGlossaryMetadata.Builder.class); + } + + /** + * + * + *
+ * Enumerates the possible states that the creation request can be in. + *+ * + * Protobuf enum {@code google.cloud.translation.v3beta1.DeleteGlossaryMetadata.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 glossary was successfully deleted. + *+ * + *
SUCCEEDED = 2;
+ */
+ SUCCEEDED(2),
+ /**
+ *
+ *
+ * + * Failed to delete the glossary. + *+ * + *
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 glossary deletion request has been successfully canceled. + *+ * + *
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 glossary was successfully deleted. + *+ * + *
SUCCEEDED = 2;
+ */
+ public static final int SUCCEEDED_VALUE = 2;
+ /**
+ *
+ *
+ * + * Failed to delete the glossary. + *+ * + *
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 glossary deletion request has been successfully canceled. + *+ * + *
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;
+ }
+
+ /** @deprecated Use {@link #forNumber(int)} instead. */
+ @java.lang.Deprecated
+ public static State valueOf(int value) {
+ return forNumber(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 name of the glossary that is being deleted. + *+ * + *
string name = 1;
+ */
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ name_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * The name of the glossary that is being deleted. + *+ * + *
string name = 1;
+ */
+ public com.google.protobuf.ByteString getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int STATE_FIELD_NUMBER = 2;
+ private int state_;
+ /**
+ *
+ *
+ * + * The current state of the glossary deletion operation. + *+ * + *
.google.cloud.translation.v3beta1.DeleteGlossaryMetadata.State state = 2;
+ */
+ public int getStateValue() {
+ return state_;
+ }
+ /**
+ *
+ *
+ * + * The current state of the glossary deletion operation. + *+ * + *
.google.cloud.translation.v3beta1.DeleteGlossaryMetadata.State state = 2;
+ */
+ public com.google.cloud.translate.v3beta1.DeleteGlossaryMetadata.State getState() {
+ @SuppressWarnings("deprecation")
+ com.google.cloud.translate.v3beta1.DeleteGlossaryMetadata.State result =
+ com.google.cloud.translate.v3beta1.DeleteGlossaryMetadata.State.valueOf(state_);
+ return result == null
+ ? com.google.cloud.translate.v3beta1.DeleteGlossaryMetadata.State.UNRECOGNIZED
+ : result;
+ }
+
+ public static final int SUBMIT_TIME_FIELD_NUMBER = 3;
+ private com.google.protobuf.Timestamp submitTime_;
+ /**
+ *
+ *
+ * + * The time when the operation was submitted to the server. + *+ * + *
.google.protobuf.Timestamp submit_time = 3;
+ */
+ public boolean hasSubmitTime() {
+ return submitTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * The time when the operation was submitted to the server. + *+ * + *
.google.protobuf.Timestamp submit_time = 3;
+ */
+ public com.google.protobuf.Timestamp getSubmitTime() {
+ return submitTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : submitTime_;
+ }
+ /**
+ *
+ *
+ * + * The time when the operation was submitted to the server. + *+ * + *
.google.protobuf.Timestamp submit_time = 3;
+ */
+ 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 (!getNameBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
+ }
+ if (state_
+ != com.google.cloud.translate.v3beta1.DeleteGlossaryMetadata.State.STATE_UNSPECIFIED
+ .getNumber()) {
+ output.writeEnum(2, state_);
+ }
+ if (submitTime_ != null) {
+ output.writeMessage(3, getSubmitTime());
+ }
+ 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 (state_
+ != com.google.cloud.translate.v3beta1.DeleteGlossaryMetadata.State.STATE_UNSPECIFIED
+ .getNumber()) {
+ size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, state_);
+ }
+ if (submitTime_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, 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.v3beta1.DeleteGlossaryMetadata)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.translate.v3beta1.DeleteGlossaryMetadata other =
+ (com.google.cloud.translate.v3beta1.DeleteGlossaryMetadata) obj;
+
+ if (!getName().equals(other.getName())) return false;
+ if (state_ != other.state_) 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) + NAME_FIELD_NUMBER;
+ hash = (53 * hash) + getName().hashCode();
+ hash = (37 * hash) + STATE_FIELD_NUMBER;
+ hash = (53 * hash) + state_;
+ 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.v3beta1.DeleteGlossaryMetadata parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DeleteGlossaryMetadata parseFrom(
+ 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.v3beta1.DeleteGlossaryMetadata parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DeleteGlossaryMetadata parseFrom(
+ com.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.v3beta1.DeleteGlossaryMetadata parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DeleteGlossaryMetadata parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DeleteGlossaryMetadata parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DeleteGlossaryMetadata parseFrom(
+ java.io.InputStream 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.v3beta1.DeleteGlossaryMetadata parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DeleteGlossaryMetadata parseDelimitedFrom(
+ java.io.InputStream 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.v3beta1.DeleteGlossaryMetadata parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DeleteGlossaryMetadata parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, 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.v3beta1.DeleteGlossaryMetadata prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ * + * Stored in the [google.longrunning.Operation.metadata][google.longrunning.Operation.metadata] field returned by + * DeleteGlossary. + *+ * + * Protobuf type {@code google.cloud.translation.v3beta1.DeleteGlossaryMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * The name of the glossary that is being deleted. + *+ * + *
string name = 1;
+ */
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ name_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The name of the glossary that is being deleted. + *+ * + *
string name = 1;
+ */
+ public com.google.protobuf.ByteString getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The name of the glossary that is being deleted. + *+ * + *
string name = 1;
+ */
+ public Builder setName(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The name of the glossary that is being deleted. + *+ * + *
string name = 1;
+ */
+ public Builder clearName() {
+
+ name_ = getDefaultInstance().getName();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The name of the glossary that is being deleted. + *+ * + *
string name = 1;
+ */
+ public Builder setNameBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+
+ private int state_ = 0;
+ /**
+ *
+ *
+ * + * The current state of the glossary deletion operation. + *+ * + *
.google.cloud.translation.v3beta1.DeleteGlossaryMetadata.State state = 2;
+ */
+ public int getStateValue() {
+ return state_;
+ }
+ /**
+ *
+ *
+ * + * The current state of the glossary deletion operation. + *+ * + *
.google.cloud.translation.v3beta1.DeleteGlossaryMetadata.State state = 2;
+ */
+ public Builder setStateValue(int value) {
+ state_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The current state of the glossary deletion operation. + *+ * + *
.google.cloud.translation.v3beta1.DeleteGlossaryMetadata.State state = 2;
+ */
+ public com.google.cloud.translate.v3beta1.DeleteGlossaryMetadata.State getState() {
+ @SuppressWarnings("deprecation")
+ com.google.cloud.translate.v3beta1.DeleteGlossaryMetadata.State result =
+ com.google.cloud.translate.v3beta1.DeleteGlossaryMetadata.State.valueOf(state_);
+ return result == null
+ ? com.google.cloud.translate.v3beta1.DeleteGlossaryMetadata.State.UNRECOGNIZED
+ : result;
+ }
+ /**
+ *
+ *
+ * + * The current state of the glossary deletion operation. + *+ * + *
.google.cloud.translation.v3beta1.DeleteGlossaryMetadata.State state = 2;
+ */
+ public Builder setState(com.google.cloud.translate.v3beta1.DeleteGlossaryMetadata.State value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ state_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The current state of the glossary deletion operation. + *+ * + *
.google.cloud.translation.v3beta1.DeleteGlossaryMetadata.State state = 2;
+ */
+ public Builder clearState() {
+
+ state_ = 0;
+ 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_;
+ /**
+ *
+ *
+ * + * The time when the operation was submitted to the server. + *+ * + *
.google.protobuf.Timestamp submit_time = 3;
+ */
+ public boolean hasSubmitTime() {
+ return submitTimeBuilder_ != null || submitTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * The time when the operation was submitted to the server. + *+ * + *
.google.protobuf.Timestamp submit_time = 3;
+ */
+ public com.google.protobuf.Timestamp getSubmitTime() {
+ if (submitTimeBuilder_ == null) {
+ return submitTime_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : submitTime_;
+ } else {
+ return submitTimeBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * The time when the operation was submitted to the server. + *+ * + *
.google.protobuf.Timestamp submit_time = 3;
+ */
+ 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;
+ }
+ /**
+ *
+ *
+ * + * The time when the operation was submitted to the server. + *+ * + *
.google.protobuf.Timestamp submit_time = 3;
+ */
+ public Builder setSubmitTime(com.google.protobuf.Timestamp.Builder builderForValue) {
+ if (submitTimeBuilder_ == null) {
+ submitTime_ = builderForValue.build();
+ onChanged();
+ } else {
+ submitTimeBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The time when the operation was submitted to the server. + *+ * + *
.google.protobuf.Timestamp submit_time = 3;
+ */
+ 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;
+ }
+ /**
+ *
+ *
+ * + * The time when the operation was submitted to the server. + *+ * + *
.google.protobuf.Timestamp submit_time = 3;
+ */
+ public Builder clearSubmitTime() {
+ if (submitTimeBuilder_ == null) {
+ submitTime_ = null;
+ onChanged();
+ } else {
+ submitTime_ = null;
+ submitTimeBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The time when the operation was submitted to the server. + *+ * + *
.google.protobuf.Timestamp submit_time = 3;
+ */
+ public com.google.protobuf.Timestamp.Builder getSubmitTimeBuilder() {
+
+ onChanged();
+ return getSubmitTimeFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * The time when the operation was submitted to the server. + *+ * + *
.google.protobuf.Timestamp submit_time = 3;
+ */
+ public com.google.protobuf.TimestampOrBuilder getSubmitTimeOrBuilder() {
+ if (submitTimeBuilder_ != null) {
+ return submitTimeBuilder_.getMessageOrBuilder();
+ } else {
+ return submitTime_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : submitTime_;
+ }
+ }
+ /**
+ *
+ *
+ * + * The time when the operation was submitted to the server. + *+ * + *
.google.protobuf.Timestamp submit_time = 3;
+ */
+ 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.v3beta1.DeleteGlossaryMetadata)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.DeleteGlossaryMetadata)
+ private static final com.google.cloud.translate.v3beta1.DeleteGlossaryMetadata DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.translate.v3beta1.DeleteGlossaryMetadata();
+ }
+
+ public static com.google.cloud.translate.v3beta1.DeleteGlossaryMetadata getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * The name of the glossary that is being deleted. + *+ * + *
string name = 1;
+ */
+ java.lang.String getName();
+ /**
+ *
+ *
+ * + * The name of the glossary that is being deleted. + *+ * + *
string name = 1;
+ */
+ com.google.protobuf.ByteString getNameBytes();
+
+ /**
+ *
+ *
+ * + * The current state of the glossary deletion operation. + *+ * + *
.google.cloud.translation.v3beta1.DeleteGlossaryMetadata.State state = 2;
+ */
+ int getStateValue();
+ /**
+ *
+ *
+ * + * The current state of the glossary deletion operation. + *+ * + *
.google.cloud.translation.v3beta1.DeleteGlossaryMetadata.State state = 2;
+ */
+ com.google.cloud.translate.v3beta1.DeleteGlossaryMetadata.State getState();
+
+ /**
+ *
+ *
+ * + * The time when the operation was submitted to the server. + *+ * + *
.google.protobuf.Timestamp submit_time = 3;
+ */
+ boolean hasSubmitTime();
+ /**
+ *
+ *
+ * + * The time when the operation was submitted to the server. + *+ * + *
.google.protobuf.Timestamp submit_time = 3;
+ */
+ com.google.protobuf.Timestamp getSubmitTime();
+ /**
+ *
+ *
+ * + * The time when the operation was submitted to the server. + *+ * + *
.google.protobuf.Timestamp submit_time = 3;
+ */
+ com.google.protobuf.TimestampOrBuilder getSubmitTimeOrBuilder();
+}
diff --git a/google-api-grpc/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/DeleteGlossaryRequest.java b/google-api-grpc/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/DeleteGlossaryRequest.java
new file mode 100644
index 000000000000..2892674ad885
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/DeleteGlossaryRequest.java
@@ -0,0 +1,599 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/translate/v3beta1/translation_service.proto
+
+package com.google.cloud.translate.v3beta1;
+
+/**
+ *
+ *
+ * + * Request message for DeleteGlossary. + *+ * + * Protobuf type {@code google.cloud.translation.v3beta1.DeleteGlossaryRequest} + */ +public final class DeleteGlossaryRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.translation.v3beta1.DeleteGlossaryRequest) + DeleteGlossaryRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteGlossaryRequest.newBuilder() to construct. + private DeleteGlossaryRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private DeleteGlossaryRequest() { + name_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteGlossaryRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.translate.v3beta1.TranslationServiceProto + .internal_static_google_cloud_translation_v3beta1_DeleteGlossaryRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.translate.v3beta1.TranslationServiceProto + .internal_static_google_cloud_translation_v3beta1_DeleteGlossaryRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.translate.v3beta1.DeleteGlossaryRequest.class, + com.google.cloud.translate.v3beta1.DeleteGlossaryRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+ * Required. The name of the glossary to delete. + *+ * + *
string name = 1;
+ */
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ name_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. The name of the glossary to delete. + *+ * + *
string name = 1;
+ */
+ public com.google.protobuf.ByteString getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (!getNameBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getNameBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.translate.v3beta1.DeleteGlossaryRequest)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.translate.v3beta1.DeleteGlossaryRequest other =
+ (com.google.cloud.translate.v3beta1.DeleteGlossaryRequest) 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.translate.v3beta1.DeleteGlossaryRequest parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DeleteGlossaryRequest parseFrom(
+ 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.v3beta1.DeleteGlossaryRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DeleteGlossaryRequest parseFrom(
+ com.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.v3beta1.DeleteGlossaryRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DeleteGlossaryRequest parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DeleteGlossaryRequest parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DeleteGlossaryRequest parseFrom(
+ java.io.InputStream 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.v3beta1.DeleteGlossaryRequest parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DeleteGlossaryRequest parseDelimitedFrom(
+ java.io.InputStream 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.v3beta1.DeleteGlossaryRequest parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DeleteGlossaryRequest parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, 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.v3beta1.DeleteGlossaryRequest prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ * + * Request message for DeleteGlossary. + *+ * + * Protobuf type {@code google.cloud.translation.v3beta1.DeleteGlossaryRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Required. The name of the glossary to delete. + *+ * + *
string name = 1;
+ */
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ name_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. The name of the glossary to delete. + *+ * + *
string name = 1;
+ */
+ public com.google.protobuf.ByteString getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. The name of the glossary to delete. + *+ * + *
string name = 1;
+ */
+ public Builder setName(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The name of the glossary to delete. + *+ * + *
string name = 1;
+ */
+ public Builder clearName() {
+
+ name_ = getDefaultInstance().getName();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The name of the glossary to delete. + *+ * + *
string name = 1;
+ */
+ public Builder setNameBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.translation.v3beta1.DeleteGlossaryRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.DeleteGlossaryRequest)
+ private static final com.google.cloud.translate.v3beta1.DeleteGlossaryRequest DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.translate.v3beta1.DeleteGlossaryRequest();
+ }
+
+ public static com.google.cloud.translate.v3beta1.DeleteGlossaryRequest getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Required. The name of the glossary to delete. + *+ * + *
string name = 1;
+ */
+ java.lang.String getName();
+ /**
+ *
+ *
+ * + * Required. The name of the glossary to delete. + *+ * + *
string name = 1;
+ */
+ com.google.protobuf.ByteString getNameBytes();
+}
diff --git a/google-api-grpc/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/DeleteGlossaryResponse.java b/google-api-grpc/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/DeleteGlossaryResponse.java
new file mode 100644
index 000000000000..dce0e3628032
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/DeleteGlossaryResponse.java
@@ -0,0 +1,1131 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/translate/v3beta1/translation_service.proto
+
+package com.google.cloud.translate.v3beta1;
+
+/**
+ *
+ *
+ * + * Stored in the [google.longrunning.Operation.response][google.longrunning.Operation.response] field returned by + * DeleteGlossary. + *+ * + * Protobuf type {@code google.cloud.translation.v3beta1.DeleteGlossaryResponse} + */ +public final class DeleteGlossaryResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.translation.v3beta1.DeleteGlossaryResponse) + DeleteGlossaryResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteGlossaryResponse.newBuilder() to construct. + private DeleteGlossaryResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private DeleteGlossaryResponse() { + name_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteGlossaryResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (submitTime_ != null) { + subBuilder = submitTime_.toBuilder(); + } + submitTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(submitTime_); + submitTime_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (endTime_ != null) { + subBuilder = endTime_.toBuilder(); + } + endTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(endTime_); + endTime_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.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.v3beta1.TranslationServiceProto + .internal_static_google_cloud_translation_v3beta1_DeleteGlossaryResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.translate.v3beta1.TranslationServiceProto + .internal_static_google_cloud_translation_v3beta1_DeleteGlossaryResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.translate.v3beta1.DeleteGlossaryResponse.class, + com.google.cloud.translate.v3beta1.DeleteGlossaryResponse.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+ * The name of the deleted glossary. + *+ * + *
string name = 1;
+ */
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ name_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * The name of the deleted glossary. + *+ * + *
string name = 1;
+ */
+ public com.google.protobuf.ByteString getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int SUBMIT_TIME_FIELD_NUMBER = 2;
+ private com.google.protobuf.Timestamp submitTime_;
+ /**
+ *
+ *
+ * + * The time when the operation was submitted to the server. + *+ * + *
.google.protobuf.Timestamp submit_time = 2;
+ */
+ public boolean hasSubmitTime() {
+ return submitTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * The time when the operation was submitted to the server. + *+ * + *
.google.protobuf.Timestamp submit_time = 2;
+ */
+ public com.google.protobuf.Timestamp getSubmitTime() {
+ return submitTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : submitTime_;
+ }
+ /**
+ *
+ *
+ * + * The time when the operation was submitted to the server. + *+ * + *
.google.protobuf.Timestamp submit_time = 2;
+ */
+ public com.google.protobuf.TimestampOrBuilder getSubmitTimeOrBuilder() {
+ return getSubmitTime();
+ }
+
+ public static final int END_TIME_FIELD_NUMBER = 3;
+ private com.google.protobuf.Timestamp endTime_;
+ /**
+ *
+ *
+ * + * The time when the glossary deletion is finished and + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. + *+ * + *
.google.protobuf.Timestamp end_time = 3;
+ */
+ public boolean hasEndTime() {
+ return endTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * The time when the glossary deletion is finished and + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. + *+ * + *
.google.protobuf.Timestamp end_time = 3;
+ */
+ public com.google.protobuf.Timestamp getEndTime() {
+ return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_;
+ }
+ /**
+ *
+ *
+ * + * The time when the glossary deletion is finished and + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. + *+ * + *
.google.protobuf.Timestamp end_time = 3;
+ */
+ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() {
+ return getEndTime();
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (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 (submitTime_ != null) {
+ output.writeMessage(2, getSubmitTime());
+ }
+ if (endTime_ != null) {
+ output.writeMessage(3, getEndTime());
+ }
+ 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 (submitTime_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSubmitTime());
+ }
+ if (endTime_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getEndTime());
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ 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.v3beta1.DeleteGlossaryResponse)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.translate.v3beta1.DeleteGlossaryResponse other =
+ (com.google.cloud.translate.v3beta1.DeleteGlossaryResponse) obj;
+
+ if (!getName().equals(other.getName())) return false;
+ if (hasSubmitTime() != other.hasSubmitTime()) return false;
+ if (hasSubmitTime()) {
+ if (!getSubmitTime().equals(other.getSubmitTime())) return false;
+ }
+ if (hasEndTime() != other.hasEndTime()) return false;
+ if (hasEndTime()) {
+ if (!getEndTime().equals(other.getEndTime())) return false;
+ }
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + NAME_FIELD_NUMBER;
+ hash = (53 * hash) + getName().hashCode();
+ if (hasSubmitTime()) {
+ hash = (37 * hash) + SUBMIT_TIME_FIELD_NUMBER;
+ hash = (53 * hash) + getSubmitTime().hashCode();
+ }
+ if (hasEndTime()) {
+ hash = (37 * hash) + END_TIME_FIELD_NUMBER;
+ hash = (53 * hash) + getEndTime().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.translate.v3beta1.DeleteGlossaryResponse parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DeleteGlossaryResponse parseFrom(
+ 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.v3beta1.DeleteGlossaryResponse parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DeleteGlossaryResponse parseFrom(
+ com.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.v3beta1.DeleteGlossaryResponse parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DeleteGlossaryResponse parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DeleteGlossaryResponse parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DeleteGlossaryResponse parseFrom(
+ java.io.InputStream 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.v3beta1.DeleteGlossaryResponse parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DeleteGlossaryResponse parseDelimitedFrom(
+ java.io.InputStream 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.v3beta1.DeleteGlossaryResponse parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DeleteGlossaryResponse parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, 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.v3beta1.DeleteGlossaryResponse prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ * + * Stored in the [google.longrunning.Operation.response][google.longrunning.Operation.response] field returned by + * DeleteGlossary. + *+ * + * Protobuf type {@code google.cloud.translation.v3beta1.DeleteGlossaryResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * The name of the deleted glossary. + *+ * + *
string name = 1;
+ */
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ name_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The name of the deleted glossary. + *+ * + *
string name = 1;
+ */
+ public com.google.protobuf.ByteString getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The name of the deleted glossary. + *+ * + *
string name = 1;
+ */
+ public Builder setName(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The name of the deleted glossary. + *+ * + *
string name = 1;
+ */
+ public Builder clearName() {
+
+ name_ = getDefaultInstance().getName();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The name of the deleted glossary. + *+ * + *
string name = 1;
+ */
+ public Builder setNameBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.Timestamp submitTime_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ submitTimeBuilder_;
+ /**
+ *
+ *
+ * + * The time when the operation was submitted to the server. + *+ * + *
.google.protobuf.Timestamp submit_time = 2;
+ */
+ public boolean hasSubmitTime() {
+ return submitTimeBuilder_ != null || submitTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * The time when the operation was submitted to the server. + *+ * + *
.google.protobuf.Timestamp submit_time = 2;
+ */
+ public com.google.protobuf.Timestamp getSubmitTime() {
+ if (submitTimeBuilder_ == null) {
+ return submitTime_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : submitTime_;
+ } else {
+ return submitTimeBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * The time when the operation was submitted to the server. + *+ * + *
.google.protobuf.Timestamp submit_time = 2;
+ */
+ 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;
+ }
+ /**
+ *
+ *
+ * + * The time when the operation was submitted to the server. + *+ * + *
.google.protobuf.Timestamp submit_time = 2;
+ */
+ public Builder setSubmitTime(com.google.protobuf.Timestamp.Builder builderForValue) {
+ if (submitTimeBuilder_ == null) {
+ submitTime_ = builderForValue.build();
+ onChanged();
+ } else {
+ submitTimeBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The time when the operation was submitted to the server. + *+ * + *
.google.protobuf.Timestamp submit_time = 2;
+ */
+ 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;
+ }
+ /**
+ *
+ *
+ * + * The time when the operation was submitted to the server. + *+ * + *
.google.protobuf.Timestamp submit_time = 2;
+ */
+ public Builder clearSubmitTime() {
+ if (submitTimeBuilder_ == null) {
+ submitTime_ = null;
+ onChanged();
+ } else {
+ submitTime_ = null;
+ submitTimeBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The time when the operation was submitted to the server. + *+ * + *
.google.protobuf.Timestamp submit_time = 2;
+ */
+ public com.google.protobuf.Timestamp.Builder getSubmitTimeBuilder() {
+
+ onChanged();
+ return getSubmitTimeFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * The time when the operation was submitted to the server. + *+ * + *
.google.protobuf.Timestamp submit_time = 2;
+ */
+ public com.google.protobuf.TimestampOrBuilder getSubmitTimeOrBuilder() {
+ if (submitTimeBuilder_ != null) {
+ return submitTimeBuilder_.getMessageOrBuilder();
+ } else {
+ return submitTime_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : submitTime_;
+ }
+ }
+ /**
+ *
+ *
+ * + * The time when the operation was submitted to the server. + *+ * + *
.google.protobuf.Timestamp submit_time = 2;
+ */
+ 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_;
+ }
+
+ private com.google.protobuf.Timestamp endTime_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ endTimeBuilder_;
+ /**
+ *
+ *
+ * + * The time when the glossary deletion is finished and + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. + *+ * + *
.google.protobuf.Timestamp end_time = 3;
+ */
+ public boolean hasEndTime() {
+ return endTimeBuilder_ != null || endTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * The time when the glossary deletion is finished and + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. + *+ * + *
.google.protobuf.Timestamp end_time = 3;
+ */
+ public com.google.protobuf.Timestamp getEndTime() {
+ if (endTimeBuilder_ == null) {
+ return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_;
+ } else {
+ return endTimeBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * The time when the glossary deletion is finished and + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. + *+ * + *
.google.protobuf.Timestamp end_time = 3;
+ */
+ public Builder setEndTime(com.google.protobuf.Timestamp value) {
+ if (endTimeBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ endTime_ = value;
+ onChanged();
+ } else {
+ endTimeBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The time when the glossary deletion is finished and + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. + *+ * + *
.google.protobuf.Timestamp end_time = 3;
+ */
+ public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) {
+ if (endTimeBuilder_ == null) {
+ endTime_ = builderForValue.build();
+ onChanged();
+ } else {
+ endTimeBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The time when the glossary deletion is finished and + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. + *+ * + *
.google.protobuf.Timestamp end_time = 3;
+ */
+ public Builder mergeEndTime(com.google.protobuf.Timestamp value) {
+ if (endTimeBuilder_ == null) {
+ if (endTime_ != null) {
+ endTime_ =
+ com.google.protobuf.Timestamp.newBuilder(endTime_).mergeFrom(value).buildPartial();
+ } else {
+ endTime_ = value;
+ }
+ onChanged();
+ } else {
+ endTimeBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The time when the glossary deletion is finished and + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. + *+ * + *
.google.protobuf.Timestamp end_time = 3;
+ */
+ public Builder clearEndTime() {
+ if (endTimeBuilder_ == null) {
+ endTime_ = null;
+ onChanged();
+ } else {
+ endTime_ = null;
+ endTimeBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The time when the glossary deletion is finished and + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. + *+ * + *
.google.protobuf.Timestamp end_time = 3;
+ */
+ public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() {
+
+ onChanged();
+ return getEndTimeFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * The time when the glossary deletion is finished and + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. + *+ * + *
.google.protobuf.Timestamp end_time = 3;
+ */
+ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() {
+ if (endTimeBuilder_ != null) {
+ return endTimeBuilder_.getMessageOrBuilder();
+ } else {
+ return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_;
+ }
+ }
+ /**
+ *
+ *
+ * + * The time when the glossary deletion is finished and + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. + *+ * + *
.google.protobuf.Timestamp end_time = 3;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ getEndTimeFieldBuilder() {
+ if (endTimeBuilder_ == null) {
+ endTimeBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>(
+ getEndTime(), getParentForChildren(), isClean());
+ endTime_ = null;
+ }
+ return endTimeBuilder_;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @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.v3beta1.DeleteGlossaryResponse)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.DeleteGlossaryResponse)
+ private static final com.google.cloud.translate.v3beta1.DeleteGlossaryResponse DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.translate.v3beta1.DeleteGlossaryResponse();
+ }
+
+ public static com.google.cloud.translate.v3beta1.DeleteGlossaryResponse getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * The name of the deleted glossary. + *+ * + *
string name = 1;
+ */
+ java.lang.String getName();
+ /**
+ *
+ *
+ * + * The name of the deleted glossary. + *+ * + *
string name = 1;
+ */
+ com.google.protobuf.ByteString getNameBytes();
+
+ /**
+ *
+ *
+ * + * The time when the operation was submitted to the server. + *+ * + *
.google.protobuf.Timestamp submit_time = 2;
+ */
+ boolean hasSubmitTime();
+ /**
+ *
+ *
+ * + * The time when the operation was submitted to the server. + *+ * + *
.google.protobuf.Timestamp submit_time = 2;
+ */
+ com.google.protobuf.Timestamp getSubmitTime();
+ /**
+ *
+ *
+ * + * The time when the operation was submitted to the server. + *+ * + *
.google.protobuf.Timestamp submit_time = 2;
+ */
+ com.google.protobuf.TimestampOrBuilder getSubmitTimeOrBuilder();
+
+ /**
+ *
+ *
+ * + * The time when the glossary deletion is finished and + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. + *+ * + *
.google.protobuf.Timestamp end_time = 3;
+ */
+ boolean hasEndTime();
+ /**
+ *
+ *
+ * + * The time when the glossary deletion is finished and + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. + *+ * + *
.google.protobuf.Timestamp end_time = 3;
+ */
+ com.google.protobuf.Timestamp getEndTime();
+ /**
+ *
+ *
+ * + * The time when the glossary deletion is finished and + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. + *+ * + *
.google.protobuf.Timestamp end_time = 3;
+ */
+ com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder();
+}
diff --git a/google-api-grpc/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/DetectLanguageRequest.java b/google-api-grpc/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/DetectLanguageRequest.java
new file mode 100644
index 000000000000..921853b3dfeb
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/DetectLanguageRequest.java
@@ -0,0 +1,1226 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/translate/v3beta1/translation_service.proto
+
+package com.google.cloud.translate.v3beta1;
+
+/**
+ *
+ *
+ * + * The request message for language detection. + *+ * + * Protobuf type {@code google.cloud.translation.v3beta1.DetectLanguageRequest} + */ +public final class DetectLanguageRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.translation.v3beta1.DetectLanguageRequest) + DetectLanguageRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DetectLanguageRequest.newBuilder() to construct. + private DetectLanguageRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private DetectLanguageRequest() { + parent_ = ""; + model_ = ""; + mimeType_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DetectLanguageRequest( + 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(); + sourceCase_ = 1; + source_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + mimeType_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + model_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = 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.translate.v3beta1.TranslationServiceProto + .internal_static_google_cloud_translation_v3beta1_DetectLanguageRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.translate.v3beta1.TranslationServiceProto + .internal_static_google_cloud_translation_v3beta1_DetectLanguageRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.translate.v3beta1.DetectLanguageRequest.class, + com.google.cloud.translate.v3beta1.DetectLanguageRequest.Builder.class); + } + + private int sourceCase_ = 0; + private java.lang.Object source_; + + public enum SourceCase implements com.google.protobuf.Internal.EnumLite { + CONTENT(1), + SOURCE_NOT_SET(0); + private final int value; + + private SourceCase(int value) { + this.value = value; + } + /** @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 CONTENT; + 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 PARENT_FIELD_NUMBER = 5; + private volatile java.lang.Object parent_; + /** + * + * + *
+ * Optional. Only used when making regionalized call.
+ * Format:
+ * projects/{project-id}/locations/{location-id}.
+ * Only custom model within the same location-id can be used.
+ * Otherwise 400 is returned.
+ *
+ *
+ * string parent = 5;
+ */
+ 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;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Optional. Only used when making regionalized call.
+ * Format:
+ * projects/{project-id}/locations/{location-id}.
+ * Only custom model within the same location-id can be used.
+ * Otherwise 400 is returned.
+ *
+ *
+ * string parent = 5;
+ */
+ public com.google.protobuf.ByteString getParentBytes() {
+ java.lang.Object ref = parent_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ parent_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int MODEL_FIELD_NUMBER = 4;
+ private volatile java.lang.Object model_;
+ /**
+ *
+ *
+ *
+ * Optional. The language detection model to be used.
+ * projects/{project-id}/locations/{location-id}/models/language-detection/{model-id}
+ * If not specified, default will be used.
+ *
+ *
+ * string model = 4;
+ */
+ public java.lang.String getModel() {
+ java.lang.Object ref = model_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ model_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The language detection model to be used.
+ * projects/{project-id}/locations/{location-id}/models/language-detection/{model-id}
+ * If not specified, default will be used.
+ *
+ *
+ * string model = 4;
+ */
+ public com.google.protobuf.ByteString getModelBytes() {
+ java.lang.Object ref = model_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ model_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int CONTENT_FIELD_NUMBER = 1;
+ /**
+ *
+ *
+ * + * The content of the input stored as a string. + *+ * + *
string content = 1;
+ */
+ public java.lang.String getContent() {
+ java.lang.Object ref = "";
+ if (sourceCase_ == 1) {
+ ref = source_;
+ }
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (sourceCase_ == 1) {
+ source_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * The content of the input stored as a string. + *+ * + *
string content = 1;
+ */
+ public com.google.protobuf.ByteString getContentBytes() {
+ java.lang.Object ref = "";
+ if (sourceCase_ == 1) {
+ ref = source_;
+ }
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ if (sourceCase_ == 1) {
+ source_ = b;
+ }
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int MIME_TYPE_FIELD_NUMBER = 3;
+ private volatile java.lang.Object mimeType_;
+ /**
+ *
+ *
+ * + * Optional. The format of the source text, for example, "text/html", + * "text/plain". If left blank, the MIME type is assumed to be "text/html". + *+ * + *
string mime_type = 3;
+ */
+ public java.lang.String getMimeType() {
+ java.lang.Object ref = mimeType_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ mimeType_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. The format of the source text, for example, "text/html", + * "text/plain". If left blank, the MIME type is assumed to be "text/html". + *+ * + *
string mime_type = 3;
+ */
+ public com.google.protobuf.ByteString getMimeTypeBytes() {
+ java.lang.Object ref = mimeType_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ mimeType_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (sourceCase_ == 1) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, source_);
+ }
+ if (!getMimeTypeBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 3, mimeType_);
+ }
+ if (!getModelBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 4, model_);
+ }
+ if (!getParentBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 5, parent_);
+ }
+ 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.GeneratedMessageV3.computeStringSize(1, source_);
+ }
+ if (!getMimeTypeBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, mimeType_);
+ }
+ if (!getModelBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, model_);
+ }
+ if (!getParentBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, parent_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ 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.v3beta1.DetectLanguageRequest)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.translate.v3beta1.DetectLanguageRequest other =
+ (com.google.cloud.translate.v3beta1.DetectLanguageRequest) obj;
+
+ if (!getParent().equals(other.getParent())) return false;
+ if (!getModel().equals(other.getModel())) return false;
+ if (!getMimeType().equals(other.getMimeType())) return false;
+ if (!getSourceCase().equals(other.getSourceCase())) return false;
+ switch (sourceCase_) {
+ case 1:
+ if (!getContent().equals(other.getContent())) return false;
+ break;
+ case 0:
+ default:
+ }
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + PARENT_FIELD_NUMBER;
+ hash = (53 * hash) + getParent().hashCode();
+ hash = (37 * hash) + MODEL_FIELD_NUMBER;
+ hash = (53 * hash) + getModel().hashCode();
+ hash = (37 * hash) + MIME_TYPE_FIELD_NUMBER;
+ hash = (53 * hash) + getMimeType().hashCode();
+ switch (sourceCase_) {
+ case 1:
+ hash = (37 * hash) + CONTENT_FIELD_NUMBER;
+ hash = (53 * hash) + getContent().hashCode();
+ break;
+ case 0:
+ default:
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.translate.v3beta1.DetectLanguageRequest parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DetectLanguageRequest parseFrom(
+ 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.v3beta1.DetectLanguageRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DetectLanguageRequest parseFrom(
+ com.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.v3beta1.DetectLanguageRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DetectLanguageRequest parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DetectLanguageRequest parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DetectLanguageRequest parseFrom(
+ java.io.InputStream 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.v3beta1.DetectLanguageRequest parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DetectLanguageRequest parseDelimitedFrom(
+ java.io.InputStream 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.v3beta1.DetectLanguageRequest parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DetectLanguageRequest parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, 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.v3beta1.DetectLanguageRequest prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new 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 language detection. + *+ * + * Protobuf type {@code google.cloud.translation.v3beta1.DetectLanguageRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Optional. Only used when making regionalized call.
+ * Format:
+ * projects/{project-id}/locations/{location-id}.
+ * Only custom model within the same location-id can be used.
+ * Otherwise 400 is returned.
+ *
+ *
+ * string parent = 5;
+ */
+ public java.lang.String getParent() {
+ java.lang.Object ref = parent_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ parent_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Optional. Only used when making regionalized call.
+ * Format:
+ * projects/{project-id}/locations/{location-id}.
+ * Only custom model within the same location-id can be used.
+ * Otherwise 400 is returned.
+ *
+ *
+ * string parent = 5;
+ */
+ public com.google.protobuf.ByteString getParentBytes() {
+ java.lang.Object ref = parent_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ parent_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Optional. Only used when making regionalized call.
+ * Format:
+ * projects/{project-id}/locations/{location-id}.
+ * Only custom model within the same location-id can be used.
+ * Otherwise 400 is returned.
+ *
+ *
+ * string parent = 5;
+ */
+ public Builder setParent(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ parent_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. Only used when making regionalized call.
+ * Format:
+ * projects/{project-id}/locations/{location-id}.
+ * Only custom model within the same location-id can be used.
+ * Otherwise 400 is returned.
+ *
+ *
+ * string parent = 5;
+ */
+ public Builder clearParent() {
+
+ parent_ = getDefaultInstance().getParent();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. Only used when making regionalized call.
+ * Format:
+ * projects/{project-id}/locations/{location-id}.
+ * Only custom model within the same location-id can be used.
+ * Otherwise 400 is returned.
+ *
+ *
+ * string parent = 5;
+ */
+ public Builder setParentBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ parent_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object model_ = "";
+ /**
+ *
+ *
+ *
+ * Optional. The language detection model to be used.
+ * projects/{project-id}/locations/{location-id}/models/language-detection/{model-id}
+ * If not specified, default will be used.
+ *
+ *
+ * string model = 4;
+ */
+ public java.lang.String getModel() {
+ java.lang.Object ref = model_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ model_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The language detection model to be used.
+ * projects/{project-id}/locations/{location-id}/models/language-detection/{model-id}
+ * If not specified, default will be used.
+ *
+ *
+ * string model = 4;
+ */
+ public com.google.protobuf.ByteString getModelBytes() {
+ java.lang.Object ref = model_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ model_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The language detection model to be used.
+ * projects/{project-id}/locations/{location-id}/models/language-detection/{model-id}
+ * If not specified, default will be used.
+ *
+ *
+ * string model = 4;
+ */
+ public Builder setModel(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ model_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The language detection model to be used.
+ * projects/{project-id}/locations/{location-id}/models/language-detection/{model-id}
+ * If not specified, default will be used.
+ *
+ *
+ * string model = 4;
+ */
+ public Builder clearModel() {
+
+ model_ = getDefaultInstance().getModel();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The language detection model to be used.
+ * projects/{project-id}/locations/{location-id}/models/language-detection/{model-id}
+ * If not specified, default will be used.
+ *
+ *
+ * string model = 4;
+ */
+ public Builder setModelBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ model_ = value;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * The content of the input stored as a string. + *+ * + *
string content = 1;
+ */
+ public java.lang.String getContent() {
+ java.lang.Object ref = "";
+ if (sourceCase_ == 1) {
+ ref = source_;
+ }
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (sourceCase_ == 1) {
+ source_ = s;
+ }
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The content of the input stored as a string. + *+ * + *
string content = 1;
+ */
+ public com.google.protobuf.ByteString getContentBytes() {
+ java.lang.Object ref = "";
+ if (sourceCase_ == 1) {
+ ref = source_;
+ }
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ if (sourceCase_ == 1) {
+ source_ = b;
+ }
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The content of the input stored as a string. + *+ * + *
string content = 1;
+ */
+ public Builder setContent(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ sourceCase_ = 1;
+ source_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The content of the input stored as a string. + *+ * + *
string content = 1;
+ */
+ public Builder clearContent() {
+ if (sourceCase_ == 1) {
+ sourceCase_ = 0;
+ source_ = null;
+ onChanged();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The content of the input stored as a string. + *+ * + *
string content = 1;
+ */
+ public Builder setContentBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+ sourceCase_ = 1;
+ source_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object mimeType_ = "";
+ /**
+ *
+ *
+ * + * Optional. The format of the source text, for example, "text/html", + * "text/plain". If left blank, the MIME type is assumed to be "text/html". + *+ * + *
string mime_type = 3;
+ */
+ public java.lang.String getMimeType() {
+ java.lang.Object ref = mimeType_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ mimeType_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. The format of the source text, for example, "text/html", + * "text/plain". If left blank, the MIME type is assumed to be "text/html". + *+ * + *
string mime_type = 3;
+ */
+ public com.google.protobuf.ByteString getMimeTypeBytes() {
+ java.lang.Object ref = mimeType_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ mimeType_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. The format of the source text, for example, "text/html", + * "text/plain". If left blank, the MIME type is assumed to be "text/html". + *+ * + *
string mime_type = 3;
+ */
+ public Builder setMimeType(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ mimeType_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. The format of the source text, for example, "text/html", + * "text/plain". If left blank, the MIME type is assumed to be "text/html". + *+ * + *
string mime_type = 3;
+ */
+ public Builder clearMimeType() {
+
+ mimeType_ = getDefaultInstance().getMimeType();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. The format of the source text, for example, "text/html", + * "text/plain". If left blank, the MIME type is assumed to be "text/html". + *+ * + *
string mime_type = 3;
+ */
+ public Builder setMimeTypeBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ mimeType_ = value;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.translation.v3beta1.DetectLanguageRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.DetectLanguageRequest)
+ private static final com.google.cloud.translate.v3beta1.DetectLanguageRequest DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.translate.v3beta1.DetectLanguageRequest();
+ }
+
+ public static com.google.cloud.translate.v3beta1.DetectLanguageRequest getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ * Optional. Only used when making regionalized call.
+ * Format:
+ * projects/{project-id}/locations/{location-id}.
+ * Only custom model within the same location-id can be used.
+ * Otherwise 400 is returned.
+ *
+ *
+ * string parent = 5;
+ */
+ java.lang.String getParent();
+ /**
+ *
+ *
+ *
+ * Optional. Only used when making regionalized call.
+ * Format:
+ * projects/{project-id}/locations/{location-id}.
+ * Only custom model within the same location-id can be used.
+ * Otherwise 400 is returned.
+ *
+ *
+ * string parent = 5;
+ */
+ com.google.protobuf.ByteString getParentBytes();
+
+ /**
+ *
+ *
+ *
+ * Optional. The language detection model to be used.
+ * projects/{project-id}/locations/{location-id}/models/language-detection/{model-id}
+ * If not specified, default will be used.
+ *
+ *
+ * string model = 4;
+ */
+ java.lang.String getModel();
+ /**
+ *
+ *
+ *
+ * Optional. The language detection model to be used.
+ * projects/{project-id}/locations/{location-id}/models/language-detection/{model-id}
+ * If not specified, default will be used.
+ *
+ *
+ * string model = 4;
+ */
+ com.google.protobuf.ByteString getModelBytes();
+
+ /**
+ *
+ *
+ * + * The content of the input stored as a string. + *+ * + *
string content = 1;
+ */
+ java.lang.String getContent();
+ /**
+ *
+ *
+ * + * The content of the input stored as a string. + *+ * + *
string content = 1;
+ */
+ com.google.protobuf.ByteString getContentBytes();
+
+ /**
+ *
+ *
+ * + * Optional. The format of the source text, for example, "text/html", + * "text/plain". If left blank, the MIME type is assumed to be "text/html". + *+ * + *
string mime_type = 3;
+ */
+ java.lang.String getMimeType();
+ /**
+ *
+ *
+ * + * Optional. The format of the source text, for example, "text/html", + * "text/plain". If left blank, the MIME type is assumed to be "text/html". + *+ * + *
string mime_type = 3;
+ */
+ com.google.protobuf.ByteString getMimeTypeBytes();
+
+ public com.google.cloud.translate.v3beta1.DetectLanguageRequest.SourceCase getSourceCase();
+}
diff --git a/google-api-grpc/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/DetectLanguageResponse.java b/google-api-grpc/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/DetectLanguageResponse.java
new file mode 100644
index 000000000000..0d0b83509aa6
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/DetectLanguageResponse.java
@@ -0,0 +1,959 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/translate/v3beta1/translation_service.proto
+
+package com.google.cloud.translate.v3beta1;
+
+/**
+ *
+ *
+ * + * The response message for language detection. + *+ * + * Protobuf type {@code google.cloud.translation.v3beta1.DetectLanguageResponse} + */ +public final class DetectLanguageResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.translation.v3beta1.DetectLanguageResponse) + DetectLanguageResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use DetectLanguageResponse.newBuilder() to construct. + private DetectLanguageResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private DetectLanguageResponse() { + languages_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DetectLanguageResponse( + 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)) { + languages_ = + new java.util.ArrayList
+ * A list of detected languages sorted by detection confidence in descending + * order. The most probable language first. + *+ * + *
repeated .google.cloud.translation.v3beta1.DetectedLanguage languages = 1;
+ */
+ public java.util.List+ * A list of detected languages sorted by detection confidence in descending + * order. The most probable language first. + *+ * + *
repeated .google.cloud.translation.v3beta1.DetectedLanguage languages = 1;
+ */
+ public java.util.List extends com.google.cloud.translate.v3beta1.DetectedLanguageOrBuilder>
+ getLanguagesOrBuilderList() {
+ return languages_;
+ }
+ /**
+ *
+ *
+ * + * A list of detected languages sorted by detection confidence in descending + * order. The most probable language first. + *+ * + *
repeated .google.cloud.translation.v3beta1.DetectedLanguage languages = 1;
+ */
+ public int getLanguagesCount() {
+ return languages_.size();
+ }
+ /**
+ *
+ *
+ * + * A list of detected languages sorted by detection confidence in descending + * order. The most probable language first. + *+ * + *
repeated .google.cloud.translation.v3beta1.DetectedLanguage languages = 1;
+ */
+ public com.google.cloud.translate.v3beta1.DetectedLanguage getLanguages(int index) {
+ return languages_.get(index);
+ }
+ /**
+ *
+ *
+ * + * A list of detected languages sorted by detection confidence in descending + * order. The most probable language first. + *+ * + *
repeated .google.cloud.translation.v3beta1.DetectedLanguage languages = 1;
+ */
+ public com.google.cloud.translate.v3beta1.DetectedLanguageOrBuilder getLanguagesOrBuilder(
+ int index) {
+ return languages_.get(index);
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ for (int i = 0; i < languages_.size(); i++) {
+ output.writeMessage(1, languages_.get(i));
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ for (int i = 0; i < languages_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, languages_.get(i));
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.translate.v3beta1.DetectLanguageResponse)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.translate.v3beta1.DetectLanguageResponse other =
+ (com.google.cloud.translate.v3beta1.DetectLanguageResponse) obj;
+
+ if (!getLanguagesList().equals(other.getLanguagesList())) return false;
+ if (!unknownFields.equals(other.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 (getLanguagesCount() > 0) {
+ hash = (37 * hash) + LANGUAGES_FIELD_NUMBER;
+ hash = (53 * hash) + getLanguagesList().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.translate.v3beta1.DetectLanguageResponse parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DetectLanguageResponse parseFrom(
+ 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.v3beta1.DetectLanguageResponse parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DetectLanguageResponse parseFrom(
+ com.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.v3beta1.DetectLanguageResponse parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DetectLanguageResponse parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DetectLanguageResponse parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DetectLanguageResponse parseFrom(
+ java.io.InputStream 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.v3beta1.DetectLanguageResponse parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DetectLanguageResponse parseDelimitedFrom(
+ java.io.InputStream 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.v3beta1.DetectLanguageResponse parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DetectLanguageResponse parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, 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.v3beta1.DetectLanguageResponse prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new 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 language detection. + *+ * + * Protobuf type {@code google.cloud.translation.v3beta1.DetectLanguageResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * A list of detected languages sorted by detection confidence in descending + * order. The most probable language first. + *+ * + *
repeated .google.cloud.translation.v3beta1.DetectedLanguage languages = 1;
+ */
+ public java.util.List+ * A list of detected languages sorted by detection confidence in descending + * order. The most probable language first. + *+ * + *
repeated .google.cloud.translation.v3beta1.DetectedLanguage languages = 1;
+ */
+ public int getLanguagesCount() {
+ if (languagesBuilder_ == null) {
+ return languages_.size();
+ } else {
+ return languagesBuilder_.getCount();
+ }
+ }
+ /**
+ *
+ *
+ * + * A list of detected languages sorted by detection confidence in descending + * order. The most probable language first. + *+ * + *
repeated .google.cloud.translation.v3beta1.DetectedLanguage languages = 1;
+ */
+ public com.google.cloud.translate.v3beta1.DetectedLanguage getLanguages(int index) {
+ if (languagesBuilder_ == null) {
+ return languages_.get(index);
+ } else {
+ return languagesBuilder_.getMessage(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * A list of detected languages sorted by detection confidence in descending + * order. The most probable language first. + *+ * + *
repeated .google.cloud.translation.v3beta1.DetectedLanguage languages = 1;
+ */
+ public Builder setLanguages(
+ int index, com.google.cloud.translate.v3beta1.DetectedLanguage value) {
+ if (languagesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureLanguagesIsMutable();
+ languages_.set(index, value);
+ onChanged();
+ } else {
+ languagesBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A list of detected languages sorted by detection confidence in descending + * order. The most probable language first. + *+ * + *
repeated .google.cloud.translation.v3beta1.DetectedLanguage languages = 1;
+ */
+ public Builder setLanguages(
+ int index, com.google.cloud.translate.v3beta1.DetectedLanguage.Builder builderForValue) {
+ if (languagesBuilder_ == null) {
+ ensureLanguagesIsMutable();
+ languages_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ languagesBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A list of detected languages sorted by detection confidence in descending + * order. The most probable language first. + *+ * + *
repeated .google.cloud.translation.v3beta1.DetectedLanguage languages = 1;
+ */
+ public Builder addLanguages(com.google.cloud.translate.v3beta1.DetectedLanguage value) {
+ if (languagesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureLanguagesIsMutable();
+ languages_.add(value);
+ onChanged();
+ } else {
+ languagesBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A list of detected languages sorted by detection confidence in descending + * order. The most probable language first. + *+ * + *
repeated .google.cloud.translation.v3beta1.DetectedLanguage languages = 1;
+ */
+ public Builder addLanguages(
+ int index, com.google.cloud.translate.v3beta1.DetectedLanguage value) {
+ if (languagesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureLanguagesIsMutable();
+ languages_.add(index, value);
+ onChanged();
+ } else {
+ languagesBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A list of detected languages sorted by detection confidence in descending + * order. The most probable language first. + *+ * + *
repeated .google.cloud.translation.v3beta1.DetectedLanguage languages = 1;
+ */
+ public Builder addLanguages(
+ com.google.cloud.translate.v3beta1.DetectedLanguage.Builder builderForValue) {
+ if (languagesBuilder_ == null) {
+ ensureLanguagesIsMutable();
+ languages_.add(builderForValue.build());
+ onChanged();
+ } else {
+ languagesBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A list of detected languages sorted by detection confidence in descending + * order. The most probable language first. + *+ * + *
repeated .google.cloud.translation.v3beta1.DetectedLanguage languages = 1;
+ */
+ public Builder addLanguages(
+ int index, com.google.cloud.translate.v3beta1.DetectedLanguage.Builder builderForValue) {
+ if (languagesBuilder_ == null) {
+ ensureLanguagesIsMutable();
+ languages_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ languagesBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A list of detected languages sorted by detection confidence in descending + * order. The most probable language first. + *+ * + *
repeated .google.cloud.translation.v3beta1.DetectedLanguage languages = 1;
+ */
+ public Builder addAllLanguages(
+ java.lang.Iterable extends com.google.cloud.translate.v3beta1.DetectedLanguage> values) {
+ if (languagesBuilder_ == null) {
+ ensureLanguagesIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, languages_);
+ onChanged();
+ } else {
+ languagesBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A list of detected languages sorted by detection confidence in descending + * order. The most probable language first. + *+ * + *
repeated .google.cloud.translation.v3beta1.DetectedLanguage languages = 1;
+ */
+ public Builder clearLanguages() {
+ if (languagesBuilder_ == null) {
+ languages_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ } else {
+ languagesBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A list of detected languages sorted by detection confidence in descending + * order. The most probable language first. + *+ * + *
repeated .google.cloud.translation.v3beta1.DetectedLanguage languages = 1;
+ */
+ public Builder removeLanguages(int index) {
+ if (languagesBuilder_ == null) {
+ ensureLanguagesIsMutable();
+ languages_.remove(index);
+ onChanged();
+ } else {
+ languagesBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A list of detected languages sorted by detection confidence in descending + * order. The most probable language first. + *+ * + *
repeated .google.cloud.translation.v3beta1.DetectedLanguage languages = 1;
+ */
+ public com.google.cloud.translate.v3beta1.DetectedLanguage.Builder getLanguagesBuilder(
+ int index) {
+ return getLanguagesFieldBuilder().getBuilder(index);
+ }
+ /**
+ *
+ *
+ * + * A list of detected languages sorted by detection confidence in descending + * order. The most probable language first. + *+ * + *
repeated .google.cloud.translation.v3beta1.DetectedLanguage languages = 1;
+ */
+ public com.google.cloud.translate.v3beta1.DetectedLanguageOrBuilder getLanguagesOrBuilder(
+ int index) {
+ if (languagesBuilder_ == null) {
+ return languages_.get(index);
+ } else {
+ return languagesBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * A list of detected languages sorted by detection confidence in descending + * order. The most probable language first. + *+ * + *
repeated .google.cloud.translation.v3beta1.DetectedLanguage languages = 1;
+ */
+ public java.util.List extends com.google.cloud.translate.v3beta1.DetectedLanguageOrBuilder>
+ getLanguagesOrBuilderList() {
+ if (languagesBuilder_ != null) {
+ return languagesBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(languages_);
+ }
+ }
+ /**
+ *
+ *
+ * + * A list of detected languages sorted by detection confidence in descending + * order. The most probable language first. + *+ * + *
repeated .google.cloud.translation.v3beta1.DetectedLanguage languages = 1;
+ */
+ public com.google.cloud.translate.v3beta1.DetectedLanguage.Builder addLanguagesBuilder() {
+ return getLanguagesFieldBuilder()
+ .addBuilder(com.google.cloud.translate.v3beta1.DetectedLanguage.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * A list of detected languages sorted by detection confidence in descending + * order. The most probable language first. + *+ * + *
repeated .google.cloud.translation.v3beta1.DetectedLanguage languages = 1;
+ */
+ public com.google.cloud.translate.v3beta1.DetectedLanguage.Builder addLanguagesBuilder(
+ int index) {
+ return getLanguagesFieldBuilder()
+ .addBuilder(
+ index, com.google.cloud.translate.v3beta1.DetectedLanguage.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * A list of detected languages sorted by detection confidence in descending + * order. The most probable language first. + *+ * + *
repeated .google.cloud.translation.v3beta1.DetectedLanguage languages = 1;
+ */
+ public java.util.List+ * A list of detected languages sorted by detection confidence in descending + * order. The most probable language first. + *+ * + *
repeated .google.cloud.translation.v3beta1.DetectedLanguage languages = 1;
+ */
+ java.util.List+ * A list of detected languages sorted by detection confidence in descending + * order. The most probable language first. + *+ * + *
repeated .google.cloud.translation.v3beta1.DetectedLanguage languages = 1;
+ */
+ com.google.cloud.translate.v3beta1.DetectedLanguage getLanguages(int index);
+ /**
+ *
+ *
+ * + * A list of detected languages sorted by detection confidence in descending + * order. The most probable language first. + *+ * + *
repeated .google.cloud.translation.v3beta1.DetectedLanguage languages = 1;
+ */
+ int getLanguagesCount();
+ /**
+ *
+ *
+ * + * A list of detected languages sorted by detection confidence in descending + * order. The most probable language first. + *+ * + *
repeated .google.cloud.translation.v3beta1.DetectedLanguage languages = 1;
+ */
+ java.util.List extends com.google.cloud.translate.v3beta1.DetectedLanguageOrBuilder>
+ getLanguagesOrBuilderList();
+ /**
+ *
+ *
+ * + * A list of detected languages sorted by detection confidence in descending + * order. The most probable language first. + *+ * + *
repeated .google.cloud.translation.v3beta1.DetectedLanguage languages = 1;
+ */
+ com.google.cloud.translate.v3beta1.DetectedLanguageOrBuilder getLanguagesOrBuilder(int index);
+}
diff --git a/google-api-grpc/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/DetectedLanguage.java b/google-api-grpc/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/DetectedLanguage.java
new file mode 100644
index 000000000000..f1386b3bb386
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/DetectedLanguage.java
@@ -0,0 +1,685 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/translate/v3beta1/translation_service.proto
+
+package com.google.cloud.translate.v3beta1;
+
+/**
+ *
+ *
+ * + * The response message for language detection. + *+ * + * Protobuf type {@code google.cloud.translation.v3beta1.DetectedLanguage} + */ +public final class DetectedLanguage extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.translation.v3beta1.DetectedLanguage) + DetectedLanguageOrBuilder { + private static final long serialVersionUID = 0L; + // Use DetectedLanguage.newBuilder() to construct. + private DetectedLanguage(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private DetectedLanguage() { + languageCode_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DetectedLanguage( + 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(); + + languageCode_ = s; + break; + } + case 21: + { + confidence_ = input.readFloat(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.translate.v3beta1.TranslationServiceProto + .internal_static_google_cloud_translation_v3beta1_DetectedLanguage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.translate.v3beta1.TranslationServiceProto + .internal_static_google_cloud_translation_v3beta1_DetectedLanguage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.translate.v3beta1.DetectedLanguage.class, + com.google.cloud.translate.v3beta1.DetectedLanguage.Builder.class); + } + + public static final int LANGUAGE_CODE_FIELD_NUMBER = 1; + private volatile java.lang.Object languageCode_; + /** + * + * + *
+ * The BCP-47 language code of source content in the request, detected + * automatically. + *+ * + *
string language_code = 1;
+ */
+ public java.lang.String getLanguageCode() {
+ java.lang.Object ref = languageCode_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ languageCode_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * The BCP-47 language code of source content in the request, detected + * automatically. + *+ * + *
string language_code = 1;
+ */
+ public com.google.protobuf.ByteString getLanguageCodeBytes() {
+ java.lang.Object ref = languageCode_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ languageCode_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int CONFIDENCE_FIELD_NUMBER = 2;
+ private float confidence_;
+ /**
+ *
+ *
+ * + * The confidence of the detection result for this language. + *+ * + *
float confidence = 2;
+ */
+ public float getConfidence() {
+ return confidence_;
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (!getLanguageCodeBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, languageCode_);
+ }
+ if (confidence_ != 0F) {
+ output.writeFloat(2, confidence_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getLanguageCodeBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, languageCode_);
+ }
+ if (confidence_ != 0F) {
+ size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, confidence_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.translate.v3beta1.DetectedLanguage)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.translate.v3beta1.DetectedLanguage other =
+ (com.google.cloud.translate.v3beta1.DetectedLanguage) obj;
+
+ if (!getLanguageCode().equals(other.getLanguageCode())) return false;
+ if (java.lang.Float.floatToIntBits(getConfidence())
+ != java.lang.Float.floatToIntBits(other.getConfidence())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER;
+ hash = (53 * hash) + getLanguageCode().hashCode();
+ hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER;
+ hash = (53 * hash) + java.lang.Float.floatToIntBits(getConfidence());
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.translate.v3beta1.DetectedLanguage parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DetectedLanguage parseFrom(
+ 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.v3beta1.DetectedLanguage parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DetectedLanguage parseFrom(
+ com.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.v3beta1.DetectedLanguage parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DetectedLanguage parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DetectedLanguage parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DetectedLanguage parseFrom(
+ java.io.InputStream 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.v3beta1.DetectedLanguage parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DetectedLanguage parseDelimitedFrom(
+ java.io.InputStream 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.v3beta1.DetectedLanguage parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DetectedLanguage parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, 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.v3beta1.DetectedLanguage prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new 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 language detection. + *+ * + * Protobuf type {@code google.cloud.translation.v3beta1.DetectedLanguage} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * The BCP-47 language code of source content in the request, detected + * automatically. + *+ * + *
string language_code = 1;
+ */
+ public java.lang.String getLanguageCode() {
+ java.lang.Object ref = languageCode_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ languageCode_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The BCP-47 language code of source content in the request, detected + * automatically. + *+ * + *
string language_code = 1;
+ */
+ public com.google.protobuf.ByteString getLanguageCodeBytes() {
+ java.lang.Object ref = languageCode_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ languageCode_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The BCP-47 language code of source content in the request, detected + * automatically. + *+ * + *
string language_code = 1;
+ */
+ public Builder setLanguageCode(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ languageCode_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The BCP-47 language code of source content in the request, detected + * automatically. + *+ * + *
string language_code = 1;
+ */
+ public Builder clearLanguageCode() {
+
+ languageCode_ = getDefaultInstance().getLanguageCode();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The BCP-47 language code of source content in the request, detected + * automatically. + *+ * + *
string language_code = 1;
+ */
+ public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ languageCode_ = value;
+ onChanged();
+ return this;
+ }
+
+ private float confidence_;
+ /**
+ *
+ *
+ * + * The confidence of the detection result for this language. + *+ * + *
float confidence = 2;
+ */
+ public float getConfidence() {
+ return confidence_;
+ }
+ /**
+ *
+ *
+ * + * The confidence of the detection result for this language. + *+ * + *
float confidence = 2;
+ */
+ public Builder setConfidence(float value) {
+
+ confidence_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The confidence of the detection result for this language. + *+ * + *
float confidence = 2;
+ */
+ public Builder clearConfidence() {
+
+ confidence_ = 0F;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.translation.v3beta1.DetectedLanguage)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.DetectedLanguage)
+ private static final com.google.cloud.translate.v3beta1.DetectedLanguage DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.translate.v3beta1.DetectedLanguage();
+ }
+
+ public static com.google.cloud.translate.v3beta1.DetectedLanguage getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * The BCP-47 language code of source content in the request, detected + * automatically. + *+ * + *
string language_code = 1;
+ */
+ java.lang.String getLanguageCode();
+ /**
+ *
+ *
+ * + * The BCP-47 language code of source content in the request, detected + * automatically. + *+ * + *
string language_code = 1;
+ */
+ com.google.protobuf.ByteString getLanguageCodeBytes();
+
+ /**
+ *
+ *
+ * + * The confidence of the detection result for this language. + *+ * + *
float confidence = 2;
+ */
+ float getConfidence();
+}
diff --git a/google-api-grpc/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/GcsDestination.java b/google-api-grpc/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/GcsDestination.java
new file mode 100644
index 000000000000..e0e7ed9b8943
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/GcsDestination.java
@@ -0,0 +1,605 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/translate/v3beta1/translation_service.proto
+
+package com.google.cloud.translate.v3beta1;
+
+/**
+ *
+ *
+ * + * The GCS location for the output content + *+ * + * Protobuf type {@code google.cloud.translation.v3beta1.GcsDestination} + */ +public final class GcsDestination extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.translation.v3beta1.GcsDestination) + GcsDestinationOrBuilder { + private static final long serialVersionUID = 0L; + // Use GcsDestination.newBuilder() to construct. + private GcsDestination(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private GcsDestination() { + outputUriPrefix_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GcsDestination( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + 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(); + + outputUriPrefix_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.translate.v3beta1.TranslationServiceProto + .internal_static_google_cloud_translation_v3beta1_GcsDestination_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.translate.v3beta1.TranslationServiceProto + .internal_static_google_cloud_translation_v3beta1_GcsDestination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.translate.v3beta1.GcsDestination.class, + com.google.cloud.translate.v3beta1.GcsDestination.Builder.class); + } + + public static final int OUTPUT_URI_PREFIX_FIELD_NUMBER = 1; + private volatile java.lang.Object outputUriPrefix_; + /** + * + * + *
+ * Required. There must be no files under 'output_uri_prefix'. + * 'output_uri_prefix' must end with "/". Otherwise error 400 is returned. + *+ * + *
string output_uri_prefix = 1;
+ */
+ public java.lang.String getOutputUriPrefix() {
+ java.lang.Object ref = outputUriPrefix_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ outputUriPrefix_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. There must be no files under 'output_uri_prefix'. + * 'output_uri_prefix' must end with "/". Otherwise error 400 is returned. + *+ * + *
string output_uri_prefix = 1;
+ */
+ public com.google.protobuf.ByteString getOutputUriPrefixBytes() {
+ java.lang.Object ref = outputUriPrefix_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ outputUriPrefix_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (!getOutputUriPrefixBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, outputUriPrefix_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getOutputUriPrefixBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, outputUriPrefix_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.translate.v3beta1.GcsDestination)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.translate.v3beta1.GcsDestination other =
+ (com.google.cloud.translate.v3beta1.GcsDestination) obj;
+
+ if (!getOutputUriPrefix().equals(other.getOutputUriPrefix())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + OUTPUT_URI_PREFIX_FIELD_NUMBER;
+ hash = (53 * hash) + getOutputUriPrefix().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.translate.v3beta1.GcsDestination parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.GcsDestination parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.GcsDestination parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.GcsDestination parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.GcsDestination parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.GcsDestination parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.GcsDestination parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.GcsDestination parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.GcsDestination parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.GcsDestination parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.GcsDestination parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.GcsDestination parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(com.google.cloud.translate.v3beta1.GcsDestination prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ * + * The GCS location for the output content + *+ * + * Protobuf type {@code google.cloud.translation.v3beta1.GcsDestination} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Required. There must be no files under 'output_uri_prefix'. + * 'output_uri_prefix' must end with "/". Otherwise error 400 is returned. + *+ * + *
string output_uri_prefix = 1;
+ */
+ public java.lang.String getOutputUriPrefix() {
+ java.lang.Object ref = outputUriPrefix_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ outputUriPrefix_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. There must be no files under 'output_uri_prefix'. + * 'output_uri_prefix' must end with "/". Otherwise error 400 is returned. + *+ * + *
string output_uri_prefix = 1;
+ */
+ public com.google.protobuf.ByteString getOutputUriPrefixBytes() {
+ java.lang.Object ref = outputUriPrefix_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ outputUriPrefix_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. There must be no files under 'output_uri_prefix'. + * 'output_uri_prefix' must end with "/". Otherwise error 400 is returned. + *+ * + *
string output_uri_prefix = 1;
+ */
+ public Builder setOutputUriPrefix(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ outputUriPrefix_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. There must be no files under 'output_uri_prefix'. + * 'output_uri_prefix' must end with "/". Otherwise error 400 is returned. + *+ * + *
string output_uri_prefix = 1;
+ */
+ public Builder clearOutputUriPrefix() {
+
+ outputUriPrefix_ = getDefaultInstance().getOutputUriPrefix();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. There must be no files under 'output_uri_prefix'. + * 'output_uri_prefix' must end with "/". Otherwise error 400 is returned. + *+ * + *
string output_uri_prefix = 1;
+ */
+ public Builder setOutputUriPrefixBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ outputUriPrefix_ = value;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.translation.v3beta1.GcsDestination)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.GcsDestination)
+ private static final com.google.cloud.translate.v3beta1.GcsDestination DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.translate.v3beta1.GcsDestination();
+ }
+
+ public static com.google.cloud.translate.v3beta1.GcsDestination getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Required. There must be no files under 'output_uri_prefix'. + * 'output_uri_prefix' must end with "/". Otherwise error 400 is returned. + *+ * + *
string output_uri_prefix = 1;
+ */
+ java.lang.String getOutputUriPrefix();
+ /**
+ *
+ *
+ * + * Required. There must be no files under 'output_uri_prefix'. + * 'output_uri_prefix' must end with "/". Otherwise error 400 is returned. + *+ * + *
string output_uri_prefix = 1;
+ */
+ com.google.protobuf.ByteString getOutputUriPrefixBytes();
+}
diff --git a/google-api-grpc/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/GcsSource.java b/google-api-grpc/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/GcsSource.java
new file mode 100644
index 000000000000..81bb60a067e7
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/GcsSource.java
@@ -0,0 +1,596 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/translate/v3beta1/translation_service.proto
+
+package com.google.cloud.translate.v3beta1;
+
+/**
+ *
+ *
+ * + * The GCS location for the input content. + *+ * + * Protobuf type {@code google.cloud.translation.v3beta1.GcsSource} + */ +public final class GcsSource extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.translation.v3beta1.GcsSource) + GcsSourceOrBuilder { + private static final long serialVersionUID = 0L; + // Use GcsSource.newBuilder() to construct. + private GcsSource(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private GcsSource() { + inputUri_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GcsSource( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + inputUri_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.translate.v3beta1.TranslationServiceProto + .internal_static_google_cloud_translation_v3beta1_GcsSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.translate.v3beta1.TranslationServiceProto + .internal_static_google_cloud_translation_v3beta1_GcsSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.translate.v3beta1.GcsSource.class, + com.google.cloud.translate.v3beta1.GcsSource.Builder.class); + } + + public static final int INPUT_URI_FIELD_NUMBER = 1; + private volatile java.lang.Object inputUri_; + /** + * + * + *
+ * Required. Source data URI. For example, `gs://my_bucket/my_object`. + *+ * + *
string input_uri = 1;
+ */
+ public java.lang.String getInputUri() {
+ java.lang.Object ref = inputUri_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ inputUri_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. Source data URI. For example, `gs://my_bucket/my_object`. + *+ * + *
string input_uri = 1;
+ */
+ public com.google.protobuf.ByteString getInputUriBytes() {
+ java.lang.Object ref = inputUri_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ inputUri_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (!getInputUriBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, inputUri_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getInputUriBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, inputUri_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.translate.v3beta1.GcsSource)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.translate.v3beta1.GcsSource other =
+ (com.google.cloud.translate.v3beta1.GcsSource) obj;
+
+ if (!getInputUri().equals(other.getInputUri())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + INPUT_URI_FIELD_NUMBER;
+ hash = (53 * hash) + getInputUri().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.translate.v3beta1.GcsSource parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.GcsSource parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.GcsSource parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.GcsSource parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.GcsSource parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.GcsSource parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.GcsSource parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.GcsSource parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.GcsSource parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.GcsSource parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.GcsSource parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.GcsSource parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(com.google.cloud.translate.v3beta1.GcsSource prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ * + * The GCS location for the input content. + *+ * + * Protobuf type {@code google.cloud.translation.v3beta1.GcsSource} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Required. Source data URI. For example, `gs://my_bucket/my_object`. + *+ * + *
string input_uri = 1;
+ */
+ public java.lang.String getInputUri() {
+ java.lang.Object ref = inputUri_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ inputUri_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. Source data URI. For example, `gs://my_bucket/my_object`. + *+ * + *
string input_uri = 1;
+ */
+ public com.google.protobuf.ByteString getInputUriBytes() {
+ java.lang.Object ref = inputUri_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ inputUri_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. Source data URI. For example, `gs://my_bucket/my_object`. + *+ * + *
string input_uri = 1;
+ */
+ public Builder setInputUri(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ inputUri_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Source data URI. For example, `gs://my_bucket/my_object`. + *+ * + *
string input_uri = 1;
+ */
+ public Builder clearInputUri() {
+
+ inputUri_ = getDefaultInstance().getInputUri();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Source data URI. For example, `gs://my_bucket/my_object`. + *+ * + *
string input_uri = 1;
+ */
+ public Builder setInputUriBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ inputUri_ = value;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.translation.v3beta1.GcsSource)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.GcsSource)
+ private static final com.google.cloud.translate.v3beta1.GcsSource DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.translate.v3beta1.GcsSource();
+ }
+
+ public static com.google.cloud.translate.v3beta1.GcsSource getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Required. Source data URI. For example, `gs://my_bucket/my_object`. + *+ * + *
string input_uri = 1;
+ */
+ java.lang.String getInputUri();
+ /**
+ *
+ *
+ * + * Required. Source data URI. For example, `gs://my_bucket/my_object`. + *+ * + *
string input_uri = 1;
+ */
+ com.google.protobuf.ByteString getInputUriBytes();
+}
diff --git a/google-api-grpc/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/GetGlossaryRequest.java b/google-api-grpc/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/GetGlossaryRequest.java
new file mode 100644
index 000000000000..77d716603f66
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/GetGlossaryRequest.java
@@ -0,0 +1,599 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/translate/v3beta1/translation_service.proto
+
+package com.google.cloud.translate.v3beta1;
+
+/**
+ *
+ *
+ * + * Request message for GetGlossary. + *+ * + * Protobuf type {@code google.cloud.translation.v3beta1.GetGlossaryRequest} + */ +public final class GetGlossaryRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.translation.v3beta1.GetGlossaryRequest) + GetGlossaryRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetGlossaryRequest.newBuilder() to construct. + private GetGlossaryRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private GetGlossaryRequest() { + name_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetGlossaryRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.translate.v3beta1.TranslationServiceProto + .internal_static_google_cloud_translation_v3beta1_GetGlossaryRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.translate.v3beta1.TranslationServiceProto + .internal_static_google_cloud_translation_v3beta1_GetGlossaryRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.translate.v3beta1.GetGlossaryRequest.class, + com.google.cloud.translate.v3beta1.GetGlossaryRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+ * Required. The name of the glossary to retrieve. + *+ * + *
string name = 1;
+ */
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ name_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. The name of the glossary to retrieve. + *+ * + *
string name = 1;
+ */
+ public com.google.protobuf.ByteString getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (!getNameBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getNameBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.translate.v3beta1.GetGlossaryRequest)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.translate.v3beta1.GetGlossaryRequest other =
+ (com.google.cloud.translate.v3beta1.GetGlossaryRequest) 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.translate.v3beta1.GetGlossaryRequest parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.GetGlossaryRequest parseFrom(
+ 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.v3beta1.GetGlossaryRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.GetGlossaryRequest parseFrom(
+ com.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.v3beta1.GetGlossaryRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.GetGlossaryRequest parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.GetGlossaryRequest parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.GetGlossaryRequest parseFrom(
+ java.io.InputStream 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.v3beta1.GetGlossaryRequest parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.GetGlossaryRequest parseDelimitedFrom(
+ java.io.InputStream 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.v3beta1.GetGlossaryRequest parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.GetGlossaryRequest parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, 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.v3beta1.GetGlossaryRequest prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ * + * Request message for GetGlossary. + *+ * + * Protobuf type {@code google.cloud.translation.v3beta1.GetGlossaryRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Required. The name of the glossary to retrieve. + *+ * + *
string name = 1;
+ */
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ name_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. The name of the glossary to retrieve. + *+ * + *
string name = 1;
+ */
+ public com.google.protobuf.ByteString getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. The name of the glossary to retrieve. + *+ * + *
string name = 1;
+ */
+ public Builder setName(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The name of the glossary to retrieve. + *+ * + *
string name = 1;
+ */
+ public Builder clearName() {
+
+ name_ = getDefaultInstance().getName();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The name of the glossary to retrieve. + *+ * + *
string name = 1;
+ */
+ public Builder setNameBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.translation.v3beta1.GetGlossaryRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.GetGlossaryRequest)
+ private static final com.google.cloud.translate.v3beta1.GetGlossaryRequest DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.translate.v3beta1.GetGlossaryRequest();
+ }
+
+ public static com.google.cloud.translate.v3beta1.GetGlossaryRequest getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Required. The name of the glossary to retrieve. + *+ * + *
string name = 1;
+ */
+ java.lang.String getName();
+ /**
+ *
+ *
+ * + * Required. The name of the glossary to retrieve. + *+ * + *
string name = 1;
+ */
+ com.google.protobuf.ByteString getNameBytes();
+}
diff --git a/google-api-grpc/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/GetSupportedLanguagesRequest.java b/google-api-grpc/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/GetSupportedLanguagesRequest.java
new file mode 100644
index 000000000000..83e95fc438ec
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/GetSupportedLanguagesRequest.java
@@ -0,0 +1,1026 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/translate/v3beta1/translation_service.proto
+
+package com.google.cloud.translate.v3beta1;
+
+/**
+ *
+ *
+ * + * The request message for discovering supported languages. + *+ * + * Protobuf type {@code google.cloud.translation.v3beta1.GetSupportedLanguagesRequest} + */ +public final class GetSupportedLanguagesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.translation.v3beta1.GetSupportedLanguagesRequest) + GetSupportedLanguagesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetSupportedLanguagesRequest.newBuilder() to construct. + private GetSupportedLanguagesRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private GetSupportedLanguagesRequest() { + parent_ = ""; + displayLanguageCode_ = ""; + model_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetSupportedLanguagesRequest( + 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(); + + displayLanguageCode_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + model_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = 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.translate.v3beta1.TranslationServiceProto + .internal_static_google_cloud_translation_v3beta1_GetSupportedLanguagesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.translate.v3beta1.TranslationServiceProto + .internal_static_google_cloud_translation_v3beta1_GetSupportedLanguagesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.translate.v3beta1.GetSupportedLanguagesRequest.class, + com.google.cloud.translate.v3beta1.GetSupportedLanguagesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 3; + private volatile java.lang.Object parent_; + /** + * + * + *
+ * Optional. Used for making regionalized calls.
+ * Format: projects/{project-id}/locations/{location-id}.
+ * For global calls, use projects/{project-id}/locations/global.
+ * If missing, the call is treated as a global call.
+ * Only custom model within the same location-id can be used.
+ * Otherwise 400 is returned.
+ *
+ *
+ * string parent = 3;
+ */
+ 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;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Optional. Used for making regionalized calls.
+ * Format: projects/{project-id}/locations/{location-id}.
+ * For global calls, use projects/{project-id}/locations/global.
+ * If missing, the call is treated as a global call.
+ * Only custom model within the same location-id can be used.
+ * Otherwise 400 is returned.
+ *
+ *
+ * string parent = 3;
+ */
+ 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 DISPLAY_LANGUAGE_CODE_FIELD_NUMBER = 1;
+ private volatile java.lang.Object displayLanguageCode_;
+ /**
+ *
+ *
+ * + * Optional. The language to use to return localized, human readable names + * of supported languages. If missing, default language is ENGLISH. + *+ * + *
string display_language_code = 1;
+ */
+ public java.lang.String getDisplayLanguageCode() {
+ java.lang.Object ref = displayLanguageCode_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ displayLanguageCode_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. The language to use to return localized, human readable names + * of supported languages. If missing, default language is ENGLISH. + *+ * + *
string display_language_code = 1;
+ */
+ public com.google.protobuf.ByteString getDisplayLanguageCodeBytes() {
+ java.lang.Object ref = displayLanguageCode_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ displayLanguageCode_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int MODEL_FIELD_NUMBER = 2;
+ private volatile java.lang.Object model_;
+ /**
+ *
+ *
+ *
+ * Optional. Get supported languages of this model.
+ * The format depends on model type:
+ * 1. Custom models:
+ * projects/{project-id}/locations/{location-id}/models/{model-id}.
+ * 2. General (built-in) models:
+ * projects/{project-id}/locations/{location-id}/models/general/nmt
+ * projects/{project-id}/locations/{location-id}/models/general/base
+ * Returns languages supported by the specified model.
+ * If missing, we get supported languages of Google general NMT model.
+ *
+ *
+ * string model = 2;
+ */
+ public java.lang.String getModel() {
+ java.lang.Object ref = model_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ model_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Optional. Get supported languages of this model.
+ * The format depends on model type:
+ * 1. Custom models:
+ * projects/{project-id}/locations/{location-id}/models/{model-id}.
+ * 2. General (built-in) models:
+ * projects/{project-id}/locations/{location-id}/models/general/nmt
+ * projects/{project-id}/locations/{location-id}/models/general/base
+ * Returns languages supported by the specified model.
+ * If missing, we get supported languages of Google general NMT model.
+ *
+ *
+ * string model = 2;
+ */
+ public com.google.protobuf.ByteString getModelBytes() {
+ java.lang.Object ref = model_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ model_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (!getDisplayLanguageCodeBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, displayLanguageCode_);
+ }
+ if (!getModelBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, model_);
+ }
+ if (!getParentBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 3, parent_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getDisplayLanguageCodeBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, displayLanguageCode_);
+ }
+ if (!getModelBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, model_);
+ }
+ if (!getParentBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, parent_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ 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.v3beta1.GetSupportedLanguagesRequest)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.translate.v3beta1.GetSupportedLanguagesRequest other =
+ (com.google.cloud.translate.v3beta1.GetSupportedLanguagesRequest) obj;
+
+ if (!getParent().equals(other.getParent())) return false;
+ if (!getDisplayLanguageCode().equals(other.getDisplayLanguageCode())) return false;
+ if (!getModel().equals(other.getModel())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + PARENT_FIELD_NUMBER;
+ hash = (53 * hash) + getParent().hashCode();
+ hash = (37 * hash) + DISPLAY_LANGUAGE_CODE_FIELD_NUMBER;
+ hash = (53 * hash) + getDisplayLanguageCode().hashCode();
+ hash = (37 * hash) + MODEL_FIELD_NUMBER;
+ hash = (53 * hash) + getModel().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.translate.v3beta1.GetSupportedLanguagesRequest parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.GetSupportedLanguagesRequest parseFrom(
+ 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.v3beta1.GetSupportedLanguagesRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.GetSupportedLanguagesRequest parseFrom(
+ com.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.v3beta1.GetSupportedLanguagesRequest parseFrom(
+ byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.GetSupportedLanguagesRequest parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.GetSupportedLanguagesRequest parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.GetSupportedLanguagesRequest parseFrom(
+ java.io.InputStream 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.v3beta1.GetSupportedLanguagesRequest parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.GetSupportedLanguagesRequest parseDelimitedFrom(
+ java.io.InputStream 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.v3beta1.GetSupportedLanguagesRequest parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.GetSupportedLanguagesRequest parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, 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.v3beta1.GetSupportedLanguagesRequest prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new 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 discovering supported languages. + *+ * + * Protobuf type {@code google.cloud.translation.v3beta1.GetSupportedLanguagesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Optional. Used for making regionalized calls.
+ * Format: projects/{project-id}/locations/{location-id}.
+ * For global calls, use projects/{project-id}/locations/global.
+ * If missing, the call is treated as a global call.
+ * Only custom model within the same location-id can be used.
+ * Otherwise 400 is returned.
+ *
+ *
+ * string parent = 3;
+ */
+ public java.lang.String getParent() {
+ java.lang.Object ref = parent_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ parent_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Optional. Used for making regionalized calls.
+ * Format: projects/{project-id}/locations/{location-id}.
+ * For global calls, use projects/{project-id}/locations/global.
+ * If missing, the call is treated as a global call.
+ * Only custom model within the same location-id can be used.
+ * Otherwise 400 is returned.
+ *
+ *
+ * string parent = 3;
+ */
+ public com.google.protobuf.ByteString getParentBytes() {
+ java.lang.Object ref = parent_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ parent_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Optional. Used for making regionalized calls.
+ * Format: projects/{project-id}/locations/{location-id}.
+ * For global calls, use projects/{project-id}/locations/global.
+ * If missing, the call is treated as a global call.
+ * Only custom model within the same location-id can be used.
+ * Otherwise 400 is returned.
+ *
+ *
+ * string parent = 3;
+ */
+ public Builder setParent(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ parent_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. Used for making regionalized calls.
+ * Format: projects/{project-id}/locations/{location-id}.
+ * For global calls, use projects/{project-id}/locations/global.
+ * If missing, the call is treated as a global call.
+ * Only custom model within the same location-id can be used.
+ * Otherwise 400 is returned.
+ *
+ *
+ * string parent = 3;
+ */
+ public Builder clearParent() {
+
+ parent_ = getDefaultInstance().getParent();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. Used for making regionalized calls.
+ * Format: projects/{project-id}/locations/{location-id}.
+ * For global calls, use projects/{project-id}/locations/global.
+ * If missing, the call is treated as a global call.
+ * Only custom model within the same location-id can be used.
+ * Otherwise 400 is returned.
+ *
+ *
+ * string parent = 3;
+ */
+ public Builder setParentBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ parent_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object displayLanguageCode_ = "";
+ /**
+ *
+ *
+ * + * Optional. The language to use to return localized, human readable names + * of supported languages. If missing, default language is ENGLISH. + *+ * + *
string display_language_code = 1;
+ */
+ public java.lang.String getDisplayLanguageCode() {
+ java.lang.Object ref = displayLanguageCode_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ displayLanguageCode_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. The language to use to return localized, human readable names + * of supported languages. If missing, default language is ENGLISH. + *+ * + *
string display_language_code = 1;
+ */
+ public com.google.protobuf.ByteString getDisplayLanguageCodeBytes() {
+ java.lang.Object ref = displayLanguageCode_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ displayLanguageCode_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. The language to use to return localized, human readable names + * of supported languages. If missing, default language is ENGLISH. + *+ * + *
string display_language_code = 1;
+ */
+ public Builder setDisplayLanguageCode(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ displayLanguageCode_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. The language to use to return localized, human readable names + * of supported languages. If missing, default language is ENGLISH. + *+ * + *
string display_language_code = 1;
+ */
+ public Builder clearDisplayLanguageCode() {
+
+ displayLanguageCode_ = getDefaultInstance().getDisplayLanguageCode();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. The language to use to return localized, human readable names + * of supported languages. If missing, default language is ENGLISH. + *+ * + *
string display_language_code = 1;
+ */
+ public Builder setDisplayLanguageCodeBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ displayLanguageCode_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object model_ = "";
+ /**
+ *
+ *
+ *
+ * Optional. Get supported languages of this model.
+ * The format depends on model type:
+ * 1. Custom models:
+ * projects/{project-id}/locations/{location-id}/models/{model-id}.
+ * 2. General (built-in) models:
+ * projects/{project-id}/locations/{location-id}/models/general/nmt
+ * projects/{project-id}/locations/{location-id}/models/general/base
+ * Returns languages supported by the specified model.
+ * If missing, we get supported languages of Google general NMT model.
+ *
+ *
+ * string model = 2;
+ */
+ public java.lang.String getModel() {
+ java.lang.Object ref = model_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ model_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Optional. Get supported languages of this model.
+ * The format depends on model type:
+ * 1. Custom models:
+ * projects/{project-id}/locations/{location-id}/models/{model-id}.
+ * 2. General (built-in) models:
+ * projects/{project-id}/locations/{location-id}/models/general/nmt
+ * projects/{project-id}/locations/{location-id}/models/general/base
+ * Returns languages supported by the specified model.
+ * If missing, we get supported languages of Google general NMT model.
+ *
+ *
+ * string model = 2;
+ */
+ public com.google.protobuf.ByteString getModelBytes() {
+ java.lang.Object ref = model_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ model_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Optional. Get supported languages of this model.
+ * The format depends on model type:
+ * 1. Custom models:
+ * projects/{project-id}/locations/{location-id}/models/{model-id}.
+ * 2. General (built-in) models:
+ * projects/{project-id}/locations/{location-id}/models/general/nmt
+ * projects/{project-id}/locations/{location-id}/models/general/base
+ * Returns languages supported by the specified model.
+ * If missing, we get supported languages of Google general NMT model.
+ *
+ *
+ * string model = 2;
+ */
+ public Builder setModel(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ model_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. Get supported languages of this model.
+ * The format depends on model type:
+ * 1. Custom models:
+ * projects/{project-id}/locations/{location-id}/models/{model-id}.
+ * 2. General (built-in) models:
+ * projects/{project-id}/locations/{location-id}/models/general/nmt
+ * projects/{project-id}/locations/{location-id}/models/general/base
+ * Returns languages supported by the specified model.
+ * If missing, we get supported languages of Google general NMT model.
+ *
+ *
+ * string model = 2;
+ */
+ public Builder clearModel() {
+
+ model_ = getDefaultInstance().getModel();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. Get supported languages of this model.
+ * The format depends on model type:
+ * 1. Custom models:
+ * projects/{project-id}/locations/{location-id}/models/{model-id}.
+ * 2. General (built-in) models:
+ * projects/{project-id}/locations/{location-id}/models/general/nmt
+ * projects/{project-id}/locations/{location-id}/models/general/base
+ * Returns languages supported by the specified model.
+ * If missing, we get supported languages of Google general NMT model.
+ *
+ *
+ * string model = 2;
+ */
+ public Builder setModelBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ model_ = value;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.translation.v3beta1.GetSupportedLanguagesRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.GetSupportedLanguagesRequest)
+ private static final com.google.cloud.translate.v3beta1.GetSupportedLanguagesRequest
+ DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.translate.v3beta1.GetSupportedLanguagesRequest();
+ }
+
+ public static com.google.cloud.translate.v3beta1.GetSupportedLanguagesRequest
+ getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ * Optional. Used for making regionalized calls.
+ * Format: projects/{project-id}/locations/{location-id}.
+ * For global calls, use projects/{project-id}/locations/global.
+ * If missing, the call is treated as a global call.
+ * Only custom model within the same location-id can be used.
+ * Otherwise 400 is returned.
+ *
+ *
+ * string parent = 3;
+ */
+ java.lang.String getParent();
+ /**
+ *
+ *
+ *
+ * Optional. Used for making regionalized calls.
+ * Format: projects/{project-id}/locations/{location-id}.
+ * For global calls, use projects/{project-id}/locations/global.
+ * If missing, the call is treated as a global call.
+ * Only custom model within the same location-id can be used.
+ * Otherwise 400 is returned.
+ *
+ *
+ * string parent = 3;
+ */
+ com.google.protobuf.ByteString getParentBytes();
+
+ /**
+ *
+ *
+ * + * Optional. The language to use to return localized, human readable names + * of supported languages. If missing, default language is ENGLISH. + *+ * + *
string display_language_code = 1;
+ */
+ java.lang.String getDisplayLanguageCode();
+ /**
+ *
+ *
+ * + * Optional. The language to use to return localized, human readable names + * of supported languages. If missing, default language is ENGLISH. + *+ * + *
string display_language_code = 1;
+ */
+ com.google.protobuf.ByteString getDisplayLanguageCodeBytes();
+
+ /**
+ *
+ *
+ *
+ * Optional. Get supported languages of this model.
+ * The format depends on model type:
+ * 1. Custom models:
+ * projects/{project-id}/locations/{location-id}/models/{model-id}.
+ * 2. General (built-in) models:
+ * projects/{project-id}/locations/{location-id}/models/general/nmt
+ * projects/{project-id}/locations/{location-id}/models/general/base
+ * Returns languages supported by the specified model.
+ * If missing, we get supported languages of Google general NMT model.
+ *
+ *
+ * string model = 2;
+ */
+ java.lang.String getModel();
+ /**
+ *
+ *
+ *
+ * Optional. Get supported languages of this model.
+ * The format depends on model type:
+ * 1. Custom models:
+ * projects/{project-id}/locations/{location-id}/models/{model-id}.
+ * 2. General (built-in) models:
+ * projects/{project-id}/locations/{location-id}/models/general/nmt
+ * projects/{project-id}/locations/{location-id}/models/general/base
+ * Returns languages supported by the specified model.
+ * If missing, we get supported languages of Google general NMT model.
+ *
+ *
+ * string model = 2;
+ */
+ com.google.protobuf.ByteString getModelBytes();
+}
diff --git a/google-api-grpc/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/Glossary.java b/google-api-grpc/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/Glossary.java
new file mode 100644
index 000000000000..d15a9b030315
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/Glossary.java
@@ -0,0 +1,3772 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/translate/v3beta1/translation_service.proto
+
+package com.google.cloud.translate.v3beta1;
+
+/**
+ *
+ *
+ * + * Represents a glossary built from user provided data. + *+ * + * Protobuf type {@code google.cloud.translation.v3beta1.Glossary} + */ +public final class Glossary extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.translation.v3beta1.Glossary) + GlossaryOrBuilder { + private static final long serialVersionUID = 0L; + // Use Glossary.newBuilder() to construct. + private Glossary(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private Glossary() { + name_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Glossary( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 26: + { + com.google.cloud.translate.v3beta1.Glossary.LanguageCodePair.Builder subBuilder = + null; + if (languagesCase_ == 3) { + subBuilder = + ((com.google.cloud.translate.v3beta1.Glossary.LanguageCodePair) languages_) + .toBuilder(); + } + languages_ = + input.readMessage( + com.google.cloud.translate.v3beta1.Glossary.LanguageCodePair.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.translate.v3beta1.Glossary.LanguageCodePair) languages_); + languages_ = subBuilder.buildPartial(); + } + languagesCase_ = 3; + break; + } + case 34: + { + com.google.cloud.translate.v3beta1.Glossary.LanguageCodesSet.Builder subBuilder = + null; + if (languagesCase_ == 4) { + subBuilder = + ((com.google.cloud.translate.v3beta1.Glossary.LanguageCodesSet) languages_) + .toBuilder(); + } + languages_ = + input.readMessage( + com.google.cloud.translate.v3beta1.Glossary.LanguageCodesSet.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.translate.v3beta1.Glossary.LanguageCodesSet) languages_); + languages_ = subBuilder.buildPartial(); + } + languagesCase_ = 4; + break; + } + case 42: + { + com.google.cloud.translate.v3beta1.GlossaryInputConfig.Builder subBuilder = null; + if (inputConfig_ != null) { + subBuilder = inputConfig_.toBuilder(); + } + inputConfig_ = + input.readMessage( + com.google.cloud.translate.v3beta1.GlossaryInputConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(inputConfig_); + inputConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 48: + { + entryCount_ = input.readInt32(); + break; + } + case 58: + { + 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; + } + case 66: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (endTime_ != null) { + subBuilder = endTime_.toBuilder(); + } + endTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(endTime_); + endTime_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.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.v3beta1.TranslationServiceProto + .internal_static_google_cloud_translation_v3beta1_Glossary_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.translate.v3beta1.TranslationServiceProto + .internal_static_google_cloud_translation_v3beta1_Glossary_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.translate.v3beta1.Glossary.class, + com.google.cloud.translate.v3beta1.Glossary.Builder.class); + } + + public interface LanguageCodePairOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.translation.v3beta1.Glossary.LanguageCodePair) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+ * Required. The BCP-47 language code of the input text, for example, + * "en-US". Expected to be an exact match for GlossaryTerm.language_code. + *+ * + *
string source_language_code = 1;
+ */
+ java.lang.String getSourceLanguageCode();
+ /**
+ *
+ *
+ * + * Required. The BCP-47 language code of the input text, for example, + * "en-US". Expected to be an exact match for GlossaryTerm.language_code. + *+ * + *
string source_language_code = 1;
+ */
+ com.google.protobuf.ByteString getSourceLanguageCodeBytes();
+
+ /**
+ *
+ *
+ * + * Required. The BCP-47 language code for translation output, for example, + * "zh-CN". Expected to be an exact match for GlossaryTerm.language_code. + *+ * + *
string target_language_code = 2;
+ */
+ java.lang.String getTargetLanguageCode();
+ /**
+ *
+ *
+ * + * Required. The BCP-47 language code for translation output, for example, + * "zh-CN". Expected to be an exact match for GlossaryTerm.language_code. + *+ * + *
string target_language_code = 2;
+ */
+ com.google.protobuf.ByteString getTargetLanguageCodeBytes();
+ }
+ /**
+ *
+ *
+ * + * Used with UNIDIRECTIONAL. + *+ * + * Protobuf type {@code google.cloud.translation.v3beta1.Glossary.LanguageCodePair} + */ + public static final class LanguageCodePair extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.translation.v3beta1.Glossary.LanguageCodePair) + LanguageCodePairOrBuilder { + private static final long serialVersionUID = 0L; + // Use LanguageCodePair.newBuilder() to construct. + private LanguageCodePair(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private LanguageCodePair() { + sourceLanguageCode_ = ""; + targetLanguageCode_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private LanguageCodePair( + 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(); + + sourceLanguageCode_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + targetLanguageCode_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.translate.v3beta1.TranslationServiceProto + .internal_static_google_cloud_translation_v3beta1_Glossary_LanguageCodePair_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.translate.v3beta1.TranslationServiceProto + .internal_static_google_cloud_translation_v3beta1_Glossary_LanguageCodePair_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.translate.v3beta1.Glossary.LanguageCodePair.class, + com.google.cloud.translate.v3beta1.Glossary.LanguageCodePair.Builder.class); + } + + public static final int SOURCE_LANGUAGE_CODE_FIELD_NUMBER = 1; + private volatile java.lang.Object sourceLanguageCode_; + /** + * + * + *
+ * Required. The BCP-47 language code of the input text, for example, + * "en-US". Expected to be an exact match for GlossaryTerm.language_code. + *+ * + *
string source_language_code = 1;
+ */
+ 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 text, for example, + * "en-US". Expected to be an exact match for GlossaryTerm.language_code. + *+ * + *
string source_language_code = 1;
+ */
+ public com.google.protobuf.ByteString getSourceLanguageCodeBytes() {
+ java.lang.Object ref = sourceLanguageCode_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ sourceLanguageCode_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int TARGET_LANGUAGE_CODE_FIELD_NUMBER = 2;
+ private volatile java.lang.Object targetLanguageCode_;
+ /**
+ *
+ *
+ * + * Required. The BCP-47 language code for translation output, for example, + * "zh-CN". Expected to be an exact match for GlossaryTerm.language_code. + *+ * + *
string target_language_code = 2;
+ */
+ public java.lang.String getTargetLanguageCode() {
+ java.lang.Object ref = targetLanguageCode_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ targetLanguageCode_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. The BCP-47 language code for translation output, for example, + * "zh-CN". Expected to be an exact match for GlossaryTerm.language_code. + *+ * + *
string target_language_code = 2;
+ */
+ public com.google.protobuf.ByteString getTargetLanguageCodeBytes() {
+ java.lang.Object ref = targetLanguageCode_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ targetLanguageCode_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (!getSourceLanguageCodeBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, sourceLanguageCode_);
+ }
+ if (!getTargetLanguageCodeBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, targetLanguageCode_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getSourceLanguageCodeBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, sourceLanguageCode_);
+ }
+ if (!getTargetLanguageCodeBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, targetLanguageCode_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.translate.v3beta1.Glossary.LanguageCodePair)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.translate.v3beta1.Glossary.LanguageCodePair other =
+ (com.google.cloud.translate.v3beta1.Glossary.LanguageCodePair) obj;
+
+ if (!getSourceLanguageCode().equals(other.getSourceLanguageCode())) return false;
+ if (!getTargetLanguageCode().equals(other.getTargetLanguageCode())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + SOURCE_LANGUAGE_CODE_FIELD_NUMBER;
+ hash = (53 * hash) + getSourceLanguageCode().hashCode();
+ hash = (37 * hash) + TARGET_LANGUAGE_CODE_FIELD_NUMBER;
+ hash = (53 * hash) + getTargetLanguageCode().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.translate.v3beta1.Glossary.LanguageCodePair parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.Glossary.LanguageCodePair parseFrom(
+ 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.v3beta1.Glossary.LanguageCodePair parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.Glossary.LanguageCodePair parseFrom(
+ com.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.v3beta1.Glossary.LanguageCodePair parseFrom(
+ byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.Glossary.LanguageCodePair parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.Glossary.LanguageCodePair parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.Glossary.LanguageCodePair parseFrom(
+ java.io.InputStream 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.v3beta1.Glossary.LanguageCodePair parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.Glossary.LanguageCodePair parseDelimitedFrom(
+ java.io.InputStream 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.v3beta1.Glossary.LanguageCodePair parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.Glossary.LanguageCodePair parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, 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.v3beta1.Glossary.LanguageCodePair prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ * + * Used with UNIDIRECTIONAL. + *+ * + * Protobuf type {@code google.cloud.translation.v3beta1.Glossary.LanguageCodePair} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Required. The BCP-47 language code of the input text, for example, + * "en-US". Expected to be an exact match for GlossaryTerm.language_code. + *+ * + *
string source_language_code = 1;
+ */
+ public java.lang.String getSourceLanguageCode() {
+ java.lang.Object ref = sourceLanguageCode_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ sourceLanguageCode_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. The BCP-47 language code of the input text, for example, + * "en-US". Expected to be an exact match for GlossaryTerm.language_code. + *+ * + *
string source_language_code = 1;
+ */
+ public com.google.protobuf.ByteString getSourceLanguageCodeBytes() {
+ java.lang.Object ref = sourceLanguageCode_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ sourceLanguageCode_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. The BCP-47 language code of the input text, for example, + * "en-US". Expected to be an exact match for GlossaryTerm.language_code. + *+ * + *
string source_language_code = 1;
+ */
+ public Builder setSourceLanguageCode(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ sourceLanguageCode_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The BCP-47 language code of the input text, for example, + * "en-US". Expected to be an exact match for GlossaryTerm.language_code. + *+ * + *
string source_language_code = 1;
+ */
+ public Builder clearSourceLanguageCode() {
+
+ sourceLanguageCode_ = getDefaultInstance().getSourceLanguageCode();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The BCP-47 language code of the input text, for example, + * "en-US". Expected to be an exact match for GlossaryTerm.language_code. + *+ * + *
string source_language_code = 1;
+ */
+ public Builder setSourceLanguageCodeBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ sourceLanguageCode_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object targetLanguageCode_ = "";
+ /**
+ *
+ *
+ * + * Required. The BCP-47 language code for translation output, for example, + * "zh-CN". Expected to be an exact match for GlossaryTerm.language_code. + *+ * + *
string target_language_code = 2;
+ */
+ public java.lang.String getTargetLanguageCode() {
+ java.lang.Object ref = targetLanguageCode_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ targetLanguageCode_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. The BCP-47 language code for translation output, for example, + * "zh-CN". Expected to be an exact match for GlossaryTerm.language_code. + *+ * + *
string target_language_code = 2;
+ */
+ public com.google.protobuf.ByteString getTargetLanguageCodeBytes() {
+ java.lang.Object ref = targetLanguageCode_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ targetLanguageCode_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. The BCP-47 language code for translation output, for example, + * "zh-CN". Expected to be an exact match for GlossaryTerm.language_code. + *+ * + *
string target_language_code = 2;
+ */
+ public Builder setTargetLanguageCode(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ targetLanguageCode_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The BCP-47 language code for translation output, for example, + * "zh-CN". Expected to be an exact match for GlossaryTerm.language_code. + *+ * + *
string target_language_code = 2;
+ */
+ public Builder clearTargetLanguageCode() {
+
+ targetLanguageCode_ = getDefaultInstance().getTargetLanguageCode();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The BCP-47 language code for translation output, for example, + * "zh-CN". Expected to be an exact match for GlossaryTerm.language_code. + *+ * + *
string target_language_code = 2;
+ */
+ public Builder setTargetLanguageCodeBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ targetLanguageCode_ = value;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.translation.v3beta1.Glossary.LanguageCodePair)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.Glossary.LanguageCodePair)
+ private static final com.google.cloud.translate.v3beta1.Glossary.LanguageCodePair
+ DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.translate.v3beta1.Glossary.LanguageCodePair();
+ }
+
+ public static com.google.cloud.translate.v3beta1.Glossary.LanguageCodePair
+ getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * The BCP-47 language code(s) for terms defined in the glossary. + * All entries are unique. The list contains at least two entries. + * Expected to be an exact match for GlossaryTerm.language_code. + *+ * + *
repeated string language_codes = 1;
+ */
+ java.util.List+ * The BCP-47 language code(s) for terms defined in the glossary. + * All entries are unique. The list contains at least two entries. + * Expected to be an exact match for GlossaryTerm.language_code. + *+ * + *
repeated string language_codes = 1;
+ */
+ int getLanguageCodesCount();
+ /**
+ *
+ *
+ * + * The BCP-47 language code(s) for terms defined in the glossary. + * All entries are unique. The list contains at least two entries. + * Expected to be an exact match for GlossaryTerm.language_code. + *+ * + *
repeated string language_codes = 1;
+ */
+ java.lang.String getLanguageCodes(int index);
+ /**
+ *
+ *
+ * + * The BCP-47 language code(s) for terms defined in the glossary. + * All entries are unique. The list contains at least two entries. + * Expected to be an exact match for GlossaryTerm.language_code. + *+ * + *
repeated string language_codes = 1;
+ */
+ com.google.protobuf.ByteString getLanguageCodesBytes(int index);
+ }
+ /**
+ *
+ *
+ * + * Used with EQUIVALENT_TERMS_SET. + *+ * + * Protobuf type {@code google.cloud.translation.v3beta1.Glossary.LanguageCodesSet} + */ + public static final class LanguageCodesSet extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.translation.v3beta1.Glossary.LanguageCodesSet) + LanguageCodesSetOrBuilder { + private static final long serialVersionUID = 0L; + // Use LanguageCodesSet.newBuilder() to construct. + private LanguageCodesSet(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private LanguageCodesSet() { + languageCodes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private LanguageCodesSet( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + languageCodes_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + languageCodes_.add(s); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + languageCodes_ = languageCodes_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.translate.v3beta1.TranslationServiceProto + .internal_static_google_cloud_translation_v3beta1_Glossary_LanguageCodesSet_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.translate.v3beta1.TranslationServiceProto + .internal_static_google_cloud_translation_v3beta1_Glossary_LanguageCodesSet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.translate.v3beta1.Glossary.LanguageCodesSet.class, + com.google.cloud.translate.v3beta1.Glossary.LanguageCodesSet.Builder.class); + } + + public static final int LANGUAGE_CODES_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList languageCodes_; + /** + * + * + *
+ * The BCP-47 language code(s) for terms defined in the glossary. + * All entries are unique. The list contains at least two entries. + * Expected to be an exact match for GlossaryTerm.language_code. + *+ * + *
repeated string language_codes = 1;
+ */
+ public com.google.protobuf.ProtocolStringList getLanguageCodesList() {
+ return languageCodes_;
+ }
+ /**
+ *
+ *
+ * + * The BCP-47 language code(s) for terms defined in the glossary. + * All entries are unique. The list contains at least two entries. + * Expected to be an exact match for GlossaryTerm.language_code. + *+ * + *
repeated string language_codes = 1;
+ */
+ public int getLanguageCodesCount() {
+ return languageCodes_.size();
+ }
+ /**
+ *
+ *
+ * + * The BCP-47 language code(s) for terms defined in the glossary. + * All entries are unique. The list contains at least two entries. + * Expected to be an exact match for GlossaryTerm.language_code. + *+ * + *
repeated string language_codes = 1;
+ */
+ public java.lang.String getLanguageCodes(int index) {
+ return languageCodes_.get(index);
+ }
+ /**
+ *
+ *
+ * + * The BCP-47 language code(s) for terms defined in the glossary. + * All entries are unique. The list contains at least two entries. + * Expected to be an exact match for GlossaryTerm.language_code. + *+ * + *
repeated string language_codes = 1;
+ */
+ public com.google.protobuf.ByteString getLanguageCodesBytes(int index) {
+ return languageCodes_.getByteString(index);
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ for (int i = 0; i < languageCodes_.size(); i++) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, languageCodes_.getRaw(i));
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ {
+ int dataSize = 0;
+ for (int i = 0; i < languageCodes_.size(); i++) {
+ dataSize += computeStringSizeNoTag(languageCodes_.getRaw(i));
+ }
+ size += dataSize;
+ size += 1 * getLanguageCodesList().size();
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.translate.v3beta1.Glossary.LanguageCodesSet)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.translate.v3beta1.Glossary.LanguageCodesSet other =
+ (com.google.cloud.translate.v3beta1.Glossary.LanguageCodesSet) obj;
+
+ if (!getLanguageCodesList().equals(other.getLanguageCodesList())) return false;
+ if (!unknownFields.equals(other.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 (getLanguageCodesCount() > 0) {
+ hash = (37 * hash) + LANGUAGE_CODES_FIELD_NUMBER;
+ hash = (53 * hash) + getLanguageCodesList().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.translate.v3beta1.Glossary.LanguageCodesSet parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.Glossary.LanguageCodesSet parseFrom(
+ 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.v3beta1.Glossary.LanguageCodesSet parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.Glossary.LanguageCodesSet parseFrom(
+ com.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.v3beta1.Glossary.LanguageCodesSet parseFrom(
+ byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.Glossary.LanguageCodesSet parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.Glossary.LanguageCodesSet parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.Glossary.LanguageCodesSet parseFrom(
+ java.io.InputStream 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.v3beta1.Glossary.LanguageCodesSet parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.Glossary.LanguageCodesSet parseDelimitedFrom(
+ java.io.InputStream 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.v3beta1.Glossary.LanguageCodesSet parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.Glossary.LanguageCodesSet parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, 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.v3beta1.Glossary.LanguageCodesSet prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ * + * Used with EQUIVALENT_TERMS_SET. + *+ * + * Protobuf type {@code google.cloud.translation.v3beta1.Glossary.LanguageCodesSet} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder
+ * The BCP-47 language code(s) for terms defined in the glossary. + * All entries are unique. The list contains at least two entries. + * Expected to be an exact match for GlossaryTerm.language_code. + *+ * + *
repeated string language_codes = 1;
+ */
+ public com.google.protobuf.ProtocolStringList getLanguageCodesList() {
+ return languageCodes_.getUnmodifiableView();
+ }
+ /**
+ *
+ *
+ * + * The BCP-47 language code(s) for terms defined in the glossary. + * All entries are unique. The list contains at least two entries. + * Expected to be an exact match for GlossaryTerm.language_code. + *+ * + *
repeated string language_codes = 1;
+ */
+ public int getLanguageCodesCount() {
+ return languageCodes_.size();
+ }
+ /**
+ *
+ *
+ * + * The BCP-47 language code(s) for terms defined in the glossary. + * All entries are unique. The list contains at least two entries. + * Expected to be an exact match for GlossaryTerm.language_code. + *+ * + *
repeated string language_codes = 1;
+ */
+ public java.lang.String getLanguageCodes(int index) {
+ return languageCodes_.get(index);
+ }
+ /**
+ *
+ *
+ * + * The BCP-47 language code(s) for terms defined in the glossary. + * All entries are unique. The list contains at least two entries. + * Expected to be an exact match for GlossaryTerm.language_code. + *+ * + *
repeated string language_codes = 1;
+ */
+ public com.google.protobuf.ByteString getLanguageCodesBytes(int index) {
+ return languageCodes_.getByteString(index);
+ }
+ /**
+ *
+ *
+ * + * The BCP-47 language code(s) for terms defined in the glossary. + * All entries are unique. The list contains at least two entries. + * Expected to be an exact match for GlossaryTerm.language_code. + *+ * + *
repeated string language_codes = 1;
+ */
+ public Builder setLanguageCodes(int index, java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureLanguageCodesIsMutable();
+ languageCodes_.set(index, value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The BCP-47 language code(s) for terms defined in the glossary. + * All entries are unique. The list contains at least two entries. + * Expected to be an exact match for GlossaryTerm.language_code. + *+ * + *
repeated string language_codes = 1;
+ */
+ public Builder addLanguageCodes(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureLanguageCodesIsMutable();
+ languageCodes_.add(value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The BCP-47 language code(s) for terms defined in the glossary. + * All entries are unique. The list contains at least two entries. + * Expected to be an exact match for GlossaryTerm.language_code. + *+ * + *
repeated string language_codes = 1;
+ */
+ public Builder addAllLanguageCodes(java.lang.Iterable+ * The BCP-47 language code(s) for terms defined in the glossary. + * All entries are unique. The list contains at least two entries. + * Expected to be an exact match for GlossaryTerm.language_code. + *+ * + *
repeated string language_codes = 1;
+ */
+ public Builder clearLanguageCodes() {
+ languageCodes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The BCP-47 language code(s) for terms defined in the glossary. + * All entries are unique. The list contains at least two entries. + * Expected to be an exact match for GlossaryTerm.language_code. + *+ * + *
repeated string language_codes = 1;
+ */
+ public Builder addLanguageCodesBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+ ensureLanguageCodesIsMutable();
+ languageCodes_.add(value);
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.translation.v3beta1.Glossary.LanguageCodesSet)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.Glossary.LanguageCodesSet)
+ private static final com.google.cloud.translate.v3beta1.Glossary.LanguageCodesSet
+ DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.translate.v3beta1.Glossary.LanguageCodesSet();
+ }
+
+ public static com.google.cloud.translate.v3beta1.Glossary.LanguageCodesSet
+ getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ * Required. The resource name of the glossary. Glossary names have the form
+ * `projects/{project-id}/locations/{location-id}/glossaries/{glossary-id}`.
+ *
+ *
+ * string name = 1;
+ */
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ name_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Required. The resource name of the glossary. Glossary names have the form
+ * `projects/{project-id}/locations/{location-id}/glossaries/{glossary-id}`.
+ *
+ *
+ * string name = 1;
+ */
+ public com.google.protobuf.ByteString getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int LANGUAGE_PAIR_FIELD_NUMBER = 3;
+ /**
+ *
+ *
+ * + * Used with UNIDIRECTIONAL. + *+ * + *
.google.cloud.translation.v3beta1.Glossary.LanguageCodePair language_pair = 3;
+ */
+ public boolean hasLanguagePair() {
+ return languagesCase_ == 3;
+ }
+ /**
+ *
+ *
+ * + * Used with UNIDIRECTIONAL. + *+ * + *
.google.cloud.translation.v3beta1.Glossary.LanguageCodePair language_pair = 3;
+ */
+ public com.google.cloud.translate.v3beta1.Glossary.LanguageCodePair getLanguagePair() {
+ if (languagesCase_ == 3) {
+ return (com.google.cloud.translate.v3beta1.Glossary.LanguageCodePair) languages_;
+ }
+ return com.google.cloud.translate.v3beta1.Glossary.LanguageCodePair.getDefaultInstance();
+ }
+ /**
+ *
+ *
+ * + * Used with UNIDIRECTIONAL. + *+ * + *
.google.cloud.translation.v3beta1.Glossary.LanguageCodePair language_pair = 3;
+ */
+ public com.google.cloud.translate.v3beta1.Glossary.LanguageCodePairOrBuilder
+ getLanguagePairOrBuilder() {
+ if (languagesCase_ == 3) {
+ return (com.google.cloud.translate.v3beta1.Glossary.LanguageCodePair) languages_;
+ }
+ return com.google.cloud.translate.v3beta1.Glossary.LanguageCodePair.getDefaultInstance();
+ }
+
+ public static final int LANGUAGE_CODES_SET_FIELD_NUMBER = 4;
+ /**
+ *
+ *
+ * + * Used with EQUIVALENT_TERMS_SET. + *+ * + *
.google.cloud.translation.v3beta1.Glossary.LanguageCodesSet language_codes_set = 4;
+ *
+ */
+ public boolean hasLanguageCodesSet() {
+ return languagesCase_ == 4;
+ }
+ /**
+ *
+ *
+ * + * Used with EQUIVALENT_TERMS_SET. + *+ * + *
.google.cloud.translation.v3beta1.Glossary.LanguageCodesSet language_codes_set = 4;
+ *
+ */
+ public com.google.cloud.translate.v3beta1.Glossary.LanguageCodesSet getLanguageCodesSet() {
+ if (languagesCase_ == 4) {
+ return (com.google.cloud.translate.v3beta1.Glossary.LanguageCodesSet) languages_;
+ }
+ return com.google.cloud.translate.v3beta1.Glossary.LanguageCodesSet.getDefaultInstance();
+ }
+ /**
+ *
+ *
+ * + * Used with EQUIVALENT_TERMS_SET. + *+ * + *
.google.cloud.translation.v3beta1.Glossary.LanguageCodesSet language_codes_set = 4;
+ *
+ */
+ public com.google.cloud.translate.v3beta1.Glossary.LanguageCodesSetOrBuilder
+ getLanguageCodesSetOrBuilder() {
+ if (languagesCase_ == 4) {
+ return (com.google.cloud.translate.v3beta1.Glossary.LanguageCodesSet) languages_;
+ }
+ return com.google.cloud.translate.v3beta1.Glossary.LanguageCodesSet.getDefaultInstance();
+ }
+
+ public static final int INPUT_CONFIG_FIELD_NUMBER = 5;
+ private com.google.cloud.translate.v3beta1.GlossaryInputConfig inputConfig_;
+ /**
+ *
+ *
+ * + * Required. Provides examples to build the glossary from. + * Total glossary must not exceed 10M Unicode codepoints. + *+ * + *
.google.cloud.translation.v3beta1.GlossaryInputConfig input_config = 5;
+ */
+ public boolean hasInputConfig() {
+ return inputConfig_ != null;
+ }
+ /**
+ *
+ *
+ * + * Required. Provides examples to build the glossary from. + * Total glossary must not exceed 10M Unicode codepoints. + *+ * + *
.google.cloud.translation.v3beta1.GlossaryInputConfig input_config = 5;
+ */
+ public com.google.cloud.translate.v3beta1.GlossaryInputConfig getInputConfig() {
+ return inputConfig_ == null
+ ? com.google.cloud.translate.v3beta1.GlossaryInputConfig.getDefaultInstance()
+ : inputConfig_;
+ }
+ /**
+ *
+ *
+ * + * Required. Provides examples to build the glossary from. + * Total glossary must not exceed 10M Unicode codepoints. + *+ * + *
.google.cloud.translation.v3beta1.GlossaryInputConfig input_config = 5;
+ */
+ public com.google.cloud.translate.v3beta1.GlossaryInputConfigOrBuilder getInputConfigOrBuilder() {
+ return getInputConfig();
+ }
+
+ public static final int ENTRY_COUNT_FIELD_NUMBER = 6;
+ private int entryCount_;
+ /**
+ *
+ *
+ * + * Output only. The number of entries defined in the glossary. + *+ * + *
int32 entry_count = 6;
+ */
+ public int getEntryCount() {
+ return entryCount_;
+ }
+
+ public static final int SUBMIT_TIME_FIELD_NUMBER = 7;
+ private com.google.protobuf.Timestamp submitTime_;
+ /**
+ *
+ *
+ * + * Output only. When CreateGlossary was called. + *+ * + *
.google.protobuf.Timestamp submit_time = 7;
+ */
+ public boolean hasSubmitTime() {
+ return submitTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * Output only. When CreateGlossary was called. + *+ * + *
.google.protobuf.Timestamp submit_time = 7;
+ */
+ public com.google.protobuf.Timestamp getSubmitTime() {
+ return submitTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : submitTime_;
+ }
+ /**
+ *
+ *
+ * + * Output only. When CreateGlossary was called. + *+ * + *
.google.protobuf.Timestamp submit_time = 7;
+ */
+ public com.google.protobuf.TimestampOrBuilder getSubmitTimeOrBuilder() {
+ return getSubmitTime();
+ }
+
+ public static final int END_TIME_FIELD_NUMBER = 8;
+ private com.google.protobuf.Timestamp endTime_;
+ /**
+ *
+ *
+ * + * Output only. When the glossary creation was finished. + *+ * + *
.google.protobuf.Timestamp end_time = 8;
+ */
+ public boolean hasEndTime() {
+ return endTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * Output only. When the glossary creation was finished. + *+ * + *
.google.protobuf.Timestamp end_time = 8;
+ */
+ public com.google.protobuf.Timestamp getEndTime() {
+ return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_;
+ }
+ /**
+ *
+ *
+ * + * Output only. When the glossary creation was finished. + *+ * + *
.google.protobuf.Timestamp end_time = 8;
+ */
+ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() {
+ return getEndTime();
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (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 (languagesCase_ == 3) {
+ output.writeMessage(
+ 3, (com.google.cloud.translate.v3beta1.Glossary.LanguageCodePair) languages_);
+ }
+ if (languagesCase_ == 4) {
+ output.writeMessage(
+ 4, (com.google.cloud.translate.v3beta1.Glossary.LanguageCodesSet) languages_);
+ }
+ if (inputConfig_ != null) {
+ output.writeMessage(5, getInputConfig());
+ }
+ if (entryCount_ != 0) {
+ output.writeInt32(6, entryCount_);
+ }
+ if (submitTime_ != null) {
+ output.writeMessage(7, getSubmitTime());
+ }
+ if (endTime_ != null) {
+ output.writeMessage(8, getEndTime());
+ }
+ 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 (languagesCase_ == 3) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 3, (com.google.cloud.translate.v3beta1.Glossary.LanguageCodePair) languages_);
+ }
+ if (languagesCase_ == 4) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 4, (com.google.cloud.translate.v3beta1.Glossary.LanguageCodesSet) languages_);
+ }
+ if (inputConfig_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getInputConfig());
+ }
+ if (entryCount_ != 0) {
+ size += com.google.protobuf.CodedOutputStream.computeInt32Size(6, entryCount_);
+ }
+ if (submitTime_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getSubmitTime());
+ }
+ if (endTime_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getEndTime());
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ 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.v3beta1.Glossary)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.translate.v3beta1.Glossary other =
+ (com.google.cloud.translate.v3beta1.Glossary) obj;
+
+ if (!getName().equals(other.getName())) return false;
+ if (hasInputConfig() != other.hasInputConfig()) return false;
+ if (hasInputConfig()) {
+ if (!getInputConfig().equals(other.getInputConfig())) return false;
+ }
+ if (getEntryCount() != other.getEntryCount()) return false;
+ if (hasSubmitTime() != other.hasSubmitTime()) return false;
+ if (hasSubmitTime()) {
+ if (!getSubmitTime().equals(other.getSubmitTime())) return false;
+ }
+ if (hasEndTime() != other.hasEndTime()) return false;
+ if (hasEndTime()) {
+ if (!getEndTime().equals(other.getEndTime())) return false;
+ }
+ if (!getLanguagesCase().equals(other.getLanguagesCase())) return false;
+ switch (languagesCase_) {
+ case 3:
+ if (!getLanguagePair().equals(other.getLanguagePair())) return false;
+ break;
+ case 4:
+ if (!getLanguageCodesSet().equals(other.getLanguageCodesSet())) return false;
+ break;
+ case 0:
+ default:
+ }
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + NAME_FIELD_NUMBER;
+ hash = (53 * hash) + getName().hashCode();
+ if (hasInputConfig()) {
+ hash = (37 * hash) + INPUT_CONFIG_FIELD_NUMBER;
+ hash = (53 * hash) + getInputConfig().hashCode();
+ }
+ hash = (37 * hash) + ENTRY_COUNT_FIELD_NUMBER;
+ hash = (53 * hash) + getEntryCount();
+ if (hasSubmitTime()) {
+ hash = (37 * hash) + SUBMIT_TIME_FIELD_NUMBER;
+ hash = (53 * hash) + getSubmitTime().hashCode();
+ }
+ if (hasEndTime()) {
+ hash = (37 * hash) + END_TIME_FIELD_NUMBER;
+ hash = (53 * hash) + getEndTime().hashCode();
+ }
+ switch (languagesCase_) {
+ case 3:
+ hash = (37 * hash) + LANGUAGE_PAIR_FIELD_NUMBER;
+ hash = (53 * hash) + getLanguagePair().hashCode();
+ break;
+ case 4:
+ hash = (37 * hash) + LANGUAGE_CODES_SET_FIELD_NUMBER;
+ hash = (53 * hash) + getLanguageCodesSet().hashCode();
+ break;
+ case 0:
+ default:
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.translate.v3beta1.Glossary parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.Glossary parseFrom(
+ 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.v3beta1.Glossary parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.Glossary parseFrom(
+ com.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.v3beta1.Glossary parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.Glossary parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.Glossary parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.Glossary parseFrom(
+ java.io.InputStream 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.v3beta1.Glossary parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.Glossary parseDelimitedFrom(
+ java.io.InputStream 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.v3beta1.Glossary parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.Glossary parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, 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.v3beta1.Glossary prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ * + * Represents a glossary built from user provided data. + *+ * + * Protobuf type {@code google.cloud.translation.v3beta1.Glossary} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Required. The resource name of the glossary. Glossary names have the form
+ * `projects/{project-id}/locations/{location-id}/glossaries/{glossary-id}`.
+ *
+ *
+ * string name = 1;
+ */
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ name_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Required. The resource name of the glossary. Glossary names have the form
+ * `projects/{project-id}/locations/{location-id}/glossaries/{glossary-id}`.
+ *
+ *
+ * string name = 1;
+ */
+ public com.google.protobuf.ByteString getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Required. The resource name of the glossary. Glossary names have the form
+ * `projects/{project-id}/locations/{location-id}/glossaries/{glossary-id}`.
+ *
+ *
+ * string name = 1;
+ */
+ public Builder setName(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Required. The resource name of the glossary. Glossary names have the form
+ * `projects/{project-id}/locations/{location-id}/glossaries/{glossary-id}`.
+ *
+ *
+ * string name = 1;
+ */
+ public Builder clearName() {
+
+ name_ = getDefaultInstance().getName();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Required. The resource name of the glossary. Glossary names have the form
+ * `projects/{project-id}/locations/{location-id}/glossaries/{glossary-id}`.
+ *
+ *
+ * string name = 1;
+ */
+ public Builder setNameBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.translate.v3beta1.Glossary.LanguageCodePair,
+ com.google.cloud.translate.v3beta1.Glossary.LanguageCodePair.Builder,
+ com.google.cloud.translate.v3beta1.Glossary.LanguageCodePairOrBuilder>
+ languagePairBuilder_;
+ /**
+ *
+ *
+ * + * Used with UNIDIRECTIONAL. + *+ * + *
.google.cloud.translation.v3beta1.Glossary.LanguageCodePair language_pair = 3;
+ */
+ public boolean hasLanguagePair() {
+ return languagesCase_ == 3;
+ }
+ /**
+ *
+ *
+ * + * Used with UNIDIRECTIONAL. + *+ * + *
.google.cloud.translation.v3beta1.Glossary.LanguageCodePair language_pair = 3;
+ */
+ public com.google.cloud.translate.v3beta1.Glossary.LanguageCodePair getLanguagePair() {
+ if (languagePairBuilder_ == null) {
+ if (languagesCase_ == 3) {
+ return (com.google.cloud.translate.v3beta1.Glossary.LanguageCodePair) languages_;
+ }
+ return com.google.cloud.translate.v3beta1.Glossary.LanguageCodePair.getDefaultInstance();
+ } else {
+ if (languagesCase_ == 3) {
+ return languagePairBuilder_.getMessage();
+ }
+ return com.google.cloud.translate.v3beta1.Glossary.LanguageCodePair.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ * + * Used with UNIDIRECTIONAL. + *+ * + *
.google.cloud.translation.v3beta1.Glossary.LanguageCodePair language_pair = 3;
+ */
+ public Builder setLanguagePair(
+ com.google.cloud.translate.v3beta1.Glossary.LanguageCodePair value) {
+ if (languagePairBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ languages_ = value;
+ onChanged();
+ } else {
+ languagePairBuilder_.setMessage(value);
+ }
+ languagesCase_ = 3;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Used with UNIDIRECTIONAL. + *+ * + *
.google.cloud.translation.v3beta1.Glossary.LanguageCodePair language_pair = 3;
+ */
+ public Builder setLanguagePair(
+ com.google.cloud.translate.v3beta1.Glossary.LanguageCodePair.Builder builderForValue) {
+ if (languagePairBuilder_ == null) {
+ languages_ = builderForValue.build();
+ onChanged();
+ } else {
+ languagePairBuilder_.setMessage(builderForValue.build());
+ }
+ languagesCase_ = 3;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Used with UNIDIRECTIONAL. + *+ * + *
.google.cloud.translation.v3beta1.Glossary.LanguageCodePair language_pair = 3;
+ */
+ public Builder mergeLanguagePair(
+ com.google.cloud.translate.v3beta1.Glossary.LanguageCodePair value) {
+ if (languagePairBuilder_ == null) {
+ if (languagesCase_ == 3
+ && languages_
+ != com.google.cloud.translate.v3beta1.Glossary.LanguageCodePair
+ .getDefaultInstance()) {
+ languages_ =
+ com.google.cloud.translate.v3beta1.Glossary.LanguageCodePair.newBuilder(
+ (com.google.cloud.translate.v3beta1.Glossary.LanguageCodePair) languages_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ languages_ = value;
+ }
+ onChanged();
+ } else {
+ if (languagesCase_ == 3) {
+ languagePairBuilder_.mergeFrom(value);
+ }
+ languagePairBuilder_.setMessage(value);
+ }
+ languagesCase_ = 3;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Used with UNIDIRECTIONAL. + *+ * + *
.google.cloud.translation.v3beta1.Glossary.LanguageCodePair language_pair = 3;
+ */
+ public Builder clearLanguagePair() {
+ if (languagePairBuilder_ == null) {
+ if (languagesCase_ == 3) {
+ languagesCase_ = 0;
+ languages_ = null;
+ onChanged();
+ }
+ } else {
+ if (languagesCase_ == 3) {
+ languagesCase_ = 0;
+ languages_ = null;
+ }
+ languagePairBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Used with UNIDIRECTIONAL. + *+ * + *
.google.cloud.translation.v3beta1.Glossary.LanguageCodePair language_pair = 3;
+ */
+ public com.google.cloud.translate.v3beta1.Glossary.LanguageCodePair.Builder
+ getLanguagePairBuilder() {
+ return getLanguagePairFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Used with UNIDIRECTIONAL. + *+ * + *
.google.cloud.translation.v3beta1.Glossary.LanguageCodePair language_pair = 3;
+ */
+ public com.google.cloud.translate.v3beta1.Glossary.LanguageCodePairOrBuilder
+ getLanguagePairOrBuilder() {
+ if ((languagesCase_ == 3) && (languagePairBuilder_ != null)) {
+ return languagePairBuilder_.getMessageOrBuilder();
+ } else {
+ if (languagesCase_ == 3) {
+ return (com.google.cloud.translate.v3beta1.Glossary.LanguageCodePair) languages_;
+ }
+ return com.google.cloud.translate.v3beta1.Glossary.LanguageCodePair.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ * + * Used with UNIDIRECTIONAL. + *+ * + *
.google.cloud.translation.v3beta1.Glossary.LanguageCodePair language_pair = 3;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.translate.v3beta1.Glossary.LanguageCodePair,
+ com.google.cloud.translate.v3beta1.Glossary.LanguageCodePair.Builder,
+ com.google.cloud.translate.v3beta1.Glossary.LanguageCodePairOrBuilder>
+ getLanguagePairFieldBuilder() {
+ if (languagePairBuilder_ == null) {
+ if (!(languagesCase_ == 3)) {
+ languages_ =
+ com.google.cloud.translate.v3beta1.Glossary.LanguageCodePair.getDefaultInstance();
+ }
+ languagePairBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.translate.v3beta1.Glossary.LanguageCodePair,
+ com.google.cloud.translate.v3beta1.Glossary.LanguageCodePair.Builder,
+ com.google.cloud.translate.v3beta1.Glossary.LanguageCodePairOrBuilder>(
+ (com.google.cloud.translate.v3beta1.Glossary.LanguageCodePair) languages_,
+ getParentForChildren(),
+ isClean());
+ languages_ = null;
+ }
+ languagesCase_ = 3;
+ onChanged();
+ ;
+ return languagePairBuilder_;
+ }
+
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.translate.v3beta1.Glossary.LanguageCodesSet,
+ com.google.cloud.translate.v3beta1.Glossary.LanguageCodesSet.Builder,
+ com.google.cloud.translate.v3beta1.Glossary.LanguageCodesSetOrBuilder>
+ languageCodesSetBuilder_;
+ /**
+ *
+ *
+ * + * Used with EQUIVALENT_TERMS_SET. + *+ * + *
.google.cloud.translation.v3beta1.Glossary.LanguageCodesSet language_codes_set = 4;
+ *
+ */
+ public boolean hasLanguageCodesSet() {
+ return languagesCase_ == 4;
+ }
+ /**
+ *
+ *
+ * + * Used with EQUIVALENT_TERMS_SET. + *+ * + *
.google.cloud.translation.v3beta1.Glossary.LanguageCodesSet language_codes_set = 4;
+ *
+ */
+ public com.google.cloud.translate.v3beta1.Glossary.LanguageCodesSet getLanguageCodesSet() {
+ if (languageCodesSetBuilder_ == null) {
+ if (languagesCase_ == 4) {
+ return (com.google.cloud.translate.v3beta1.Glossary.LanguageCodesSet) languages_;
+ }
+ return com.google.cloud.translate.v3beta1.Glossary.LanguageCodesSet.getDefaultInstance();
+ } else {
+ if (languagesCase_ == 4) {
+ return languageCodesSetBuilder_.getMessage();
+ }
+ return com.google.cloud.translate.v3beta1.Glossary.LanguageCodesSet.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ * + * Used with EQUIVALENT_TERMS_SET. + *+ * + *
.google.cloud.translation.v3beta1.Glossary.LanguageCodesSet language_codes_set = 4;
+ *
+ */
+ public Builder setLanguageCodesSet(
+ com.google.cloud.translate.v3beta1.Glossary.LanguageCodesSet value) {
+ if (languageCodesSetBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ languages_ = value;
+ onChanged();
+ } else {
+ languageCodesSetBuilder_.setMessage(value);
+ }
+ languagesCase_ = 4;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Used with EQUIVALENT_TERMS_SET. + *+ * + *
.google.cloud.translation.v3beta1.Glossary.LanguageCodesSet language_codes_set = 4;
+ *
+ */
+ public Builder setLanguageCodesSet(
+ com.google.cloud.translate.v3beta1.Glossary.LanguageCodesSet.Builder builderForValue) {
+ if (languageCodesSetBuilder_ == null) {
+ languages_ = builderForValue.build();
+ onChanged();
+ } else {
+ languageCodesSetBuilder_.setMessage(builderForValue.build());
+ }
+ languagesCase_ = 4;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Used with EQUIVALENT_TERMS_SET. + *+ * + *
.google.cloud.translation.v3beta1.Glossary.LanguageCodesSet language_codes_set = 4;
+ *
+ */
+ public Builder mergeLanguageCodesSet(
+ com.google.cloud.translate.v3beta1.Glossary.LanguageCodesSet value) {
+ if (languageCodesSetBuilder_ == null) {
+ if (languagesCase_ == 4
+ && languages_
+ != com.google.cloud.translate.v3beta1.Glossary.LanguageCodesSet
+ .getDefaultInstance()) {
+ languages_ =
+ com.google.cloud.translate.v3beta1.Glossary.LanguageCodesSet.newBuilder(
+ (com.google.cloud.translate.v3beta1.Glossary.LanguageCodesSet) languages_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ languages_ = value;
+ }
+ onChanged();
+ } else {
+ if (languagesCase_ == 4) {
+ languageCodesSetBuilder_.mergeFrom(value);
+ }
+ languageCodesSetBuilder_.setMessage(value);
+ }
+ languagesCase_ = 4;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Used with EQUIVALENT_TERMS_SET. + *+ * + *
.google.cloud.translation.v3beta1.Glossary.LanguageCodesSet language_codes_set = 4;
+ *
+ */
+ public Builder clearLanguageCodesSet() {
+ if (languageCodesSetBuilder_ == null) {
+ if (languagesCase_ == 4) {
+ languagesCase_ = 0;
+ languages_ = null;
+ onChanged();
+ }
+ } else {
+ if (languagesCase_ == 4) {
+ languagesCase_ = 0;
+ languages_ = null;
+ }
+ languageCodesSetBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Used with EQUIVALENT_TERMS_SET. + *+ * + *
.google.cloud.translation.v3beta1.Glossary.LanguageCodesSet language_codes_set = 4;
+ *
+ */
+ public com.google.cloud.translate.v3beta1.Glossary.LanguageCodesSet.Builder
+ getLanguageCodesSetBuilder() {
+ return getLanguageCodesSetFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Used with EQUIVALENT_TERMS_SET. + *+ * + *
.google.cloud.translation.v3beta1.Glossary.LanguageCodesSet language_codes_set = 4;
+ *
+ */
+ public com.google.cloud.translate.v3beta1.Glossary.LanguageCodesSetOrBuilder
+ getLanguageCodesSetOrBuilder() {
+ if ((languagesCase_ == 4) && (languageCodesSetBuilder_ != null)) {
+ return languageCodesSetBuilder_.getMessageOrBuilder();
+ } else {
+ if (languagesCase_ == 4) {
+ return (com.google.cloud.translate.v3beta1.Glossary.LanguageCodesSet) languages_;
+ }
+ return com.google.cloud.translate.v3beta1.Glossary.LanguageCodesSet.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ * + * Used with EQUIVALENT_TERMS_SET. + *+ * + *
.google.cloud.translation.v3beta1.Glossary.LanguageCodesSet language_codes_set = 4;
+ *
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.translate.v3beta1.Glossary.LanguageCodesSet,
+ com.google.cloud.translate.v3beta1.Glossary.LanguageCodesSet.Builder,
+ com.google.cloud.translate.v3beta1.Glossary.LanguageCodesSetOrBuilder>
+ getLanguageCodesSetFieldBuilder() {
+ if (languageCodesSetBuilder_ == null) {
+ if (!(languagesCase_ == 4)) {
+ languages_ =
+ com.google.cloud.translate.v3beta1.Glossary.LanguageCodesSet.getDefaultInstance();
+ }
+ languageCodesSetBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.translate.v3beta1.Glossary.LanguageCodesSet,
+ com.google.cloud.translate.v3beta1.Glossary.LanguageCodesSet.Builder,
+ com.google.cloud.translate.v3beta1.Glossary.LanguageCodesSetOrBuilder>(
+ (com.google.cloud.translate.v3beta1.Glossary.LanguageCodesSet) languages_,
+ getParentForChildren(),
+ isClean());
+ languages_ = null;
+ }
+ languagesCase_ = 4;
+ onChanged();
+ ;
+ return languageCodesSetBuilder_;
+ }
+
+ private com.google.cloud.translate.v3beta1.GlossaryInputConfig inputConfig_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.translate.v3beta1.GlossaryInputConfig,
+ com.google.cloud.translate.v3beta1.GlossaryInputConfig.Builder,
+ com.google.cloud.translate.v3beta1.GlossaryInputConfigOrBuilder>
+ inputConfigBuilder_;
+ /**
+ *
+ *
+ * + * Required. Provides examples to build the glossary from. + * Total glossary must not exceed 10M Unicode codepoints. + *+ * + *
.google.cloud.translation.v3beta1.GlossaryInputConfig input_config = 5;
+ */
+ public boolean hasInputConfig() {
+ return inputConfigBuilder_ != null || inputConfig_ != null;
+ }
+ /**
+ *
+ *
+ * + * Required. Provides examples to build the glossary from. + * Total glossary must not exceed 10M Unicode codepoints. + *+ * + *
.google.cloud.translation.v3beta1.GlossaryInputConfig input_config = 5;
+ */
+ public com.google.cloud.translate.v3beta1.GlossaryInputConfig getInputConfig() {
+ if (inputConfigBuilder_ == null) {
+ return inputConfig_ == null
+ ? com.google.cloud.translate.v3beta1.GlossaryInputConfig.getDefaultInstance()
+ : inputConfig_;
+ } else {
+ return inputConfigBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. Provides examples to build the glossary from. + * Total glossary must not exceed 10M Unicode codepoints. + *+ * + *
.google.cloud.translation.v3beta1.GlossaryInputConfig input_config = 5;
+ */
+ public Builder setInputConfig(com.google.cloud.translate.v3beta1.GlossaryInputConfig value) {
+ if (inputConfigBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ inputConfig_ = value;
+ onChanged();
+ } else {
+ inputConfigBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Provides examples to build the glossary from. + * Total glossary must not exceed 10M Unicode codepoints. + *+ * + *
.google.cloud.translation.v3beta1.GlossaryInputConfig input_config = 5;
+ */
+ public Builder setInputConfig(
+ com.google.cloud.translate.v3beta1.GlossaryInputConfig.Builder builderForValue) {
+ if (inputConfigBuilder_ == null) {
+ inputConfig_ = builderForValue.build();
+ onChanged();
+ } else {
+ inputConfigBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Provides examples to build the glossary from. + * Total glossary must not exceed 10M Unicode codepoints. + *+ * + *
.google.cloud.translation.v3beta1.GlossaryInputConfig input_config = 5;
+ */
+ public Builder mergeInputConfig(com.google.cloud.translate.v3beta1.GlossaryInputConfig value) {
+ if (inputConfigBuilder_ == null) {
+ if (inputConfig_ != null) {
+ inputConfig_ =
+ com.google.cloud.translate.v3beta1.GlossaryInputConfig.newBuilder(inputConfig_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ inputConfig_ = value;
+ }
+ onChanged();
+ } else {
+ inputConfigBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Provides examples to build the glossary from. + * Total glossary must not exceed 10M Unicode codepoints. + *+ * + *
.google.cloud.translation.v3beta1.GlossaryInputConfig input_config = 5;
+ */
+ public Builder clearInputConfig() {
+ if (inputConfigBuilder_ == null) {
+ inputConfig_ = null;
+ onChanged();
+ } else {
+ inputConfig_ = null;
+ inputConfigBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Provides examples to build the glossary from. + * Total glossary must not exceed 10M Unicode codepoints. + *+ * + *
.google.cloud.translation.v3beta1.GlossaryInputConfig input_config = 5;
+ */
+ public com.google.cloud.translate.v3beta1.GlossaryInputConfig.Builder getInputConfigBuilder() {
+
+ onChanged();
+ return getInputConfigFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Required. Provides examples to build the glossary from. + * Total glossary must not exceed 10M Unicode codepoints. + *+ * + *
.google.cloud.translation.v3beta1.GlossaryInputConfig input_config = 5;
+ */
+ public com.google.cloud.translate.v3beta1.GlossaryInputConfigOrBuilder
+ getInputConfigOrBuilder() {
+ if (inputConfigBuilder_ != null) {
+ return inputConfigBuilder_.getMessageOrBuilder();
+ } else {
+ return inputConfig_ == null
+ ? com.google.cloud.translate.v3beta1.GlossaryInputConfig.getDefaultInstance()
+ : inputConfig_;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. Provides examples to build the glossary from. + * Total glossary must not exceed 10M Unicode codepoints. + *+ * + *
.google.cloud.translation.v3beta1.GlossaryInputConfig input_config = 5;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.translate.v3beta1.GlossaryInputConfig,
+ com.google.cloud.translate.v3beta1.GlossaryInputConfig.Builder,
+ com.google.cloud.translate.v3beta1.GlossaryInputConfigOrBuilder>
+ getInputConfigFieldBuilder() {
+ if (inputConfigBuilder_ == null) {
+ inputConfigBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.translate.v3beta1.GlossaryInputConfig,
+ com.google.cloud.translate.v3beta1.GlossaryInputConfig.Builder,
+ com.google.cloud.translate.v3beta1.GlossaryInputConfigOrBuilder>(
+ getInputConfig(), getParentForChildren(), isClean());
+ inputConfig_ = null;
+ }
+ return inputConfigBuilder_;
+ }
+
+ private int entryCount_;
+ /**
+ *
+ *
+ * + * Output only. The number of entries defined in the glossary. + *+ * + *
int32 entry_count = 6;
+ */
+ public int getEntryCount() {
+ return entryCount_;
+ }
+ /**
+ *
+ *
+ * + * Output only. The number of entries defined in the glossary. + *+ * + *
int32 entry_count = 6;
+ */
+ public Builder setEntryCount(int value) {
+
+ entryCount_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Output only. The number of entries defined in the glossary. + *+ * + *
int32 entry_count = 6;
+ */
+ public Builder clearEntryCount() {
+
+ entryCount_ = 0;
+ 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_;
+ /**
+ *
+ *
+ * + * Output only. When CreateGlossary was called. + *+ * + *
.google.protobuf.Timestamp submit_time = 7;
+ */
+ public boolean hasSubmitTime() {
+ return submitTimeBuilder_ != null || submitTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * Output only. When CreateGlossary was called. + *+ * + *
.google.protobuf.Timestamp submit_time = 7;
+ */
+ public com.google.protobuf.Timestamp getSubmitTime() {
+ if (submitTimeBuilder_ == null) {
+ return submitTime_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : submitTime_;
+ } else {
+ return submitTimeBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * Output only. When CreateGlossary was called. + *+ * + *
.google.protobuf.Timestamp submit_time = 7;
+ */
+ 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;
+ }
+ /**
+ *
+ *
+ * + * Output only. When CreateGlossary was called. + *+ * + *
.google.protobuf.Timestamp submit_time = 7;
+ */
+ public Builder setSubmitTime(com.google.protobuf.Timestamp.Builder builderForValue) {
+ if (submitTimeBuilder_ == null) {
+ submitTime_ = builderForValue.build();
+ onChanged();
+ } else {
+ submitTimeBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Output only. When CreateGlossary was called. + *+ * + *
.google.protobuf.Timestamp submit_time = 7;
+ */
+ 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;
+ }
+ /**
+ *
+ *
+ * + * Output only. When CreateGlossary was called. + *+ * + *
.google.protobuf.Timestamp submit_time = 7;
+ */
+ public Builder clearSubmitTime() {
+ if (submitTimeBuilder_ == null) {
+ submitTime_ = null;
+ onChanged();
+ } else {
+ submitTime_ = null;
+ submitTimeBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Output only. When CreateGlossary was called. + *+ * + *
.google.protobuf.Timestamp submit_time = 7;
+ */
+ public com.google.protobuf.Timestamp.Builder getSubmitTimeBuilder() {
+
+ onChanged();
+ return getSubmitTimeFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Output only. When CreateGlossary was called. + *+ * + *
.google.protobuf.Timestamp submit_time = 7;
+ */
+ public com.google.protobuf.TimestampOrBuilder getSubmitTimeOrBuilder() {
+ if (submitTimeBuilder_ != null) {
+ return submitTimeBuilder_.getMessageOrBuilder();
+ } else {
+ return submitTime_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : submitTime_;
+ }
+ }
+ /**
+ *
+ *
+ * + * Output only. When CreateGlossary was called. + *+ * + *
.google.protobuf.Timestamp submit_time = 7;
+ */
+ 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_;
+ }
+
+ private com.google.protobuf.Timestamp endTime_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ endTimeBuilder_;
+ /**
+ *
+ *
+ * + * Output only. When the glossary creation was finished. + *+ * + *
.google.protobuf.Timestamp end_time = 8;
+ */
+ public boolean hasEndTime() {
+ return endTimeBuilder_ != null || endTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * Output only. When the glossary creation was finished. + *+ * + *
.google.protobuf.Timestamp end_time = 8;
+ */
+ public com.google.protobuf.Timestamp getEndTime() {
+ if (endTimeBuilder_ == null) {
+ return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_;
+ } else {
+ return endTimeBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * Output only. When the glossary creation was finished. + *+ * + *
.google.protobuf.Timestamp end_time = 8;
+ */
+ public Builder setEndTime(com.google.protobuf.Timestamp value) {
+ if (endTimeBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ endTime_ = value;
+ onChanged();
+ } else {
+ endTimeBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Output only. When the glossary creation was finished. + *+ * + *
.google.protobuf.Timestamp end_time = 8;
+ */
+ public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) {
+ if (endTimeBuilder_ == null) {
+ endTime_ = builderForValue.build();
+ onChanged();
+ } else {
+ endTimeBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Output only. When the glossary creation was finished. + *+ * + *
.google.protobuf.Timestamp end_time = 8;
+ */
+ public Builder mergeEndTime(com.google.protobuf.Timestamp value) {
+ if (endTimeBuilder_ == null) {
+ if (endTime_ != null) {
+ endTime_ =
+ com.google.protobuf.Timestamp.newBuilder(endTime_).mergeFrom(value).buildPartial();
+ } else {
+ endTime_ = value;
+ }
+ onChanged();
+ } else {
+ endTimeBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Output only. When the glossary creation was finished. + *+ * + *
.google.protobuf.Timestamp end_time = 8;
+ */
+ public Builder clearEndTime() {
+ if (endTimeBuilder_ == null) {
+ endTime_ = null;
+ onChanged();
+ } else {
+ endTime_ = null;
+ endTimeBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Output only. When the glossary creation was finished. + *+ * + *
.google.protobuf.Timestamp end_time = 8;
+ */
+ public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() {
+
+ onChanged();
+ return getEndTimeFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Output only. When the glossary creation was finished. + *+ * + *
.google.protobuf.Timestamp end_time = 8;
+ */
+ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() {
+ if (endTimeBuilder_ != null) {
+ return endTimeBuilder_.getMessageOrBuilder();
+ } else {
+ return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_;
+ }
+ }
+ /**
+ *
+ *
+ * + * Output only. When the glossary creation was finished. + *+ * + *
.google.protobuf.Timestamp end_time = 8;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ getEndTimeFieldBuilder() {
+ if (endTimeBuilder_ == null) {
+ endTimeBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>(
+ getEndTime(), getParentForChildren(), isClean());
+ endTime_ = null;
+ }
+ return endTimeBuilder_;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @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.v3beta1.Glossary)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.Glossary)
+ private static final com.google.cloud.translate.v3beta1.Glossary DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.translate.v3beta1.Glossary();
+ }
+
+ public static com.google.cloud.translate.v3beta1.Glossary getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Input configuration for glossaries. + *+ * + * Protobuf type {@code google.cloud.translation.v3beta1.GlossaryInputConfig} + */ +public final class GlossaryInputConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.translation.v3beta1.GlossaryInputConfig) + GlossaryInputConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use GlossaryInputConfig.newBuilder() to construct. + private GlossaryInputConfig(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private GlossaryInputConfig() {} + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GlossaryInputConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.translate.v3beta1.GcsSource.Builder subBuilder = null; + if (sourceCase_ == 1) { + subBuilder = ((com.google.cloud.translate.v3beta1.GcsSource) source_).toBuilder(); + } + source_ = + input.readMessage( + com.google.cloud.translate.v3beta1.GcsSource.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.translate.v3beta1.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.v3beta1.TranslationServiceProto + .internal_static_google_cloud_translation_v3beta1_GlossaryInputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.translate.v3beta1.TranslationServiceProto + .internal_static_google_cloud_translation_v3beta1_GlossaryInputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.translate.v3beta1.GlossaryInputConfig.class, + com.google.cloud.translate.v3beta1.GlossaryInputConfig.Builder.class); + } + + private int sourceCase_ = 0; + private java.lang.Object source_; + + public enum SourceCase implements com.google.protobuf.Internal.EnumLite { + GCS_SOURCE(1), + SOURCE_NOT_SET(0); + private final int value; + + private SourceCase(int value) { + this.value = value; + } + /** @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; + /** + * + * + *
+ * Required. Google Cloud Storage location of glossary data. + * File format is determined based on file name extension. API returns + * [google.rpc.Code.INVALID_ARGUMENT] for unsupported URI-s and file + * formats. Wildcards are not allowed. This must be a single file in one of + * the following formats: + * For `UNIDIRECTIONAL` glossaries: + * - TSV/CSV (`.tsv`/`.csv`): 2 column file, tab- or comma-separated. + * The first column is source text. The second column is target text. + * The file must not contain headers. That is, the first row is data, not + * column names. + * - TMX (`.tmx`): TMX file with parallel data defining source/target term + * pairs. + * For `EQUIVALENT_TERMS_SET` glossaries: + * - CSV (`.csv`): Multi-column CSV file defining equivalent glossary terms + * in multiple languages. The format is defined for Google Translation + * Toolkit and documented here: + * `https://support.google.com/translatortoolkit/answer/6306379?hl=en`. + *+ * + *
.google.cloud.translation.v3beta1.GcsSource gcs_source = 1;
+ */
+ public boolean hasGcsSource() {
+ return sourceCase_ == 1;
+ }
+ /**
+ *
+ *
+ * + * Required. Google Cloud Storage location of glossary data. + * File format is determined based on file name extension. API returns + * [google.rpc.Code.INVALID_ARGUMENT] for unsupported URI-s and file + * formats. Wildcards are not allowed. This must be a single file in one of + * the following formats: + * For `UNIDIRECTIONAL` glossaries: + * - TSV/CSV (`.tsv`/`.csv`): 2 column file, tab- or comma-separated. + * The first column is source text. The second column is target text. + * The file must not contain headers. That is, the first row is data, not + * column names. + * - TMX (`.tmx`): TMX file with parallel data defining source/target term + * pairs. + * For `EQUIVALENT_TERMS_SET` glossaries: + * - CSV (`.csv`): Multi-column CSV file defining equivalent glossary terms + * in multiple languages. The format is defined for Google Translation + * Toolkit and documented here: + * `https://support.google.com/translatortoolkit/answer/6306379?hl=en`. + *+ * + *
.google.cloud.translation.v3beta1.GcsSource gcs_source = 1;
+ */
+ public com.google.cloud.translate.v3beta1.GcsSource getGcsSource() {
+ if (sourceCase_ == 1) {
+ return (com.google.cloud.translate.v3beta1.GcsSource) source_;
+ }
+ return com.google.cloud.translate.v3beta1.GcsSource.getDefaultInstance();
+ }
+ /**
+ *
+ *
+ * + * Required. Google Cloud Storage location of glossary data. + * File format is determined based on file name extension. API returns + * [google.rpc.Code.INVALID_ARGUMENT] for unsupported URI-s and file + * formats. Wildcards are not allowed. This must be a single file in one of + * the following formats: + * For `UNIDIRECTIONAL` glossaries: + * - TSV/CSV (`.tsv`/`.csv`): 2 column file, tab- or comma-separated. + * The first column is source text. The second column is target text. + * The file must not contain headers. That is, the first row is data, not + * column names. + * - TMX (`.tmx`): TMX file with parallel data defining source/target term + * pairs. + * For `EQUIVALENT_TERMS_SET` glossaries: + * - CSV (`.csv`): Multi-column CSV file defining equivalent glossary terms + * in multiple languages. The format is defined for Google Translation + * Toolkit and documented here: + * `https://support.google.com/translatortoolkit/answer/6306379?hl=en`. + *+ * + *
.google.cloud.translation.v3beta1.GcsSource gcs_source = 1;
+ */
+ public com.google.cloud.translate.v3beta1.GcsSourceOrBuilder getGcsSourceOrBuilder() {
+ if (sourceCase_ == 1) {
+ return (com.google.cloud.translate.v3beta1.GcsSource) source_;
+ }
+ return com.google.cloud.translate.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.GlossaryInputConfig)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.translate.v3beta1.GlossaryInputConfig other =
+ (com.google.cloud.translate.v3beta1.GlossaryInputConfig) 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.v3beta1.GlossaryInputConfig parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.GlossaryInputConfig parseFrom(
+ 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.v3beta1.GlossaryInputConfig parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.GlossaryInputConfig parseFrom(
+ com.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.v3beta1.GlossaryInputConfig parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.GlossaryInputConfig parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.GlossaryInputConfig parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.GlossaryInputConfig parseFrom(
+ java.io.InputStream 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.v3beta1.GlossaryInputConfig parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.GlossaryInputConfig parseDelimitedFrom(
+ java.io.InputStream 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.v3beta1.GlossaryInputConfig parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.GlossaryInputConfig parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, 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.v3beta1.GlossaryInputConfig prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new 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 glossaries. + *+ * + * Protobuf type {@code google.cloud.translation.v3beta1.GlossaryInputConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Required. Google Cloud Storage location of glossary data. + * File format is determined based on file name extension. API returns + * [google.rpc.Code.INVALID_ARGUMENT] for unsupported URI-s and file + * formats. Wildcards are not allowed. This must be a single file in one of + * the following formats: + * For `UNIDIRECTIONAL` glossaries: + * - TSV/CSV (`.tsv`/`.csv`): 2 column file, tab- or comma-separated. + * The first column is source text. The second column is target text. + * The file must not contain headers. That is, the first row is data, not + * column names. + * - TMX (`.tmx`): TMX file with parallel data defining source/target term + * pairs. + * For `EQUIVALENT_TERMS_SET` glossaries: + * - CSV (`.csv`): Multi-column CSV file defining equivalent glossary terms + * in multiple languages. The format is defined for Google Translation + * Toolkit and documented here: + * `https://support.google.com/translatortoolkit/answer/6306379?hl=en`. + *+ * + *
.google.cloud.translation.v3beta1.GcsSource gcs_source = 1;
+ */
+ public boolean hasGcsSource() {
+ return sourceCase_ == 1;
+ }
+ /**
+ *
+ *
+ * + * Required. Google Cloud Storage location of glossary data. + * File format is determined based on file name extension. API returns + * [google.rpc.Code.INVALID_ARGUMENT] for unsupported URI-s and file + * formats. Wildcards are not allowed. This must be a single file in one of + * the following formats: + * For `UNIDIRECTIONAL` glossaries: + * - TSV/CSV (`.tsv`/`.csv`): 2 column file, tab- or comma-separated. + * The first column is source text. The second column is target text. + * The file must not contain headers. That is, the first row is data, not + * column names. + * - TMX (`.tmx`): TMX file with parallel data defining source/target term + * pairs. + * For `EQUIVALENT_TERMS_SET` glossaries: + * - CSV (`.csv`): Multi-column CSV file defining equivalent glossary terms + * in multiple languages. The format is defined for Google Translation + * Toolkit and documented here: + * `https://support.google.com/translatortoolkit/answer/6306379?hl=en`. + *+ * + *
.google.cloud.translation.v3beta1.GcsSource gcs_source = 1;
+ */
+ public com.google.cloud.translate.v3beta1.GcsSource getGcsSource() {
+ if (gcsSourceBuilder_ == null) {
+ if (sourceCase_ == 1) {
+ return (com.google.cloud.translate.v3beta1.GcsSource) source_;
+ }
+ return com.google.cloud.translate.v3beta1.GcsSource.getDefaultInstance();
+ } else {
+ if (sourceCase_ == 1) {
+ return gcsSourceBuilder_.getMessage();
+ }
+ return com.google.cloud.translate.v3beta1.GcsSource.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. Google Cloud Storage location of glossary data. + * File format is determined based on file name extension. API returns + * [google.rpc.Code.INVALID_ARGUMENT] for unsupported URI-s and file + * formats. Wildcards are not allowed. This must be a single file in one of + * the following formats: + * For `UNIDIRECTIONAL` glossaries: + * - TSV/CSV (`.tsv`/`.csv`): 2 column file, tab- or comma-separated. + * The first column is source text. The second column is target text. + * The file must not contain headers. That is, the first row is data, not + * column names. + * - TMX (`.tmx`): TMX file with parallel data defining source/target term + * pairs. + * For `EQUIVALENT_TERMS_SET` glossaries: + * - CSV (`.csv`): Multi-column CSV file defining equivalent glossary terms + * in multiple languages. The format is defined for Google Translation + * Toolkit and documented here: + * `https://support.google.com/translatortoolkit/answer/6306379?hl=en`. + *+ * + *
.google.cloud.translation.v3beta1.GcsSource gcs_source = 1;
+ */
+ public Builder setGcsSource(com.google.cloud.translate.v3beta1.GcsSource value) {
+ if (gcsSourceBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ source_ = value;
+ onChanged();
+ } else {
+ gcsSourceBuilder_.setMessage(value);
+ }
+ sourceCase_ = 1;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Google Cloud Storage location of glossary data. + * File format is determined based on file name extension. API returns + * [google.rpc.Code.INVALID_ARGUMENT] for unsupported URI-s and file + * formats. Wildcards are not allowed. This must be a single file in one of + * the following formats: + * For `UNIDIRECTIONAL` glossaries: + * - TSV/CSV (`.tsv`/`.csv`): 2 column file, tab- or comma-separated. + * The first column is source text. The second column is target text. + * The file must not contain headers. That is, the first row is data, not + * column names. + * - TMX (`.tmx`): TMX file with parallel data defining source/target term + * pairs. + * For `EQUIVALENT_TERMS_SET` glossaries: + * - CSV (`.csv`): Multi-column CSV file defining equivalent glossary terms + * in multiple languages. The format is defined for Google Translation + * Toolkit and documented here: + * `https://support.google.com/translatortoolkit/answer/6306379?hl=en`. + *+ * + *
.google.cloud.translation.v3beta1.GcsSource gcs_source = 1;
+ */
+ public Builder setGcsSource(
+ com.google.cloud.translate.v3beta1.GcsSource.Builder builderForValue) {
+ if (gcsSourceBuilder_ == null) {
+ source_ = builderForValue.build();
+ onChanged();
+ } else {
+ gcsSourceBuilder_.setMessage(builderForValue.build());
+ }
+ sourceCase_ = 1;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Google Cloud Storage location of glossary data. + * File format is determined based on file name extension. API returns + * [google.rpc.Code.INVALID_ARGUMENT] for unsupported URI-s and file + * formats. Wildcards are not allowed. This must be a single file in one of + * the following formats: + * For `UNIDIRECTIONAL` glossaries: + * - TSV/CSV (`.tsv`/`.csv`): 2 column file, tab- or comma-separated. + * The first column is source text. The second column is target text. + * The file must not contain headers. That is, the first row is data, not + * column names. + * - TMX (`.tmx`): TMX file with parallel data defining source/target term + * pairs. + * For `EQUIVALENT_TERMS_SET` glossaries: + * - CSV (`.csv`): Multi-column CSV file defining equivalent glossary terms + * in multiple languages. The format is defined for Google Translation + * Toolkit and documented here: + * `https://support.google.com/translatortoolkit/answer/6306379?hl=en`. + *+ * + *
.google.cloud.translation.v3beta1.GcsSource gcs_source = 1;
+ */
+ public Builder mergeGcsSource(com.google.cloud.translate.v3beta1.GcsSource value) {
+ if (gcsSourceBuilder_ == null) {
+ if (sourceCase_ == 1
+ && source_ != com.google.cloud.translate.v3beta1.GcsSource.getDefaultInstance()) {
+ source_ =
+ com.google.cloud.translate.v3beta1.GcsSource.newBuilder(
+ (com.google.cloud.translate.v3beta1.GcsSource) source_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ source_ = value;
+ }
+ onChanged();
+ } else {
+ if (sourceCase_ == 1) {
+ gcsSourceBuilder_.mergeFrom(value);
+ }
+ gcsSourceBuilder_.setMessage(value);
+ }
+ sourceCase_ = 1;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Google Cloud Storage location of glossary data. + * File format is determined based on file name extension. API returns + * [google.rpc.Code.INVALID_ARGUMENT] for unsupported URI-s and file + * formats. Wildcards are not allowed. This must be a single file in one of + * the following formats: + * For `UNIDIRECTIONAL` glossaries: + * - TSV/CSV (`.tsv`/`.csv`): 2 column file, tab- or comma-separated. + * The first column is source text. The second column is target text. + * The file must not contain headers. That is, the first row is data, not + * column names. + * - TMX (`.tmx`): TMX file with parallel data defining source/target term + * pairs. + * For `EQUIVALENT_TERMS_SET` glossaries: + * - CSV (`.csv`): Multi-column CSV file defining equivalent glossary terms + * in multiple languages. The format is defined for Google Translation + * Toolkit and documented here: + * `https://support.google.com/translatortoolkit/answer/6306379?hl=en`. + *+ * + *
.google.cloud.translation.v3beta1.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;
+ }
+ /**
+ *
+ *
+ * + * Required. Google Cloud Storage location of glossary data. + * File format is determined based on file name extension. API returns + * [google.rpc.Code.INVALID_ARGUMENT] for unsupported URI-s and file + * formats. Wildcards are not allowed. This must be a single file in one of + * the following formats: + * For `UNIDIRECTIONAL` glossaries: + * - TSV/CSV (`.tsv`/`.csv`): 2 column file, tab- or comma-separated. + * The first column is source text. The second column is target text. + * The file must not contain headers. That is, the first row is data, not + * column names. + * - TMX (`.tmx`): TMX file with parallel data defining source/target term + * pairs. + * For `EQUIVALENT_TERMS_SET` glossaries: + * - CSV (`.csv`): Multi-column CSV file defining equivalent glossary terms + * in multiple languages. The format is defined for Google Translation + * Toolkit and documented here: + * `https://support.google.com/translatortoolkit/answer/6306379?hl=en`. + *+ * + *
.google.cloud.translation.v3beta1.GcsSource gcs_source = 1;
+ */
+ public com.google.cloud.translate.v3beta1.GcsSource.Builder getGcsSourceBuilder() {
+ return getGcsSourceFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Required. Google Cloud Storage location of glossary data. + * File format is determined based on file name extension. API returns + * [google.rpc.Code.INVALID_ARGUMENT] for unsupported URI-s and file + * formats. Wildcards are not allowed. This must be a single file in one of + * the following formats: + * For `UNIDIRECTIONAL` glossaries: + * - TSV/CSV (`.tsv`/`.csv`): 2 column file, tab- or comma-separated. + * The first column is source text. The second column is target text. + * The file must not contain headers. That is, the first row is data, not + * column names. + * - TMX (`.tmx`): TMX file with parallel data defining source/target term + * pairs. + * For `EQUIVALENT_TERMS_SET` glossaries: + * - CSV (`.csv`): Multi-column CSV file defining equivalent glossary terms + * in multiple languages. The format is defined for Google Translation + * Toolkit and documented here: + * `https://support.google.com/translatortoolkit/answer/6306379?hl=en`. + *+ * + *
.google.cloud.translation.v3beta1.GcsSource gcs_source = 1;
+ */
+ public com.google.cloud.translate.v3beta1.GcsSourceOrBuilder getGcsSourceOrBuilder() {
+ if ((sourceCase_ == 1) && (gcsSourceBuilder_ != null)) {
+ return gcsSourceBuilder_.getMessageOrBuilder();
+ } else {
+ if (sourceCase_ == 1) {
+ return (com.google.cloud.translate.v3beta1.GcsSource) source_;
+ }
+ return com.google.cloud.translate.v3beta1.GcsSource.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. Google Cloud Storage location of glossary data. + * File format is determined based on file name extension. API returns + * [google.rpc.Code.INVALID_ARGUMENT] for unsupported URI-s and file + * formats. Wildcards are not allowed. This must be a single file in one of + * the following formats: + * For `UNIDIRECTIONAL` glossaries: + * - TSV/CSV (`.tsv`/`.csv`): 2 column file, tab- or comma-separated. + * The first column is source text. The second column is target text. + * The file must not contain headers. That is, the first row is data, not + * column names. + * - TMX (`.tmx`): TMX file with parallel data defining source/target term + * pairs. + * For `EQUIVALENT_TERMS_SET` glossaries: + * - CSV (`.csv`): Multi-column CSV file defining equivalent glossary terms + * in multiple languages. The format is defined for Google Translation + * Toolkit and documented here: + * `https://support.google.com/translatortoolkit/answer/6306379?hl=en`. + *+ * + *
.google.cloud.translation.v3beta1.GcsSource gcs_source = 1;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.translate.v3beta1.GcsSource,
+ com.google.cloud.translate.v3beta1.GcsSource.Builder,
+ com.google.cloud.translate.v3beta1.GcsSourceOrBuilder>
+ getGcsSourceFieldBuilder() {
+ if (gcsSourceBuilder_ == null) {
+ if (!(sourceCase_ == 1)) {
+ source_ = com.google.cloud.translate.v3beta1.GcsSource.getDefaultInstance();
+ }
+ gcsSourceBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.translate.v3beta1.GcsSource,
+ com.google.cloud.translate.v3beta1.GcsSource.Builder,
+ com.google.cloud.translate.v3beta1.GcsSourceOrBuilder>(
+ (com.google.cloud.translate.v3beta1.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.v3beta1.GlossaryInputConfig)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.GlossaryInputConfig)
+ private static final com.google.cloud.translate.v3beta1.GlossaryInputConfig DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.translate.v3beta1.GlossaryInputConfig();
+ }
+
+ public static com.google.cloud.translate.v3beta1.GlossaryInputConfig getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Required. Google Cloud Storage location of glossary data. + * File format is determined based on file name extension. API returns + * [google.rpc.Code.INVALID_ARGUMENT] for unsupported URI-s and file + * formats. Wildcards are not allowed. This must be a single file in one of + * the following formats: + * For `UNIDIRECTIONAL` glossaries: + * - TSV/CSV (`.tsv`/`.csv`): 2 column file, tab- or comma-separated. + * The first column is source text. The second column is target text. + * The file must not contain headers. That is, the first row is data, not + * column names. + * - TMX (`.tmx`): TMX file with parallel data defining source/target term + * pairs. + * For `EQUIVALENT_TERMS_SET` glossaries: + * - CSV (`.csv`): Multi-column CSV file defining equivalent glossary terms + * in multiple languages. The format is defined for Google Translation + * Toolkit and documented here: + * `https://support.google.com/translatortoolkit/answer/6306379?hl=en`. + *+ * + *
.google.cloud.translation.v3beta1.GcsSource gcs_source = 1;
+ */
+ boolean hasGcsSource();
+ /**
+ *
+ *
+ * + * Required. Google Cloud Storage location of glossary data. + * File format is determined based on file name extension. API returns + * [google.rpc.Code.INVALID_ARGUMENT] for unsupported URI-s and file + * formats. Wildcards are not allowed. This must be a single file in one of + * the following formats: + * For `UNIDIRECTIONAL` glossaries: + * - TSV/CSV (`.tsv`/`.csv`): 2 column file, tab- or comma-separated. + * The first column is source text. The second column is target text. + * The file must not contain headers. That is, the first row is data, not + * column names. + * - TMX (`.tmx`): TMX file with parallel data defining source/target term + * pairs. + * For `EQUIVALENT_TERMS_SET` glossaries: + * - CSV (`.csv`): Multi-column CSV file defining equivalent glossary terms + * in multiple languages. The format is defined for Google Translation + * Toolkit and documented here: + * `https://support.google.com/translatortoolkit/answer/6306379?hl=en`. + *+ * + *
.google.cloud.translation.v3beta1.GcsSource gcs_source = 1;
+ */
+ com.google.cloud.translate.v3beta1.GcsSource getGcsSource();
+ /**
+ *
+ *
+ * + * Required. Google Cloud Storage location of glossary data. + * File format is determined based on file name extension. API returns + * [google.rpc.Code.INVALID_ARGUMENT] for unsupported URI-s and file + * formats. Wildcards are not allowed. This must be a single file in one of + * the following formats: + * For `UNIDIRECTIONAL` glossaries: + * - TSV/CSV (`.tsv`/`.csv`): 2 column file, tab- or comma-separated. + * The first column is source text. The second column is target text. + * The file must not contain headers. That is, the first row is data, not + * column names. + * - TMX (`.tmx`): TMX file with parallel data defining source/target term + * pairs. + * For `EQUIVALENT_TERMS_SET` glossaries: + * - CSV (`.csv`): Multi-column CSV file defining equivalent glossary terms + * in multiple languages. The format is defined for Google Translation + * Toolkit and documented here: + * `https://support.google.com/translatortoolkit/answer/6306379?hl=en`. + *+ * + *
.google.cloud.translation.v3beta1.GcsSource gcs_source = 1;
+ */
+ com.google.cloud.translate.v3beta1.GcsSourceOrBuilder getGcsSourceOrBuilder();
+
+ public com.google.cloud.translate.v3beta1.GlossaryInputConfig.SourceCase getSourceCase();
+}
diff --git a/google-api-grpc/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/GlossaryName.java b/google-api-grpc/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/GlossaryName.java
new file mode 100644
index 000000000000..6d87fbfe373e
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/GlossaryName.java
@@ -0,0 +1,209 @@
+/*
+ * Copyright 2018 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+package com.google.cloud.translate.v3beta1;
+
+import com.google.api.pathtemplate.PathTemplate;
+import com.google.api.resourcenames.ResourceName;
+import com.google.common.base.Preconditions;
+import com.google.common.collect.ImmutableMap;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS
+@javax.annotation.Generated("by GAPIC protoc plugin")
+public class GlossaryName implements ResourceName {
+
+ private static final PathTemplate PATH_TEMPLATE =
+ PathTemplate.createWithoutUrlEncoding(
+ "projects/{project}/locations/{location}/glossaries/{glossary}");
+
+ private volatile Map
+ * Required. The resource name of the glossary. Glossary names have the form
+ * `projects/{project-id}/locations/{location-id}/glossaries/{glossary-id}`.
+ *
+ *
+ * string name = 1;
+ */
+ java.lang.String getName();
+ /**
+ *
+ *
+ *
+ * Required. The resource name of the glossary. Glossary names have the form
+ * `projects/{project-id}/locations/{location-id}/glossaries/{glossary-id}`.
+ *
+ *
+ * string name = 1;
+ */
+ com.google.protobuf.ByteString getNameBytes();
+
+ /**
+ *
+ *
+ * + * Used with UNIDIRECTIONAL. + *+ * + *
.google.cloud.translation.v3beta1.Glossary.LanguageCodePair language_pair = 3;
+ */
+ boolean hasLanguagePair();
+ /**
+ *
+ *
+ * + * Used with UNIDIRECTIONAL. + *+ * + *
.google.cloud.translation.v3beta1.Glossary.LanguageCodePair language_pair = 3;
+ */
+ com.google.cloud.translate.v3beta1.Glossary.LanguageCodePair getLanguagePair();
+ /**
+ *
+ *
+ * + * Used with UNIDIRECTIONAL. + *+ * + *
.google.cloud.translation.v3beta1.Glossary.LanguageCodePair language_pair = 3;
+ */
+ com.google.cloud.translate.v3beta1.Glossary.LanguageCodePairOrBuilder getLanguagePairOrBuilder();
+
+ /**
+ *
+ *
+ * + * Used with EQUIVALENT_TERMS_SET. + *+ * + *
.google.cloud.translation.v3beta1.Glossary.LanguageCodesSet language_codes_set = 4;
+ *
+ */
+ boolean hasLanguageCodesSet();
+ /**
+ *
+ *
+ * + * Used with EQUIVALENT_TERMS_SET. + *+ * + *
.google.cloud.translation.v3beta1.Glossary.LanguageCodesSet language_codes_set = 4;
+ *
+ */
+ com.google.cloud.translate.v3beta1.Glossary.LanguageCodesSet getLanguageCodesSet();
+ /**
+ *
+ *
+ * + * Used with EQUIVALENT_TERMS_SET. + *+ * + *
.google.cloud.translation.v3beta1.Glossary.LanguageCodesSet language_codes_set = 4;
+ *
+ */
+ com.google.cloud.translate.v3beta1.Glossary.LanguageCodesSetOrBuilder
+ getLanguageCodesSetOrBuilder();
+
+ /**
+ *
+ *
+ * + * Required. Provides examples to build the glossary from. + * Total glossary must not exceed 10M Unicode codepoints. + *+ * + *
.google.cloud.translation.v3beta1.GlossaryInputConfig input_config = 5;
+ */
+ boolean hasInputConfig();
+ /**
+ *
+ *
+ * + * Required. Provides examples to build the glossary from. + * Total glossary must not exceed 10M Unicode codepoints. + *+ * + *
.google.cloud.translation.v3beta1.GlossaryInputConfig input_config = 5;
+ */
+ com.google.cloud.translate.v3beta1.GlossaryInputConfig getInputConfig();
+ /**
+ *
+ *
+ * + * Required. Provides examples to build the glossary from. + * Total glossary must not exceed 10M Unicode codepoints. + *+ * + *
.google.cloud.translation.v3beta1.GlossaryInputConfig input_config = 5;
+ */
+ com.google.cloud.translate.v3beta1.GlossaryInputConfigOrBuilder getInputConfigOrBuilder();
+
+ /**
+ *
+ *
+ * + * Output only. The number of entries defined in the glossary. + *+ * + *
int32 entry_count = 6;
+ */
+ int getEntryCount();
+
+ /**
+ *
+ *
+ * + * Output only. When CreateGlossary was called. + *+ * + *
.google.protobuf.Timestamp submit_time = 7;
+ */
+ boolean hasSubmitTime();
+ /**
+ *
+ *
+ * + * Output only. When CreateGlossary was called. + *+ * + *
.google.protobuf.Timestamp submit_time = 7;
+ */
+ com.google.protobuf.Timestamp getSubmitTime();
+ /**
+ *
+ *
+ * + * Output only. When CreateGlossary was called. + *+ * + *
.google.protobuf.Timestamp submit_time = 7;
+ */
+ com.google.protobuf.TimestampOrBuilder getSubmitTimeOrBuilder();
+
+ /**
+ *
+ *
+ * + * Output only. When the glossary creation was finished. + *+ * + *
.google.protobuf.Timestamp end_time = 8;
+ */
+ boolean hasEndTime();
+ /**
+ *
+ *
+ * + * Output only. When the glossary creation was finished. + *+ * + *
.google.protobuf.Timestamp end_time = 8;
+ */
+ com.google.protobuf.Timestamp getEndTime();
+ /**
+ *
+ *
+ * + * Output only. When the glossary creation was finished. + *+ * + *
.google.protobuf.Timestamp end_time = 8;
+ */
+ com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder();
+
+ public com.google.cloud.translate.v3beta1.Glossary.LanguagesCase getLanguagesCase();
+}
diff --git a/google-api-grpc/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/InputConfig.java b/google-api-grpc/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/InputConfig.java
new file mode 100644
index 000000000000..cf5515838000
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/InputConfig.java
@@ -0,0 +1,1107 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/translate/v3beta1/translation_service.proto
+
+package com.google.cloud.translate.v3beta1;
+
+/**
+ *
+ *
+ * + * Input configuration. + *+ * + * Protobuf type {@code google.cloud.translation.v3beta1.InputConfig} + */ +public final class InputConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.translation.v3beta1.InputConfig) + InputConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use InputConfig.newBuilder() to construct. + private InputConfig(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private InputConfig() { + mimeType_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private InputConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + mimeType_ = s; + break; + } + case 18: + { + com.google.cloud.translate.v3beta1.GcsSource.Builder subBuilder = null; + if (sourceCase_ == 2) { + subBuilder = ((com.google.cloud.translate.v3beta1.GcsSource) source_).toBuilder(); + } + source_ = + input.readMessage( + com.google.cloud.translate.v3beta1.GcsSource.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.translate.v3beta1.GcsSource) source_); + source_ = subBuilder.buildPartial(); + } + sourceCase_ = 2; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.translate.v3beta1.TranslationServiceProto + .internal_static_google_cloud_translation_v3beta1_InputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.translate.v3beta1.TranslationServiceProto + .internal_static_google_cloud_translation_v3beta1_InputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.translate.v3beta1.InputConfig.class, + com.google.cloud.translate.v3beta1.InputConfig.Builder.class); + } + + private int sourceCase_ = 0; + private java.lang.Object source_; + + public enum SourceCase implements com.google.protobuf.Internal.EnumLite { + GCS_SOURCE(2), + SOURCE_NOT_SET(0); + private final int value; + + private SourceCase(int value) { + this.value = value; + } + /** @deprecated Use {@link #forNumber(int)} instead. */ + @java.lang.Deprecated + public static SourceCase valueOf(int value) { + return forNumber(value); + } + + public static SourceCase forNumber(int value) { + switch (value) { + case 2: + return GCS_SOURCE; + case 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 MIME_TYPE_FIELD_NUMBER = 1; + private volatile java.lang.Object mimeType_; + /** + * + * + *
+ * Optional. Can be "text/plain" or "text/html". + * For `.tsv`, "text/html" is used if mime_type is missing. + * For `.html`, this field must be "text/html" or empty. + * For `.txt`, this field must be "text/plain" or empty. + *+ * + *
string mime_type = 1;
+ */
+ public java.lang.String getMimeType() {
+ java.lang.Object ref = mimeType_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ mimeType_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. Can be "text/plain" or "text/html". + * For `.tsv`, "text/html" is used if mime_type is missing. + * For `.html`, this field must be "text/html" or empty. + * For `.txt`, this field must be "text/plain" or empty. + *+ * + *
string mime_type = 1;
+ */
+ public com.google.protobuf.ByteString getMimeTypeBytes() {
+ java.lang.Object ref = mimeType_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ mimeType_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int GCS_SOURCE_FIELD_NUMBER = 2;
+ /**
+ *
+ *
+ * + * Required. Google Cloud Storage location for the source input. + * This can be a single file (for example, + * `gs://translation-test/input.tsv`) or a wildcard (for example, + * `gs://translation-test/*`). If a file extension is `.tsv`, it can + * contain either one or two columns. The first column (optional) is the id + * of the text request. If the first column is missing, we use the row + * number (0-based) from the input file as the ID in the output file. The + * second column is the actual text to be + * translated. We recommend each row be <= 10K Unicode codepoints, + * otherwise an error might be returned. + * The other supported file extensions are `.txt` or `.html`, which is + * treated as a single large chunk of text. + *+ * + *
.google.cloud.translation.v3beta1.GcsSource gcs_source = 2;
+ */
+ public boolean hasGcsSource() {
+ return sourceCase_ == 2;
+ }
+ /**
+ *
+ *
+ * + * Required. Google Cloud Storage location for the source input. + * This can be a single file (for example, + * `gs://translation-test/input.tsv`) or a wildcard (for example, + * `gs://translation-test/*`). If a file extension is `.tsv`, it can + * contain either one or two columns. The first column (optional) is the id + * of the text request. If the first column is missing, we use the row + * number (0-based) from the input file as the ID in the output file. The + * second column is the actual text to be + * translated. We recommend each row be <= 10K Unicode codepoints, + * otherwise an error might be returned. + * The other supported file extensions are `.txt` or `.html`, which is + * treated as a single large chunk of text. + *+ * + *
.google.cloud.translation.v3beta1.GcsSource gcs_source = 2;
+ */
+ public com.google.cloud.translate.v3beta1.GcsSource getGcsSource() {
+ if (sourceCase_ == 2) {
+ return (com.google.cloud.translate.v3beta1.GcsSource) source_;
+ }
+ return com.google.cloud.translate.v3beta1.GcsSource.getDefaultInstance();
+ }
+ /**
+ *
+ *
+ * + * Required. Google Cloud Storage location for the source input. + * This can be a single file (for example, + * `gs://translation-test/input.tsv`) or a wildcard (for example, + * `gs://translation-test/*`). If a file extension is `.tsv`, it can + * contain either one or two columns. The first column (optional) is the id + * of the text request. If the first column is missing, we use the row + * number (0-based) from the input file as the ID in the output file. The + * second column is the actual text to be + * translated. We recommend each row be <= 10K Unicode codepoints, + * otherwise an error might be returned. + * The other supported file extensions are `.txt` or `.html`, which is + * treated as a single large chunk of text. + *+ * + *
.google.cloud.translation.v3beta1.GcsSource gcs_source = 2;
+ */
+ public com.google.cloud.translate.v3beta1.GcsSourceOrBuilder getGcsSourceOrBuilder() {
+ if (sourceCase_ == 2) {
+ return (com.google.cloud.translate.v3beta1.GcsSource) source_;
+ }
+ return com.google.cloud.translate.v3beta1.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 (!getMimeTypeBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, mimeType_);
+ }
+ if (sourceCase_ == 2) {
+ output.writeMessage(2, (com.google.cloud.translate.v3beta1.GcsSource) source_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getMimeTypeBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, mimeType_);
+ }
+ if (sourceCase_ == 2) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 2, (com.google.cloud.translate.v3beta1.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.v3beta1.InputConfig)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.translate.v3beta1.InputConfig other =
+ (com.google.cloud.translate.v3beta1.InputConfig) obj;
+
+ if (!getMimeType().equals(other.getMimeType())) return false;
+ if (!getSourceCase().equals(other.getSourceCase())) return false;
+ switch (sourceCase_) {
+ case 2:
+ 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();
+ hash = (37 * hash) + MIME_TYPE_FIELD_NUMBER;
+ hash = (53 * hash) + getMimeType().hashCode();
+ switch (sourceCase_) {
+ case 2:
+ 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.v3beta1.InputConfig parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.InputConfig parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.InputConfig parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.InputConfig parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.InputConfig parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.InputConfig parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.InputConfig parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.InputConfig parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.InputConfig parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.InputConfig parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.InputConfig parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.InputConfig parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(com.google.cloud.translate.v3beta1.InputConfig prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ * + * Input configuration. + *+ * + * Protobuf type {@code google.cloud.translation.v3beta1.InputConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Optional. Can be "text/plain" or "text/html". + * For `.tsv`, "text/html" is used if mime_type is missing. + * For `.html`, this field must be "text/html" or empty. + * For `.txt`, this field must be "text/plain" or empty. + *+ * + *
string mime_type = 1;
+ */
+ public java.lang.String getMimeType() {
+ java.lang.Object ref = mimeType_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ mimeType_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. Can be "text/plain" or "text/html". + * For `.tsv`, "text/html" is used if mime_type is missing. + * For `.html`, this field must be "text/html" or empty. + * For `.txt`, this field must be "text/plain" or empty. + *+ * + *
string mime_type = 1;
+ */
+ public com.google.protobuf.ByteString getMimeTypeBytes() {
+ java.lang.Object ref = mimeType_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ mimeType_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. Can be "text/plain" or "text/html". + * For `.tsv`, "text/html" is used if mime_type is missing. + * For `.html`, this field must be "text/html" or empty. + * For `.txt`, this field must be "text/plain" or empty. + *+ * + *
string mime_type = 1;
+ */
+ public Builder setMimeType(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ mimeType_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. Can be "text/plain" or "text/html". + * For `.tsv`, "text/html" is used if mime_type is missing. + * For `.html`, this field must be "text/html" or empty. + * For `.txt`, this field must be "text/plain" or empty. + *+ * + *
string mime_type = 1;
+ */
+ public Builder clearMimeType() {
+
+ mimeType_ = getDefaultInstance().getMimeType();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. Can be "text/plain" or "text/html". + * For `.tsv`, "text/html" is used if mime_type is missing. + * For `.html`, this field must be "text/html" or empty. + * For `.txt`, this field must be "text/plain" or empty. + *+ * + *
string mime_type = 1;
+ */
+ public Builder setMimeTypeBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ mimeType_ = value;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.translate.v3beta1.GcsSource,
+ com.google.cloud.translate.v3beta1.GcsSource.Builder,
+ com.google.cloud.translate.v3beta1.GcsSourceOrBuilder>
+ gcsSourceBuilder_;
+ /**
+ *
+ *
+ * + * Required. Google Cloud Storage location for the source input. + * This can be a single file (for example, + * `gs://translation-test/input.tsv`) or a wildcard (for example, + * `gs://translation-test/*`). If a file extension is `.tsv`, it can + * contain either one or two columns. The first column (optional) is the id + * of the text request. If the first column is missing, we use the row + * number (0-based) from the input file as the ID in the output file. The + * second column is the actual text to be + * translated. We recommend each row be <= 10K Unicode codepoints, + * otherwise an error might be returned. + * The other supported file extensions are `.txt` or `.html`, which is + * treated as a single large chunk of text. + *+ * + *
.google.cloud.translation.v3beta1.GcsSource gcs_source = 2;
+ */
+ public boolean hasGcsSource() {
+ return sourceCase_ == 2;
+ }
+ /**
+ *
+ *
+ * + * Required. Google Cloud Storage location for the source input. + * This can be a single file (for example, + * `gs://translation-test/input.tsv`) or a wildcard (for example, + * `gs://translation-test/*`). If a file extension is `.tsv`, it can + * contain either one or two columns. The first column (optional) is the id + * of the text request. If the first column is missing, we use the row + * number (0-based) from the input file as the ID in the output file. The + * second column is the actual text to be + * translated. We recommend each row be <= 10K Unicode codepoints, + * otherwise an error might be returned. + * The other supported file extensions are `.txt` or `.html`, which is + * treated as a single large chunk of text. + *+ * + *
.google.cloud.translation.v3beta1.GcsSource gcs_source = 2;
+ */
+ public com.google.cloud.translate.v3beta1.GcsSource getGcsSource() {
+ if (gcsSourceBuilder_ == null) {
+ if (sourceCase_ == 2) {
+ return (com.google.cloud.translate.v3beta1.GcsSource) source_;
+ }
+ return com.google.cloud.translate.v3beta1.GcsSource.getDefaultInstance();
+ } else {
+ if (sourceCase_ == 2) {
+ return gcsSourceBuilder_.getMessage();
+ }
+ return com.google.cloud.translate.v3beta1.GcsSource.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. Google Cloud Storage location for the source input. + * This can be a single file (for example, + * `gs://translation-test/input.tsv`) or a wildcard (for example, + * `gs://translation-test/*`). If a file extension is `.tsv`, it can + * contain either one or two columns. The first column (optional) is the id + * of the text request. If the first column is missing, we use the row + * number (0-based) from the input file as the ID in the output file. The + * second column is the actual text to be + * translated. We recommend each row be <= 10K Unicode codepoints, + * otherwise an error might be returned. + * The other supported file extensions are `.txt` or `.html`, which is + * treated as a single large chunk of text. + *+ * + *
.google.cloud.translation.v3beta1.GcsSource gcs_source = 2;
+ */
+ public Builder setGcsSource(com.google.cloud.translate.v3beta1.GcsSource value) {
+ if (gcsSourceBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ source_ = value;
+ onChanged();
+ } else {
+ gcsSourceBuilder_.setMessage(value);
+ }
+ sourceCase_ = 2;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Google Cloud Storage location for the source input. + * This can be a single file (for example, + * `gs://translation-test/input.tsv`) or a wildcard (for example, + * `gs://translation-test/*`). If a file extension is `.tsv`, it can + * contain either one or two columns. The first column (optional) is the id + * of the text request. If the first column is missing, we use the row + * number (0-based) from the input file as the ID in the output file. The + * second column is the actual text to be + * translated. We recommend each row be <= 10K Unicode codepoints, + * otherwise an error might be returned. + * The other supported file extensions are `.txt` or `.html`, which is + * treated as a single large chunk of text. + *+ * + *
.google.cloud.translation.v3beta1.GcsSource gcs_source = 2;
+ */
+ public Builder setGcsSource(
+ com.google.cloud.translate.v3beta1.GcsSource.Builder builderForValue) {
+ if (gcsSourceBuilder_ == null) {
+ source_ = builderForValue.build();
+ onChanged();
+ } else {
+ gcsSourceBuilder_.setMessage(builderForValue.build());
+ }
+ sourceCase_ = 2;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Google Cloud Storage location for the source input. + * This can be a single file (for example, + * `gs://translation-test/input.tsv`) or a wildcard (for example, + * `gs://translation-test/*`). If a file extension is `.tsv`, it can + * contain either one or two columns. The first column (optional) is the id + * of the text request. If the first column is missing, we use the row + * number (0-based) from the input file as the ID in the output file. The + * second column is the actual text to be + * translated. We recommend each row be <= 10K Unicode codepoints, + * otherwise an error might be returned. + * The other supported file extensions are `.txt` or `.html`, which is + * treated as a single large chunk of text. + *+ * + *
.google.cloud.translation.v3beta1.GcsSource gcs_source = 2;
+ */
+ public Builder mergeGcsSource(com.google.cloud.translate.v3beta1.GcsSource value) {
+ if (gcsSourceBuilder_ == null) {
+ if (sourceCase_ == 2
+ && source_ != com.google.cloud.translate.v3beta1.GcsSource.getDefaultInstance()) {
+ source_ =
+ com.google.cloud.translate.v3beta1.GcsSource.newBuilder(
+ (com.google.cloud.translate.v3beta1.GcsSource) source_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ source_ = value;
+ }
+ onChanged();
+ } else {
+ if (sourceCase_ == 2) {
+ gcsSourceBuilder_.mergeFrom(value);
+ }
+ gcsSourceBuilder_.setMessage(value);
+ }
+ sourceCase_ = 2;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Google Cloud Storage location for the source input. + * This can be a single file (for example, + * `gs://translation-test/input.tsv`) or a wildcard (for example, + * `gs://translation-test/*`). If a file extension is `.tsv`, it can + * contain either one or two columns. The first column (optional) is the id + * of the text request. If the first column is missing, we use the row + * number (0-based) from the input file as the ID in the output file. The + * second column is the actual text to be + * translated. We recommend each row be <= 10K Unicode codepoints, + * otherwise an error might be returned. + * The other supported file extensions are `.txt` or `.html`, which is + * treated as a single large chunk of text. + *+ * + *
.google.cloud.translation.v3beta1.GcsSource gcs_source = 2;
+ */
+ public Builder clearGcsSource() {
+ if (gcsSourceBuilder_ == null) {
+ if (sourceCase_ == 2) {
+ sourceCase_ = 0;
+ source_ = null;
+ onChanged();
+ }
+ } else {
+ if (sourceCase_ == 2) {
+ sourceCase_ = 0;
+ source_ = null;
+ }
+ gcsSourceBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Google Cloud Storage location for the source input. + * This can be a single file (for example, + * `gs://translation-test/input.tsv`) or a wildcard (for example, + * `gs://translation-test/*`). If a file extension is `.tsv`, it can + * contain either one or two columns. The first column (optional) is the id + * of the text request. If the first column is missing, we use the row + * number (0-based) from the input file as the ID in the output file. The + * second column is the actual text to be + * translated. We recommend each row be <= 10K Unicode codepoints, + * otherwise an error might be returned. + * The other supported file extensions are `.txt` or `.html`, which is + * treated as a single large chunk of text. + *+ * + *
.google.cloud.translation.v3beta1.GcsSource gcs_source = 2;
+ */
+ public com.google.cloud.translate.v3beta1.GcsSource.Builder getGcsSourceBuilder() {
+ return getGcsSourceFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Required. Google Cloud Storage location for the source input. + * This can be a single file (for example, + * `gs://translation-test/input.tsv`) or a wildcard (for example, + * `gs://translation-test/*`). If a file extension is `.tsv`, it can + * contain either one or two columns. The first column (optional) is the id + * of the text request. If the first column is missing, we use the row + * number (0-based) from the input file as the ID in the output file. The + * second column is the actual text to be + * translated. We recommend each row be <= 10K Unicode codepoints, + * otherwise an error might be returned. + * The other supported file extensions are `.txt` or `.html`, which is + * treated as a single large chunk of text. + *+ * + *
.google.cloud.translation.v3beta1.GcsSource gcs_source = 2;
+ */
+ public com.google.cloud.translate.v3beta1.GcsSourceOrBuilder getGcsSourceOrBuilder() {
+ if ((sourceCase_ == 2) && (gcsSourceBuilder_ != null)) {
+ return gcsSourceBuilder_.getMessageOrBuilder();
+ } else {
+ if (sourceCase_ == 2) {
+ return (com.google.cloud.translate.v3beta1.GcsSource) source_;
+ }
+ return com.google.cloud.translate.v3beta1.GcsSource.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. Google Cloud Storage location for the source input. + * This can be a single file (for example, + * `gs://translation-test/input.tsv`) or a wildcard (for example, + * `gs://translation-test/*`). If a file extension is `.tsv`, it can + * contain either one or two columns. The first column (optional) is the id + * of the text request. If the first column is missing, we use the row + * number (0-based) from the input file as the ID in the output file. The + * second column is the actual text to be + * translated. We recommend each row be <= 10K Unicode codepoints, + * otherwise an error might be returned. + * The other supported file extensions are `.txt` or `.html`, which is + * treated as a single large chunk of text. + *+ * + *
.google.cloud.translation.v3beta1.GcsSource gcs_source = 2;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.translate.v3beta1.GcsSource,
+ com.google.cloud.translate.v3beta1.GcsSource.Builder,
+ com.google.cloud.translate.v3beta1.GcsSourceOrBuilder>
+ getGcsSourceFieldBuilder() {
+ if (gcsSourceBuilder_ == null) {
+ if (!(sourceCase_ == 2)) {
+ source_ = com.google.cloud.translate.v3beta1.GcsSource.getDefaultInstance();
+ }
+ gcsSourceBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.translate.v3beta1.GcsSource,
+ com.google.cloud.translate.v3beta1.GcsSource.Builder,
+ com.google.cloud.translate.v3beta1.GcsSourceOrBuilder>(
+ (com.google.cloud.translate.v3beta1.GcsSource) source_,
+ getParentForChildren(),
+ isClean());
+ source_ = null;
+ }
+ sourceCase_ = 2;
+ 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.v3beta1.InputConfig)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.InputConfig)
+ private static final com.google.cloud.translate.v3beta1.InputConfig DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.translate.v3beta1.InputConfig();
+ }
+
+ public static com.google.cloud.translate.v3beta1.InputConfig getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Optional. Can be "text/plain" or "text/html". + * For `.tsv`, "text/html" is used if mime_type is missing. + * For `.html`, this field must be "text/html" or empty. + * For `.txt`, this field must be "text/plain" or empty. + *+ * + *
string mime_type = 1;
+ */
+ java.lang.String getMimeType();
+ /**
+ *
+ *
+ * + * Optional. Can be "text/plain" or "text/html". + * For `.tsv`, "text/html" is used if mime_type is missing. + * For `.html`, this field must be "text/html" or empty. + * For `.txt`, this field must be "text/plain" or empty. + *+ * + *
string mime_type = 1;
+ */
+ com.google.protobuf.ByteString getMimeTypeBytes();
+
+ /**
+ *
+ *
+ * + * Required. Google Cloud Storage location for the source input. + * This can be a single file (for example, + * `gs://translation-test/input.tsv`) or a wildcard (for example, + * `gs://translation-test/*`). If a file extension is `.tsv`, it can + * contain either one or two columns. The first column (optional) is the id + * of the text request. If the first column is missing, we use the row + * number (0-based) from the input file as the ID in the output file. The + * second column is the actual text to be + * translated. We recommend each row be <= 10K Unicode codepoints, + * otherwise an error might be returned. + * The other supported file extensions are `.txt` or `.html`, which is + * treated as a single large chunk of text. + *+ * + *
.google.cloud.translation.v3beta1.GcsSource gcs_source = 2;
+ */
+ boolean hasGcsSource();
+ /**
+ *
+ *
+ * + * Required. Google Cloud Storage location for the source input. + * This can be a single file (for example, + * `gs://translation-test/input.tsv`) or a wildcard (for example, + * `gs://translation-test/*`). If a file extension is `.tsv`, it can + * contain either one or two columns. The first column (optional) is the id + * of the text request. If the first column is missing, we use the row + * number (0-based) from the input file as the ID in the output file. The + * second column is the actual text to be + * translated. We recommend each row be <= 10K Unicode codepoints, + * otherwise an error might be returned. + * The other supported file extensions are `.txt` or `.html`, which is + * treated as a single large chunk of text. + *+ * + *
.google.cloud.translation.v3beta1.GcsSource gcs_source = 2;
+ */
+ com.google.cloud.translate.v3beta1.GcsSource getGcsSource();
+ /**
+ *
+ *
+ * + * Required. Google Cloud Storage location for the source input. + * This can be a single file (for example, + * `gs://translation-test/input.tsv`) or a wildcard (for example, + * `gs://translation-test/*`). If a file extension is `.tsv`, it can + * contain either one or two columns. The first column (optional) is the id + * of the text request. If the first column is missing, we use the row + * number (0-based) from the input file as the ID in the output file. The + * second column is the actual text to be + * translated. We recommend each row be <= 10K Unicode codepoints, + * otherwise an error might be returned. + * The other supported file extensions are `.txt` or `.html`, which is + * treated as a single large chunk of text. + *+ * + *
.google.cloud.translation.v3beta1.GcsSource gcs_source = 2;
+ */
+ com.google.cloud.translate.v3beta1.GcsSourceOrBuilder getGcsSourceOrBuilder();
+
+ public com.google.cloud.translate.v3beta1.InputConfig.SourceCase getSourceCase();
+}
diff --git a/google-api-grpc/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/ListGlossariesRequest.java b/google-api-grpc/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/ListGlossariesRequest.java
new file mode 100644
index 000000000000..3e9c98f22f0d
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/ListGlossariesRequest.java
@@ -0,0 +1,1039 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/translate/v3beta1/translation_service.proto
+
+package com.google.cloud.translate.v3beta1;
+
+/**
+ *
+ *
+ * + * Request message for ListGlossaries. + *+ * + * Protobuf type {@code google.cloud.translation.v3beta1.ListGlossariesRequest} + */ +public final class ListGlossariesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.translation.v3beta1.ListGlossariesRequest) + ListGlossariesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListGlossariesRequest.newBuilder() to construct. + private ListGlossariesRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private ListGlossariesRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListGlossariesRequest( + 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 16: + { + pageSize_ = input.readInt32(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.translate.v3beta1.TranslationServiceProto + .internal_static_google_cloud_translation_v3beta1_ListGlossariesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.translate.v3beta1.TranslationServiceProto + .internal_static_google_cloud_translation_v3beta1_ListGlossariesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.translate.v3beta1.ListGlossariesRequest.class, + com.google.cloud.translate.v3beta1.ListGlossariesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+ * Required. The name of the project from which to list all of the glossaries. + *+ * + *
string parent = 1;
+ */
+ public java.lang.String getParent() {
+ java.lang.Object ref = parent_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ parent_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. The name of the project from which to list all of the glossaries. + *+ * + *
string parent = 1;
+ */
+ public com.google.protobuf.ByteString getParentBytes() {
+ java.lang.Object ref = parent_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ parent_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int PAGE_SIZE_FIELD_NUMBER = 2;
+ private int pageSize_;
+ /**
+ *
+ *
+ * + * Optional. Requested page size. The server may return fewer glossaries than + * requested. If unspecified, the server picks an appropriate default. + *+ * + *
int32 page_size = 2;
+ */
+ public int getPageSize() {
+ return pageSize_;
+ }
+
+ public static final int PAGE_TOKEN_FIELD_NUMBER = 3;
+ private volatile java.lang.Object pageToken_;
+ /**
+ *
+ *
+ * + * Optional. A token identifying a page of results the server should return. + * Typically, this is the value of [ListGlossariesResponse.next_page_token] + * returned from the previous call to `ListGlossaries` method. + * The first page is returned if `page_token`is empty or missing. + *+ * + *
string page_token = 3;
+ */
+ public java.lang.String getPageToken() {
+ java.lang.Object ref = pageToken_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ pageToken_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. A token identifying a page of results the server should return. + * Typically, this is the value of [ListGlossariesResponse.next_page_token] + * returned from the previous call to `ListGlossaries` method. + * The first page is returned if `page_token`is empty or missing. + *+ * + *
string page_token = 3;
+ */
+ public com.google.protobuf.ByteString getPageTokenBytes() {
+ java.lang.Object ref = pageToken_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ pageToken_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int FILTER_FIELD_NUMBER = 4;
+ private volatile java.lang.Object filter_;
+ /**
+ *
+ *
+ * + * Optional. Filter specifying constraints of a list operation. + * For example, `tags.glossary_name="products*"`. + * If missing, no filtering is performed. + *+ * + *
string filter = 4;
+ */
+ public java.lang.String getFilter() {
+ java.lang.Object ref = filter_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ filter_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. Filter specifying constraints of a list operation. + * For example, `tags.glossary_name="products*"`. + * If missing, no filtering is performed. + *+ * + *
string filter = 4;
+ */
+ public com.google.protobuf.ByteString getFilterBytes() {
+ java.lang.Object ref = filter_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ filter_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (!getParentBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_);
+ }
+ if (pageSize_ != 0) {
+ output.writeInt32(2, pageSize_);
+ }
+ if (!getPageTokenBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_);
+ }
+ if (!getFilterBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getParentBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_);
+ }
+ if (pageSize_ != 0) {
+ size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_);
+ }
+ if (!getPageTokenBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_);
+ }
+ if (!getFilterBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.translate.v3beta1.ListGlossariesRequest)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.translate.v3beta1.ListGlossariesRequest other =
+ (com.google.cloud.translate.v3beta1.ListGlossariesRequest) obj;
+
+ if (!getParent().equals(other.getParent())) return false;
+ if (getPageSize() != other.getPageSize()) return false;
+ if (!getPageToken().equals(other.getPageToken())) return false;
+ if (!getFilter().equals(other.getFilter())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + PARENT_FIELD_NUMBER;
+ hash = (53 * hash) + getParent().hashCode();
+ hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER;
+ hash = (53 * hash) + getPageSize();
+ hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER;
+ hash = (53 * hash) + getPageToken().hashCode();
+ hash = (37 * hash) + FILTER_FIELD_NUMBER;
+ hash = (53 * hash) + getFilter().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.translate.v3beta1.ListGlossariesRequest parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.ListGlossariesRequest parseFrom(
+ 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.v3beta1.ListGlossariesRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.ListGlossariesRequest parseFrom(
+ com.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.v3beta1.ListGlossariesRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.ListGlossariesRequest parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.ListGlossariesRequest parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.ListGlossariesRequest parseFrom(
+ java.io.InputStream 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.v3beta1.ListGlossariesRequest parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.ListGlossariesRequest parseDelimitedFrom(
+ java.io.InputStream 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.v3beta1.ListGlossariesRequest parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.ListGlossariesRequest parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, 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.v3beta1.ListGlossariesRequest prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ * + * Request message for ListGlossaries. + *+ * + * Protobuf type {@code google.cloud.translation.v3beta1.ListGlossariesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Required. The name of the project from which to list all of the glossaries. + *+ * + *
string parent = 1;
+ */
+ public java.lang.String getParent() {
+ java.lang.Object ref = parent_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ parent_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. The name of the project from which to list all of the glossaries. + *+ * + *
string parent = 1;
+ */
+ public com.google.protobuf.ByteString getParentBytes() {
+ java.lang.Object ref = parent_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ parent_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. The name of the project from which to list all of the glossaries. + *+ * + *
string parent = 1;
+ */
+ public Builder setParent(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ parent_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The name of the project from which to list all of the glossaries. + *+ * + *
string parent = 1;
+ */
+ public Builder clearParent() {
+
+ parent_ = getDefaultInstance().getParent();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The name of the project from which to list all of the glossaries. + *+ * + *
string parent = 1;
+ */
+ public Builder setParentBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ parent_ = value;
+ onChanged();
+ return this;
+ }
+
+ private int pageSize_;
+ /**
+ *
+ *
+ * + * Optional. Requested page size. The server may return fewer glossaries than + * requested. If unspecified, the server picks an appropriate default. + *+ * + *
int32 page_size = 2;
+ */
+ public int getPageSize() {
+ return pageSize_;
+ }
+ /**
+ *
+ *
+ * + * Optional. Requested page size. The server may return fewer glossaries than + * requested. If unspecified, the server picks an appropriate default. + *+ * + *
int32 page_size = 2;
+ */
+ public Builder setPageSize(int value) {
+
+ pageSize_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. Requested page size. The server may return fewer glossaries than + * requested. If unspecified, the server picks an appropriate default. + *+ * + *
int32 page_size = 2;
+ */
+ public Builder clearPageSize() {
+
+ pageSize_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object pageToken_ = "";
+ /**
+ *
+ *
+ * + * Optional. A token identifying a page of results the server should return. + * Typically, this is the value of [ListGlossariesResponse.next_page_token] + * returned from the previous call to `ListGlossaries` method. + * The first page is returned if `page_token`is empty or missing. + *+ * + *
string page_token = 3;
+ */
+ public java.lang.String getPageToken() {
+ java.lang.Object ref = pageToken_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ pageToken_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. A token identifying a page of results the server should return. + * Typically, this is the value of [ListGlossariesResponse.next_page_token] + * returned from the previous call to `ListGlossaries` method. + * The first page is returned if `page_token`is empty or missing. + *+ * + *
string page_token = 3;
+ */
+ public com.google.protobuf.ByteString getPageTokenBytes() {
+ java.lang.Object ref = pageToken_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ pageToken_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. A token identifying a page of results the server should return. + * Typically, this is the value of [ListGlossariesResponse.next_page_token] + * returned from the previous call to `ListGlossaries` method. + * The first page is returned if `page_token`is empty or missing. + *+ * + *
string page_token = 3;
+ */
+ public Builder setPageToken(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ pageToken_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. A token identifying a page of results the server should return. + * Typically, this is the value of [ListGlossariesResponse.next_page_token] + * returned from the previous call to `ListGlossaries` method. + * The first page is returned if `page_token`is empty or missing. + *+ * + *
string page_token = 3;
+ */
+ public Builder clearPageToken() {
+
+ pageToken_ = getDefaultInstance().getPageToken();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. A token identifying a page of results the server should return. + * Typically, this is the value of [ListGlossariesResponse.next_page_token] + * returned from the previous call to `ListGlossaries` method. + * The first page is returned if `page_token`is empty or missing. + *+ * + *
string page_token = 3;
+ */
+ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ pageToken_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object filter_ = "";
+ /**
+ *
+ *
+ * + * Optional. Filter specifying constraints of a list operation. + * For example, `tags.glossary_name="products*"`. + * If missing, no filtering is performed. + *+ * + *
string filter = 4;
+ */
+ public java.lang.String getFilter() {
+ java.lang.Object ref = filter_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ filter_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. Filter specifying constraints of a list operation. + * For example, `tags.glossary_name="products*"`. + * If missing, no filtering is performed. + *+ * + *
string filter = 4;
+ */
+ public com.google.protobuf.ByteString getFilterBytes() {
+ java.lang.Object ref = filter_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ filter_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. Filter specifying constraints of a list operation. + * For example, `tags.glossary_name="products*"`. + * If missing, no filtering is performed. + *+ * + *
string filter = 4;
+ */
+ public Builder setFilter(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ filter_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. Filter specifying constraints of a list operation. + * For example, `tags.glossary_name="products*"`. + * If missing, no filtering is performed. + *+ * + *
string filter = 4;
+ */
+ public Builder clearFilter() {
+
+ filter_ = getDefaultInstance().getFilter();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. Filter specifying constraints of a list operation. + * For example, `tags.glossary_name="products*"`. + * If missing, no filtering is performed. + *+ * + *
string filter = 4;
+ */
+ public Builder setFilterBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ filter_ = value;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.translation.v3beta1.ListGlossariesRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.ListGlossariesRequest)
+ private static final com.google.cloud.translate.v3beta1.ListGlossariesRequest DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.translate.v3beta1.ListGlossariesRequest();
+ }
+
+ public static com.google.cloud.translate.v3beta1.ListGlossariesRequest getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Required. The name of the project from which to list all of the glossaries. + *+ * + *
string parent = 1;
+ */
+ java.lang.String getParent();
+ /**
+ *
+ *
+ * + * Required. The name of the project from which to list all of the glossaries. + *+ * + *
string parent = 1;
+ */
+ com.google.protobuf.ByteString getParentBytes();
+
+ /**
+ *
+ *
+ * + * Optional. Requested page size. The server may return fewer glossaries than + * requested. If unspecified, the server picks an appropriate default. + *+ * + *
int32 page_size = 2;
+ */
+ int getPageSize();
+
+ /**
+ *
+ *
+ * + * Optional. A token identifying a page of results the server should return. + * Typically, this is the value of [ListGlossariesResponse.next_page_token] + * returned from the previous call to `ListGlossaries` method. + * The first page is returned if `page_token`is empty or missing. + *+ * + *
string page_token = 3;
+ */
+ java.lang.String getPageToken();
+ /**
+ *
+ *
+ * + * Optional. A token identifying a page of results the server should return. + * Typically, this is the value of [ListGlossariesResponse.next_page_token] + * returned from the previous call to `ListGlossaries` method. + * The first page is returned if `page_token`is empty or missing. + *+ * + *
string page_token = 3;
+ */
+ com.google.protobuf.ByteString getPageTokenBytes();
+
+ /**
+ *
+ *
+ * + * Optional. Filter specifying constraints of a list operation. + * For example, `tags.glossary_name="products*"`. + * If missing, no filtering is performed. + *+ * + *
string filter = 4;
+ */
+ java.lang.String getFilter();
+ /**
+ *
+ *
+ * + * Optional. Filter specifying constraints of a list operation. + * For example, `tags.glossary_name="products*"`. + * If missing, no filtering is performed. + *+ * + *
string filter = 4;
+ */
+ com.google.protobuf.ByteString getFilterBytes();
+}
diff --git a/google-api-grpc/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/ListGlossariesResponse.java b/google-api-grpc/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/ListGlossariesResponse.java
new file mode 100644
index 000000000000..47faef8968b1
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/ListGlossariesResponse.java
@@ -0,0 +1,1105 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/translate/v3beta1/translation_service.proto
+
+package com.google.cloud.translate.v3beta1;
+
+/**
+ *
+ *
+ * + * Response message for ListGlossaries. + *+ * + * Protobuf type {@code google.cloud.translation.v3beta1.ListGlossariesResponse} + */ +public final class ListGlossariesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.translation.v3beta1.ListGlossariesResponse) + ListGlossariesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListGlossariesResponse.newBuilder() to construct. + private ListGlossariesResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private ListGlossariesResponse() { + glossaries_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListGlossariesResponse( + 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)) { + glossaries_ = + new java.util.ArrayList
+ * The list of glossaries for a project. + *+ * + *
repeated .google.cloud.translation.v3beta1.Glossary glossaries = 1;
+ */
+ public java.util.List+ * The list of glossaries for a project. + *+ * + *
repeated .google.cloud.translation.v3beta1.Glossary glossaries = 1;
+ */
+ public java.util.List extends com.google.cloud.translate.v3beta1.GlossaryOrBuilder>
+ getGlossariesOrBuilderList() {
+ return glossaries_;
+ }
+ /**
+ *
+ *
+ * + * The list of glossaries for a project. + *+ * + *
repeated .google.cloud.translation.v3beta1.Glossary glossaries = 1;
+ */
+ public int getGlossariesCount() {
+ return glossaries_.size();
+ }
+ /**
+ *
+ *
+ * + * The list of glossaries for a project. + *+ * + *
repeated .google.cloud.translation.v3beta1.Glossary glossaries = 1;
+ */
+ public com.google.cloud.translate.v3beta1.Glossary getGlossaries(int index) {
+ return glossaries_.get(index);
+ }
+ /**
+ *
+ *
+ * + * The list of glossaries for a project. + *+ * + *
repeated .google.cloud.translation.v3beta1.Glossary glossaries = 1;
+ */
+ public com.google.cloud.translate.v3beta1.GlossaryOrBuilder getGlossariesOrBuilder(int index) {
+ return glossaries_.get(index);
+ }
+
+ public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2;
+ private volatile java.lang.Object nextPageToken_;
+ /**
+ *
+ *
+ * + * A token to retrieve a page of results. Pass this value in the + * [ListGlossariesRequest.page_token] field in the subsequent call to + * `ListGlossaries` method to retrieve the next page of results. + *+ * + *
string next_page_token = 2;
+ */
+ public java.lang.String getNextPageToken() {
+ java.lang.Object ref = nextPageToken_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ nextPageToken_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * A token to retrieve a page of results. Pass this value in the + * [ListGlossariesRequest.page_token] field in the subsequent call to + * `ListGlossaries` method to retrieve the next page of results. + *+ * + *
string next_page_token = 2;
+ */
+ public com.google.protobuf.ByteString getNextPageTokenBytes() {
+ java.lang.Object ref = nextPageToken_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ nextPageToken_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ for (int i = 0; i < glossaries_.size(); i++) {
+ output.writeMessage(1, glossaries_.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 < glossaries_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, glossaries_.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.translate.v3beta1.ListGlossariesResponse)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.translate.v3beta1.ListGlossariesResponse other =
+ (com.google.cloud.translate.v3beta1.ListGlossariesResponse) obj;
+
+ if (!getGlossariesList().equals(other.getGlossariesList())) 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 (getGlossariesCount() > 0) {
+ hash = (37 * hash) + GLOSSARIES_FIELD_NUMBER;
+ hash = (53 * hash) + getGlossariesList().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.translate.v3beta1.ListGlossariesResponse parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.ListGlossariesResponse parseFrom(
+ 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.v3beta1.ListGlossariesResponse parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.ListGlossariesResponse parseFrom(
+ com.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.v3beta1.ListGlossariesResponse parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.ListGlossariesResponse parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.ListGlossariesResponse parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.ListGlossariesResponse parseFrom(
+ java.io.InputStream 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.v3beta1.ListGlossariesResponse parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.ListGlossariesResponse parseDelimitedFrom(
+ java.io.InputStream 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.v3beta1.ListGlossariesResponse parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.ListGlossariesResponse parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, 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.v3beta1.ListGlossariesResponse prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ * + * Response message for ListGlossaries. + *+ * + * Protobuf type {@code google.cloud.translation.v3beta1.ListGlossariesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * The list of glossaries for a project. + *+ * + *
repeated .google.cloud.translation.v3beta1.Glossary glossaries = 1;
+ */
+ public java.util.List+ * The list of glossaries for a project. + *+ * + *
repeated .google.cloud.translation.v3beta1.Glossary glossaries = 1;
+ */
+ public int getGlossariesCount() {
+ if (glossariesBuilder_ == null) {
+ return glossaries_.size();
+ } else {
+ return glossariesBuilder_.getCount();
+ }
+ }
+ /**
+ *
+ *
+ * + * The list of glossaries for a project. + *+ * + *
repeated .google.cloud.translation.v3beta1.Glossary glossaries = 1;
+ */
+ public com.google.cloud.translate.v3beta1.Glossary getGlossaries(int index) {
+ if (glossariesBuilder_ == null) {
+ return glossaries_.get(index);
+ } else {
+ return glossariesBuilder_.getMessage(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * The list of glossaries for a project. + *+ * + *
repeated .google.cloud.translation.v3beta1.Glossary glossaries = 1;
+ */
+ public Builder setGlossaries(int index, com.google.cloud.translate.v3beta1.Glossary value) {
+ if (glossariesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureGlossariesIsMutable();
+ glossaries_.set(index, value);
+ onChanged();
+ } else {
+ glossariesBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The list of glossaries for a project. + *+ * + *
repeated .google.cloud.translation.v3beta1.Glossary glossaries = 1;
+ */
+ public Builder setGlossaries(
+ int index, com.google.cloud.translate.v3beta1.Glossary.Builder builderForValue) {
+ if (glossariesBuilder_ == null) {
+ ensureGlossariesIsMutable();
+ glossaries_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ glossariesBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The list of glossaries for a project. + *+ * + *
repeated .google.cloud.translation.v3beta1.Glossary glossaries = 1;
+ */
+ public Builder addGlossaries(com.google.cloud.translate.v3beta1.Glossary value) {
+ if (glossariesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureGlossariesIsMutable();
+ glossaries_.add(value);
+ onChanged();
+ } else {
+ glossariesBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The list of glossaries for a project. + *+ * + *
repeated .google.cloud.translation.v3beta1.Glossary glossaries = 1;
+ */
+ public Builder addGlossaries(int index, com.google.cloud.translate.v3beta1.Glossary value) {
+ if (glossariesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureGlossariesIsMutable();
+ glossaries_.add(index, value);
+ onChanged();
+ } else {
+ glossariesBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The list of glossaries for a project. + *+ * + *
repeated .google.cloud.translation.v3beta1.Glossary glossaries = 1;
+ */
+ public Builder addGlossaries(
+ com.google.cloud.translate.v3beta1.Glossary.Builder builderForValue) {
+ if (glossariesBuilder_ == null) {
+ ensureGlossariesIsMutable();
+ glossaries_.add(builderForValue.build());
+ onChanged();
+ } else {
+ glossariesBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The list of glossaries for a project. + *+ * + *
repeated .google.cloud.translation.v3beta1.Glossary glossaries = 1;
+ */
+ public Builder addGlossaries(
+ int index, com.google.cloud.translate.v3beta1.Glossary.Builder builderForValue) {
+ if (glossariesBuilder_ == null) {
+ ensureGlossariesIsMutable();
+ glossaries_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ glossariesBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The list of glossaries for a project. + *+ * + *
repeated .google.cloud.translation.v3beta1.Glossary glossaries = 1;
+ */
+ public Builder addAllGlossaries(
+ java.lang.Iterable extends com.google.cloud.translate.v3beta1.Glossary> values) {
+ if (glossariesBuilder_ == null) {
+ ensureGlossariesIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, glossaries_);
+ onChanged();
+ } else {
+ glossariesBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The list of glossaries for a project. + *+ * + *
repeated .google.cloud.translation.v3beta1.Glossary glossaries = 1;
+ */
+ public Builder clearGlossaries() {
+ if (glossariesBuilder_ == null) {
+ glossaries_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ } else {
+ glossariesBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The list of glossaries for a project. + *+ * + *
repeated .google.cloud.translation.v3beta1.Glossary glossaries = 1;
+ */
+ public Builder removeGlossaries(int index) {
+ if (glossariesBuilder_ == null) {
+ ensureGlossariesIsMutable();
+ glossaries_.remove(index);
+ onChanged();
+ } else {
+ glossariesBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The list of glossaries for a project. + *+ * + *
repeated .google.cloud.translation.v3beta1.Glossary glossaries = 1;
+ */
+ public com.google.cloud.translate.v3beta1.Glossary.Builder getGlossariesBuilder(int index) {
+ return getGlossariesFieldBuilder().getBuilder(index);
+ }
+ /**
+ *
+ *
+ * + * The list of glossaries for a project. + *+ * + *
repeated .google.cloud.translation.v3beta1.Glossary glossaries = 1;
+ */
+ public com.google.cloud.translate.v3beta1.GlossaryOrBuilder getGlossariesOrBuilder(int index) {
+ if (glossariesBuilder_ == null) {
+ return glossaries_.get(index);
+ } else {
+ return glossariesBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * The list of glossaries for a project. + *+ * + *
repeated .google.cloud.translation.v3beta1.Glossary glossaries = 1;
+ */
+ public java.util.List extends com.google.cloud.translate.v3beta1.GlossaryOrBuilder>
+ getGlossariesOrBuilderList() {
+ if (glossariesBuilder_ != null) {
+ return glossariesBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(glossaries_);
+ }
+ }
+ /**
+ *
+ *
+ * + * The list of glossaries for a project. + *+ * + *
repeated .google.cloud.translation.v3beta1.Glossary glossaries = 1;
+ */
+ public com.google.cloud.translate.v3beta1.Glossary.Builder addGlossariesBuilder() {
+ return getGlossariesFieldBuilder()
+ .addBuilder(com.google.cloud.translate.v3beta1.Glossary.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * The list of glossaries for a project. + *+ * + *
repeated .google.cloud.translation.v3beta1.Glossary glossaries = 1;
+ */
+ public com.google.cloud.translate.v3beta1.Glossary.Builder addGlossariesBuilder(int index) {
+ return getGlossariesFieldBuilder()
+ .addBuilder(index, com.google.cloud.translate.v3beta1.Glossary.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * The list of glossaries for a project. + *+ * + *
repeated .google.cloud.translation.v3beta1.Glossary glossaries = 1;
+ */
+ public java.util.List+ * A token to retrieve a page of results. Pass this value in the + * [ListGlossariesRequest.page_token] field in the subsequent call to + * `ListGlossaries` method to retrieve the next page of results. + *+ * + *
string next_page_token = 2;
+ */
+ public java.lang.String getNextPageToken() {
+ java.lang.Object ref = nextPageToken_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ nextPageToken_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * A token to retrieve a page of results. Pass this value in the + * [ListGlossariesRequest.page_token] field in the subsequent call to + * `ListGlossaries` method to retrieve the next page of results. + *+ * + *
string next_page_token = 2;
+ */
+ public com.google.protobuf.ByteString getNextPageTokenBytes() {
+ java.lang.Object ref = nextPageToken_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ nextPageToken_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * A token to retrieve a page of results. Pass this value in the + * [ListGlossariesRequest.page_token] field in the subsequent call to + * `ListGlossaries` method to retrieve the next page of results. + *+ * + *
string next_page_token = 2;
+ */
+ public Builder setNextPageToken(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ nextPageToken_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A token to retrieve a page of results. Pass this value in the + * [ListGlossariesRequest.page_token] field in the subsequent call to + * `ListGlossaries` method to retrieve the next page of results. + *+ * + *
string next_page_token = 2;
+ */
+ public Builder clearNextPageToken() {
+
+ nextPageToken_ = getDefaultInstance().getNextPageToken();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A token to retrieve a page of results. Pass this value in the + * [ListGlossariesRequest.page_token] field in the subsequent call to + * `ListGlossaries` method to retrieve the next page of results. + *+ * + *
string next_page_token = 2;
+ */
+ public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ nextPageToken_ = value;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.translation.v3beta1.ListGlossariesResponse)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.ListGlossariesResponse)
+ private static final com.google.cloud.translate.v3beta1.ListGlossariesResponse DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.translate.v3beta1.ListGlossariesResponse();
+ }
+
+ public static com.google.cloud.translate.v3beta1.ListGlossariesResponse getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * The list of glossaries for a project. + *+ * + *
repeated .google.cloud.translation.v3beta1.Glossary glossaries = 1;
+ */
+ java.util.List+ * The list of glossaries for a project. + *+ * + *
repeated .google.cloud.translation.v3beta1.Glossary glossaries = 1;
+ */
+ com.google.cloud.translate.v3beta1.Glossary getGlossaries(int index);
+ /**
+ *
+ *
+ * + * The list of glossaries for a project. + *+ * + *
repeated .google.cloud.translation.v3beta1.Glossary glossaries = 1;
+ */
+ int getGlossariesCount();
+ /**
+ *
+ *
+ * + * The list of glossaries for a project. + *+ * + *
repeated .google.cloud.translation.v3beta1.Glossary glossaries = 1;
+ */
+ java.util.List extends com.google.cloud.translate.v3beta1.GlossaryOrBuilder>
+ getGlossariesOrBuilderList();
+ /**
+ *
+ *
+ * + * The list of glossaries for a project. + *+ * + *
repeated .google.cloud.translation.v3beta1.Glossary glossaries = 1;
+ */
+ com.google.cloud.translate.v3beta1.GlossaryOrBuilder getGlossariesOrBuilder(int index);
+
+ /**
+ *
+ *
+ * + * A token to retrieve a page of results. Pass this value in the + * [ListGlossariesRequest.page_token] field in the subsequent call to + * `ListGlossaries` method to retrieve the next page of results. + *+ * + *
string next_page_token = 2;
+ */
+ java.lang.String getNextPageToken();
+ /**
+ *
+ *
+ * + * A token to retrieve a page of results. Pass this value in the + * [ListGlossariesRequest.page_token] field in the subsequent call to + * `ListGlossaries` method to retrieve the next page of results. + *+ * + *
string next_page_token = 2;
+ */
+ com.google.protobuf.ByteString getNextPageTokenBytes();
+}
diff --git a/google-api-grpc/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/LocationName.java b/google-api-grpc/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/LocationName.java
new file mode 100644
index 000000000000..e40db2735b96
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/LocationName.java
@@ -0,0 +1,180 @@
+/*
+ * Copyright 2018 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+package com.google.cloud.translate.v3beta1;
+
+import com.google.api.pathtemplate.PathTemplate;
+import com.google.api.resourcenames.ResourceName;
+import com.google.common.base.Preconditions;
+import com.google.common.collect.ImmutableMap;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS
+@javax.annotation.Generated("by GAPIC protoc plugin")
+public class LocationName implements ResourceName {
+
+ private static final PathTemplate PATH_TEMPLATE =
+ PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}");
+
+ private volatile Map+ * Output configuration. + *+ * + * Protobuf type {@code google.cloud.translation.v3beta1.OutputConfig} + */ +public final class OutputConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.translation.v3beta1.OutputConfig) + OutputConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use OutputConfig.newBuilder() to construct. + private OutputConfig(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private OutputConfig() {} + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private OutputConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.translate.v3beta1.GcsDestination.Builder subBuilder = null; + if (destinationCase_ == 1) { + subBuilder = + ((com.google.cloud.translate.v3beta1.GcsDestination) destination_).toBuilder(); + } + destination_ = + input.readMessage( + com.google.cloud.translate.v3beta1.GcsDestination.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.translate.v3beta1.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.v3beta1.TranslationServiceProto + .internal_static_google_cloud_translation_v3beta1_OutputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.translate.v3beta1.TranslationServiceProto + .internal_static_google_cloud_translation_v3beta1_OutputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.translate.v3beta1.OutputConfig.class, + com.google.cloud.translate.v3beta1.OutputConfig.Builder.class); + } + + private int destinationCase_ = 0; + private java.lang.Object destination_; + + public enum DestinationCase implements com.google.protobuf.Internal.EnumLite { + GCS_DESTINATION(1), + DESTINATION_NOT_SET(0); + private final int value; + + private DestinationCase(int value) { + this.value = value; + } + /** @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 file (for example, gs://a/b/c.[extension]), we + * generate at most 2 * n output files. (n is the # of target_language_codes + * in the BatchTranslateTextRequest). + * Output files (tsv) generated are compliant with RFC 4180 except that + * record delimiters are '\n' instead of '\r\n'. We don't provide any way to + * change record delimiters. + * While the input files are being processed, we write/update an index file + * 'index.csv' under 'output_uri_prefix' (for example, + * gs://translation-test/index.csv) The index file is generated/updated as + * new files are being translated. The format is: + * input_file,target_language_code,translations_file,errors_file, + * glossary_translations_file,glossary_errors_file + * input_file is one file we matched using gcs_source.input_uri. + * target_language_code is provided in the request. + * translations_file contains the translations. (details provided below) + * errors_file contains the errors during processing of the file. (details + * below). Both translations_file and errors_file could be empty + * strings if we have no content to output. + * glossary_translations_file,glossary_errors_file are always empty string + * if input_file is tsv. 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). + * The format of translations_file (for target language code 'trg') is: + * gs://translation_test/a_b_c_'trg'_translations.[extension] + * If the input file extension is tsv, the output has the following + * columns: + * Column 1: ID of the request provided in the input, if it's not + * provided in the input, then the input row number is used (0-based). + * Column 2: source sentence. + * Column 3: translation without applying a glossary. Empty string if there + * is an error. + * Column 4 (only present if a glossary is provided in the request): + * translation after applying the glossary. Empty string if there is an + * error applying the glossary. Could be same string as column 3 if there is + * no glossary applied. + * If input file extension is a txt or html, the translation is directly + * written to the output file. If glossary is requested, a separate + * glossary_translations_file has format of + * gs://translation_test/a_b_c_'trg'_glossary_translations.[extension] + * The format of errors file (for target language code 'trg') is: + * gs://translation_test/a_b_c_'trg'_errors.[extension] + * If the input file extension is tsv, errors_file has the + * following Column 1: ID of the request provided in the input, if it's not + * provided in the input, then the input row number is used (0-based). + * Column 2: source sentence. + * Column 3: Error detail for the translation. Could be empty. + * Column 4 (only present if a glossary is provided in the request): + * Error when applying the glossary. + * If the input file extension is txt or html, glossary_error_file will be + * generated that contains error details. glossary_error_file has format of + * gs://translation_test/a_b_c_'trg'_glossary_errors.[extension] + *+ * + *
.google.cloud.translation.v3beta1.GcsDestination gcs_destination = 1;
+ */
+ public boolean hasGcsDestination() {
+ return destinationCase_ == 1;
+ }
+ /**
+ *
+ *
+ * + * Google Cloud Storage destination for output content. + * For every single input file (for example, gs://a/b/c.[extension]), we + * generate at most 2 * n output files. (n is the # of target_language_codes + * in the BatchTranslateTextRequest). + * Output files (tsv) generated are compliant with RFC 4180 except that + * record delimiters are '\n' instead of '\r\n'. We don't provide any way to + * change record delimiters. + * While the input files are being processed, we write/update an index file + * 'index.csv' under 'output_uri_prefix' (for example, + * gs://translation-test/index.csv) The index file is generated/updated as + * new files are being translated. The format is: + * input_file,target_language_code,translations_file,errors_file, + * glossary_translations_file,glossary_errors_file + * input_file is one file we matched using gcs_source.input_uri. + * target_language_code is provided in the request. + * translations_file contains the translations. (details provided below) + * errors_file contains the errors during processing of the file. (details + * below). Both translations_file and errors_file could be empty + * strings if we have no content to output. + * glossary_translations_file,glossary_errors_file are always empty string + * if input_file is tsv. 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). + * The format of translations_file (for target language code 'trg') is: + * gs://translation_test/a_b_c_'trg'_translations.[extension] + * If the input file extension is tsv, the output has the following + * columns: + * Column 1: ID of the request provided in the input, if it's not + * provided in the input, then the input row number is used (0-based). + * Column 2: source sentence. + * Column 3: translation without applying a glossary. Empty string if there + * is an error. + * Column 4 (only present if a glossary is provided in the request): + * translation after applying the glossary. Empty string if there is an + * error applying the glossary. Could be same string as column 3 if there is + * no glossary applied. + * If input file extension is a txt or html, the translation is directly + * written to the output file. If glossary is requested, a separate + * glossary_translations_file has format of + * gs://translation_test/a_b_c_'trg'_glossary_translations.[extension] + * The format of errors file (for target language code 'trg') is: + * gs://translation_test/a_b_c_'trg'_errors.[extension] + * If the input file extension is tsv, errors_file has the + * following Column 1: ID of the request provided in the input, if it's not + * provided in the input, then the input row number is used (0-based). + * Column 2: source sentence. + * Column 3: Error detail for the translation. Could be empty. + * Column 4 (only present if a glossary is provided in the request): + * Error when applying the glossary. + * If the input file extension is txt or html, glossary_error_file will be + * generated that contains error details. glossary_error_file has format of + * gs://translation_test/a_b_c_'trg'_glossary_errors.[extension] + *+ * + *
.google.cloud.translation.v3beta1.GcsDestination gcs_destination = 1;
+ */
+ public com.google.cloud.translate.v3beta1.GcsDestination getGcsDestination() {
+ if (destinationCase_ == 1) {
+ return (com.google.cloud.translate.v3beta1.GcsDestination) destination_;
+ }
+ return com.google.cloud.translate.v3beta1.GcsDestination.getDefaultInstance();
+ }
+ /**
+ *
+ *
+ * + * Google Cloud Storage destination for output content. + * For every single input file (for example, gs://a/b/c.[extension]), we + * generate at most 2 * n output files. (n is the # of target_language_codes + * in the BatchTranslateTextRequest). + * Output files (tsv) generated are compliant with RFC 4180 except that + * record delimiters are '\n' instead of '\r\n'. We don't provide any way to + * change record delimiters. + * While the input files are being processed, we write/update an index file + * 'index.csv' under 'output_uri_prefix' (for example, + * gs://translation-test/index.csv) The index file is generated/updated as + * new files are being translated. The format is: + * input_file,target_language_code,translations_file,errors_file, + * glossary_translations_file,glossary_errors_file + * input_file is one file we matched using gcs_source.input_uri. + * target_language_code is provided in the request. + * translations_file contains the translations. (details provided below) + * errors_file contains the errors during processing of the file. (details + * below). Both translations_file and errors_file could be empty + * strings if we have no content to output. + * glossary_translations_file,glossary_errors_file are always empty string + * if input_file is tsv. 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). + * The format of translations_file (for target language code 'trg') is: + * gs://translation_test/a_b_c_'trg'_translations.[extension] + * If the input file extension is tsv, the output has the following + * columns: + * Column 1: ID of the request provided in the input, if it's not + * provided in the input, then the input row number is used (0-based). + * Column 2: source sentence. + * Column 3: translation without applying a glossary. Empty string if there + * is an error. + * Column 4 (only present if a glossary is provided in the request): + * translation after applying the glossary. Empty string if there is an + * error applying the glossary. Could be same string as column 3 if there is + * no glossary applied. + * If input file extension is a txt or html, the translation is directly + * written to the output file. If glossary is requested, a separate + * glossary_translations_file has format of + * gs://translation_test/a_b_c_'trg'_glossary_translations.[extension] + * The format of errors file (for target language code 'trg') is: + * gs://translation_test/a_b_c_'trg'_errors.[extension] + * If the input file extension is tsv, errors_file has the + * following Column 1: ID of the request provided in the input, if it's not + * provided in the input, then the input row number is used (0-based). + * Column 2: source sentence. + * Column 3: Error detail for the translation. Could be empty. + * Column 4 (only present if a glossary is provided in the request): + * Error when applying the glossary. + * If the input file extension is txt or html, glossary_error_file will be + * generated that contains error details. glossary_error_file has format of + * gs://translation_test/a_b_c_'trg'_glossary_errors.[extension] + *+ * + *
.google.cloud.translation.v3beta1.GcsDestination gcs_destination = 1;
+ */
+ public com.google.cloud.translate.v3beta1.GcsDestinationOrBuilder getGcsDestinationOrBuilder() {
+ if (destinationCase_ == 1) {
+ return (com.google.cloud.translate.v3beta1.GcsDestination) destination_;
+ }
+ return com.google.cloud.translate.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.OutputConfig)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.translate.v3beta1.OutputConfig other =
+ (com.google.cloud.translate.v3beta1.OutputConfig) 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.v3beta1.OutputConfig parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.OutputConfig parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.OutputConfig parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.OutputConfig parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.OutputConfig parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.OutputConfig parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.OutputConfig parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.OutputConfig parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.OutputConfig parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.OutputConfig parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.OutputConfig parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.OutputConfig parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(com.google.cloud.translate.v3beta1.OutputConfig prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ * + * Output configuration. + *+ * + * Protobuf type {@code google.cloud.translation.v3beta1.OutputConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Google Cloud Storage destination for output content. + * For every single input file (for example, gs://a/b/c.[extension]), we + * generate at most 2 * n output files. (n is the # of target_language_codes + * in the BatchTranslateTextRequest). + * Output files (tsv) generated are compliant with RFC 4180 except that + * record delimiters are '\n' instead of '\r\n'. We don't provide any way to + * change record delimiters. + * While the input files are being processed, we write/update an index file + * 'index.csv' under 'output_uri_prefix' (for example, + * gs://translation-test/index.csv) The index file is generated/updated as + * new files are being translated. The format is: + * input_file,target_language_code,translations_file,errors_file, + * glossary_translations_file,glossary_errors_file + * input_file is one file we matched using gcs_source.input_uri. + * target_language_code is provided in the request. + * translations_file contains the translations. (details provided below) + * errors_file contains the errors during processing of the file. (details + * below). Both translations_file and errors_file could be empty + * strings if we have no content to output. + * glossary_translations_file,glossary_errors_file are always empty string + * if input_file is tsv. 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). + * The format of translations_file (for target language code 'trg') is: + * gs://translation_test/a_b_c_'trg'_translations.[extension] + * If the input file extension is tsv, the output has the following + * columns: + * Column 1: ID of the request provided in the input, if it's not + * provided in the input, then the input row number is used (0-based). + * Column 2: source sentence. + * Column 3: translation without applying a glossary. Empty string if there + * is an error. + * Column 4 (only present if a glossary is provided in the request): + * translation after applying the glossary. Empty string if there is an + * error applying the glossary. Could be same string as column 3 if there is + * no glossary applied. + * If input file extension is a txt or html, the translation is directly + * written to the output file. If glossary is requested, a separate + * glossary_translations_file has format of + * gs://translation_test/a_b_c_'trg'_glossary_translations.[extension] + * The format of errors file (for target language code 'trg') is: + * gs://translation_test/a_b_c_'trg'_errors.[extension] + * If the input file extension is tsv, errors_file has the + * following Column 1: ID of the request provided in the input, if it's not + * provided in the input, then the input row number is used (0-based). + * Column 2: source sentence. + * Column 3: Error detail for the translation. Could be empty. + * Column 4 (only present if a glossary is provided in the request): + * Error when applying the glossary. + * If the input file extension is txt or html, glossary_error_file will be + * generated that contains error details. glossary_error_file has format of + * gs://translation_test/a_b_c_'trg'_glossary_errors.[extension] + *+ * + *
.google.cloud.translation.v3beta1.GcsDestination gcs_destination = 1;
+ */
+ public boolean hasGcsDestination() {
+ return destinationCase_ == 1;
+ }
+ /**
+ *
+ *
+ * + * Google Cloud Storage destination for output content. + * For every single input file (for example, gs://a/b/c.[extension]), we + * generate at most 2 * n output files. (n is the # of target_language_codes + * in the BatchTranslateTextRequest). + * Output files (tsv) generated are compliant with RFC 4180 except that + * record delimiters are '\n' instead of '\r\n'. We don't provide any way to + * change record delimiters. + * While the input files are being processed, we write/update an index file + * 'index.csv' under 'output_uri_prefix' (for example, + * gs://translation-test/index.csv) The index file is generated/updated as + * new files are being translated. The format is: + * input_file,target_language_code,translations_file,errors_file, + * glossary_translations_file,glossary_errors_file + * input_file is one file we matched using gcs_source.input_uri. + * target_language_code is provided in the request. + * translations_file contains the translations. (details provided below) + * errors_file contains the errors during processing of the file. (details + * below). Both translations_file and errors_file could be empty + * strings if we have no content to output. + * glossary_translations_file,glossary_errors_file are always empty string + * if input_file is tsv. 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). + * The format of translations_file (for target language code 'trg') is: + * gs://translation_test/a_b_c_'trg'_translations.[extension] + * If the input file extension is tsv, the output has the following + * columns: + * Column 1: ID of the request provided in the input, if it's not + * provided in the input, then the input row number is used (0-based). + * Column 2: source sentence. + * Column 3: translation without applying a glossary. Empty string if there + * is an error. + * Column 4 (only present if a glossary is provided in the request): + * translation after applying the glossary. Empty string if there is an + * error applying the glossary. Could be same string as column 3 if there is + * no glossary applied. + * If input file extension is a txt or html, the translation is directly + * written to the output file. If glossary is requested, a separate + * glossary_translations_file has format of + * gs://translation_test/a_b_c_'trg'_glossary_translations.[extension] + * The format of errors file (for target language code 'trg') is: + * gs://translation_test/a_b_c_'trg'_errors.[extension] + * If the input file extension is tsv, errors_file has the + * following Column 1: ID of the request provided in the input, if it's not + * provided in the input, then the input row number is used (0-based). + * Column 2: source sentence. + * Column 3: Error detail for the translation. Could be empty. + * Column 4 (only present if a glossary is provided in the request): + * Error when applying the glossary. + * If the input file extension is txt or html, glossary_error_file will be + * generated that contains error details. glossary_error_file has format of + * gs://translation_test/a_b_c_'trg'_glossary_errors.[extension] + *+ * + *
.google.cloud.translation.v3beta1.GcsDestination gcs_destination = 1;
+ */
+ public com.google.cloud.translate.v3beta1.GcsDestination getGcsDestination() {
+ if (gcsDestinationBuilder_ == null) {
+ if (destinationCase_ == 1) {
+ return (com.google.cloud.translate.v3beta1.GcsDestination) destination_;
+ }
+ return com.google.cloud.translate.v3beta1.GcsDestination.getDefaultInstance();
+ } else {
+ if (destinationCase_ == 1) {
+ return gcsDestinationBuilder_.getMessage();
+ }
+ return com.google.cloud.translate.v3beta1.GcsDestination.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ * + * Google Cloud Storage destination for output content. + * For every single input file (for example, gs://a/b/c.[extension]), we + * generate at most 2 * n output files. (n is the # of target_language_codes + * in the BatchTranslateTextRequest). + * Output files (tsv) generated are compliant with RFC 4180 except that + * record delimiters are '\n' instead of '\r\n'. We don't provide any way to + * change record delimiters. + * While the input files are being processed, we write/update an index file + * 'index.csv' under 'output_uri_prefix' (for example, + * gs://translation-test/index.csv) The index file is generated/updated as + * new files are being translated. The format is: + * input_file,target_language_code,translations_file,errors_file, + * glossary_translations_file,glossary_errors_file + * input_file is one file we matched using gcs_source.input_uri. + * target_language_code is provided in the request. + * translations_file contains the translations. (details provided below) + * errors_file contains the errors during processing of the file. (details + * below). Both translations_file and errors_file could be empty + * strings if we have no content to output. + * glossary_translations_file,glossary_errors_file are always empty string + * if input_file is tsv. 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). + * The format of translations_file (for target language code 'trg') is: + * gs://translation_test/a_b_c_'trg'_translations.[extension] + * If the input file extension is tsv, the output has the following + * columns: + * Column 1: ID of the request provided in the input, if it's not + * provided in the input, then the input row number is used (0-based). + * Column 2: source sentence. + * Column 3: translation without applying a glossary. Empty string if there + * is an error. + * Column 4 (only present if a glossary is provided in the request): + * translation after applying the glossary. Empty string if there is an + * error applying the glossary. Could be same string as column 3 if there is + * no glossary applied. + * If input file extension is a txt or html, the translation is directly + * written to the output file. If glossary is requested, a separate + * glossary_translations_file has format of + * gs://translation_test/a_b_c_'trg'_glossary_translations.[extension] + * The format of errors file (for target language code 'trg') is: + * gs://translation_test/a_b_c_'trg'_errors.[extension] + * If the input file extension is tsv, errors_file has the + * following Column 1: ID of the request provided in the input, if it's not + * provided in the input, then the input row number is used (0-based). + * Column 2: source sentence. + * Column 3: Error detail for the translation. Could be empty. + * Column 4 (only present if a glossary is provided in the request): + * Error when applying the glossary. + * If the input file extension is txt or html, glossary_error_file will be + * generated that contains error details. glossary_error_file has format of + * gs://translation_test/a_b_c_'trg'_glossary_errors.[extension] + *+ * + *
.google.cloud.translation.v3beta1.GcsDestination gcs_destination = 1;
+ */
+ public Builder setGcsDestination(com.google.cloud.translate.v3beta1.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 file (for example, gs://a/b/c.[extension]), we + * generate at most 2 * n output files. (n is the # of target_language_codes + * in the BatchTranslateTextRequest). + * Output files (tsv) generated are compliant with RFC 4180 except that + * record delimiters are '\n' instead of '\r\n'. We don't provide any way to + * change record delimiters. + * While the input files are being processed, we write/update an index file + * 'index.csv' under 'output_uri_prefix' (for example, + * gs://translation-test/index.csv) The index file is generated/updated as + * new files are being translated. The format is: + * input_file,target_language_code,translations_file,errors_file, + * glossary_translations_file,glossary_errors_file + * input_file is one file we matched using gcs_source.input_uri. + * target_language_code is provided in the request. + * translations_file contains the translations. (details provided below) + * errors_file contains the errors during processing of the file. (details + * below). Both translations_file and errors_file could be empty + * strings if we have no content to output. + * glossary_translations_file,glossary_errors_file are always empty string + * if input_file is tsv. 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). + * The format of translations_file (for target language code 'trg') is: + * gs://translation_test/a_b_c_'trg'_translations.[extension] + * If the input file extension is tsv, the output has the following + * columns: + * Column 1: ID of the request provided in the input, if it's not + * provided in the input, then the input row number is used (0-based). + * Column 2: source sentence. + * Column 3: translation without applying a glossary. Empty string if there + * is an error. + * Column 4 (only present if a glossary is provided in the request): + * translation after applying the glossary. Empty string if there is an + * error applying the glossary. Could be same string as column 3 if there is + * no glossary applied. + * If input file extension is a txt or html, the translation is directly + * written to the output file. If glossary is requested, a separate + * glossary_translations_file has format of + * gs://translation_test/a_b_c_'trg'_glossary_translations.[extension] + * The format of errors file (for target language code 'trg') is: + * gs://translation_test/a_b_c_'trg'_errors.[extension] + * If the input file extension is tsv, errors_file has the + * following Column 1: ID of the request provided in the input, if it's not + * provided in the input, then the input row number is used (0-based). + * Column 2: source sentence. + * Column 3: Error detail for the translation. Could be empty. + * Column 4 (only present if a glossary is provided in the request): + * Error when applying the glossary. + * If the input file extension is txt or html, glossary_error_file will be + * generated that contains error details. glossary_error_file has format of + * gs://translation_test/a_b_c_'trg'_glossary_errors.[extension] + *+ * + *
.google.cloud.translation.v3beta1.GcsDestination gcs_destination = 1;
+ */
+ public Builder setGcsDestination(
+ com.google.cloud.translate.v3beta1.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 file (for example, gs://a/b/c.[extension]), we + * generate at most 2 * n output files. (n is the # of target_language_codes + * in the BatchTranslateTextRequest). + * Output files (tsv) generated are compliant with RFC 4180 except that + * record delimiters are '\n' instead of '\r\n'. We don't provide any way to + * change record delimiters. + * While the input files are being processed, we write/update an index file + * 'index.csv' under 'output_uri_prefix' (for example, + * gs://translation-test/index.csv) The index file is generated/updated as + * new files are being translated. The format is: + * input_file,target_language_code,translations_file,errors_file, + * glossary_translations_file,glossary_errors_file + * input_file is one file we matched using gcs_source.input_uri. + * target_language_code is provided in the request. + * translations_file contains the translations. (details provided below) + * errors_file contains the errors during processing of the file. (details + * below). Both translations_file and errors_file could be empty + * strings if we have no content to output. + * glossary_translations_file,glossary_errors_file are always empty string + * if input_file is tsv. 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). + * The format of translations_file (for target language code 'trg') is: + * gs://translation_test/a_b_c_'trg'_translations.[extension] + * If the input file extension is tsv, the output has the following + * columns: + * Column 1: ID of the request provided in the input, if it's not + * provided in the input, then the input row number is used (0-based). + * Column 2: source sentence. + * Column 3: translation without applying a glossary. Empty string if there + * is an error. + * Column 4 (only present if a glossary is provided in the request): + * translation after applying the glossary. Empty string if there is an + * error applying the glossary. Could be same string as column 3 if there is + * no glossary applied. + * If input file extension is a txt or html, the translation is directly + * written to the output file. If glossary is requested, a separate + * glossary_translations_file has format of + * gs://translation_test/a_b_c_'trg'_glossary_translations.[extension] + * The format of errors file (for target language code 'trg') is: + * gs://translation_test/a_b_c_'trg'_errors.[extension] + * If the input file extension is tsv, errors_file has the + * following Column 1: ID of the request provided in the input, if it's not + * provided in the input, then the input row number is used (0-based). + * Column 2: source sentence. + * Column 3: Error detail for the translation. Could be empty. + * Column 4 (only present if a glossary is provided in the request): + * Error when applying the glossary. + * If the input file extension is txt or html, glossary_error_file will be + * generated that contains error details. glossary_error_file has format of + * gs://translation_test/a_b_c_'trg'_glossary_errors.[extension] + *+ * + *
.google.cloud.translation.v3beta1.GcsDestination gcs_destination = 1;
+ */
+ public Builder mergeGcsDestination(com.google.cloud.translate.v3beta1.GcsDestination value) {
+ if (gcsDestinationBuilder_ == null) {
+ if (destinationCase_ == 1
+ && destination_
+ != com.google.cloud.translate.v3beta1.GcsDestination.getDefaultInstance()) {
+ destination_ =
+ com.google.cloud.translate.v3beta1.GcsDestination.newBuilder(
+ (com.google.cloud.translate.v3beta1.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 file (for example, gs://a/b/c.[extension]), we + * generate at most 2 * n output files. (n is the # of target_language_codes + * in the BatchTranslateTextRequest). + * Output files (tsv) generated are compliant with RFC 4180 except that + * record delimiters are '\n' instead of '\r\n'. We don't provide any way to + * change record delimiters. + * While the input files are being processed, we write/update an index file + * 'index.csv' under 'output_uri_prefix' (for example, + * gs://translation-test/index.csv) The index file is generated/updated as + * new files are being translated. The format is: + * input_file,target_language_code,translations_file,errors_file, + * glossary_translations_file,glossary_errors_file + * input_file is one file we matched using gcs_source.input_uri. + * target_language_code is provided in the request. + * translations_file contains the translations. (details provided below) + * errors_file contains the errors during processing of the file. (details + * below). Both translations_file and errors_file could be empty + * strings if we have no content to output. + * glossary_translations_file,glossary_errors_file are always empty string + * if input_file is tsv. 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). + * The format of translations_file (for target language code 'trg') is: + * gs://translation_test/a_b_c_'trg'_translations.[extension] + * If the input file extension is tsv, the output has the following + * columns: + * Column 1: ID of the request provided in the input, if it's not + * provided in the input, then the input row number is used (0-based). + * Column 2: source sentence. + * Column 3: translation without applying a glossary. Empty string if there + * is an error. + * Column 4 (only present if a glossary is provided in the request): + * translation after applying the glossary. Empty string if there is an + * error applying the glossary. Could be same string as column 3 if there is + * no glossary applied. + * If input file extension is a txt or html, the translation is directly + * written to the output file. If glossary is requested, a separate + * glossary_translations_file has format of + * gs://translation_test/a_b_c_'trg'_glossary_translations.[extension] + * The format of errors file (for target language code 'trg') is: + * gs://translation_test/a_b_c_'trg'_errors.[extension] + * If the input file extension is tsv, errors_file has the + * following Column 1: ID of the request provided in the input, if it's not + * provided in the input, then the input row number is used (0-based). + * Column 2: source sentence. + * Column 3: Error detail for the translation. Could be empty. + * Column 4 (only present if a glossary is provided in the request): + * Error when applying the glossary. + * If the input file extension is txt or html, glossary_error_file will be + * generated that contains error details. glossary_error_file has format of + * gs://translation_test/a_b_c_'trg'_glossary_errors.[extension] + *+ * + *
.google.cloud.translation.v3beta1.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 file (for example, gs://a/b/c.[extension]), we + * generate at most 2 * n output files. (n is the # of target_language_codes + * in the BatchTranslateTextRequest). + * Output files (tsv) generated are compliant with RFC 4180 except that + * record delimiters are '\n' instead of '\r\n'. We don't provide any way to + * change record delimiters. + * While the input files are being processed, we write/update an index file + * 'index.csv' under 'output_uri_prefix' (for example, + * gs://translation-test/index.csv) The index file is generated/updated as + * new files are being translated. The format is: + * input_file,target_language_code,translations_file,errors_file, + * glossary_translations_file,glossary_errors_file + * input_file is one file we matched using gcs_source.input_uri. + * target_language_code is provided in the request. + * translations_file contains the translations. (details provided below) + * errors_file contains the errors during processing of the file. (details + * below). Both translations_file and errors_file could be empty + * strings if we have no content to output. + * glossary_translations_file,glossary_errors_file are always empty string + * if input_file is tsv. 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). + * The format of translations_file (for target language code 'trg') is: + * gs://translation_test/a_b_c_'trg'_translations.[extension] + * If the input file extension is tsv, the output has the following + * columns: + * Column 1: ID of the request provided in the input, if it's not + * provided in the input, then the input row number is used (0-based). + * Column 2: source sentence. + * Column 3: translation without applying a glossary. Empty string if there + * is an error. + * Column 4 (only present if a glossary is provided in the request): + * translation after applying the glossary. Empty string if there is an + * error applying the glossary. Could be same string as column 3 if there is + * no glossary applied. + * If input file extension is a txt or html, the translation is directly + * written to the output file. If glossary is requested, a separate + * glossary_translations_file has format of + * gs://translation_test/a_b_c_'trg'_glossary_translations.[extension] + * The format of errors file (for target language code 'trg') is: + * gs://translation_test/a_b_c_'trg'_errors.[extension] + * If the input file extension is tsv, errors_file has the + * following Column 1: ID of the request provided in the input, if it's not + * provided in the input, then the input row number is used (0-based). + * Column 2: source sentence. + * Column 3: Error detail for the translation. Could be empty. + * Column 4 (only present if a glossary is provided in the request): + * Error when applying the glossary. + * If the input file extension is txt or html, glossary_error_file will be + * generated that contains error details. glossary_error_file has format of + * gs://translation_test/a_b_c_'trg'_glossary_errors.[extension] + *+ * + *
.google.cloud.translation.v3beta1.GcsDestination gcs_destination = 1;
+ */
+ public com.google.cloud.translate.v3beta1.GcsDestination.Builder getGcsDestinationBuilder() {
+ return getGcsDestinationFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Google Cloud Storage destination for output content. + * For every single input file (for example, gs://a/b/c.[extension]), we + * generate at most 2 * n output files. (n is the # of target_language_codes + * in the BatchTranslateTextRequest). + * Output files (tsv) generated are compliant with RFC 4180 except that + * record delimiters are '\n' instead of '\r\n'. We don't provide any way to + * change record delimiters. + * While the input files are being processed, we write/update an index file + * 'index.csv' under 'output_uri_prefix' (for example, + * gs://translation-test/index.csv) The index file is generated/updated as + * new files are being translated. The format is: + * input_file,target_language_code,translations_file,errors_file, + * glossary_translations_file,glossary_errors_file + * input_file is one file we matched using gcs_source.input_uri. + * target_language_code is provided in the request. + * translations_file contains the translations. (details provided below) + * errors_file contains the errors during processing of the file. (details + * below). Both translations_file and errors_file could be empty + * strings if we have no content to output. + * glossary_translations_file,glossary_errors_file are always empty string + * if input_file is tsv. 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). + * The format of translations_file (for target language code 'trg') is: + * gs://translation_test/a_b_c_'trg'_translations.[extension] + * If the input file extension is tsv, the output has the following + * columns: + * Column 1: ID of the request provided in the input, if it's not + * provided in the input, then the input row number is used (0-based). + * Column 2: source sentence. + * Column 3: translation without applying a glossary. Empty string if there + * is an error. + * Column 4 (only present if a glossary is provided in the request): + * translation after applying the glossary. Empty string if there is an + * error applying the glossary. Could be same string as column 3 if there is + * no glossary applied. + * If input file extension is a txt or html, the translation is directly + * written to the output file. If glossary is requested, a separate + * glossary_translations_file has format of + * gs://translation_test/a_b_c_'trg'_glossary_translations.[extension] + * The format of errors file (for target language code 'trg') is: + * gs://translation_test/a_b_c_'trg'_errors.[extension] + * If the input file extension is tsv, errors_file has the + * following Column 1: ID of the request provided in the input, if it's not + * provided in the input, then the input row number is used (0-based). + * Column 2: source sentence. + * Column 3: Error detail for the translation. Could be empty. + * Column 4 (only present if a glossary is provided in the request): + * Error when applying the glossary. + * If the input file extension is txt or html, glossary_error_file will be + * generated that contains error details. glossary_error_file has format of + * gs://translation_test/a_b_c_'trg'_glossary_errors.[extension] + *+ * + *
.google.cloud.translation.v3beta1.GcsDestination gcs_destination = 1;
+ */
+ public com.google.cloud.translate.v3beta1.GcsDestinationOrBuilder getGcsDestinationOrBuilder() {
+ if ((destinationCase_ == 1) && (gcsDestinationBuilder_ != null)) {
+ return gcsDestinationBuilder_.getMessageOrBuilder();
+ } else {
+ if (destinationCase_ == 1) {
+ return (com.google.cloud.translate.v3beta1.GcsDestination) destination_;
+ }
+ return com.google.cloud.translate.v3beta1.GcsDestination.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ * + * Google Cloud Storage destination for output content. + * For every single input file (for example, gs://a/b/c.[extension]), we + * generate at most 2 * n output files. (n is the # of target_language_codes + * in the BatchTranslateTextRequest). + * Output files (tsv) generated are compliant with RFC 4180 except that + * record delimiters are '\n' instead of '\r\n'. We don't provide any way to + * change record delimiters. + * While the input files are being processed, we write/update an index file + * 'index.csv' under 'output_uri_prefix' (for example, + * gs://translation-test/index.csv) The index file is generated/updated as + * new files are being translated. The format is: + * input_file,target_language_code,translations_file,errors_file, + * glossary_translations_file,glossary_errors_file + * input_file is one file we matched using gcs_source.input_uri. + * target_language_code is provided in the request. + * translations_file contains the translations. (details provided below) + * errors_file contains the errors during processing of the file. (details + * below). Both translations_file and errors_file could be empty + * strings if we have no content to output. + * glossary_translations_file,glossary_errors_file are always empty string + * if input_file is tsv. 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). + * The format of translations_file (for target language code 'trg') is: + * gs://translation_test/a_b_c_'trg'_translations.[extension] + * If the input file extension is tsv, the output has the following + * columns: + * Column 1: ID of the request provided in the input, if it's not + * provided in the input, then the input row number is used (0-based). + * Column 2: source sentence. + * Column 3: translation without applying a glossary. Empty string if there + * is an error. + * Column 4 (only present if a glossary is provided in the request): + * translation after applying the glossary. Empty string if there is an + * error applying the glossary. Could be same string as column 3 if there is + * no glossary applied. + * If input file extension is a txt or html, the translation is directly + * written to the output file. If glossary is requested, a separate + * glossary_translations_file has format of + * gs://translation_test/a_b_c_'trg'_glossary_translations.[extension] + * The format of errors file (for target language code 'trg') is: + * gs://translation_test/a_b_c_'trg'_errors.[extension] + * If the input file extension is tsv, errors_file has the + * following Column 1: ID of the request provided in the input, if it's not + * provided in the input, then the input row number is used (0-based). + * Column 2: source sentence. + * Column 3: Error detail for the translation. Could be empty. + * Column 4 (only present if a glossary is provided in the request): + * Error when applying the glossary. + * If the input file extension is txt or html, glossary_error_file will be + * generated that contains error details. glossary_error_file has format of + * gs://translation_test/a_b_c_'trg'_glossary_errors.[extension] + *+ * + *
.google.cloud.translation.v3beta1.GcsDestination gcs_destination = 1;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.translate.v3beta1.GcsDestination,
+ com.google.cloud.translate.v3beta1.GcsDestination.Builder,
+ com.google.cloud.translate.v3beta1.GcsDestinationOrBuilder>
+ getGcsDestinationFieldBuilder() {
+ if (gcsDestinationBuilder_ == null) {
+ if (!(destinationCase_ == 1)) {
+ destination_ = com.google.cloud.translate.v3beta1.GcsDestination.getDefaultInstance();
+ }
+ gcsDestinationBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.translate.v3beta1.GcsDestination,
+ com.google.cloud.translate.v3beta1.GcsDestination.Builder,
+ com.google.cloud.translate.v3beta1.GcsDestinationOrBuilder>(
+ (com.google.cloud.translate.v3beta1.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.v3beta1.OutputConfig)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.OutputConfig)
+ private static final com.google.cloud.translate.v3beta1.OutputConfig DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.translate.v3beta1.OutputConfig();
+ }
+
+ public static com.google.cloud.translate.v3beta1.OutputConfig getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Google Cloud Storage destination for output content. + * For every single input file (for example, gs://a/b/c.[extension]), we + * generate at most 2 * n output files. (n is the # of target_language_codes + * in the BatchTranslateTextRequest). + * Output files (tsv) generated are compliant with RFC 4180 except that + * record delimiters are '\n' instead of '\r\n'. We don't provide any way to + * change record delimiters. + * While the input files are being processed, we write/update an index file + * 'index.csv' under 'output_uri_prefix' (for example, + * gs://translation-test/index.csv) The index file is generated/updated as + * new files are being translated. The format is: + * input_file,target_language_code,translations_file,errors_file, + * glossary_translations_file,glossary_errors_file + * input_file is one file we matched using gcs_source.input_uri. + * target_language_code is provided in the request. + * translations_file contains the translations. (details provided below) + * errors_file contains the errors during processing of the file. (details + * below). Both translations_file and errors_file could be empty + * strings if we have no content to output. + * glossary_translations_file,glossary_errors_file are always empty string + * if input_file is tsv. 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). + * The format of translations_file (for target language code 'trg') is: + * gs://translation_test/a_b_c_'trg'_translations.[extension] + * If the input file extension is tsv, the output has the following + * columns: + * Column 1: ID of the request provided in the input, if it's not + * provided in the input, then the input row number is used (0-based). + * Column 2: source sentence. + * Column 3: translation without applying a glossary. Empty string if there + * is an error. + * Column 4 (only present if a glossary is provided in the request): + * translation after applying the glossary. Empty string if there is an + * error applying the glossary. Could be same string as column 3 if there is + * no glossary applied. + * If input file extension is a txt or html, the translation is directly + * written to the output file. If glossary is requested, a separate + * glossary_translations_file has format of + * gs://translation_test/a_b_c_'trg'_glossary_translations.[extension] + * The format of errors file (for target language code 'trg') is: + * gs://translation_test/a_b_c_'trg'_errors.[extension] + * If the input file extension is tsv, errors_file has the + * following Column 1: ID of the request provided in the input, if it's not + * provided in the input, then the input row number is used (0-based). + * Column 2: source sentence. + * Column 3: Error detail for the translation. Could be empty. + * Column 4 (only present if a glossary is provided in the request): + * Error when applying the glossary. + * If the input file extension is txt or html, glossary_error_file will be + * generated that contains error details. glossary_error_file has format of + * gs://translation_test/a_b_c_'trg'_glossary_errors.[extension] + *+ * + *
.google.cloud.translation.v3beta1.GcsDestination gcs_destination = 1;
+ */
+ boolean hasGcsDestination();
+ /**
+ *
+ *
+ * + * Google Cloud Storage destination for output content. + * For every single input file (for example, gs://a/b/c.[extension]), we + * generate at most 2 * n output files. (n is the # of target_language_codes + * in the BatchTranslateTextRequest). + * Output files (tsv) generated are compliant with RFC 4180 except that + * record delimiters are '\n' instead of '\r\n'. We don't provide any way to + * change record delimiters. + * While the input files are being processed, we write/update an index file + * 'index.csv' under 'output_uri_prefix' (for example, + * gs://translation-test/index.csv) The index file is generated/updated as + * new files are being translated. The format is: + * input_file,target_language_code,translations_file,errors_file, + * glossary_translations_file,glossary_errors_file + * input_file is one file we matched using gcs_source.input_uri. + * target_language_code is provided in the request. + * translations_file contains the translations. (details provided below) + * errors_file contains the errors during processing of the file. (details + * below). Both translations_file and errors_file could be empty + * strings if we have no content to output. + * glossary_translations_file,glossary_errors_file are always empty string + * if input_file is tsv. 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). + * The format of translations_file (for target language code 'trg') is: + * gs://translation_test/a_b_c_'trg'_translations.[extension] + * If the input file extension is tsv, the output has the following + * columns: + * Column 1: ID of the request provided in the input, if it's not + * provided in the input, then the input row number is used (0-based). + * Column 2: source sentence. + * Column 3: translation without applying a glossary. Empty string if there + * is an error. + * Column 4 (only present if a glossary is provided in the request): + * translation after applying the glossary. Empty string if there is an + * error applying the glossary. Could be same string as column 3 if there is + * no glossary applied. + * If input file extension is a txt or html, the translation is directly + * written to the output file. If glossary is requested, a separate + * glossary_translations_file has format of + * gs://translation_test/a_b_c_'trg'_glossary_translations.[extension] + * The format of errors file (for target language code 'trg') is: + * gs://translation_test/a_b_c_'trg'_errors.[extension] + * If the input file extension is tsv, errors_file has the + * following Column 1: ID of the request provided in the input, if it's not + * provided in the input, then the input row number is used (0-based). + * Column 2: source sentence. + * Column 3: Error detail for the translation. Could be empty. + * Column 4 (only present if a glossary is provided in the request): + * Error when applying the glossary. + * If the input file extension is txt or html, glossary_error_file will be + * generated that contains error details. glossary_error_file has format of + * gs://translation_test/a_b_c_'trg'_glossary_errors.[extension] + *+ * + *
.google.cloud.translation.v3beta1.GcsDestination gcs_destination = 1;
+ */
+ com.google.cloud.translate.v3beta1.GcsDestination getGcsDestination();
+ /**
+ *
+ *
+ * + * Google Cloud Storage destination for output content. + * For every single input file (for example, gs://a/b/c.[extension]), we + * generate at most 2 * n output files. (n is the # of target_language_codes + * in the BatchTranslateTextRequest). + * Output files (tsv) generated are compliant with RFC 4180 except that + * record delimiters are '\n' instead of '\r\n'. We don't provide any way to + * change record delimiters. + * While the input files are being processed, we write/update an index file + * 'index.csv' under 'output_uri_prefix' (for example, + * gs://translation-test/index.csv) The index file is generated/updated as + * new files are being translated. The format is: + * input_file,target_language_code,translations_file,errors_file, + * glossary_translations_file,glossary_errors_file + * input_file is one file we matched using gcs_source.input_uri. + * target_language_code is provided in the request. + * translations_file contains the translations. (details provided below) + * errors_file contains the errors during processing of the file. (details + * below). Both translations_file and errors_file could be empty + * strings if we have no content to output. + * glossary_translations_file,glossary_errors_file are always empty string + * if input_file is tsv. 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). + * The format of translations_file (for target language code 'trg') is: + * gs://translation_test/a_b_c_'trg'_translations.[extension] + * If the input file extension is tsv, the output has the following + * columns: + * Column 1: ID of the request provided in the input, if it's not + * provided in the input, then the input row number is used (0-based). + * Column 2: source sentence. + * Column 3: translation without applying a glossary. Empty string if there + * is an error. + * Column 4 (only present if a glossary is provided in the request): + * translation after applying the glossary. Empty string if there is an + * error applying the glossary. Could be same string as column 3 if there is + * no glossary applied. + * If input file extension is a txt or html, the translation is directly + * written to the output file. If glossary is requested, a separate + * glossary_translations_file has format of + * gs://translation_test/a_b_c_'trg'_glossary_translations.[extension] + * The format of errors file (for target language code 'trg') is: + * gs://translation_test/a_b_c_'trg'_errors.[extension] + * If the input file extension is tsv, errors_file has the + * following Column 1: ID of the request provided in the input, if it's not + * provided in the input, then the input row number is used (0-based). + * Column 2: source sentence. + * Column 3: Error detail for the translation. Could be empty. + * Column 4 (only present if a glossary is provided in the request): + * Error when applying the glossary. + * If the input file extension is txt or html, glossary_error_file will be + * generated that contains error details. glossary_error_file has format of + * gs://translation_test/a_b_c_'trg'_glossary_errors.[extension] + *+ * + *
.google.cloud.translation.v3beta1.GcsDestination gcs_destination = 1;
+ */
+ com.google.cloud.translate.v3beta1.GcsDestinationOrBuilder getGcsDestinationOrBuilder();
+
+ public com.google.cloud.translate.v3beta1.OutputConfig.DestinationCase getDestinationCase();
+}
diff --git a/google-api-grpc/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/SupportedLanguage.java b/google-api-grpc/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/SupportedLanguage.java
new file mode 100644
index 000000000000..3a2f6c42fd4d
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/SupportedLanguage.java
@@ -0,0 +1,947 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/translate/v3beta1/translation_service.proto
+
+package com.google.cloud.translate.v3beta1;
+
+/**
+ *
+ *
+ * + * A single supported language response corresponds to information related + * to one supported language. + *+ * + * Protobuf type {@code google.cloud.translation.v3beta1.SupportedLanguage} + */ +public final class SupportedLanguage extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.translation.v3beta1.SupportedLanguage) + SupportedLanguageOrBuilder { + private static final long serialVersionUID = 0L; + // Use SupportedLanguage.newBuilder() to construct. + private SupportedLanguage(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private SupportedLanguage() { + languageCode_ = ""; + displayName_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SupportedLanguage( + 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(); + + languageCode_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 24: + { + supportSource_ = input.readBool(); + break; + } + case 32: + { + supportTarget_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.translate.v3beta1.TranslationServiceProto + .internal_static_google_cloud_translation_v3beta1_SupportedLanguage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.translate.v3beta1.TranslationServiceProto + .internal_static_google_cloud_translation_v3beta1_SupportedLanguage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.translate.v3beta1.SupportedLanguage.class, + com.google.cloud.translate.v3beta1.SupportedLanguage.Builder.class); + } + + public static final int LANGUAGE_CODE_FIELD_NUMBER = 1; + private volatile java.lang.Object languageCode_; + /** + * + * + *
+ * Supported language code, generally consisting of its ISO 639-1 + * identifier, for example, 'en', 'ja'. In certain cases, BCP-47 codes + * including language and region identifiers are returned (for example, + * 'zh-TW' and 'zh-CN') + *+ * + *
string language_code = 1;
+ */
+ public java.lang.String getLanguageCode() {
+ java.lang.Object ref = languageCode_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ languageCode_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Supported language code, generally consisting of its ISO 639-1 + * identifier, for example, 'en', 'ja'. In certain cases, BCP-47 codes + * including language and region identifiers are returned (for example, + * 'zh-TW' and 'zh-CN') + *+ * + *
string language_code = 1;
+ */
+ public com.google.protobuf.ByteString getLanguageCodeBytes() {
+ java.lang.Object ref = languageCode_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ languageCode_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int DISPLAY_NAME_FIELD_NUMBER = 2;
+ private volatile java.lang.Object displayName_;
+ /**
+ *
+ *
+ * + * Human readable name of the language localized in the display language + * specified in the request. + *+ * + *
string display_name = 2;
+ */
+ 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;
+ }
+ }
+ /**
+ *
+ *
+ * + * Human readable name of the language localized in the display language + * specified in the request. + *+ * + *
string display_name = 2;
+ */
+ 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 SUPPORT_SOURCE_FIELD_NUMBER = 3;
+ private boolean supportSource_;
+ /**
+ *
+ *
+ * + * Can be used as source language. + *+ * + *
bool support_source = 3;
+ */
+ public boolean getSupportSource() {
+ return supportSource_;
+ }
+
+ public static final int SUPPORT_TARGET_FIELD_NUMBER = 4;
+ private boolean supportTarget_;
+ /**
+ *
+ *
+ * + * Can be used as target language. + *+ * + *
bool support_target = 4;
+ */
+ public boolean getSupportTarget() {
+ return supportTarget_;
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (!getLanguageCodeBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, languageCode_);
+ }
+ if (!getDisplayNameBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_);
+ }
+ if (supportSource_ != false) {
+ output.writeBool(3, supportSource_);
+ }
+ if (supportTarget_ != false) {
+ output.writeBool(4, supportTarget_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getLanguageCodeBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, languageCode_);
+ }
+ if (!getDisplayNameBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_);
+ }
+ if (supportSource_ != false) {
+ size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, supportSource_);
+ }
+ if (supportTarget_ != false) {
+ size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, supportTarget_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ 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.v3beta1.SupportedLanguage)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.translate.v3beta1.SupportedLanguage other =
+ (com.google.cloud.translate.v3beta1.SupportedLanguage) obj;
+
+ if (!getLanguageCode().equals(other.getLanguageCode())) return false;
+ if (!getDisplayName().equals(other.getDisplayName())) return false;
+ if (getSupportSource() != other.getSupportSource()) return false;
+ if (getSupportTarget() != other.getSupportTarget()) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER;
+ hash = (53 * hash) + getLanguageCode().hashCode();
+ hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER;
+ hash = (53 * hash) + getDisplayName().hashCode();
+ hash = (37 * hash) + SUPPORT_SOURCE_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSupportSource());
+ hash = (37 * hash) + SUPPORT_TARGET_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSupportTarget());
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.translate.v3beta1.SupportedLanguage parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.SupportedLanguage parseFrom(
+ 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.v3beta1.SupportedLanguage parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.SupportedLanguage parseFrom(
+ com.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.v3beta1.SupportedLanguage parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.SupportedLanguage parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.SupportedLanguage parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.SupportedLanguage parseFrom(
+ java.io.InputStream 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.v3beta1.SupportedLanguage parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.SupportedLanguage parseDelimitedFrom(
+ java.io.InputStream 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.v3beta1.SupportedLanguage parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.SupportedLanguage parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, 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.v3beta1.SupportedLanguage prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ * + * A single supported language response corresponds to information related + * to one supported language. + *+ * + * Protobuf type {@code google.cloud.translation.v3beta1.SupportedLanguage} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Supported language code, generally consisting of its ISO 639-1 + * identifier, for example, 'en', 'ja'. In certain cases, BCP-47 codes + * including language and region identifiers are returned (for example, + * 'zh-TW' and 'zh-CN') + *+ * + *
string language_code = 1;
+ */
+ public java.lang.String getLanguageCode() {
+ java.lang.Object ref = languageCode_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ languageCode_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Supported language code, generally consisting of its ISO 639-1 + * identifier, for example, 'en', 'ja'. In certain cases, BCP-47 codes + * including language and region identifiers are returned (for example, + * 'zh-TW' and 'zh-CN') + *+ * + *
string language_code = 1;
+ */
+ public com.google.protobuf.ByteString getLanguageCodeBytes() {
+ java.lang.Object ref = languageCode_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ languageCode_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Supported language code, generally consisting of its ISO 639-1 + * identifier, for example, 'en', 'ja'. In certain cases, BCP-47 codes + * including language and region identifiers are returned (for example, + * 'zh-TW' and 'zh-CN') + *+ * + *
string language_code = 1;
+ */
+ public Builder setLanguageCode(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ languageCode_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Supported language code, generally consisting of its ISO 639-1 + * identifier, for example, 'en', 'ja'. In certain cases, BCP-47 codes + * including language and region identifiers are returned (for example, + * 'zh-TW' and 'zh-CN') + *+ * + *
string language_code = 1;
+ */
+ public Builder clearLanguageCode() {
+
+ languageCode_ = getDefaultInstance().getLanguageCode();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Supported language code, generally consisting of its ISO 639-1 + * identifier, for example, 'en', 'ja'. In certain cases, BCP-47 codes + * including language and region identifiers are returned (for example, + * 'zh-TW' and 'zh-CN') + *+ * + *
string language_code = 1;
+ */
+ public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ languageCode_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object displayName_ = "";
+ /**
+ *
+ *
+ * + * Human readable name of the language localized in the display language + * specified in the request. + *+ * + *
string display_name = 2;
+ */
+ 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;
+ }
+ }
+ /**
+ *
+ *
+ * + * Human readable name of the language localized in the display language + * specified in the request. + *+ * + *
string display_name = 2;
+ */
+ 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;
+ }
+ }
+ /**
+ *
+ *
+ * + * Human readable name of the language localized in the display language + * specified in the request. + *+ * + *
string display_name = 2;
+ */
+ public Builder setDisplayName(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ displayName_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Human readable name of the language localized in the display language + * specified in the request. + *+ * + *
string display_name = 2;
+ */
+ public Builder clearDisplayName() {
+
+ displayName_ = getDefaultInstance().getDisplayName();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Human readable name of the language localized in the display language + * specified in the request. + *+ * + *
string display_name = 2;
+ */
+ public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ displayName_ = value;
+ onChanged();
+ return this;
+ }
+
+ private boolean supportSource_;
+ /**
+ *
+ *
+ * + * Can be used as source language. + *+ * + *
bool support_source = 3;
+ */
+ public boolean getSupportSource() {
+ return supportSource_;
+ }
+ /**
+ *
+ *
+ * + * Can be used as source language. + *+ * + *
bool support_source = 3;
+ */
+ public Builder setSupportSource(boolean value) {
+
+ supportSource_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Can be used as source language. + *+ * + *
bool support_source = 3;
+ */
+ public Builder clearSupportSource() {
+
+ supportSource_ = false;
+ onChanged();
+ return this;
+ }
+
+ private boolean supportTarget_;
+ /**
+ *
+ *
+ * + * Can be used as target language. + *+ * + *
bool support_target = 4;
+ */
+ public boolean getSupportTarget() {
+ return supportTarget_;
+ }
+ /**
+ *
+ *
+ * + * Can be used as target language. + *+ * + *
bool support_target = 4;
+ */
+ public Builder setSupportTarget(boolean value) {
+
+ supportTarget_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Can be used as target language. + *+ * + *
bool support_target = 4;
+ */
+ public Builder clearSupportTarget() {
+
+ supportTarget_ = false;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.translation.v3beta1.SupportedLanguage)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.SupportedLanguage)
+ private static final com.google.cloud.translate.v3beta1.SupportedLanguage DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.translate.v3beta1.SupportedLanguage();
+ }
+
+ public static com.google.cloud.translate.v3beta1.SupportedLanguage getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Supported language code, generally consisting of its ISO 639-1 + * identifier, for example, 'en', 'ja'. In certain cases, BCP-47 codes + * including language and region identifiers are returned (for example, + * 'zh-TW' and 'zh-CN') + *+ * + *
string language_code = 1;
+ */
+ java.lang.String getLanguageCode();
+ /**
+ *
+ *
+ * + * Supported language code, generally consisting of its ISO 639-1 + * identifier, for example, 'en', 'ja'. In certain cases, BCP-47 codes + * including language and region identifiers are returned (for example, + * 'zh-TW' and 'zh-CN') + *+ * + *
string language_code = 1;
+ */
+ com.google.protobuf.ByteString getLanguageCodeBytes();
+
+ /**
+ *
+ *
+ * + * Human readable name of the language localized in the display language + * specified in the request. + *+ * + *
string display_name = 2;
+ */
+ java.lang.String getDisplayName();
+ /**
+ *
+ *
+ * + * Human readable name of the language localized in the display language + * specified in the request. + *+ * + *
string display_name = 2;
+ */
+ com.google.protobuf.ByteString getDisplayNameBytes();
+
+ /**
+ *
+ *
+ * + * Can be used as source language. + *+ * + *
bool support_source = 3;
+ */
+ boolean getSupportSource();
+
+ /**
+ *
+ *
+ * + * Can be used as target language. + *+ * + *
bool support_target = 4;
+ */
+ boolean getSupportTarget();
+}
diff --git a/google-api-grpc/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/SupportedLanguages.java b/google-api-grpc/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/SupportedLanguages.java
new file mode 100644
index 000000000000..788d4ae702d6
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/SupportedLanguages.java
@@ -0,0 +1,959 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/translate/v3beta1/translation_service.proto
+
+package com.google.cloud.translate.v3beta1;
+
+/**
+ *
+ *
+ * + * The response message for discovering supported languages. + *+ * + * Protobuf type {@code google.cloud.translation.v3beta1.SupportedLanguages} + */ +public final class SupportedLanguages extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.translation.v3beta1.SupportedLanguages) + SupportedLanguagesOrBuilder { + private static final long serialVersionUID = 0L; + // Use SupportedLanguages.newBuilder() to construct. + private SupportedLanguages(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private SupportedLanguages() { + languages_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SupportedLanguages( + 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)) { + languages_ = + new java.util.ArrayList
+ * A list of supported language responses. This list contains an entry + * for each language the Translation API supports. + *+ * + *
repeated .google.cloud.translation.v3beta1.SupportedLanguage languages = 1;
+ */
+ public java.util.List+ * A list of supported language responses. This list contains an entry + * for each language the Translation API supports. + *+ * + *
repeated .google.cloud.translation.v3beta1.SupportedLanguage languages = 1;
+ */
+ public java.util.List extends com.google.cloud.translate.v3beta1.SupportedLanguageOrBuilder>
+ getLanguagesOrBuilderList() {
+ return languages_;
+ }
+ /**
+ *
+ *
+ * + * A list of supported language responses. This list contains an entry + * for each language the Translation API supports. + *+ * + *
repeated .google.cloud.translation.v3beta1.SupportedLanguage languages = 1;
+ */
+ public int getLanguagesCount() {
+ return languages_.size();
+ }
+ /**
+ *
+ *
+ * + * A list of supported language responses. This list contains an entry + * for each language the Translation API supports. + *+ * + *
repeated .google.cloud.translation.v3beta1.SupportedLanguage languages = 1;
+ */
+ public com.google.cloud.translate.v3beta1.SupportedLanguage getLanguages(int index) {
+ return languages_.get(index);
+ }
+ /**
+ *
+ *
+ * + * A list of supported language responses. This list contains an entry + * for each language the Translation API supports. + *+ * + *
repeated .google.cloud.translation.v3beta1.SupportedLanguage languages = 1;
+ */
+ public com.google.cloud.translate.v3beta1.SupportedLanguageOrBuilder getLanguagesOrBuilder(
+ int index) {
+ return languages_.get(index);
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ for (int i = 0; i < languages_.size(); i++) {
+ output.writeMessage(1, languages_.get(i));
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ for (int i = 0; i < languages_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, languages_.get(i));
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.translate.v3beta1.SupportedLanguages)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.translate.v3beta1.SupportedLanguages other =
+ (com.google.cloud.translate.v3beta1.SupportedLanguages) obj;
+
+ if (!getLanguagesList().equals(other.getLanguagesList())) return false;
+ if (!unknownFields.equals(other.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 (getLanguagesCount() > 0) {
+ hash = (37 * hash) + LANGUAGES_FIELD_NUMBER;
+ hash = (53 * hash) + getLanguagesList().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.translate.v3beta1.SupportedLanguages parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.SupportedLanguages parseFrom(
+ 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.v3beta1.SupportedLanguages parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.SupportedLanguages parseFrom(
+ com.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.v3beta1.SupportedLanguages parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.SupportedLanguages parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.SupportedLanguages parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.SupportedLanguages parseFrom(
+ java.io.InputStream 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.v3beta1.SupportedLanguages parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.SupportedLanguages parseDelimitedFrom(
+ java.io.InputStream 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.v3beta1.SupportedLanguages parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.SupportedLanguages parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, 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.v3beta1.SupportedLanguages prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new 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 discovering supported languages. + *+ * + * Protobuf type {@code google.cloud.translation.v3beta1.SupportedLanguages} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder