public static final class Sentence.Builder extends GeneratedMessageV3.Builder<Sentence.Builder> implements SentenceOrBuilder
Represents a sentence in the input document.Protobuf type
google.cloud.language.v1.Sentence
Modifier and Type | Method and Description |
---|---|
Sentence.Builder |
addRepeatedField(Descriptors.FieldDescriptor field,
java.lang.Object value) |
Sentence |
build() |
Sentence |
buildPartial() |
Sentence.Builder |
clear() |
Sentence.Builder |
clearField(Descriptors.FieldDescriptor field) |
Sentence.Builder |
clearOneof(Descriptors.OneofDescriptor oneof) |
Sentence.Builder |
clearSentiment()
For calls to [AnalyzeSentiment][] or if
[AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment] is set to
true, this field will contain the sentiment for the sentence.
|
Sentence.Builder |
clearText()
The sentence text.
|
Sentence.Builder |
clone() |
Sentence |
getDefaultInstanceForType() |
static Descriptors.Descriptor |
getDescriptor() |
Descriptors.Descriptor |
getDescriptorForType() |
Sentiment |
getSentiment()
For calls to [AnalyzeSentiment][] or if
[AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment] is set to
true, this field will contain the sentiment for the sentence.
|
Sentiment.Builder |
getSentimentBuilder()
For calls to [AnalyzeSentiment][] or if
[AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment] is set to
true, this field will contain the sentiment for the sentence.
|
SentimentOrBuilder |
getSentimentOrBuilder()
For calls to [AnalyzeSentiment][] or if
[AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment] is set to
true, this field will contain the sentiment for the sentence.
|
TextSpan |
getText()
The sentence text.
|
TextSpan.Builder |
getTextBuilder()
The sentence text.
|
TextSpanOrBuilder |
getTextOrBuilder()
The sentence text.
|
boolean |
hasSentiment()
For calls to [AnalyzeSentiment][] or if
[AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment] is set to
true, this field will contain the sentiment for the sentence.
|
boolean |
hasText()
The sentence text.
|
protected GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
Sentence.Builder |
mergeFrom(CodedInputStream input,
ExtensionRegistryLite extensionRegistry) |
Sentence.Builder |
mergeFrom(Message other) |
Sentence.Builder |
mergeFrom(Sentence other) |
Sentence.Builder |
mergeSentiment(Sentiment value)
For calls to [AnalyzeSentiment][] or if
[AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment] is set to
true, this field will contain the sentiment for the sentence.
|
Sentence.Builder |
mergeText(TextSpan value)
The sentence text.
|
Sentence.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields) |
Sentence.Builder |
setField(Descriptors.FieldDescriptor field,
java.lang.Object value) |
Sentence.Builder |
setRepeatedField(Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) |
Sentence.Builder |
setSentiment(Sentiment.Builder builderForValue)
For calls to [AnalyzeSentiment][] or if
[AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment] is set to
true, this field will contain the sentiment for the sentence.
|
Sentence.Builder |
setSentiment(Sentiment value)
For calls to [AnalyzeSentiment][] or if
[AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment] is set to
true, this field will contain the sentiment for the sentence.
|
Sentence.Builder |
setText(TextSpan.Builder builderForValue)
The sentence text.
|
Sentence.Builder |
setText(TextSpan value)
The sentence text.
|
Sentence.Builder |
setUnknownFields(UnknownFieldSet unknownFields) |
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, newBuilderForField, onBuilt, onChanged, setUnknownFieldsProto3
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
addAll, addAll, mergeFrom, newUninitializedMessageException
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
mergeFrom
public static final Descriptors.Descriptor getDescriptor()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable
in class GeneratedMessageV3.Builder<Sentence.Builder>
public Sentence.Builder clear()
clear
in interface Message.Builder
clear
in interface MessageLite.Builder
clear
in class GeneratedMessageV3.Builder<Sentence.Builder>
public Descriptors.Descriptor getDescriptorForType()
getDescriptorForType
in interface Message.Builder
getDescriptorForType
in interface MessageOrBuilder
getDescriptorForType
in class GeneratedMessageV3.Builder<Sentence.Builder>
public Sentence getDefaultInstanceForType()
getDefaultInstanceForType
in interface MessageLiteOrBuilder
getDefaultInstanceForType
in interface MessageOrBuilder
public Sentence build()
build
in interface Message.Builder
build
in interface MessageLite.Builder
public Sentence buildPartial()
buildPartial
in interface Message.Builder
buildPartial
in interface MessageLite.Builder
public Sentence.Builder clone()
clone
in interface Message.Builder
clone
in interface MessageLite.Builder
clone
in class GeneratedMessageV3.Builder<Sentence.Builder>
public Sentence.Builder setField(Descriptors.FieldDescriptor field, java.lang.Object value)
setField
in interface Message.Builder
setField
in class GeneratedMessageV3.Builder<Sentence.Builder>
public Sentence.Builder clearField(Descriptors.FieldDescriptor field)
clearField
in interface Message.Builder
clearField
in class GeneratedMessageV3.Builder<Sentence.Builder>
public Sentence.Builder clearOneof(Descriptors.OneofDescriptor oneof)
clearOneof
in interface Message.Builder
clearOneof
in class GeneratedMessageV3.Builder<Sentence.Builder>
public Sentence.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, java.lang.Object value)
setRepeatedField
in interface Message.Builder
setRepeatedField
in class GeneratedMessageV3.Builder<Sentence.Builder>
public Sentence.Builder addRepeatedField(Descriptors.FieldDescriptor field, java.lang.Object value)
addRepeatedField
in interface Message.Builder
addRepeatedField
in class GeneratedMessageV3.Builder<Sentence.Builder>
public Sentence.Builder mergeFrom(Message other)
mergeFrom
in interface Message.Builder
mergeFrom
in class AbstractMessage.Builder<Sentence.Builder>
public Sentence.Builder mergeFrom(Sentence other)
public final boolean isInitialized()
isInitialized
in interface MessageLiteOrBuilder
isInitialized
in class GeneratedMessageV3.Builder<Sentence.Builder>
public Sentence.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
mergeFrom
in interface Message.Builder
mergeFrom
in interface MessageLite.Builder
mergeFrom
in class AbstractMessage.Builder<Sentence.Builder>
java.io.IOException
public boolean hasText()
The sentence text.
.google.cloud.language.v1.TextSpan text = 1;
hasText
in interface SentenceOrBuilder
public TextSpan getText()
The sentence text.
.google.cloud.language.v1.TextSpan text = 1;
getText
in interface SentenceOrBuilder
public Sentence.Builder setText(TextSpan value)
The sentence text.
.google.cloud.language.v1.TextSpan text = 1;
public Sentence.Builder setText(TextSpan.Builder builderForValue)
The sentence text.
.google.cloud.language.v1.TextSpan text = 1;
public Sentence.Builder mergeText(TextSpan value)
The sentence text.
.google.cloud.language.v1.TextSpan text = 1;
public Sentence.Builder clearText()
The sentence text.
.google.cloud.language.v1.TextSpan text = 1;
public TextSpan.Builder getTextBuilder()
The sentence text.
.google.cloud.language.v1.TextSpan text = 1;
public TextSpanOrBuilder getTextOrBuilder()
The sentence text.
.google.cloud.language.v1.TextSpan text = 1;
getTextOrBuilder
in interface SentenceOrBuilder
public boolean hasSentiment()
For calls to [AnalyzeSentiment][] or if [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment] is set to true, this field will contain the sentiment for the sentence.
.google.cloud.language.v1.Sentiment sentiment = 2;
hasSentiment
in interface SentenceOrBuilder
public Sentiment getSentiment()
For calls to [AnalyzeSentiment][] or if [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment] is set to true, this field will contain the sentiment for the sentence.
.google.cloud.language.v1.Sentiment sentiment = 2;
getSentiment
in interface SentenceOrBuilder
public Sentence.Builder setSentiment(Sentiment value)
For calls to [AnalyzeSentiment][] or if [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment] is set to true, this field will contain the sentiment for the sentence.
.google.cloud.language.v1.Sentiment sentiment = 2;
public Sentence.Builder setSentiment(Sentiment.Builder builderForValue)
For calls to [AnalyzeSentiment][] or if [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment] is set to true, this field will contain the sentiment for the sentence.
.google.cloud.language.v1.Sentiment sentiment = 2;
public Sentence.Builder mergeSentiment(Sentiment value)
For calls to [AnalyzeSentiment][] or if [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment] is set to true, this field will contain the sentiment for the sentence.
.google.cloud.language.v1.Sentiment sentiment = 2;
public Sentence.Builder clearSentiment()
For calls to [AnalyzeSentiment][] or if [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment] is set to true, this field will contain the sentiment for the sentence.
.google.cloud.language.v1.Sentiment sentiment = 2;
public Sentiment.Builder getSentimentBuilder()
For calls to [AnalyzeSentiment][] or if [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment] is set to true, this field will contain the sentiment for the sentence.
.google.cloud.language.v1.Sentiment sentiment = 2;
public SentimentOrBuilder getSentimentOrBuilder()
For calls to [AnalyzeSentiment][] or if [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment] is set to true, this field will contain the sentiment for the sentence.
.google.cloud.language.v1.Sentiment sentiment = 2;
getSentimentOrBuilder
in interface SentenceOrBuilder
public final Sentence.Builder setUnknownFields(UnknownFieldSet unknownFields)
setUnknownFields
in interface Message.Builder
setUnknownFields
in class GeneratedMessageV3.Builder<Sentence.Builder>
public final Sentence.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
mergeUnknownFields
in interface Message.Builder
mergeUnknownFields
in class GeneratedMessageV3.Builder<Sentence.Builder>