public static final class SafetySetting.Builder extends com.google.protobuf.GeneratedMessage.Builder<SafetySetting.Builder> implements SafetySettingOrBuilder
Safety settings.Protobuf type
google.cloud.aiplatform.v1.SafetySettingaddRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitfindInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneofpublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<SafetySetting.Builder>public SafetySetting.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessage.Builder<SafetySetting.Builder>public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.Message.BuildergetDescriptorForType in interface com.google.protobuf.MessageOrBuildergetDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<SafetySetting.Builder>public SafetySetting getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic SafetySetting build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic SafetySetting buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic SafetySetting.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<SafetySetting.Builder>public SafetySetting.Builder mergeFrom(SafetySetting other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessage.Builder<SafetySetting.Builder>public SafetySetting.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in interface com.google.protobuf.MessageLite.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<SafetySetting.Builder>IOExceptionpublic int getCategoryValue()
Required. Harm category.
.google.cloud.aiplatform.v1.HarmCategory category = 1 [(.google.api.field_behavior) = REQUIRED];
getCategoryValue in interface SafetySettingOrBuilderpublic SafetySetting.Builder setCategoryValue(int value)
Required. Harm category.
.google.cloud.aiplatform.v1.HarmCategory category = 1 [(.google.api.field_behavior) = REQUIRED];
value - The enum numeric value on the wire for category to set.public HarmCategory getCategory()
Required. Harm category.
.google.cloud.aiplatform.v1.HarmCategory category = 1 [(.google.api.field_behavior) = REQUIRED];
getCategory in interface SafetySettingOrBuilderpublic SafetySetting.Builder setCategory(HarmCategory value)
Required. Harm category.
.google.cloud.aiplatform.v1.HarmCategory category = 1 [(.google.api.field_behavior) = REQUIRED];
value - The category to set.public SafetySetting.Builder clearCategory()
Required. Harm category.
.google.cloud.aiplatform.v1.HarmCategory category = 1 [(.google.api.field_behavior) = REQUIRED];
public int getThresholdValue()
Required. The harm block threshold.
.google.cloud.aiplatform.v1.SafetySetting.HarmBlockThreshold threshold = 2 [(.google.api.field_behavior) = REQUIRED];
getThresholdValue in interface SafetySettingOrBuilderpublic SafetySetting.Builder setThresholdValue(int value)
Required. The harm block threshold.
.google.cloud.aiplatform.v1.SafetySetting.HarmBlockThreshold threshold = 2 [(.google.api.field_behavior) = REQUIRED];
value - The enum numeric value on the wire for threshold to set.public SafetySetting.HarmBlockThreshold getThreshold()
Required. The harm block threshold.
.google.cloud.aiplatform.v1.SafetySetting.HarmBlockThreshold threshold = 2 [(.google.api.field_behavior) = REQUIRED];
getThreshold in interface SafetySettingOrBuilderpublic SafetySetting.Builder setThreshold(SafetySetting.HarmBlockThreshold value)
Required. The harm block threshold.
.google.cloud.aiplatform.v1.SafetySetting.HarmBlockThreshold threshold = 2 [(.google.api.field_behavior) = REQUIRED];
value - The threshold to set.public SafetySetting.Builder clearThreshold()
Required. The harm block threshold.
.google.cloud.aiplatform.v1.SafetySetting.HarmBlockThreshold threshold = 2 [(.google.api.field_behavior) = REQUIRED];
public int getMethodValue()
Optional. Specify if the threshold is used for probability or severity score. If not specified, the threshold is used for probability score.
.google.cloud.aiplatform.v1.SafetySetting.HarmBlockMethod method = 4 [(.google.api.field_behavior) = OPTIONAL];
getMethodValue in interface SafetySettingOrBuilderpublic SafetySetting.Builder setMethodValue(int value)
Optional. Specify if the threshold is used for probability or severity score. If not specified, the threshold is used for probability score.
.google.cloud.aiplatform.v1.SafetySetting.HarmBlockMethod method = 4 [(.google.api.field_behavior) = OPTIONAL];
value - The enum numeric value on the wire for method to set.public SafetySetting.HarmBlockMethod getMethod()
Optional. Specify if the threshold is used for probability or severity score. If not specified, the threshold is used for probability score.
.google.cloud.aiplatform.v1.SafetySetting.HarmBlockMethod method = 4 [(.google.api.field_behavior) = OPTIONAL];
getMethod in interface SafetySettingOrBuilderpublic SafetySetting.Builder setMethod(SafetySetting.HarmBlockMethod value)
Optional. Specify if the threshold is used for probability or severity score. If not specified, the threshold is used for probability score.
.google.cloud.aiplatform.v1.SafetySetting.HarmBlockMethod method = 4 [(.google.api.field_behavior) = OPTIONAL];
value - The method to set.public SafetySetting.Builder clearMethod()
Optional. Specify if the threshold is used for probability or severity score. If not specified, the threshold is used for probability score.
.google.cloud.aiplatform.v1.SafetySetting.HarmBlockMethod method = 4 [(.google.api.field_behavior) = OPTIONAL];
Copyright © 2026 Google LLC. All rights reserved.