Class SafetyRating.Builder
- Enclosing class:
- SafetyRating
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract SafetyRating.Builder
blocked
(boolean blocked) Setter for blocked.abstract SafetyRating
build()
abstract SafetyRating.Builder
category
(HarmCategory category) Setter for category.category
(HarmCategory.Known knownType) Setter for category given a known enum.Setter for category given a string.abstract SafetyRating.Builder
overwrittenThreshold
(HarmBlockThreshold overwrittenThreshold) Setter for overwrittenThreshold.overwrittenThreshold
(HarmBlockThreshold.Known knownType) Setter for overwrittenThreshold given a known enum.overwrittenThreshold
(String overwrittenThreshold) Setter for overwrittenThreshold given a string.abstract SafetyRating.Builder
probability
(HarmProbability probability) Setter for probability.probability
(HarmProbability.Known knownType) Setter for probability given a known enum.probability
(String probability) Setter for probability given a string.abstract SafetyRating.Builder
probabilityScore
(Float probabilityScore) Setter for probabilityScore.abstract SafetyRating.Builder
severity
(HarmSeverity severity) Setter for severity.severity
(HarmSeverity.Known knownType) Setter for severity given a known enum.Setter for severity given a string.abstract SafetyRating.Builder
severityScore
(Float severityScore) Setter for severityScore.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
blocked
Setter for blocked.blocked: Output only. Indicates whether the content was filtered out because of this rating.
-
category
Setter for category.category: Output only. Harm category.
-
category
Setter for category given a known enum.category: Output only. Harm category.
-
category
Setter for category given a string.category: Output only. Harm category.
-
overwrittenThreshold
Setter for overwrittenThreshold.overwrittenThreshold: Output only. The overwritten threshold for the safety category of Gemini 2.0 image out. If minors are detected in the output image, the threshold of each safety category will be overwritten if user sets a lower threshold.
-
overwrittenThreshold
@CanIgnoreReturnValue public SafetyRating.Builder overwrittenThreshold(HarmBlockThreshold.Known knownType) Setter for overwrittenThreshold given a known enum.overwrittenThreshold: Output only. The overwritten threshold for the safety category of Gemini 2.0 image out. If minors are detected in the output image, the threshold of each safety category will be overwritten if user sets a lower threshold.
-
overwrittenThreshold
Setter for overwrittenThreshold given a string.overwrittenThreshold: Output only. The overwritten threshold for the safety category of Gemini 2.0 image out. If minors are detected in the output image, the threshold of each safety category will be overwritten if user sets a lower threshold.
-
probability
Setter for probability.probability: Output only. Harm probability levels in the content.
-
probability
Setter for probability given a known enum.probability: Output only. Harm probability levels in the content.
-
probability
Setter for probability given a string.probability: Output only. Harm probability levels in the content.
-
probabilityScore
Setter for probabilityScore.probabilityScore: Output only. Harm probability score.
-
severity
Setter for severity.severity: Output only. Harm severity levels in the content.
-
severity
Setter for severity given a known enum.severity: Output only. Harm severity levels in the content.
-
severity
Setter for severity given a string.severity: Output only. Harm severity levels in the content.
-
severityScore
Setter for severityScore.severityScore: Output only. Harm severity score.
-
build
-