Class GuidedSearchSpec.Builder (0.37.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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public GuidedSearchSpec.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
GuidedSearchSpec.Builder
Overrides

build()

public GuidedSearchSpec build()
Returns
TypeDescription
GuidedSearchSpec

buildPartial()

public GuidedSearchSpec buildPartial()
Returns
TypeDescription
GuidedSearchSpec

clear()

public GuidedSearchSpec.Builder clear()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
GuidedSearchSpec.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public GuidedSearchSpec.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
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
TypeDescription
GuidedSearchSpec.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public GuidedSearchSpec.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
GuidedSearchSpec.Builder
Overrides

clone()

public GuidedSearchSpec.Builder clone()
Returns
TypeDescription
GuidedSearchSpec.Builder
Overrides

getDefaultInstanceForType()

public GuidedSearchSpec getDefaultInstanceForType()
Returns
TypeDescription
GuidedSearchSpec

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
int

The maxRelatedQuestions.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(GuidedSearchSpec other)

public GuidedSearchSpec.Builder mergeFrom(GuidedSearchSpec other)
Parameter
NameDescription
otherGuidedSearchSpec
Returns
TypeDescription
GuidedSearchSpec.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public GuidedSearchSpec.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
GuidedSearchSpec.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public GuidedSearchSpec.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
GuidedSearchSpec.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final GuidedSearchSpec.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueboolean

The enableRefinementAttributes to set.

Returns
TypeDescription
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
NameDescription
valueboolean

The enableRelatedQuestions to set.

Returns
TypeDescription
GuidedSearchSpec.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public GuidedSearchSpec.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueint

The maxRelatedQuestions to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
GuidedSearchSpec.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final GuidedSearchSpec.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
GuidedSearchSpec.Builder
Overrides