Class GenerateGroundedContentRequest.GroundingSource.SearchSource.Builder (0.49.0)

public static final class GenerateGroundedContentRequest.GroundingSource.SearchSource.Builder extends GeneratedMessageV3.Builder<GenerateGroundedContentRequest.GroundingSource.SearchSource.Builder> implements GenerateGroundedContentRequest.GroundingSource.SearchSourceOrBuilder

Message to be used for grounding with Vertex AI Search.

Protobuf type google.cloud.discoveryengine.v1.GenerateGroundedContentRequest.GroundingSource.SearchSource

Inheritance

Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > GenerateGroundedContentRequest.GroundingSource.SearchSource.Builder

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public GenerateGroundedContentRequest.GroundingSource.SearchSource build()
Returns
Type Description
GenerateGroundedContentRequest.GroundingSource.SearchSource

buildPartial()

public GenerateGroundedContentRequest.GroundingSource.SearchSource buildPartial()
Returns
Type Description
GenerateGroundedContentRequest.GroundingSource.SearchSource

clear()

public GenerateGroundedContentRequest.GroundingSource.SearchSource.Builder clear()
Returns
Type Description
GenerateGroundedContentRequest.GroundingSource.SearchSource.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public GenerateGroundedContentRequest.GroundingSource.SearchSource.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
GenerateGroundedContentRequest.GroundingSource.SearchSource.Builder
Overrides

clearFilter()

public GenerateGroundedContentRequest.GroundingSource.SearchSource.Builder clearFilter()

Filter expression to be applied to the search.

The syntax is the same as SearchRequest.filter.

string filter = 3;

Returns
Type Description
GenerateGroundedContentRequest.GroundingSource.SearchSource.Builder

This builder for chaining.

clearMaxResultCount()

public GenerateGroundedContentRequest.GroundingSource.SearchSource.Builder clearMaxResultCount()

Number of search results to return.

The default value is 10. The maximumm allowed value is 10.

int32 max_result_count = 2;

Returns
Type Description
GenerateGroundedContentRequest.GroundingSource.SearchSource.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public GenerateGroundedContentRequest.GroundingSource.SearchSource.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
GenerateGroundedContentRequest.GroundingSource.SearchSource.Builder
Overrides

clearSafeSearch()

public GenerateGroundedContentRequest.GroundingSource.SearchSource.Builder clearSafeSearch()

If set, safe search is enabled in Vertex AI Search requests.

bool safe_search = 5;

Returns
Type Description
GenerateGroundedContentRequest.GroundingSource.SearchSource.Builder

This builder for chaining.

clearServingConfig()

public GenerateGroundedContentRequest.GroundingSource.SearchSource.Builder clearServingConfig()

The resource name of the Engine to use.

Format: projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}

string serving_config = 1 [(.google.api.resource_reference) = { ... }

Returns
Type Description
GenerateGroundedContentRequest.GroundingSource.SearchSource.Builder

This builder for chaining.

clone()

public GenerateGroundedContentRequest.GroundingSource.SearchSource.Builder clone()
Returns
Type Description
GenerateGroundedContentRequest.GroundingSource.SearchSource.Builder
Overrides

getDefaultInstanceForType()

public GenerateGroundedContentRequest.GroundingSource.SearchSource getDefaultInstanceForType()
Returns
Type Description
GenerateGroundedContentRequest.GroundingSource.SearchSource

getDescriptorForType()

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

getFilter()

public String getFilter()

Filter expression to be applied to the search.

The syntax is the same as SearchRequest.filter.

string filter = 3;

Returns
Type Description
String

The filter.

getFilterBytes()

public ByteString getFilterBytes()

Filter expression to be applied to the search.

The syntax is the same as SearchRequest.filter.

string filter = 3;

Returns
Type Description
ByteString

The bytes for filter.

getMaxResultCount()

public int getMaxResultCount()

Number of search results to return.

The default value is 10. The maximumm allowed value is 10.

int32 max_result_count = 2;

Returns
Type Description
int

The maxResultCount.

getSafeSearch()

public boolean getSafeSearch()

If set, safe search is enabled in Vertex AI Search requests.

bool safe_search = 5;

Returns
Type Description
boolean

The safeSearch.

getServingConfig()

public String getServingConfig()

The resource name of the Engine to use.

Format: projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}

string serving_config = 1 [(.google.api.resource_reference) = { ... }

Returns
Type Description
String

The servingConfig.

getServingConfigBytes()

public ByteString getServingConfigBytes()

The resource name of the Engine to use.

Format: projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}

string serving_config = 1 [(.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for servingConfig.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(GenerateGroundedContentRequest.GroundingSource.SearchSource other)

public GenerateGroundedContentRequest.GroundingSource.SearchSource.Builder mergeFrom(GenerateGroundedContentRequest.GroundingSource.SearchSource other)
Parameter
Name Description
other GenerateGroundedContentRequest.GroundingSource.SearchSource
Returns
Type Description
GenerateGroundedContentRequest.GroundingSource.SearchSource.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

public GenerateGroundedContentRequest.GroundingSource.SearchSource.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
GenerateGroundedContentRequest.GroundingSource.SearchSource.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final GenerateGroundedContentRequest.GroundingSource.SearchSource.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
GenerateGroundedContentRequest.GroundingSource.SearchSource.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

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

setFilter(String value)

public GenerateGroundedContentRequest.GroundingSource.SearchSource.Builder setFilter(String value)

Filter expression to be applied to the search.

The syntax is the same as SearchRequest.filter.

string filter = 3;

Parameter
Name Description
value String

The filter to set.

Returns
Type Description
GenerateGroundedContentRequest.GroundingSource.SearchSource.Builder

This builder for chaining.

setFilterBytes(ByteString value)

public GenerateGroundedContentRequest.GroundingSource.SearchSource.Builder setFilterBytes(ByteString value)

Filter expression to be applied to the search.

The syntax is the same as SearchRequest.filter.

string filter = 3;

Parameter
Name Description
value ByteString

The bytes for filter to set.

Returns
Type Description
GenerateGroundedContentRequest.GroundingSource.SearchSource.Builder

This builder for chaining.

setMaxResultCount(int value)

public GenerateGroundedContentRequest.GroundingSource.SearchSource.Builder setMaxResultCount(int value)

Number of search results to return.

The default value is 10. The maximumm allowed value is 10.

int32 max_result_count = 2;

Parameter
Name Description
value int

The maxResultCount to set.

Returns
Type Description
GenerateGroundedContentRequest.GroundingSource.SearchSource.Builder

This builder for chaining.

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

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

setSafeSearch(boolean value)

public GenerateGroundedContentRequest.GroundingSource.SearchSource.Builder setSafeSearch(boolean value)

If set, safe search is enabled in Vertex AI Search requests.

bool safe_search = 5;

Parameter
Name Description
value boolean

The safeSearch to set.

Returns
Type Description
GenerateGroundedContentRequest.GroundingSource.SearchSource.Builder

This builder for chaining.

setServingConfig(String value)

public GenerateGroundedContentRequest.GroundingSource.SearchSource.Builder setServingConfig(String value)

The resource name of the Engine to use.

Format: projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}

string serving_config = 1 [(.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The servingConfig to set.

Returns
Type Description
GenerateGroundedContentRequest.GroundingSource.SearchSource.Builder

This builder for chaining.

setServingConfigBytes(ByteString value)

public GenerateGroundedContentRequest.GroundingSource.SearchSource.Builder setServingConfigBytes(ByteString value)

The resource name of the Engine to use.

Format: projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}

string serving_config = 1 [(.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes for servingConfig to set.

Returns
Type Description
GenerateGroundedContentRequest.GroundingSource.SearchSource.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final GenerateGroundedContentRequest.GroundingSource.SearchSource.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
GenerateGroundedContentRequest.GroundingSource.SearchSource.Builder
Overrides