Struct HarmBlockMethod
The method for blocking content. If not specified, the default behavior is to use the probability score. This enum is not supported in Gemini API.
[JsonConverter(typeof(HarmBlockMethodConverter))]
public readonly record struct HarmBlockMethod : IEquatable<HarmBlockMethod>
- Implements
- Inherited Members
Properties
AllValues
public static IReadOnlyList<HarmBlockMethod> AllValues { get; }
Property Value
HarmBlockMethodUnspecified
The harm block method is unspecified.
public static HarmBlockMethod HarmBlockMethodUnspecified { get; }
Property Value
Probability
The harm block method uses the probability score.
public static HarmBlockMethod Probability { get; }
Property Value
Severity
The harm block method uses both probability and severity scores.
public static HarmBlockMethod Severity { get; }
Property Value
Value
public string Value { get; }
Property Value
Methods
Equals(HarmBlockMethod)
public bool Equals(HarmBlockMethod other)
Parameters
otherHarmBlockMethod
Returns
FromString(string)
public static HarmBlockMethod FromString(string value)
Parameters
valuestring
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
Operators
implicit operator HarmBlockMethod(string)
public static implicit operator HarmBlockMethod(string value)
Parameters
valuestring