public enum HarmCategory extends Enum<HarmCategory> implements com.google.protobuf.ProtocolMessageEnum
Harm categories that will block the content.Protobuf enum
google.cloud.aiplatform.v1beta1.HarmCategory| Enum Constant and Description |
|---|
HARM_CATEGORY_CIVIC_INTEGRITY
The harm category is civic integrity.
|
HARM_CATEGORY_DANGEROUS_CONTENT
The harm category is dangerous content.
|
HARM_CATEGORY_HARASSMENT
The harm category is harassment.
|
HARM_CATEGORY_HATE_SPEECH
The harm category is hate speech.
|
HARM_CATEGORY_SEXUALLY_EXPLICIT
The harm category is sexually explicit content.
|
HARM_CATEGORY_UNSPECIFIED
The harm category is unspecified.
|
UNRECOGNIZED |
| Modifier and Type | Field and Description |
|---|---|
static int |
HARM_CATEGORY_CIVIC_INTEGRITY_VALUE
The harm category is civic integrity.
|
static int |
HARM_CATEGORY_DANGEROUS_CONTENT_VALUE
The harm category is dangerous content.
|
static int |
HARM_CATEGORY_HARASSMENT_VALUE
The harm category is harassment.
|
static int |
HARM_CATEGORY_HATE_SPEECH_VALUE
The harm category is hate speech.
|
static int |
HARM_CATEGORY_SEXUALLY_EXPLICIT_VALUE
The harm category is sexually explicit content.
|
static int |
HARM_CATEGORY_UNSPECIFIED_VALUE
The harm category is unspecified.
|
| Modifier and Type | Method and Description |
|---|---|
static HarmCategory |
forNumber(int value) |
static com.google.protobuf.Descriptors.EnumDescriptor |
getDescriptor() |
com.google.protobuf.Descriptors.EnumDescriptor |
getDescriptorForType() |
int |
getNumber() |
com.google.protobuf.Descriptors.EnumValueDescriptor |
getValueDescriptor() |
static com.google.protobuf.Internal.EnumLiteMap<HarmCategory> |
internalGetValueMap() |
static HarmCategory |
valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) |
static HarmCategory |
valueOf(int value)
Deprecated.
Use
forNumber(int) instead. |
static HarmCategory |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static HarmCategory[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final HarmCategory HARM_CATEGORY_UNSPECIFIED
The harm category is unspecified.
HARM_CATEGORY_UNSPECIFIED = 0;public static final HarmCategory HARM_CATEGORY_HATE_SPEECH
The harm category is hate speech.
HARM_CATEGORY_HATE_SPEECH = 1;public static final HarmCategory HARM_CATEGORY_DANGEROUS_CONTENT
The harm category is dangerous content.
HARM_CATEGORY_DANGEROUS_CONTENT = 2;public static final HarmCategory HARM_CATEGORY_HARASSMENT
The harm category is harassment.
HARM_CATEGORY_HARASSMENT = 3;public static final HarmCategory HARM_CATEGORY_SEXUALLY_EXPLICIT
The harm category is sexually explicit content.
HARM_CATEGORY_SEXUALLY_EXPLICIT = 4;public static final HarmCategory HARM_CATEGORY_CIVIC_INTEGRITY
The harm category is civic integrity.
HARM_CATEGORY_CIVIC_INTEGRITY = 5;public static final HarmCategory UNRECOGNIZED
public static final int HARM_CATEGORY_UNSPECIFIED_VALUE
The harm category is unspecified.
HARM_CATEGORY_UNSPECIFIED = 0;public static final int HARM_CATEGORY_HATE_SPEECH_VALUE
The harm category is hate speech.
HARM_CATEGORY_HATE_SPEECH = 1;public static final int HARM_CATEGORY_DANGEROUS_CONTENT_VALUE
The harm category is dangerous content.
HARM_CATEGORY_DANGEROUS_CONTENT = 2;public static final int HARM_CATEGORY_HARASSMENT_VALUE
The harm category is harassment.
HARM_CATEGORY_HARASSMENT = 3;public static final int HARM_CATEGORY_SEXUALLY_EXPLICIT_VALUE
The harm category is sexually explicit content.
HARM_CATEGORY_SEXUALLY_EXPLICIT = 4;public static final int HARM_CATEGORY_CIVIC_INTEGRITY_VALUE
The harm category is civic integrity.
HARM_CATEGORY_CIVIC_INTEGRITY = 5;public static HarmCategory[] values()
for (HarmCategory c : HarmCategory.values()) System.out.println(c);
public static HarmCategory valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic final int getNumber()
getNumber in interface com.google.protobuf.Internal.EnumLitegetNumber in interface com.google.protobuf.ProtocolMessageEnum@Deprecated public static HarmCategory valueOf(int value)
forNumber(int) instead.value - The numeric wire value of the corresponding enum entry.public static HarmCategory forNumber(int value)
value - The numeric wire value of the corresponding enum entry.public static com.google.protobuf.Internal.EnumLiteMap<HarmCategory> internalGetValueMap()
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()
getValueDescriptor in interface com.google.protobuf.ProtocolMessageEnumpublic final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.ProtocolMessageEnumpublic static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor()
public static HarmCategory valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)
Copyright © 2025 Google LLC. All rights reserved.