Class TranslateTextResponse.Builder

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

public static final class TranslateTextResponse.Builder extends com.google.protobuf.GeneratedMessage.Builder<TranslateTextResponse.Builder> implements TranslateTextResponseOrBuilder
Protobuf type google.cloud.translation.v3.TranslateTextResponse
  • 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<TranslateTextResponse.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<TranslateTextResponse.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<TranslateTextResponse.Builder>
    • getDefaultInstanceForType

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

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

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

      public TranslateTextResponse.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<TranslateTextResponse.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<TranslateTextResponse.Builder>
    • mergeFrom

      public TranslateTextResponse.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<TranslateTextResponse.Builder>
      Throws:
      IOException
    • getTranslationsList

      public List<Translation> getTranslationsList()
       Text translation responses with no glossary applied.
       This field has the same length as
       [`contents`][google.cloud.translation.v3.TranslateTextRequest.contents].
       
      repeated .google.cloud.translation.v3.Translation translations = 1;
      Specified by:
      getTranslationsList in interface TranslateTextResponseOrBuilder
    • getTranslationsCount

      public int getTranslationsCount()
       Text translation responses with no glossary applied.
       This field has the same length as
       [`contents`][google.cloud.translation.v3.TranslateTextRequest.contents].
       
      repeated .google.cloud.translation.v3.Translation translations = 1;
      Specified by:
      getTranslationsCount in interface TranslateTextResponseOrBuilder
    • getTranslations

      public Translation getTranslations(int index)
       Text translation responses with no glossary applied.
       This field has the same length as
       [`contents`][google.cloud.translation.v3.TranslateTextRequest.contents].
       
      repeated .google.cloud.translation.v3.Translation translations = 1;
      Specified by:
      getTranslations in interface TranslateTextResponseOrBuilder
    • setTranslations

      public TranslateTextResponse.Builder setTranslations(int index, Translation value)
       Text translation responses with no glossary applied.
       This field has the same length as
       [`contents`][google.cloud.translation.v3.TranslateTextRequest.contents].
       
      repeated .google.cloud.translation.v3.Translation translations = 1;
    • setTranslations

      public TranslateTextResponse.Builder setTranslations(int index, Translation.Builder builderForValue)
       Text translation responses with no glossary applied.
       This field has the same length as
       [`contents`][google.cloud.translation.v3.TranslateTextRequest.contents].
       
      repeated .google.cloud.translation.v3.Translation translations = 1;
    • addTranslations

      public TranslateTextResponse.Builder addTranslations(Translation value)
       Text translation responses with no glossary applied.
       This field has the same length as
       [`contents`][google.cloud.translation.v3.TranslateTextRequest.contents].
       
      repeated .google.cloud.translation.v3.Translation translations = 1;
    • addTranslations

      public TranslateTextResponse.Builder addTranslations(int index, Translation value)
       Text translation responses with no glossary applied.
       This field has the same length as
       [`contents`][google.cloud.translation.v3.TranslateTextRequest.contents].
       
      repeated .google.cloud.translation.v3.Translation translations = 1;
    • addTranslations

      public TranslateTextResponse.Builder addTranslations(Translation.Builder builderForValue)
       Text translation responses with no glossary applied.
       This field has the same length as
       [`contents`][google.cloud.translation.v3.TranslateTextRequest.contents].
       
      repeated .google.cloud.translation.v3.Translation translations = 1;
    • addTranslations

      public TranslateTextResponse.Builder addTranslations(int index, Translation.Builder builderForValue)
       Text translation responses with no glossary applied.
       This field has the same length as
       [`contents`][google.cloud.translation.v3.TranslateTextRequest.contents].
       
      repeated .google.cloud.translation.v3.Translation translations = 1;
    • addAllTranslations

      public TranslateTextResponse.Builder addAllTranslations(Iterable<? extends Translation> values)
       Text translation responses with no glossary applied.
       This field has the same length as
       [`contents`][google.cloud.translation.v3.TranslateTextRequest.contents].
       
      repeated .google.cloud.translation.v3.Translation translations = 1;
    • clearTranslations

      public TranslateTextResponse.Builder clearTranslations()
       Text translation responses with no glossary applied.
       This field has the same length as
       [`contents`][google.cloud.translation.v3.TranslateTextRequest.contents].
       
      repeated .google.cloud.translation.v3.Translation translations = 1;
    • removeTranslations

      public TranslateTextResponse.Builder removeTranslations(int index)
       Text translation responses with no glossary applied.
       This field has the same length as
       [`contents`][google.cloud.translation.v3.TranslateTextRequest.contents].
       
      repeated .google.cloud.translation.v3.Translation translations = 1;
    • getTranslationsBuilder

      public Translation.Builder getTranslationsBuilder(int index)
       Text translation responses with no glossary applied.
       This field has the same length as
       [`contents`][google.cloud.translation.v3.TranslateTextRequest.contents].
       
      repeated .google.cloud.translation.v3.Translation translations = 1;
    • getTranslationsOrBuilder

      public TranslationOrBuilder getTranslationsOrBuilder(int index)
       Text translation responses with no glossary applied.
       This field has the same length as
       [`contents`][google.cloud.translation.v3.TranslateTextRequest.contents].
       
      repeated .google.cloud.translation.v3.Translation translations = 1;
      Specified by:
      getTranslationsOrBuilder in interface TranslateTextResponseOrBuilder
    • getTranslationsOrBuilderList

      public List<? extends TranslationOrBuilder> getTranslationsOrBuilderList()
       Text translation responses with no glossary applied.
       This field has the same length as
       [`contents`][google.cloud.translation.v3.TranslateTextRequest.contents].
       
      repeated .google.cloud.translation.v3.Translation translations = 1;
      Specified by:
      getTranslationsOrBuilderList in interface TranslateTextResponseOrBuilder
    • addTranslationsBuilder

      public Translation.Builder addTranslationsBuilder()
       Text translation responses with no glossary applied.
       This field has the same length as
       [`contents`][google.cloud.translation.v3.TranslateTextRequest.contents].
       
      repeated .google.cloud.translation.v3.Translation translations = 1;
    • addTranslationsBuilder

      public Translation.Builder addTranslationsBuilder(int index)
       Text translation responses with no glossary applied.
       This field has the same length as
       [`contents`][google.cloud.translation.v3.TranslateTextRequest.contents].
       
      repeated .google.cloud.translation.v3.Translation translations = 1;
    • getTranslationsBuilderList

      public List<Translation.Builder> getTranslationsBuilderList()
       Text translation responses with no glossary applied.
       This field has the same length as
       [`contents`][google.cloud.translation.v3.TranslateTextRequest.contents].
       
      repeated .google.cloud.translation.v3.Translation translations = 1;
    • getGlossaryTranslationsList

      public List<Translation> getGlossaryTranslationsList()
       Text translation responses if a glossary is provided in the request.
       This can be the same as
       [`translations`][google.cloud.translation.v3.TranslateTextResponse.translations]
       if no terms apply. This field has the same length as
       [`contents`][google.cloud.translation.v3.TranslateTextRequest.contents].
       
      repeated .google.cloud.translation.v3.Translation glossary_translations = 3;
      Specified by:
      getGlossaryTranslationsList in interface TranslateTextResponseOrBuilder
    • getGlossaryTranslationsCount

      public int getGlossaryTranslationsCount()
       Text translation responses if a glossary is provided in the request.
       This can be the same as
       [`translations`][google.cloud.translation.v3.TranslateTextResponse.translations]
       if no terms apply. This field has the same length as
       [`contents`][google.cloud.translation.v3.TranslateTextRequest.contents].
       
      repeated .google.cloud.translation.v3.Translation glossary_translations = 3;
      Specified by:
      getGlossaryTranslationsCount in interface TranslateTextResponseOrBuilder
    • getGlossaryTranslations

      public Translation getGlossaryTranslations(int index)
       Text translation responses if a glossary is provided in the request.
       This can be the same as
       [`translations`][google.cloud.translation.v3.TranslateTextResponse.translations]
       if no terms apply. This field has the same length as
       [`contents`][google.cloud.translation.v3.TranslateTextRequest.contents].
       
      repeated .google.cloud.translation.v3.Translation glossary_translations = 3;
      Specified by:
      getGlossaryTranslations in interface TranslateTextResponseOrBuilder
    • setGlossaryTranslations

      public TranslateTextResponse.Builder setGlossaryTranslations(int index, Translation value)
       Text translation responses if a glossary is provided in the request.
       This can be the same as
       [`translations`][google.cloud.translation.v3.TranslateTextResponse.translations]
       if no terms apply. This field has the same length as
       [`contents`][google.cloud.translation.v3.TranslateTextRequest.contents].
       
      repeated .google.cloud.translation.v3.Translation glossary_translations = 3;
    • setGlossaryTranslations

      public TranslateTextResponse.Builder setGlossaryTranslations(int index, Translation.Builder builderForValue)
       Text translation responses if a glossary is provided in the request.
       This can be the same as
       [`translations`][google.cloud.translation.v3.TranslateTextResponse.translations]
       if no terms apply. This field has the same length as
       [`contents`][google.cloud.translation.v3.TranslateTextRequest.contents].
       
      repeated .google.cloud.translation.v3.Translation glossary_translations = 3;
    • addGlossaryTranslations

      public TranslateTextResponse.Builder addGlossaryTranslations(Translation value)
       Text translation responses if a glossary is provided in the request.
       This can be the same as
       [`translations`][google.cloud.translation.v3.TranslateTextResponse.translations]
       if no terms apply. This field has the same length as
       [`contents`][google.cloud.translation.v3.TranslateTextRequest.contents].
       
      repeated .google.cloud.translation.v3.Translation glossary_translations = 3;
    • addGlossaryTranslations

      public TranslateTextResponse.Builder addGlossaryTranslations(int index, Translation value)
       Text translation responses if a glossary is provided in the request.
       This can be the same as
       [`translations`][google.cloud.translation.v3.TranslateTextResponse.translations]
       if no terms apply. This field has the same length as
       [`contents`][google.cloud.translation.v3.TranslateTextRequest.contents].
       
      repeated .google.cloud.translation.v3.Translation glossary_translations = 3;
    • addGlossaryTranslations

      public TranslateTextResponse.Builder addGlossaryTranslations(Translation.Builder builderForValue)
       Text translation responses if a glossary is provided in the request.
       This can be the same as
       [`translations`][google.cloud.translation.v3.TranslateTextResponse.translations]
       if no terms apply. This field has the same length as
       [`contents`][google.cloud.translation.v3.TranslateTextRequest.contents].
       
      repeated .google.cloud.translation.v3.Translation glossary_translations = 3;
    • addGlossaryTranslations

      public TranslateTextResponse.Builder addGlossaryTranslations(int index, Translation.Builder builderForValue)
       Text translation responses if a glossary is provided in the request.
       This can be the same as
       [`translations`][google.cloud.translation.v3.TranslateTextResponse.translations]
       if no terms apply. This field has the same length as
       [`contents`][google.cloud.translation.v3.TranslateTextRequest.contents].
       
      repeated .google.cloud.translation.v3.Translation glossary_translations = 3;
    • addAllGlossaryTranslations

      public TranslateTextResponse.Builder addAllGlossaryTranslations(Iterable<? extends Translation> values)
       Text translation responses if a glossary is provided in the request.
       This can be the same as
       [`translations`][google.cloud.translation.v3.TranslateTextResponse.translations]
       if no terms apply. This field has the same length as
       [`contents`][google.cloud.translation.v3.TranslateTextRequest.contents].
       
      repeated .google.cloud.translation.v3.Translation glossary_translations = 3;
    • clearGlossaryTranslations

      public TranslateTextResponse.Builder clearGlossaryTranslations()
       Text translation responses if a glossary is provided in the request.
       This can be the same as
       [`translations`][google.cloud.translation.v3.TranslateTextResponse.translations]
       if no terms apply. This field has the same length as
       [`contents`][google.cloud.translation.v3.TranslateTextRequest.contents].
       
      repeated .google.cloud.translation.v3.Translation glossary_translations = 3;
    • removeGlossaryTranslations

      public TranslateTextResponse.Builder removeGlossaryTranslations(int index)
       Text translation responses if a glossary is provided in the request.
       This can be the same as
       [`translations`][google.cloud.translation.v3.TranslateTextResponse.translations]
       if no terms apply. This field has the same length as
       [`contents`][google.cloud.translation.v3.TranslateTextRequest.contents].
       
      repeated .google.cloud.translation.v3.Translation glossary_translations = 3;
    • getGlossaryTranslationsBuilder

      public Translation.Builder getGlossaryTranslationsBuilder(int index)
       Text translation responses if a glossary is provided in the request.
       This can be the same as
       [`translations`][google.cloud.translation.v3.TranslateTextResponse.translations]
       if no terms apply. This field has the same length as
       [`contents`][google.cloud.translation.v3.TranslateTextRequest.contents].
       
      repeated .google.cloud.translation.v3.Translation glossary_translations = 3;
    • getGlossaryTranslationsOrBuilder

      public TranslationOrBuilder getGlossaryTranslationsOrBuilder(int index)
       Text translation responses if a glossary is provided in the request.
       This can be the same as
       [`translations`][google.cloud.translation.v3.TranslateTextResponse.translations]
       if no terms apply. This field has the same length as
       [`contents`][google.cloud.translation.v3.TranslateTextRequest.contents].
       
      repeated .google.cloud.translation.v3.Translation glossary_translations = 3;
      Specified by:
      getGlossaryTranslationsOrBuilder in interface TranslateTextResponseOrBuilder
    • getGlossaryTranslationsOrBuilderList

      public List<? extends TranslationOrBuilder> getGlossaryTranslationsOrBuilderList()
       Text translation responses if a glossary is provided in the request.
       This can be the same as
       [`translations`][google.cloud.translation.v3.TranslateTextResponse.translations]
       if no terms apply. This field has the same length as
       [`contents`][google.cloud.translation.v3.TranslateTextRequest.contents].
       
      repeated .google.cloud.translation.v3.Translation glossary_translations = 3;
      Specified by:
      getGlossaryTranslationsOrBuilderList in interface TranslateTextResponseOrBuilder
    • addGlossaryTranslationsBuilder

      public Translation.Builder addGlossaryTranslationsBuilder()
       Text translation responses if a glossary is provided in the request.
       This can be the same as
       [`translations`][google.cloud.translation.v3.TranslateTextResponse.translations]
       if no terms apply. This field has the same length as
       [`contents`][google.cloud.translation.v3.TranslateTextRequest.contents].
       
      repeated .google.cloud.translation.v3.Translation glossary_translations = 3;
    • addGlossaryTranslationsBuilder

      public Translation.Builder addGlossaryTranslationsBuilder(int index)
       Text translation responses if a glossary is provided in the request.
       This can be the same as
       [`translations`][google.cloud.translation.v3.TranslateTextResponse.translations]
       if no terms apply. This field has the same length as
       [`contents`][google.cloud.translation.v3.TranslateTextRequest.contents].
       
      repeated .google.cloud.translation.v3.Translation glossary_translations = 3;
    • getGlossaryTranslationsBuilderList

      public List<Translation.Builder> getGlossaryTranslationsBuilderList()
       Text translation responses if a glossary is provided in the request.
       This can be the same as
       [`translations`][google.cloud.translation.v3.TranslateTextResponse.translations]
       if no terms apply. This field has the same length as
       [`contents`][google.cloud.translation.v3.TranslateTextRequest.contents].
       
      repeated .google.cloud.translation.v3.Translation glossary_translations = 3;