Package com.google.genai.types
Class SafetyRating
java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.SafetyRating
Safety rating corresponding to the generated content.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class com.google.genai.JsonSerializable
objectMapper -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionblocked()Output only.static SafetyRating.Builderbuilder()Instantiates a builder for SafetyRating.category()Output only.static SafetyRatingDeserializes a JSON string to a SafetyRating object.Output only.Output only.severity()Output only.Output only.abstract SafetyRating.BuilderCreates a builder with the same values as this instance.Methods inherited from class com.google.genai.JsonSerializable
fromJsonNode, fromJsonString, toJson, toJsonNode, toJsonString
-
Constructor Details
-
SafetyRating
public SafetyRating()
-
-
Method Details
-
blocked
Output only. Indicates whether the content was filtered out because of this rating. -
category
Output only. Harm category. -
probability
Output only. Harm probability levels in the content. -
probabilityScore
Output only. Harm probability score. -
severity
Output only. Harm severity levels in the content. -
severityScore
Output only. Harm severity score. -
builder
Instantiates a builder for SafetyRating. -
toBuilder
Creates a builder with the same values as this instance. -
fromJson
Deserializes a JSON string to a SafetyRating object.
-