Class AnswerQueryRequest.SafetySpec.SafetySetting.Builder (0.81.0)

public static final class AnswerQueryRequest.SafetySpec.SafetySetting.Builder extends GeneratedMessage.Builder<AnswerQueryRequest.SafetySpec.SafetySetting.Builder> implements AnswerQueryRequest.SafetySpec.SafetySettingOrBuilder

Safety settings.

Protobuf type google.cloud.discoveryengine.v1.AnswerQueryRequest.SafetySpec.SafetySetting

Static Methods

getDescriptor()

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

Methods

build()

public AnswerQueryRequest.SafetySpec.SafetySetting build()
Returns
Type Description
AnswerQueryRequest.SafetySpec.SafetySetting

buildPartial()

public AnswerQueryRequest.SafetySpec.SafetySetting buildPartial()
Returns
Type Description
AnswerQueryRequest.SafetySpec.SafetySetting

clear()

public AnswerQueryRequest.SafetySpec.SafetySetting.Builder clear()
Returns
Type Description
AnswerQueryRequest.SafetySpec.SafetySetting.Builder
Overrides

clearCategory()

public AnswerQueryRequest.SafetySpec.SafetySetting.Builder clearCategory()

Required. Harm category.

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

Returns
Type Description
AnswerQueryRequest.SafetySpec.SafetySetting.Builder

This builder for chaining.

clearThreshold()

public AnswerQueryRequest.SafetySpec.SafetySetting.Builder clearThreshold()

Required. The harm block threshold.

.google.cloud.discoveryengine.v1.AnswerQueryRequest.SafetySpec.SafetySetting.HarmBlockThreshold threshold = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
AnswerQueryRequest.SafetySpec.SafetySetting.Builder

This builder for chaining.

getCategory()

public HarmCategory getCategory()

Required. Harm category.

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

Returns
Type Description
HarmCategory

The category.

getCategoryValue()

public int getCategoryValue()

Required. Harm category.

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

Returns
Type Description
int

The enum numeric value on the wire for category.

getDefaultInstanceForType()

public AnswerQueryRequest.SafetySpec.SafetySetting getDefaultInstanceForType()
Returns
Type Description
AnswerQueryRequest.SafetySpec.SafetySetting

getDescriptorForType()

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

getThreshold()

public AnswerQueryRequest.SafetySpec.SafetySetting.HarmBlockThreshold getThreshold()

Required. The harm block threshold.

.google.cloud.discoveryengine.v1.AnswerQueryRequest.SafetySpec.SafetySetting.HarmBlockThreshold threshold = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
AnswerQueryRequest.SafetySpec.SafetySetting.HarmBlockThreshold

The threshold.

getThresholdValue()

public int getThresholdValue()

Required. The harm block threshold.

.google.cloud.discoveryengine.v1.AnswerQueryRequest.SafetySpec.SafetySetting.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(AnswerQueryRequest.SafetySpec.SafetySetting other)

public AnswerQueryRequest.SafetySpec.SafetySetting.Builder mergeFrom(AnswerQueryRequest.SafetySpec.SafetySetting other)
Parameter
Name Description
other AnswerQueryRequest.SafetySpec.SafetySetting
Returns
Type Description
AnswerQueryRequest.SafetySpec.SafetySetting.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

public AnswerQueryRequest.SafetySpec.SafetySetting.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
AnswerQueryRequest.SafetySpec.SafetySetting.Builder
Overrides

setCategory(HarmCategory value)

public AnswerQueryRequest.SafetySpec.SafetySetting.Builder setCategory(HarmCategory value)

Required. Harm category.

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

Parameter
Name Description
value HarmCategory

The category to set.

Returns
Type Description
AnswerQueryRequest.SafetySpec.SafetySetting.Builder

This builder for chaining.

setCategoryValue(int value)

public AnswerQueryRequest.SafetySpec.SafetySetting.Builder setCategoryValue(int value)

Required. Harm category.

.google.cloud.discoveryengine.v1.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
AnswerQueryRequest.SafetySpec.SafetySetting.Builder

This builder for chaining.

setThreshold(AnswerQueryRequest.SafetySpec.SafetySetting.HarmBlockThreshold value)

public AnswerQueryRequest.SafetySpec.SafetySetting.Builder setThreshold(AnswerQueryRequest.SafetySpec.SafetySetting.HarmBlockThreshold value)

Required. The harm block threshold.

.google.cloud.discoveryengine.v1.AnswerQueryRequest.SafetySpec.SafetySetting.HarmBlockThreshold threshold = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value AnswerQueryRequest.SafetySpec.SafetySetting.HarmBlockThreshold

The threshold to set.

Returns
Type Description
AnswerQueryRequest.SafetySpec.SafetySetting.Builder

This builder for chaining.

setThresholdValue(int value)

public AnswerQueryRequest.SafetySpec.SafetySetting.Builder setThresholdValue(int value)

Required. The harm block threshold.

.google.cloud.discoveryengine.v1.AnswerQueryRequest.SafetySpec.SafetySetting.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
AnswerQueryRequest.SafetySpec.SafetySetting.Builder

This builder for chaining.