Class AnnotateTextRequest.Features.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<AnnotateTextRequest.Features.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<AnnotateTextRequest.Features.Builder>
      • getDefaultInstanceForType

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

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

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

        public AnnotateTextRequest.Features.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<AnnotateTextRequest.Features.Builder>
        Throws:
        IOException
      • setExtractSyntax

        public AnnotateTextRequest.Features.Builder setExtractSyntax​(boolean value)
         Extract syntax information.
         
        bool extract_syntax = 1;
        Parameters:
        value - The extractSyntax to set.
        Returns:
        This builder for chaining.
      • setExtractEntities

        public AnnotateTextRequest.Features.Builder setExtractEntities​(boolean value)
         Extract entities.
         
        bool extract_entities = 2;
        Parameters:
        value - The extractEntities to set.
        Returns:
        This builder for chaining.
      • setExtractDocumentSentiment

        public AnnotateTextRequest.Features.Builder setExtractDocumentSentiment​(boolean value)
         Extract document-level sentiment.
         
        bool extract_document_sentiment = 3;
        Parameters:
        value - The extractDocumentSentiment to set.
        Returns:
        This builder for chaining.
      • clearExtractDocumentSentiment

        public AnnotateTextRequest.Features.Builder clearExtractDocumentSentiment()
         Extract document-level sentiment.
         
        bool extract_document_sentiment = 3;
        Returns:
        This builder for chaining.
      • setExtractEntitySentiment

        public AnnotateTextRequest.Features.Builder setExtractEntitySentiment​(boolean value)
         Extract entities and their associated sentiment.
         
        bool extract_entity_sentiment = 4;
        Parameters:
        value - The extractEntitySentiment to set.
        Returns:
        This builder for chaining.
      • clearExtractEntitySentiment

        public AnnotateTextRequest.Features.Builder clearExtractEntitySentiment()
         Extract entities and their associated sentiment.
         
        bool extract_entity_sentiment = 4;
        Returns:
        This builder for chaining.
      • getClassifyText

        public boolean getClassifyText()
         Classify the full document into categories. If this is true,
         the API will use the default model which classifies into a
         [predefined
         taxonomy](https://cloud.google.com/natural-language/docs/categories).
         
        bool classify_text = 6;
        Specified by:
        getClassifyText in interface AnnotateTextRequest.FeaturesOrBuilder
        Returns:
        The classifyText.
      • setClassifyText

        public AnnotateTextRequest.Features.Builder setClassifyText​(boolean value)
         Classify the full document into categories. If this is true,
         the API will use the default model which classifies into a
         [predefined
         taxonomy](https://cloud.google.com/natural-language/docs/categories).
         
        bool classify_text = 6;
        Parameters:
        value - The classifyText to set.
        Returns:
        This builder for chaining.
      • clearClassifyText

        public AnnotateTextRequest.Features.Builder clearClassifyText()
         Classify the full document into categories. If this is true,
         the API will use the default model which classifies into a
         [predefined
         taxonomy](https://cloud.google.com/natural-language/docs/categories).
         
        bool classify_text = 6;
        Returns:
        This builder for chaining.
      • setModerateText

        public AnnotateTextRequest.Features.Builder setModerateText​(boolean value)
         Moderate the document for harmful and sensitive categories.
         
        bool moderate_text = 11;
        Parameters:
        value - The moderateText to set.
        Returns:
        This builder for chaining.
      • clearModerateText

        public AnnotateTextRequest.Features.Builder clearModerateText()
         Moderate the document for harmful and sensitive categories.
         
        bool moderate_text = 11;
        Returns:
        This builder for chaining.
      • hasClassificationModelOptions

        public boolean hasClassificationModelOptions()
         The model options to use for classification. Defaults to v1 options
         if not specified. Only used if `classify_text` is set to true.
         
        .google.cloud.language.v1beta2.ClassificationModelOptions classification_model_options = 10;
        Specified by:
        hasClassificationModelOptions in interface AnnotateTextRequest.FeaturesOrBuilder
        Returns:
        Whether the classificationModelOptions field is set.
      • getClassificationModelOptions

        public ClassificationModelOptions getClassificationModelOptions()
         The model options to use for classification. Defaults to v1 options
         if not specified. Only used if `classify_text` is set to true.
         
        .google.cloud.language.v1beta2.ClassificationModelOptions classification_model_options = 10;
        Specified by:
        getClassificationModelOptions in interface AnnotateTextRequest.FeaturesOrBuilder
        Returns:
        The classificationModelOptions.
      • setClassificationModelOptions

        public AnnotateTextRequest.Features.Builder setClassificationModelOptions​(ClassificationModelOptions value)
         The model options to use for classification. Defaults to v1 options
         if not specified. Only used if `classify_text` is set to true.
         
        .google.cloud.language.v1beta2.ClassificationModelOptions classification_model_options = 10;
      • setClassificationModelOptions

        public AnnotateTextRequest.Features.Builder setClassificationModelOptions​(ClassificationModelOptions.Builder builderForValue)
         The model options to use for classification. Defaults to v1 options
         if not specified. Only used if `classify_text` is set to true.
         
        .google.cloud.language.v1beta2.ClassificationModelOptions classification_model_options = 10;
      • mergeClassificationModelOptions

        public AnnotateTextRequest.Features.Builder mergeClassificationModelOptions​(ClassificationModelOptions value)
         The model options to use for classification. Defaults to v1 options
         if not specified. Only used if `classify_text` is set to true.
         
        .google.cloud.language.v1beta2.ClassificationModelOptions classification_model_options = 10;
      • clearClassificationModelOptions

        public AnnotateTextRequest.Features.Builder clearClassificationModelOptions()
         The model options to use for classification. Defaults to v1 options
         if not specified. Only used if `classify_text` is set to true.
         
        .google.cloud.language.v1beta2.ClassificationModelOptions classification_model_options = 10;
      • getClassificationModelOptionsBuilder

        public ClassificationModelOptions.Builder getClassificationModelOptionsBuilder()
         The model options to use for classification. Defaults to v1 options
         if not specified. Only used if `classify_text` is set to true.
         
        .google.cloud.language.v1beta2.ClassificationModelOptions classification_model_options = 10;