Class SentimentData.Builder (2.83.0)

public static final class SentimentData.Builder extends GeneratedMessage.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
Type Description
Descriptor

Methods

build()

public SentimentData build()
Returns
Type Description
SentimentData

buildPartial()

public SentimentData buildPartial()
Returns
Type Description
SentimentData

clear()

public SentimentData.Builder clear()
Returns
Type Description
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
Type Description
SentimentData.Builder

This builder for chaining.

clearScore()

public SentimentData.Builder clearScore()

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

float score = 2;

Returns
Type Description
SentimentData.Builder

This builder for chaining.

getDefaultInstanceForType()

public SentimentData getDefaultInstanceForType()
Returns
Type Description
SentimentData

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
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
Type Description
float

The magnitude.

getScore()

public float getScore()

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

float score = 2;

Returns
Type Description
float

The score.

internalGetFieldAccessorTable()

protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(SentimentData other)

public SentimentData.Builder mergeFrom(SentimentData other)
Parameter
Name Description
other SentimentData
Returns
Type Description
SentimentData.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public SentimentData.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
SentimentData.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public SentimentData.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
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
Name Description
value float

The magnitude to set.

Returns
Type Description
SentimentData.Builder

This builder for chaining.

setScore(float value)

public SentimentData.Builder setScore(float value)

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

float score = 2;

Parameter
Name Description
value float

The score to set.

Returns
Type Description
SentimentData.Builder

This builder for chaining.