Class EvaluationResult.SemanticSimilarityResult.Builder (0.3.0)

public static final class EvaluationResult.SemanticSimilarityResult.Builder extends GeneratedMessage.Builder<EvaluationResult.SemanticSimilarityResult.Builder> implements EvaluationResult.SemanticSimilarityResultOrBuilder

The result of the semantic similarity check.

Protobuf type google.cloud.ces.v1beta.EvaluationResult.SemanticSimilarityResult

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

build()

public EvaluationResult.SemanticSimilarityResult build()
Returns
Type Description
EvaluationResult.SemanticSimilarityResult

buildPartial()

public EvaluationResult.SemanticSimilarityResult buildPartial()
Returns
Type Description
EvaluationResult.SemanticSimilarityResult

clear()

public EvaluationResult.SemanticSimilarityResult.Builder clear()
Returns
Type Description
EvaluationResult.SemanticSimilarityResult.Builder
Overrides

clearExplanation()

public EvaluationResult.SemanticSimilarityResult.Builder clearExplanation()

Output only. The explanation for the semantic similarity score.

string explanation = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
EvaluationResult.SemanticSimilarityResult.Builder

This builder for chaining.

clearLabel()

public EvaluationResult.SemanticSimilarityResult.Builder clearLabel()

Output only. The label associated with each score. Score 4: Fully Consistent Score 3: Mostly Consistent Score 2: Partially Consistent (Minor Omissions) Score 1: Largely Inconsistent (Major Omissions) Score 0: Completely Inconsistent / Contradictory

string label = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
EvaluationResult.SemanticSimilarityResult.Builder

This builder for chaining.

clearOutcome()

public EvaluationResult.SemanticSimilarityResult.Builder clearOutcome()

Output only. The outcome of the semantic similarity check. This is determined by comparing the score to the semantic_similarity_success_threshold. If the score is equal to or above the threshold, the outcome will be PASS. Otherwise, the outcome will be FAIL.

.google.cloud.ces.v1beta.EvaluationResult.Outcome outcome = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
EvaluationResult.SemanticSimilarityResult.Builder

This builder for chaining.

clearScore()

public EvaluationResult.SemanticSimilarityResult.Builder clearScore()

Output only. The semantic similarity score. Can be 0, 1, 2, 3, or 4.

optional int32 score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
EvaluationResult.SemanticSimilarityResult.Builder

This builder for chaining.

getDefaultInstanceForType()

public EvaluationResult.SemanticSimilarityResult getDefaultInstanceForType()
Returns
Type Description
EvaluationResult.SemanticSimilarityResult

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getExplanation()

public String getExplanation()

Output only. The explanation for the semantic similarity score.

string explanation = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The explanation.

getExplanationBytes()

public ByteString getExplanationBytes()

Output only. The explanation for the semantic similarity score.

string explanation = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for explanation.

getLabel()

public String getLabel()

Output only. The label associated with each score. Score 4: Fully Consistent Score 3: Mostly Consistent Score 2: Partially Consistent (Minor Omissions) Score 1: Largely Inconsistent (Major Omissions) Score 0: Completely Inconsistent / Contradictory

string label = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The label.

getLabelBytes()

public ByteString getLabelBytes()

Output only. The label associated with each score. Score 4: Fully Consistent Score 3: Mostly Consistent Score 2: Partially Consistent (Minor Omissions) Score 1: Largely Inconsistent (Major Omissions) Score 0: Completely Inconsistent / Contradictory

string label = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for label.

getOutcome()

public EvaluationResult.Outcome getOutcome()

Output only. The outcome of the semantic similarity check. This is determined by comparing the score to the semantic_similarity_success_threshold. If the score is equal to or above the threshold, the outcome will be PASS. Otherwise, the outcome will be FAIL.

.google.cloud.ces.v1beta.EvaluationResult.Outcome outcome = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
EvaluationResult.Outcome

The outcome.

getOutcomeValue()

public int getOutcomeValue()

Output only. The outcome of the semantic similarity check. This is determined by comparing the score to the semantic_similarity_success_threshold. If the score is equal to or above the threshold, the outcome will be PASS. Otherwise, the outcome will be FAIL.

.google.cloud.ces.v1beta.EvaluationResult.Outcome outcome = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The enum numeric value on the wire for outcome.

getScore()

public int getScore()

Output only. The semantic similarity score. Can be 0, 1, 2, 3, or 4.

optional int32 score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The score.

hasScore()

public boolean hasScore()

Output only. The semantic similarity score. Can be 0, 1, 2, 3, or 4.

optional int32 score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the score field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(EvaluationResult.SemanticSimilarityResult other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

public EvaluationResult.SemanticSimilarityResult.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
EvaluationResult.SemanticSimilarityResult.Builder
Overrides

setExplanation(String value)

public EvaluationResult.SemanticSimilarityResult.Builder setExplanation(String value)

Output only. The explanation for the semantic similarity score.

string explanation = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The explanation to set.

Returns
Type Description
EvaluationResult.SemanticSimilarityResult.Builder

This builder for chaining.

setExplanationBytes(ByteString value)

public EvaluationResult.SemanticSimilarityResult.Builder setExplanationBytes(ByteString value)

Output only. The explanation for the semantic similarity score.

string explanation = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for explanation to set.

Returns
Type Description
EvaluationResult.SemanticSimilarityResult.Builder

This builder for chaining.

setLabel(String value)

public EvaluationResult.SemanticSimilarityResult.Builder setLabel(String value)

Output only. The label associated with each score. Score 4: Fully Consistent Score 3: Mostly Consistent Score 2: Partially Consistent (Minor Omissions) Score 1: Largely Inconsistent (Major Omissions) Score 0: Completely Inconsistent / Contradictory

string label = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The label to set.

Returns
Type Description
EvaluationResult.SemanticSimilarityResult.Builder

This builder for chaining.

setLabelBytes(ByteString value)

public EvaluationResult.SemanticSimilarityResult.Builder setLabelBytes(ByteString value)

Output only. The label associated with each score. Score 4: Fully Consistent Score 3: Mostly Consistent Score 2: Partially Consistent (Minor Omissions) Score 1: Largely Inconsistent (Major Omissions) Score 0: Completely Inconsistent / Contradictory

string label = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for label to set.

Returns
Type Description
EvaluationResult.SemanticSimilarityResult.Builder

This builder for chaining.

setOutcome(EvaluationResult.Outcome value)

public EvaluationResult.SemanticSimilarityResult.Builder setOutcome(EvaluationResult.Outcome value)

Output only. The outcome of the semantic similarity check. This is determined by comparing the score to the semantic_similarity_success_threshold. If the score is equal to or above the threshold, the outcome will be PASS. Otherwise, the outcome will be FAIL.

.google.cloud.ces.v1beta.EvaluationResult.Outcome outcome = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value EvaluationResult.Outcome

The outcome to set.

Returns
Type Description
EvaluationResult.SemanticSimilarityResult.Builder

This builder for chaining.

setOutcomeValue(int value)

public EvaluationResult.SemanticSimilarityResult.Builder setOutcomeValue(int value)

Output only. The outcome of the semantic similarity check. This is determined by comparing the score to the semantic_similarity_success_threshold. If the score is equal to or above the threshold, the outcome will be PASS. Otherwise, the outcome will be FAIL.

.google.cloud.ces.v1beta.EvaluationResult.Outcome outcome = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value int

The enum numeric value on the wire for outcome to set.

Returns
Type Description
EvaluationResult.SemanticSimilarityResult.Builder

This builder for chaining.

setScore(int value)

public EvaluationResult.SemanticSimilarityResult.Builder setScore(int value)

Output only. The semantic similarity score. Can be 0, 1, 2, 3, or 4.

optional int32 score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value int

The score to set.

Returns
Type Description
EvaluationResult.SemanticSimilarityResult.Builder

This builder for chaining.