Class Guardrail.ModelSafety.SafetySetting.Builder (0.1.0)

public static final class Guardrail.ModelSafety.SafetySetting.Builder extends GeneratedMessage.Builder<Guardrail.ModelSafety.SafetySetting.Builder> implements Guardrail.ModelSafety.SafetySettingOrBuilder

Safety setting.

Protobuf type google.cloud.ces.v1.Guardrail.ModelSafety.SafetySetting

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

build()

public Guardrail.ModelSafety.SafetySetting build()
Returns
Type Description
Guardrail.ModelSafety.SafetySetting

buildPartial()

public Guardrail.ModelSafety.SafetySetting buildPartial()
Returns
Type Description
Guardrail.ModelSafety.SafetySetting

clear()

public Guardrail.ModelSafety.SafetySetting.Builder clear()
Returns
Type Description
Guardrail.ModelSafety.SafetySetting.Builder
Overrides

clearCategory()

public Guardrail.ModelSafety.SafetySetting.Builder clearCategory()

Required. The harm category.

.google.cloud.ces.v1.Guardrail.ModelSafety.HarmCategory category = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Guardrail.ModelSafety.SafetySetting.Builder

This builder for chaining.

clearThreshold()

public Guardrail.ModelSafety.SafetySetting.Builder clearThreshold()

Required. The harm block threshold.

.google.cloud.ces.v1.Guardrail.ModelSafety.HarmBlockThreshold threshold = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Guardrail.ModelSafety.SafetySetting.Builder

This builder for chaining.

getCategory()

public Guardrail.ModelSafety.HarmCategory getCategory()

Required. The harm category.

.google.cloud.ces.v1.Guardrail.ModelSafety.HarmCategory category = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Guardrail.ModelSafety.HarmCategory

The category.

getCategoryValue()

public int getCategoryValue()

Required. The harm category.

.google.cloud.ces.v1.Guardrail.ModelSafety.HarmCategory category = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The enum numeric value on the wire for category.

getDefaultInstanceForType()

public Guardrail.ModelSafety.SafetySetting getDefaultInstanceForType()
Returns
Type Description
Guardrail.ModelSafety.SafetySetting

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getThreshold()

public Guardrail.ModelSafety.HarmBlockThreshold getThreshold()

Required. The harm block threshold.

.google.cloud.ces.v1.Guardrail.ModelSafety.HarmBlockThreshold threshold = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Guardrail.ModelSafety.HarmBlockThreshold

The threshold.

getThresholdValue()

public int getThresholdValue()

Required. The harm block threshold.

.google.cloud.ces.v1.Guardrail.ModelSafety.HarmBlockThreshold threshold = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The enum numeric value on the wire for threshold.

internalGetFieldAccessorTable()

protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Guardrail.ModelSafety.SafetySetting other)

public Guardrail.ModelSafety.SafetySetting.Builder mergeFrom(Guardrail.ModelSafety.SafetySetting other)
Parameter
Name Description
other Guardrail.ModelSafety.SafetySetting
Returns
Type Description
Guardrail.ModelSafety.SafetySetting.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Guardrail.ModelSafety.SafetySetting.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Guardrail.ModelSafety.SafetySetting.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public Guardrail.ModelSafety.SafetySetting.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
Guardrail.ModelSafety.SafetySetting.Builder
Overrides

setCategory(Guardrail.ModelSafety.HarmCategory value)

public Guardrail.ModelSafety.SafetySetting.Builder setCategory(Guardrail.ModelSafety.HarmCategory value)

Required. The harm category.

.google.cloud.ces.v1.Guardrail.ModelSafety.HarmCategory category = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value Guardrail.ModelSafety.HarmCategory

The category to set.

Returns
Type Description
Guardrail.ModelSafety.SafetySetting.Builder

This builder for chaining.

setCategoryValue(int value)

public Guardrail.ModelSafety.SafetySetting.Builder setCategoryValue(int value)

Required. The harm category.

.google.cloud.ces.v1.Guardrail.ModelSafety.HarmCategory category = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value int

The enum numeric value on the wire for category to set.

Returns
Type Description
Guardrail.ModelSafety.SafetySetting.Builder

This builder for chaining.

setThreshold(Guardrail.ModelSafety.HarmBlockThreshold value)

public Guardrail.ModelSafety.SafetySetting.Builder setThreshold(Guardrail.ModelSafety.HarmBlockThreshold value)

Required. The harm block threshold.

.google.cloud.ces.v1.Guardrail.ModelSafety.HarmBlockThreshold threshold = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value Guardrail.ModelSafety.HarmBlockThreshold

The threshold to set.

Returns
Type Description
Guardrail.ModelSafety.SafetySetting.Builder

This builder for chaining.

setThresholdValue(int value)

public Guardrail.ModelSafety.SafetySetting.Builder setThresholdValue(int value)

Required. The harm block threshold.

.google.cloud.ces.v1.Guardrail.ModelSafety.HarmBlockThreshold threshold = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value int

The enum numeric value on the wire for threshold to set.

Returns
Type Description
Guardrail.ModelSafety.SafetySetting.Builder

This builder for chaining.