Package com.google.genai.types
Class SafetyAttributes
java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.SafetyAttributes
Safety attributes of a GeneratedImage or the user-provided prompt.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Builder for SafetyAttributes. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SafetyAttributes.Builder
builder()
Instantiates a builder for SafetyAttributes.List of RAI categories.Internal use only.static SafetyAttributes
Deserializes a JSON string to a SafetyAttributes object.scores()
List of scores of each categories.abstract SafetyAttributes.Builder
Creates a builder with the same values as this instance.Methods inherited from class com.google.genai.JsonSerializable
stringToJsonNode, toJson
-
Constructor Details
-
SafetyAttributes
public SafetyAttributes()
-
-
Method Details
-
categories
List of RAI categories. -
scores
List of scores of each categories. -
contentType
Internal use only. -
builder
Instantiates a builder for SafetyAttributes. -
toBuilder
Creates a builder with the same values as this instance. -
fromJson
Deserializes a JSON string to a SafetyAttributes object.
-