Class RomanizeTextRequest.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<RomanizeTextRequest.Builder>
com.google.cloud.translate.v3.RomanizeTextRequest.Builder
All Implemented Interfaces:
RomanizeTextRequestOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
RomanizeTextRequest

public static final class RomanizeTextRequest.Builder extends com.google.protobuf.GeneratedMessage.Builder<RomanizeTextRequest.Builder> implements RomanizeTextRequestOrBuilder
 The request message for synchronous romanization.
 
Protobuf type google.cloud.translation.v3.RomanizeTextRequest
  • 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.Builder<RomanizeTextRequest.Builder>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<RomanizeTextRequest.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<RomanizeTextRequest.Builder>
    • getDefaultInstanceForType

      public RomanizeTextRequest getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public RomanizeTextRequest build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public RomanizeTextRequest buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public RomanizeTextRequest.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<RomanizeTextRequest.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<RomanizeTextRequest.Builder>
    • mergeFrom

      public RomanizeTextRequest.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<RomanizeTextRequest.Builder>
      Throws:
      IOException
    • getParent

      public String getParent()
       Required. Project or location to make a call. Must refer to a caller's
       project.
      
       Format: `projects/{project-number-or-id}/locations/{location-id}` or
       `projects/{project-number-or-id}`.
      
       For global calls, use `projects/{project-number-or-id}/locations/global` or
       `projects/{project-number-or-id}`.
       
      string parent = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Specified by:
      getParent in interface RomanizeTextRequestOrBuilder
      Returns:
      The parent.
    • getParentBytes

      public com.google.protobuf.ByteString getParentBytes()
       Required. Project or location to make a call. Must refer to a caller's
       project.
      
       Format: `projects/{project-number-or-id}/locations/{location-id}` or
       `projects/{project-number-or-id}`.
      
       For global calls, use `projects/{project-number-or-id}/locations/global` or
       `projects/{project-number-or-id}`.
       
      string parent = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Specified by:
      getParentBytes in interface RomanizeTextRequestOrBuilder
      Returns:
      The bytes for parent.
    • setParent

      public RomanizeTextRequest.Builder setParent(String value)
       Required. Project or location to make a call. Must refer to a caller's
       project.
      
       Format: `projects/{project-number-or-id}/locations/{location-id}` or
       `projects/{project-number-or-id}`.
      
       For global calls, use `projects/{project-number-or-id}/locations/global` or
       `projects/{project-number-or-id}`.
       
      string parent = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Parameters:
      value - The parent to set.
      Returns:
      This builder for chaining.
    • clearParent

      public RomanizeTextRequest.Builder clearParent()
       Required. Project or location to make a call. Must refer to a caller's
       project.
      
       Format: `projects/{project-number-or-id}/locations/{location-id}` or
       `projects/{project-number-or-id}`.
      
       For global calls, use `projects/{project-number-or-id}/locations/global` or
       `projects/{project-number-or-id}`.
       
      string parent = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Returns:
      This builder for chaining.
    • setParentBytes

      public RomanizeTextRequest.Builder setParentBytes(com.google.protobuf.ByteString value)
       Required. Project or location to make a call. Must refer to a caller's
       project.
      
       Format: `projects/{project-number-or-id}/locations/{location-id}` or
       `projects/{project-number-or-id}`.
      
       For global calls, use `projects/{project-number-or-id}/locations/global` or
       `projects/{project-number-or-id}`.
       
      string parent = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Parameters:
      value - The bytes for parent to set.
      Returns:
      This builder for chaining.
    • getContentsList

      public com.google.protobuf.ProtocolStringList getContentsList()
       Required. The content of the input in string format.
       
      repeated string contents = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getContentsList in interface RomanizeTextRequestOrBuilder
      Returns:
      A list containing the contents.
    • getContentsCount

      public int getContentsCount()
       Required. The content of the input in string format.
       
      repeated string contents = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getContentsCount in interface RomanizeTextRequestOrBuilder
      Returns:
      The count of contents.
    • getContents

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

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

      public RomanizeTextRequest.Builder setContents(int index, String value)
       Required. The content of the input in string format.
       
      repeated string contents = 1 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      index - The index to set the value at.
      value - The contents to set.
      Returns:
      This builder for chaining.
    • addContents

      public RomanizeTextRequest.Builder addContents(String value)
       Required. The content of the input in string format.
       
      repeated string contents = 1 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The contents to add.
      Returns:
      This builder for chaining.
    • addAllContents

      public RomanizeTextRequest.Builder addAllContents(Iterable<String> values)
       Required. The content of the input in string format.
       
      repeated string contents = 1 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      values - The contents to add.
      Returns:
      This builder for chaining.
    • clearContents

      public RomanizeTextRequest.Builder clearContents()
       Required. The content of the input in string format.
       
      repeated string contents = 1 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • addContentsBytes

      public RomanizeTextRequest.Builder addContentsBytes(com.google.protobuf.ByteString value)
       Required. The content of the input in string format.
       
      repeated string contents = 1 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The bytes of the contents to add.
      Returns:
      This builder for chaining.
    • getSourceLanguageCode

      public String getSourceLanguageCode()
       Optional. The ISO-639 language code of the input text if
       known, for example, "hi" or "zh". Supported language codes are
       listed in [Language
       Support](https://cloud.google.com/translate/docs/languages#roman). If the
       source language isn't specified, the API attempts to identify the source
       language automatically and returns the source language for each content in
       the response.
       
      string source_language_code = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getSourceLanguageCode in interface RomanizeTextRequestOrBuilder
      Returns:
      The sourceLanguageCode.
    • getSourceLanguageCodeBytes

      public com.google.protobuf.ByteString getSourceLanguageCodeBytes()
       Optional. The ISO-639 language code of the input text if
       known, for example, "hi" or "zh". Supported language codes are
       listed in [Language
       Support](https://cloud.google.com/translate/docs/languages#roman). If the
       source language isn't specified, the API attempts to identify the source
       language automatically and returns the source language for each content in
       the response.
       
      string source_language_code = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getSourceLanguageCodeBytes in interface RomanizeTextRequestOrBuilder
      Returns:
      The bytes for sourceLanguageCode.
    • setSourceLanguageCode

      public RomanizeTextRequest.Builder setSourceLanguageCode(String value)
       Optional. The ISO-639 language code of the input text if
       known, for example, "hi" or "zh". Supported language codes are
       listed in [Language
       Support](https://cloud.google.com/translate/docs/languages#roman). If the
       source language isn't specified, the API attempts to identify the source
       language automatically and returns the source language for each content in
       the response.
       
      string source_language_code = 2 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The sourceLanguageCode to set.
      Returns:
      This builder for chaining.
    • clearSourceLanguageCode

      public RomanizeTextRequest.Builder clearSourceLanguageCode()
       Optional. The ISO-639 language code of the input text if
       known, for example, "hi" or "zh". Supported language codes are
       listed in [Language
       Support](https://cloud.google.com/translate/docs/languages#roman). If the
       source language isn't specified, the API attempts to identify the source
       language automatically and returns the source language for each content in
       the response.
       
      string source_language_code = 2 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • setSourceLanguageCodeBytes

      public RomanizeTextRequest.Builder setSourceLanguageCodeBytes(com.google.protobuf.ByteString value)
       Optional. The ISO-639 language code of the input text if
       known, for example, "hi" or "zh". Supported language codes are
       listed in [Language
       Support](https://cloud.google.com/translate/docs/languages#roman). If the
       source language isn't specified, the API attempts to identify the source
       language automatically and returns the source language for each content in
       the response.
       
      string source_language_code = 2 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The bytes for sourceLanguageCode to set.
      Returns:
      This builder for chaining.