Struct HarmCategory
The harm category to be blocked.
[JsonConverter(typeof(HarmCategoryConverter))]
public readonly record struct HarmCategory : IEquatable<HarmCategory>
- Implements
- Inherited Members
Properties
AllValues
public static IReadOnlyList<HarmCategory> AllValues { get; }
Property Value
HarmCategoryCivicIntegrity
Deprecated: Election filter is not longer supported. The harm category is civic integrity.
public static HarmCategory HarmCategoryCivicIntegrity { get; }
Property Value
HarmCategoryDangerousContent
Content that promotes, facilitates, or enables dangerous activities.
public static HarmCategory HarmCategoryDangerousContent { get; }
Property Value
HarmCategoryHarassment
Abusive, threatening, or content intended to bully, torment, or ridicule.
public static HarmCategory HarmCategoryHarassment { get; }
Property Value
HarmCategoryHateSpeech
Content that promotes violence or incites hatred against individuals or groups based on certain attributes.
public static HarmCategory HarmCategoryHateSpeech { get; }
Property Value
HarmCategoryImageDangerousContent
Images that contain dangerous content. This enum value is not supported in Gemini API.
public static HarmCategory HarmCategoryImageDangerousContent { get; }
Property Value
HarmCategoryImageHarassment
Images that contain harassment. This enum value is not supported in Gemini API.
public static HarmCategory HarmCategoryImageHarassment { get; }
Property Value
HarmCategoryImageHate
Images that contain hate speech. This enum value is not supported in Gemini API.
public static HarmCategory HarmCategoryImageHate { get; }
Property Value
HarmCategoryImageSexuallyExplicit
Images that contain sexually explicit content. This enum value is not supported in Gemini API.
public static HarmCategory HarmCategoryImageSexuallyExplicit { get; }
Property Value
HarmCategoryJailbreak
Prompts designed to bypass safety filters. This enum value is not supported in Gemini API.
public static HarmCategory HarmCategoryJailbreak { get; }
Property Value
HarmCategorySexuallyExplicit
Content that contains sexually explicit material.
public static HarmCategory HarmCategorySexuallyExplicit { get; }
Property Value
HarmCategoryUnspecified
Default value. This value is unused.
public static HarmCategory HarmCategoryUnspecified { get; }
Property Value
Value
public string Value { get; }
Property Value
Methods
Equals(HarmCategory)
public bool Equals(HarmCategory other)
Parameters
otherHarmCategory
Returns
FromString(string)
public static HarmCategory FromString(string value)
Parameters
valuestring
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
Operators
implicit operator HarmCategory(string)
public static implicit operator HarmCategory(string value)
Parameters
valuestring