Class SentimentData.Builder (2.3.10)

public static final class SentimentData.Builder extends GeneratedMessageV3.Builder<SentimentData.Builder> implements SentimentDataOrBuilder

The data for a sentiment annotation.

Protobuf type google.cloud.contactcenterinsights.v1.SentimentData

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public SentimentData.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
SentimentData.Builder
Overrides

build()

public SentimentData build()
Returns
TypeDescription
SentimentData

buildPartial()

public SentimentData buildPartial()
Returns
TypeDescription
SentimentData

clear()

public SentimentData.Builder clear()
Returns
TypeDescription
SentimentData.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public SentimentData.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
SentimentData.Builder
Overrides

clearMagnitude()

public SentimentData.Builder clearMagnitude()

A non-negative number from 0 to infinity which represents the abolute magnitude of sentiment regardless of score.

float magnitude = 1;

Returns
TypeDescription
SentimentData.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public SentimentData.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
SentimentData.Builder
Overrides

clearScore()

public SentimentData.Builder clearScore()

The sentiment score between -1.0 (negative) and 1.0 (positive).

float score = 2;

Returns
TypeDescription
SentimentData.Builder

This builder for chaining.

clone()

public SentimentData.Builder clone()
Returns
TypeDescription
SentimentData.Builder
Overrides

getDefaultInstanceForType()

public SentimentData getDefaultInstanceForType()
Returns
TypeDescription
SentimentData

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getMagnitude()

public float getMagnitude()

A non-negative number from 0 to infinity which represents the abolute magnitude of sentiment regardless of score.

float magnitude = 1;

Returns
TypeDescription
float

The magnitude.

getScore()

public float getScore()

The sentiment score between -1.0 (negative) and 1.0 (positive).

float score = 2;

Returns
TypeDescription
float

The score.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(SentimentData other)

public SentimentData.Builder mergeFrom(SentimentData other)
Parameter
NameDescription
otherSentimentData
Returns
TypeDescription
SentimentData.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public SentimentData.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
SentimentData.Builder
Overrides Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public SentimentData.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
SentimentData.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final SentimentData.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
SentimentData.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public SentimentData.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
SentimentData.Builder
Overrides

setMagnitude(float value)

public SentimentData.Builder setMagnitude(float value)

A non-negative number from 0 to infinity which represents the abolute magnitude of sentiment regardless of score.

float magnitude = 1;

Parameter
NameDescription
valuefloat

The magnitude to set.

Returns
TypeDescription
SentimentData.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public SentimentData.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
SentimentData.Builder
Overrides

setScore(float value)

public SentimentData.Builder setScore(float value)

The sentiment score between -1.0 (negative) and 1.0 (positive).

float score = 2;

Parameter
NameDescription
valuefloat

The score to set.

Returns
TypeDescription
SentimentData.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final SentimentData.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
SentimentData.Builder
Overrides