public static final class Sentiment.Builder extends GeneratedMessageV3.Builder<Sentiment.Builder> implements SentimentOrBuilder
Represents the feeling associated with the entire text or entities in the text. Next ID: 6Protobuf type
google.cloud.language.v1beta2.Sentiment
Modifier and Type | Method and Description |
---|---|
Sentiment.Builder |
addRepeatedField(Descriptors.FieldDescriptor field,
Object value) |
Sentiment |
build() |
Sentiment |
buildPartial() |
Sentiment.Builder |
clear() |
Sentiment.Builder |
clearField(Descriptors.FieldDescriptor field) |
Sentiment.Builder |
clearMagnitude()
A non-negative number in the [0, +inf) range, which represents
the absolute magnitude of sentiment regardless of score (positive or
negative).
|
Sentiment.Builder |
clearOneof(Descriptors.OneofDescriptor oneof) |
Sentiment.Builder |
clearScore()
Sentiment score between -1.0 (negative sentiment) and 1.0
(positive sentiment).
|
Sentiment.Builder |
clone() |
Sentiment |
getDefaultInstanceForType() |
static Descriptors.Descriptor |
getDescriptor() |
Descriptors.Descriptor |
getDescriptorForType() |
float |
getMagnitude()
A non-negative number in the [0, +inf) range, which represents
the absolute magnitude of sentiment regardless of score (positive or
negative).
|
float |
getScore()
Sentiment score between -1.0 (negative sentiment) and 1.0
(positive sentiment).
|
protected GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
Sentiment.Builder |
mergeFrom(CodedInputStream input,
ExtensionRegistryLite extensionRegistry) |
Sentiment.Builder |
mergeFrom(Message other) |
Sentiment.Builder |
mergeFrom(Sentiment other) |
Sentiment.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields) |
Sentiment.Builder |
setField(Descriptors.FieldDescriptor field,
Object value) |
Sentiment.Builder |
setMagnitude(float value)
A non-negative number in the [0, +inf) range, which represents
the absolute magnitude of sentiment regardless of score (positive or
negative).
|
Sentiment.Builder |
setRepeatedField(Descriptors.FieldDescriptor field,
int index,
Object value) |
Sentiment.Builder |
setScore(float value)
Sentiment score between -1.0 (negative sentiment) and 1.0
(positive sentiment).
|
Sentiment.Builder |
setUnknownFields(UnknownFieldSet unknownFields) |
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
mergeDelimitedFrom, mergeDelimitedFrom
mergeFrom
public static final Descriptors.Descriptor getDescriptor()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable
in class GeneratedMessageV3.Builder<Sentiment.Builder>
public Sentiment.Builder clear()
clear
in interface Message.Builder
clear
in interface MessageLite.Builder
clear
in class GeneratedMessageV3.Builder<Sentiment.Builder>
public Descriptors.Descriptor getDescriptorForType()
getDescriptorForType
in interface Message.Builder
getDescriptorForType
in interface MessageOrBuilder
getDescriptorForType
in class GeneratedMessageV3.Builder<Sentiment.Builder>
public Sentiment getDefaultInstanceForType()
getDefaultInstanceForType
in interface MessageLiteOrBuilder
getDefaultInstanceForType
in interface MessageOrBuilder
public Sentiment build()
build
in interface Message.Builder
build
in interface MessageLite.Builder
public Sentiment buildPartial()
buildPartial
in interface Message.Builder
buildPartial
in interface MessageLite.Builder
public Sentiment.Builder clone()
clone
in interface Message.Builder
clone
in interface MessageLite.Builder
clone
in class GeneratedMessageV3.Builder<Sentiment.Builder>
public Sentiment.Builder setField(Descriptors.FieldDescriptor field, Object value)
setField
in interface Message.Builder
setField
in class GeneratedMessageV3.Builder<Sentiment.Builder>
public Sentiment.Builder clearField(Descriptors.FieldDescriptor field)
clearField
in interface Message.Builder
clearField
in class GeneratedMessageV3.Builder<Sentiment.Builder>
public Sentiment.Builder clearOneof(Descriptors.OneofDescriptor oneof)
clearOneof
in interface Message.Builder
clearOneof
in class GeneratedMessageV3.Builder<Sentiment.Builder>
public Sentiment.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
setRepeatedField
in interface Message.Builder
setRepeatedField
in class GeneratedMessageV3.Builder<Sentiment.Builder>
public Sentiment.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
addRepeatedField
in interface Message.Builder
addRepeatedField
in class GeneratedMessageV3.Builder<Sentiment.Builder>
public Sentiment.Builder mergeFrom(Message other)
mergeFrom
in interface Message.Builder
mergeFrom
in class AbstractMessage.Builder<Sentiment.Builder>
public Sentiment.Builder mergeFrom(Sentiment other)
public final boolean isInitialized()
isInitialized
in interface MessageLiteOrBuilder
isInitialized
in class GeneratedMessageV3.Builder<Sentiment.Builder>
public Sentiment.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom
in interface Message.Builder
mergeFrom
in interface MessageLite.Builder
mergeFrom
in class AbstractMessage.Builder<Sentiment.Builder>
IOException
public float getMagnitude()
A non-negative number in the [0, +inf) range, which represents the absolute magnitude of sentiment regardless of score (positive or negative).
float magnitude = 2;
getMagnitude
in interface SentimentOrBuilder
public Sentiment.Builder setMagnitude(float value)
A non-negative number in the [0, +inf) range, which represents the absolute magnitude of sentiment regardless of score (positive or negative).
float magnitude = 2;
value
- The magnitude to set.public Sentiment.Builder clearMagnitude()
A non-negative number in the [0, +inf) range, which represents the absolute magnitude of sentiment regardless of score (positive or negative).
float magnitude = 2;
public float getScore()
Sentiment score between -1.0 (negative sentiment) and 1.0 (positive sentiment).
float score = 3;
getScore
in interface SentimentOrBuilder
public Sentiment.Builder setScore(float value)
Sentiment score between -1.0 (negative sentiment) and 1.0 (positive sentiment).
float score = 3;
value
- The score to set.public Sentiment.Builder clearScore()
Sentiment score between -1.0 (negative sentiment) and 1.0 (positive sentiment).
float score = 3;
public final Sentiment.Builder setUnknownFields(UnknownFieldSet unknownFields)
setUnknownFields
in interface Message.Builder
setUnknownFields
in class GeneratedMessageV3.Builder<Sentiment.Builder>
public final Sentiment.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
mergeUnknownFields
in interface Message.Builder
mergeUnknownFields
in class GeneratedMessageV3.Builder<Sentiment.Builder>
Copyright © 2022 Google LLC. All rights reserved.