Class AdaptiveMtTranslateRequest

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.translate.v3.AdaptiveMtTranslateRequest
All Implemented Interfaces:
AdaptiveMtTranslateRequestOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

@Generated public final class AdaptiveMtTranslateRequest extends com.google.protobuf.GeneratedMessage implements AdaptiveMtTranslateRequestOrBuilder
 The request for sending an AdaptiveMt translation query.
 
Protobuf type google.cloud.translation.v3.AdaptiveMtTranslateRequest
See Also:
  • Field Details

    • PARENT_FIELD_NUMBER

      public static final int PARENT_FIELD_NUMBER
      See Also:
    • DATASET_FIELD_NUMBER

      public static final int DATASET_FIELD_NUMBER
      See Also:
    • CONTENT_FIELD_NUMBER

      public static final int CONTENT_FIELD_NUMBER
      See Also:
    • MIME_TYPE_FIELD_NUMBER

      public static final int MIME_TYPE_FIELD_NUMBER
      See Also:
    • REFERENCE_SENTENCE_CONFIG_FIELD_NUMBER

      public static final int REFERENCE_SENTENCE_CONFIG_FIELD_NUMBER
      See Also:
    • GLOSSARY_CONFIG_FIELD_NUMBER

      public static final int GLOSSARY_CONFIG_FIELD_NUMBER
      See Also:
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage
    • getParent

      public String getParent()
       Required. Location to make a regional call.
      
       Format: `projects/{project-number-or-id}/locations/{location-id}`.
       
      string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Specified by:
      getParent in interface AdaptiveMtTranslateRequestOrBuilder
      Returns:
      The parent.
    • getParentBytes

      public com.google.protobuf.ByteString getParentBytes()
       Required. Location to make a regional call.
      
       Format: `projects/{project-number-or-id}/locations/{location-id}`.
       
      string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Specified by:
      getParentBytes in interface AdaptiveMtTranslateRequestOrBuilder
      Returns:
      The bytes for parent.
    • getDataset

      public String getDataset()
       Required. The resource name for the dataset to use for adaptive MT.
       `projects/{project}/locations/{location-id}/adaptiveMtDatasets/{dataset}`
       
      string dataset = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Specified by:
      getDataset in interface AdaptiveMtTranslateRequestOrBuilder
      Returns:
      The dataset.
    • getDatasetBytes

      public com.google.protobuf.ByteString getDatasetBytes()
       Required. The resource name for the dataset to use for adaptive MT.
       `projects/{project}/locations/{location-id}/adaptiveMtDatasets/{dataset}`
       
      string dataset = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Specified by:
      getDatasetBytes in interface AdaptiveMtTranslateRequestOrBuilder
      Returns:
      The bytes for dataset.
    • getContentList

      public com.google.protobuf.ProtocolStringList getContentList()
       Required. The content of the input in string format.
       
      repeated string content = 3 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getContentList in interface AdaptiveMtTranslateRequestOrBuilder
      Returns:
      A list containing the content.
    • getContentCount

      public int getContentCount()
       Required. The content of the input in string format.
       
      repeated string content = 3 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getContentCount in interface AdaptiveMtTranslateRequestOrBuilder
      Returns:
      The count of content.
    • getContent

      public String getContent(int index)
       Required. The content of the input in string format.
       
      repeated string content = 3 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getContent in interface AdaptiveMtTranslateRequestOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The content at the given index.
    • getContentBytes

      public com.google.protobuf.ByteString getContentBytes(int index)
       Required. The content of the input in string format.
       
      repeated string content = 3 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getContentBytes in interface AdaptiveMtTranslateRequestOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the content at the given index.
    • getMimeType

      public String getMimeType()
       The format of the source text.
       
      string mime_type = 4;
      Specified by:
      getMimeType in interface AdaptiveMtTranslateRequestOrBuilder
      Returns:
      The mimeType.
    • getMimeTypeBytes

      public com.google.protobuf.ByteString getMimeTypeBytes()
       The format of the source text.
       
      string mime_type = 4;
      Specified by:
      getMimeTypeBytes in interface AdaptiveMtTranslateRequestOrBuilder
      Returns:
      The bytes for mimeType.
    • hasReferenceSentenceConfig

      public boolean hasReferenceSentenceConfig()
       Configuration for caller provided reference sentences.
       
      optional .google.cloud.translation.v3.AdaptiveMtTranslateRequest.ReferenceSentenceConfig reference_sentence_config = 6;
      Specified by:
      hasReferenceSentenceConfig in interface AdaptiveMtTranslateRequestOrBuilder
      Returns:
      Whether the referenceSentenceConfig field is set.
    • getReferenceSentenceConfig

      public AdaptiveMtTranslateRequest.ReferenceSentenceConfig getReferenceSentenceConfig()
       Configuration for caller provided reference sentences.
       
      optional .google.cloud.translation.v3.AdaptiveMtTranslateRequest.ReferenceSentenceConfig reference_sentence_config = 6;
      Specified by:
      getReferenceSentenceConfig in interface AdaptiveMtTranslateRequestOrBuilder
      Returns:
      The referenceSentenceConfig.
    • getReferenceSentenceConfigOrBuilder

      public AdaptiveMtTranslateRequest.ReferenceSentenceConfigOrBuilder getReferenceSentenceConfigOrBuilder()
       Configuration for caller provided reference sentences.
       
      optional .google.cloud.translation.v3.AdaptiveMtTranslateRequest.ReferenceSentenceConfig reference_sentence_config = 6;
      Specified by:
      getReferenceSentenceConfigOrBuilder in interface AdaptiveMtTranslateRequestOrBuilder
    • hasGlossaryConfig

      public boolean hasGlossaryConfig()
       Optional. Glossary to be applied. The glossary must be
       within the same region (have the same location-id) as the model, otherwise
       an INVALID_ARGUMENT (400) error is returned.
       
      optional .google.cloud.translation.v3.AdaptiveMtTranslateRequest.GlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      hasGlossaryConfig in interface AdaptiveMtTranslateRequestOrBuilder
      Returns:
      Whether the glossaryConfig field is set.
    • getGlossaryConfig

      public AdaptiveMtTranslateRequest.GlossaryConfig getGlossaryConfig()
       Optional. Glossary to be applied. The glossary must be
       within the same region (have the same location-id) as the model, otherwise
       an INVALID_ARGUMENT (400) error is returned.
       
      optional .google.cloud.translation.v3.AdaptiveMtTranslateRequest.GlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getGlossaryConfig in interface AdaptiveMtTranslateRequestOrBuilder
      Returns:
      The glossaryConfig.
    • getGlossaryConfigOrBuilder

      public AdaptiveMtTranslateRequest.GlossaryConfigOrBuilder getGlossaryConfigOrBuilder()
       Optional. Glossary to be applied. The glossary must be
       within the same region (have the same location-id) as the model, otherwise
       an INVALID_ARGUMENT (400) error is returned.
       
      optional .google.cloud.translation.v3.AdaptiveMtTranslateRequest.GlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getGlossaryConfigOrBuilder in interface AdaptiveMtTranslateRequestOrBuilder
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static AdaptiveMtTranslateRequest parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static AdaptiveMtTranslateRequest parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static AdaptiveMtTranslateRequest parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static AdaptiveMtTranslateRequest parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static AdaptiveMtTranslateRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static AdaptiveMtTranslateRequest parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static AdaptiveMtTranslateRequest parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static AdaptiveMtTranslateRequest parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static AdaptiveMtTranslateRequest parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static AdaptiveMtTranslateRequest parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static AdaptiveMtTranslateRequest parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static AdaptiveMtTranslateRequest parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public AdaptiveMtTranslateRequest.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static AdaptiveMtTranslateRequest.Builder newBuilder()
    • newBuilder

      public static AdaptiveMtTranslateRequest.Builder newBuilder(AdaptiveMtTranslateRequest prototype)
    • toBuilder

      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected AdaptiveMtTranslateRequest.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static AdaptiveMtTranslateRequest getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<AdaptiveMtTranslateRequest> parser()
    • getParserForType

      public com.google.protobuf.Parser<AdaptiveMtTranslateRequest> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessage
    • getDefaultInstanceForType

      public AdaptiveMtTranslateRequest getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder