Class TextAnnotation.DetectedLanguage.Builder

    • Method Detail

      • getDescriptor

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

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<TextAnnotation.DetectedLanguage.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.GeneratedMessageV3.Builder<TextAnnotation.DetectedLanguage.Builder>
      • getDefaultInstanceForType

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

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

        public TextAnnotation.DetectedLanguage buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<TextAnnotation.DetectedLanguage.Builder>
      • getLanguageCode

        public String getLanguageCode()
         The BCP-47 language code, such as "en-US" or "sr-Latn". For more
         information, see
         http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
         
        string language_code = 1;
        Specified by:
        getLanguageCode in interface TextAnnotation.DetectedLanguageOrBuilder
        Returns:
        The languageCode.
      • getLanguageCodeBytes

        public com.google.protobuf.ByteString getLanguageCodeBytes()
         The BCP-47 language code, such as "en-US" or "sr-Latn". For more
         information, see
         http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
         
        string language_code = 1;
        Specified by:
        getLanguageCodeBytes in interface TextAnnotation.DetectedLanguageOrBuilder
        Returns:
        The bytes for languageCode.
      • setLanguageCode

        public TextAnnotation.DetectedLanguage.Builder setLanguageCode​(String value)
         The BCP-47 language code, such as "en-US" or "sr-Latn". For more
         information, see
         http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
         
        string language_code = 1;
        Parameters:
        value - The languageCode to set.
        Returns:
        This builder for chaining.
      • clearLanguageCode

        public TextAnnotation.DetectedLanguage.Builder clearLanguageCode()
         The BCP-47 language code, such as "en-US" or "sr-Latn". For more
         information, see
         http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
         
        string language_code = 1;
        Returns:
        This builder for chaining.
      • setLanguageCodeBytes

        public TextAnnotation.DetectedLanguage.Builder setLanguageCodeBytes​(com.google.protobuf.ByteString value)
         The BCP-47 language code, such as "en-US" or "sr-Latn". For more
         information, see
         http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
         
        string language_code = 1;
        Parameters:
        value - The bytes for languageCode to set.
        Returns:
        This builder for chaining.
      • setConfidence

        public TextAnnotation.DetectedLanguage.Builder setConfidence​(float value)
         Confidence of detected language. Range [0, 1].
         
        float confidence = 2;
        Parameters:
        value - The confidence to set.
        Returns:
        This builder for chaining.