public class Emotion
extends java.lang.Object
implements java.io.Serializable
The emotions that appear to be expressed on the face, and the confidence level in the determination. The API is only making a determination of the physical appearance of a person's face. It is not a determination of the person’s internal emotional state and should not be used in such a way. For example, a person pretending to have a sad face might not be sad emotionally.
Constructor and Description |
---|
Emotion() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.Float |
getConfidence()
Level of confidence in the determination.
|
java.lang.String |
getType()
Type of emotion detected.
|
int |
hashCode() |
void |
setConfidence(java.lang.Float confidence)
Level of confidence in the determination.
|
void |
setType(EmotionName type)
Type of emotion detected.
|
void |
setType(java.lang.String type)
Type of emotion detected.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
Emotion |
withConfidence(java.lang.Float confidence)
Level of confidence in the determination.
|
Emotion |
withType(EmotionName type)
Type of emotion detected.
|
Emotion |
withType(java.lang.String type)
Type of emotion detected.
|
public java.lang.String getType()
Type of emotion detected.
Constraints:
Allowed Values: HAPPY, SAD, ANGRY, CONFUSED, DISGUSTED, SURPRISED,
CALM, UNKNOWN, FEAR
Type of emotion detected.
EmotionName
public void setType(java.lang.String type)
Type of emotion detected.
Constraints:
Allowed Values: HAPPY, SAD, ANGRY, CONFUSED, DISGUSTED, SURPRISED,
CALM, UNKNOWN, FEAR
type
- Type of emotion detected.
EmotionName
public Emotion withType(java.lang.String type)
Type of emotion detected.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: HAPPY, SAD, ANGRY, CONFUSED, DISGUSTED, SURPRISED,
CALM, UNKNOWN, FEAR
type
- Type of emotion detected.
EmotionName
public void setType(EmotionName type)
Type of emotion detected.
Constraints:
Allowed Values: HAPPY, SAD, ANGRY, CONFUSED, DISGUSTED, SURPRISED,
CALM, UNKNOWN, FEAR
type
- Type of emotion detected.
EmotionName
public Emotion withType(EmotionName type)
Type of emotion detected.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: HAPPY, SAD, ANGRY, CONFUSED, DISGUSTED, SURPRISED,
CALM, UNKNOWN, FEAR
type
- Type of emotion detected.
EmotionName
public java.lang.Float getConfidence()
Level of confidence in the determination.
Constraints:
Length: 0 - 100
Level of confidence in the determination.
public void setConfidence(java.lang.Float confidence)
Level of confidence in the determination.
Constraints:
Length: 0 - 100
confidence
- Level of confidence in the determination.
public Emotion withConfidence(java.lang.Float confidence)
Level of confidence in the determination.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 0 - 100
confidence
- Level of confidence in the determination.
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.