Class GuidedSearchSpec.Builder (0.40.0)

public static final class GuidedSearchSpec.Builder extends GeneratedMessageV3.Builder<GuidedSearchSpec.Builder> implements GuidedSearchSpecOrBuilder

Defines guided search spec.

Protobuf type google.cloud.discoveryengine.v1alpha.GuidedSearchSpec

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public GuidedSearchSpec.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
GuidedSearchSpec.Builder
Overrides

build()

public GuidedSearchSpec build()
Returns
Type Description
GuidedSearchSpec

buildPartial()

public GuidedSearchSpec buildPartial()
Returns
Type Description
GuidedSearchSpec

clear()

public GuidedSearchSpec.Builder clear()
Returns
Type Description
GuidedSearchSpec.Builder
Overrides

clearEnableRefinementAttributes()

public GuidedSearchSpec.Builder clearEnableRefinementAttributes()

Whether or not to enable and include refinement attributes in gudied search result.

bool enable_refinement_attributes = 1;

Returns
Type Description
GuidedSearchSpec.Builder

This builder for chaining.

clearEnableRelatedQuestions()

public GuidedSearchSpec.Builder clearEnableRelatedQuestions()

Whether or not to enable and include related questions in search response.

bool enable_related_questions = 2;

Returns
Type Description
GuidedSearchSpec.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public GuidedSearchSpec.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
GuidedSearchSpec.Builder
Overrides

clearMaxRelatedQuestions()

public GuidedSearchSpec.Builder clearMaxRelatedQuestions()

Max number of related questions to be returned. The valid range is [1, 5]. If enable_related_questions is true, the default value is 3.

int32 max_related_questions = 3;

Returns
Type Description
GuidedSearchSpec.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public GuidedSearchSpec.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
GuidedSearchSpec.Builder
Overrides

clone()

public GuidedSearchSpec.Builder clone()
Returns
Type Description
GuidedSearchSpec.Builder
Overrides

getDefaultInstanceForType()

public GuidedSearchSpec getDefaultInstanceForType()
Returns
Type Description
GuidedSearchSpec

getDescriptorForType()

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

getEnableRefinementAttributes()

public boolean getEnableRefinementAttributes()

Whether or not to enable and include refinement attributes in gudied search result.

bool enable_refinement_attributes = 1;

Returns
Type Description
boolean

The enableRefinementAttributes.

getEnableRelatedQuestions()

public boolean getEnableRelatedQuestions()

Whether or not to enable and include related questions in search response.

bool enable_related_questions = 2;

Returns
Type Description
boolean

The enableRelatedQuestions.

getMaxRelatedQuestions()

public int getMaxRelatedQuestions()

Max number of related questions to be returned. The valid range is [1, 5]. If enable_related_questions is true, the default value is 3.

int32 max_related_questions = 3;

Returns
Type Description
int

The maxRelatedQuestions.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(GuidedSearchSpec other)

public GuidedSearchSpec.Builder mergeFrom(GuidedSearchSpec other)
Parameter
Name Description
other GuidedSearchSpec
Returns
Type Description
GuidedSearchSpec.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

public GuidedSearchSpec.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
GuidedSearchSpec.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final GuidedSearchSpec.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
GuidedSearchSpec.Builder
Overrides

setEnableRefinementAttributes(boolean value)

public GuidedSearchSpec.Builder setEnableRefinementAttributes(boolean value)

Whether or not to enable and include refinement attributes in gudied search result.

bool enable_refinement_attributes = 1;

Parameter
Name Description
value boolean

The enableRefinementAttributes to set.

Returns
Type Description
GuidedSearchSpec.Builder

This builder for chaining.

setEnableRelatedQuestions(boolean value)

public GuidedSearchSpec.Builder setEnableRelatedQuestions(boolean value)

Whether or not to enable and include related questions in search response.

bool enable_related_questions = 2;

Parameter
Name Description
value boolean

The enableRelatedQuestions to set.

Returns
Type Description
GuidedSearchSpec.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public GuidedSearchSpec.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
GuidedSearchSpec.Builder
Overrides

setMaxRelatedQuestions(int value)

public GuidedSearchSpec.Builder setMaxRelatedQuestions(int value)

Max number of related questions to be returned. The valid range is [1, 5]. If enable_related_questions is true, the default value is 3.

int32 max_related_questions = 3;

Parameter
Name Description
value int

The maxRelatedQuestions to set.

Returns
Type Description
GuidedSearchSpec.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public GuidedSearchSpec.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
GuidedSearchSpec.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final GuidedSearchSpec.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
GuidedSearchSpec.Builder
Overrides