Class SafetySetting.Builder
- Enclosing class:
- SafetySetting
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract SafetySettingbuild()abstract SafetySetting.Buildercategory(HarmCategory category) Setter for category.category(HarmCategory.Known knownType) Setter for category given a known enum.Setter for category given a string.Clears the value of category field.Clears the value of method field.Clears the value of threshold field.abstract SafetySetting.Buildermethod(HarmBlockMethod method) Setter for method.method(HarmBlockMethod.Known knownType) Setter for method given a known enum.Setter for method given a string.abstract SafetySetting.Builderthreshold(HarmBlockThreshold threshold) Setter for threshold.threshold(HarmBlockThreshold.Known knownType) Setter for threshold given a known enum.Setter for threshold given a string.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
category
Setter for category.category: Required. Harm category.
-
clearCategory
Clears the value of category field. -
category
Setter for category given a known enum.category: Required. Harm category.
-
category
Setter for category given a string.category: Required. Harm category.
-
method
Setter for method.method: Optional. Specify if the threshold is used for probability or severity score. If not specified, the threshold is used for probability score. This field is not supported in Gemini API.
-
clearMethod
Clears the value of method field. -
method
Setter for method given a known enum.method: Optional. Specify if the threshold is used for probability or severity score. If not specified, the threshold is used for probability score. This field is not supported in Gemini API.
-
method
Setter for method given a string.method: Optional. Specify if the threshold is used for probability or severity score. If not specified, the threshold is used for probability score. This field is not supported in Gemini API.
-
threshold
Setter for threshold.threshold: Required. The harm block threshold.
-
clearThreshold
Clears the value of threshold field. -
threshold
Setter for threshold given a known enum.threshold: Required. The harm block threshold.
-
threshold
Setter for threshold given a string.threshold: Required. The harm block threshold.
-
build
-