Package com.google.cloud.language.v2
Class Sentence.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessageV3.Builder<Sentence.Builder>
-
- com.google.cloud.language.v2.Sentence.Builder
-
- All Implemented Interfaces:
SentenceOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- Sentence
public static final class Sentence.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Sentence.Builder> implements SentenceOrBuilder
Represents a sentence in the input document.
Protobuf typegoogle.cloud.language.v2.Sentence
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Sentence.BuilderaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)Sentencebuild()SentencebuildPartial()Sentence.Builderclear()Sentence.BuilderclearField(com.google.protobuf.Descriptors.FieldDescriptor field)Sentence.BuilderclearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)Sentence.BuilderclearSentiment()For calls to [AnalyzeSentiment][] or if [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v2.AnnotateTextRequest.Features.extract_document_sentiment] is set to true, this field will contain the sentiment for the sentence.Sentence.BuilderclearText()The sentence text.Sentence.Builderclone()SentencegetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Descriptors.DescriptorgetDescriptorForType()SentimentgetSentiment()For calls to [AnalyzeSentiment][] or if [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v2.AnnotateTextRequest.Features.extract_document_sentiment] is set to true, this field will contain the sentiment for the sentence.Sentiment.BuildergetSentimentBuilder()For calls to [AnalyzeSentiment][] or if [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v2.AnnotateTextRequest.Features.extract_document_sentiment] is set to true, this field will contain the sentiment for the sentence.SentimentOrBuildergetSentimentOrBuilder()For calls to [AnalyzeSentiment][] or if [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v2.AnnotateTextRequest.Features.extract_document_sentiment] is set to true, this field will contain the sentiment for the sentence.TextSpangetText()The sentence text.TextSpan.BuildergetTextBuilder()The sentence text.TextSpanOrBuildergetTextOrBuilder()The sentence text.booleanhasSentiment()For calls to [AnalyzeSentiment][] or if [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v2.AnnotateTextRequest.Features.extract_document_sentiment] is set to true, this field will contain the sentiment for the sentence.booleanhasText()The sentence text.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()Sentence.BuildermergeFrom(Sentence other)Sentence.BuildermergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)Sentence.BuildermergeFrom(com.google.protobuf.Message other)Sentence.BuildermergeSentiment(Sentiment value)For calls to [AnalyzeSentiment][] or if [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v2.AnnotateTextRequest.Features.extract_document_sentiment] is set to true, this field will contain the sentiment for the sentence.Sentence.BuildermergeText(TextSpan value)The sentence text.Sentence.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)Sentence.BuildersetField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)Sentence.BuildersetRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)Sentence.BuildersetSentiment(Sentiment value)For calls to [AnalyzeSentiment][] or if [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v2.AnnotateTextRequest.Features.extract_document_sentiment] is set to true, this field will contain the sentiment for the sentence.Sentence.BuildersetSentiment(Sentiment.Builder builderForValue)For calls to [AnalyzeSentiment][] or if [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v2.AnnotateTextRequest.Features.extract_document_sentiment] is set to true, this field will contain the sentiment for the sentence.Sentence.BuildersetText(TextSpan value)The sentence text.Sentence.BuildersetText(TextSpan.Builder builderForValue)The sentence text.Sentence.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<Sentence.Builder>
-
clear
public Sentence.Builder clear()
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.Builder<Sentence.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessageV3.Builder<Sentence.Builder>
-
getDefaultInstanceForType
public Sentence getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
public Sentence build()
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public Sentence buildPartial()
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
public Sentence.Builder clone()
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<Sentence.Builder>
-
setField
public Sentence.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Sentence.Builder>
-
clearField
public Sentence.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Sentence.Builder>
-
clearOneof
public Sentence.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<Sentence.Builder>
-
setRepeatedField
public Sentence.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Sentence.Builder>
-
addRepeatedField
public Sentence.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Sentence.Builder>
-
mergeFrom
public Sentence.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Sentence.Builder>
-
mergeFrom
public Sentence.Builder mergeFrom(Sentence other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.Builder<Sentence.Builder>
-
mergeFrom
public Sentence.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Sentence.Builder>- Throws:
IOException
-
hasText
public boolean hasText()
The sentence text.
.google.cloud.language.v2.TextSpan text = 1;- Specified by:
hasTextin interfaceSentenceOrBuilder- Returns:
- Whether the text field is set.
-
getText
public TextSpan getText()
The sentence text.
.google.cloud.language.v2.TextSpan text = 1;- Specified by:
getTextin interfaceSentenceOrBuilder- Returns:
- The text.
-
setText
public Sentence.Builder setText(TextSpan value)
The sentence text.
.google.cloud.language.v2.TextSpan text = 1;
-
setText
public Sentence.Builder setText(TextSpan.Builder builderForValue)
The sentence text.
.google.cloud.language.v2.TextSpan text = 1;
-
mergeText
public Sentence.Builder mergeText(TextSpan value)
The sentence text.
.google.cloud.language.v2.TextSpan text = 1;
-
clearText
public Sentence.Builder clearText()
The sentence text.
.google.cloud.language.v2.TextSpan text = 1;
-
getTextBuilder
public TextSpan.Builder getTextBuilder()
The sentence text.
.google.cloud.language.v2.TextSpan text = 1;
-
getTextOrBuilder
public TextSpanOrBuilder getTextOrBuilder()
The sentence text.
.google.cloud.language.v2.TextSpan text = 1;- Specified by:
getTextOrBuilderin interfaceSentenceOrBuilder
-
hasSentiment
public boolean hasSentiment()
For calls to [AnalyzeSentiment][] or if [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v2.AnnotateTextRequest.Features.extract_document_sentiment] is set to true, this field will contain the sentiment for the sentence.
.google.cloud.language.v2.Sentiment sentiment = 2;- Specified by:
hasSentimentin interfaceSentenceOrBuilder- Returns:
- Whether the sentiment field is set.
-
getSentiment
public Sentiment getSentiment()
For calls to [AnalyzeSentiment][] or if [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v2.AnnotateTextRequest.Features.extract_document_sentiment] is set to true, this field will contain the sentiment for the sentence.
.google.cloud.language.v2.Sentiment sentiment = 2;- Specified by:
getSentimentin interfaceSentenceOrBuilder- Returns:
- The sentiment.
-
setSentiment
public Sentence.Builder setSentiment(Sentiment value)
For calls to [AnalyzeSentiment][] or if [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v2.AnnotateTextRequest.Features.extract_document_sentiment] is set to true, this field will contain the sentiment for the sentence.
.google.cloud.language.v2.Sentiment sentiment = 2;
-
setSentiment
public Sentence.Builder setSentiment(Sentiment.Builder builderForValue)
For calls to [AnalyzeSentiment][] or if [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v2.AnnotateTextRequest.Features.extract_document_sentiment] is set to true, this field will contain the sentiment for the sentence.
.google.cloud.language.v2.Sentiment sentiment = 2;
-
mergeSentiment
public Sentence.Builder mergeSentiment(Sentiment value)
For calls to [AnalyzeSentiment][] or if [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v2.AnnotateTextRequest.Features.extract_document_sentiment] is set to true, this field will contain the sentiment for the sentence.
.google.cloud.language.v2.Sentiment sentiment = 2;
-
clearSentiment
public Sentence.Builder clearSentiment()
For calls to [AnalyzeSentiment][] or if [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v2.AnnotateTextRequest.Features.extract_document_sentiment] is set to true, this field will contain the sentiment for the sentence.
.google.cloud.language.v2.Sentiment sentiment = 2;
-
getSentimentBuilder
public Sentiment.Builder getSentimentBuilder()
For calls to [AnalyzeSentiment][] or if [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v2.AnnotateTextRequest.Features.extract_document_sentiment] is set to true, this field will contain the sentiment for the sentence.
.google.cloud.language.v2.Sentiment sentiment = 2;
-
getSentimentOrBuilder
public SentimentOrBuilder getSentimentOrBuilder()
For calls to [AnalyzeSentiment][] or if [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v2.AnnotateTextRequest.Features.extract_document_sentiment] is set to true, this field will contain the sentiment for the sentence.
.google.cloud.language.v2.Sentiment sentiment = 2;- Specified by:
getSentimentOrBuilderin interfaceSentenceOrBuilder
-
setUnknownFields
public final Sentence.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<Sentence.Builder>
-
mergeUnknownFields
public final Sentence.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<Sentence.Builder>
-
-