Class SearchResponse.Summary.Builder (0.37.0)

public static final class SearchResponse.Summary.Builder extends GeneratedMessageV3.Builder<SearchResponse.Summary.Builder> implements SearchResponse.SummaryOrBuilder

Summary of the top N search result specified by the summary spec.

Protobuf type google.cloud.discoveryengine.v1.SearchResponse.Summary

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAllSummarySkippedReasons(Iterable<? extends SearchResponse.Summary.SummarySkippedReason> values)

public SearchResponse.Summary.Builder addAllSummarySkippedReasons(Iterable<? extends SearchResponse.Summary.SummarySkippedReason> values)

Additional summary-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set.

repeated .google.cloud.discoveryengine.v1.SearchResponse.Summary.SummarySkippedReason summary_skipped_reasons = 2;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.discoveryengine.v1.SearchResponse.Summary.SummarySkippedReason>

The summarySkippedReasons to add.

Returns
TypeDescription
SearchResponse.Summary.Builder

This builder for chaining.

addAllSummarySkippedReasonsValue(Iterable<Integer> values)

public SearchResponse.Summary.Builder addAllSummarySkippedReasonsValue(Iterable<Integer> values)

Additional summary-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set.

repeated .google.cloud.discoveryengine.v1.SearchResponse.Summary.SummarySkippedReason summary_skipped_reasons = 2;

Parameter
NameDescription
valuesIterable<Integer>

The enum numeric values on the wire for summarySkippedReasons to add.

Returns
TypeDescription
SearchResponse.Summary.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

addSummarySkippedReasons(SearchResponse.Summary.SummarySkippedReason value)

public SearchResponse.Summary.Builder addSummarySkippedReasons(SearchResponse.Summary.SummarySkippedReason value)

Additional summary-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set.

repeated .google.cloud.discoveryengine.v1.SearchResponse.Summary.SummarySkippedReason summary_skipped_reasons = 2;

Parameter
NameDescription
valueSearchResponse.Summary.SummarySkippedReason

The summarySkippedReasons to add.

Returns
TypeDescription
SearchResponse.Summary.Builder

This builder for chaining.

addSummarySkippedReasonsValue(int value)

public SearchResponse.Summary.Builder addSummarySkippedReasonsValue(int value)

Additional summary-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set.

repeated .google.cloud.discoveryengine.v1.SearchResponse.Summary.SummarySkippedReason summary_skipped_reasons = 2;

Parameter
NameDescription
valueint

The enum numeric value on the wire for summarySkippedReasons to add.

Returns
TypeDescription
SearchResponse.Summary.Builder

This builder for chaining.

build()

public SearchResponse.Summary build()
Returns
TypeDescription
SearchResponse.Summary

buildPartial()

public SearchResponse.Summary buildPartial()
Returns
TypeDescription
SearchResponse.Summary

clear()

public SearchResponse.Summary.Builder clear()
Returns
TypeDescription
SearchResponse.Summary.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public SearchResponse.Summary.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
SearchResponse.Summary.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearSafetyAttributes()

public SearchResponse.Summary.Builder clearSafetyAttributes()

A collection of Safety Attribute categories and their associated confidence scores.

.google.cloud.discoveryengine.v1.SearchResponse.Summary.SafetyAttributes safety_attributes = 3;

Returns
TypeDescription
SearchResponse.Summary.Builder

clearSummarySkippedReasons()

public SearchResponse.Summary.Builder clearSummarySkippedReasons()

Additional summary-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set.

repeated .google.cloud.discoveryengine.v1.SearchResponse.Summary.SummarySkippedReason summary_skipped_reasons = 2;

Returns
TypeDescription
SearchResponse.Summary.Builder

This builder for chaining.

clearSummaryText()

public SearchResponse.Summary.Builder clearSummaryText()

The summary content.

string summary_text = 1;

Returns
TypeDescription
SearchResponse.Summary.Builder

This builder for chaining.

clearSummaryWithMetadata()

public SearchResponse.Summary.Builder clearSummaryWithMetadata()

Summary with metadata information.

.google.cloud.discoveryengine.v1.SearchResponse.Summary.SummaryWithMetadata summary_with_metadata = 4;

Returns
TypeDescription
SearchResponse.Summary.Builder

clone()

public SearchResponse.Summary.Builder clone()
Returns
TypeDescription
SearchResponse.Summary.Builder
Overrides

getDefaultInstanceForType()

public SearchResponse.Summary getDefaultInstanceForType()
Returns
TypeDescription
SearchResponse.Summary

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getSafetyAttributes()

public SearchResponse.Summary.SafetyAttributes getSafetyAttributes()

A collection of Safety Attribute categories and their associated confidence scores.

.google.cloud.discoveryengine.v1.SearchResponse.Summary.SafetyAttributes safety_attributes = 3;

Returns
TypeDescription
SearchResponse.Summary.SafetyAttributes

The safetyAttributes.

getSafetyAttributesBuilder()

public SearchResponse.Summary.SafetyAttributes.Builder getSafetyAttributesBuilder()

A collection of Safety Attribute categories and their associated confidence scores.

.google.cloud.discoveryengine.v1.SearchResponse.Summary.SafetyAttributes safety_attributes = 3;

Returns
TypeDescription
SearchResponse.Summary.SafetyAttributes.Builder

getSafetyAttributesOrBuilder()

public SearchResponse.Summary.SafetyAttributesOrBuilder getSafetyAttributesOrBuilder()

A collection of Safety Attribute categories and their associated confidence scores.

.google.cloud.discoveryengine.v1.SearchResponse.Summary.SafetyAttributes safety_attributes = 3;

Returns
TypeDescription
SearchResponse.Summary.SafetyAttributesOrBuilder

getSummarySkippedReasons(int index)

public SearchResponse.Summary.SummarySkippedReason getSummarySkippedReasons(int index)

Additional summary-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set.

repeated .google.cloud.discoveryengine.v1.SearchResponse.Summary.SummarySkippedReason summary_skipped_reasons = 2;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
SearchResponse.Summary.SummarySkippedReason

The summarySkippedReasons at the given index.

getSummarySkippedReasonsCount()

public int getSummarySkippedReasonsCount()

Additional summary-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set.

repeated .google.cloud.discoveryengine.v1.SearchResponse.Summary.SummarySkippedReason summary_skipped_reasons = 2;

Returns
TypeDescription
int

The count of summarySkippedReasons.

getSummarySkippedReasonsList()

public List<SearchResponse.Summary.SummarySkippedReason> getSummarySkippedReasonsList()

Additional summary-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set.

repeated .google.cloud.discoveryengine.v1.SearchResponse.Summary.SummarySkippedReason summary_skipped_reasons = 2;

Returns
TypeDescription
List<SummarySkippedReason>

A list containing the summarySkippedReasons.

getSummarySkippedReasonsValue(int index)

public int getSummarySkippedReasonsValue(int index)

Additional summary-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set.

repeated .google.cloud.discoveryengine.v1.SearchResponse.Summary.SummarySkippedReason summary_skipped_reasons = 2;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
int

The enum numeric value on the wire of summarySkippedReasons at the given index.

getSummarySkippedReasonsValueList()

public List<Integer> getSummarySkippedReasonsValueList()

Additional summary-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set.

repeated .google.cloud.discoveryengine.v1.SearchResponse.Summary.SummarySkippedReason summary_skipped_reasons = 2;

Returns
TypeDescription
List<Integer>

A list containing the enum numeric values on the wire for summarySkippedReasons.

getSummaryText()

public String getSummaryText()

The summary content.

string summary_text = 1;

Returns
TypeDescription
String

The summaryText.

getSummaryTextBytes()

public ByteString getSummaryTextBytes()

The summary content.

string summary_text = 1;

Returns
TypeDescription
ByteString

The bytes for summaryText.

getSummaryWithMetadata()

public SearchResponse.Summary.SummaryWithMetadata getSummaryWithMetadata()

Summary with metadata information.

.google.cloud.discoveryengine.v1.SearchResponse.Summary.SummaryWithMetadata summary_with_metadata = 4;

Returns
TypeDescription
SearchResponse.Summary.SummaryWithMetadata

The summaryWithMetadata.

getSummaryWithMetadataBuilder()

public SearchResponse.Summary.SummaryWithMetadata.Builder getSummaryWithMetadataBuilder()

Summary with metadata information.

.google.cloud.discoveryengine.v1.SearchResponse.Summary.SummaryWithMetadata summary_with_metadata = 4;

Returns
TypeDescription
SearchResponse.Summary.SummaryWithMetadata.Builder

getSummaryWithMetadataOrBuilder()

public SearchResponse.Summary.SummaryWithMetadataOrBuilder getSummaryWithMetadataOrBuilder()

Summary with metadata information.

.google.cloud.discoveryengine.v1.SearchResponse.Summary.SummaryWithMetadata summary_with_metadata = 4;

Returns
TypeDescription
SearchResponse.Summary.SummaryWithMetadataOrBuilder

hasSafetyAttributes()

public boolean hasSafetyAttributes()

A collection of Safety Attribute categories and their associated confidence scores.

.google.cloud.discoveryengine.v1.SearchResponse.Summary.SafetyAttributes safety_attributes = 3;

Returns
TypeDescription
boolean

Whether the safetyAttributes field is set.

hasSummaryWithMetadata()

public boolean hasSummaryWithMetadata()

Summary with metadata information.

.google.cloud.discoveryengine.v1.SearchResponse.Summary.SummaryWithMetadata summary_with_metadata = 4;

Returns
TypeDescription
boolean

Whether the summaryWithMetadata field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(SearchResponse.Summary other)

public SearchResponse.Summary.Builder mergeFrom(SearchResponse.Summary other)
Parameter
NameDescription
otherSearchResponse.Summary
Returns
TypeDescription
SearchResponse.Summary.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeSafetyAttributes(SearchResponse.Summary.SafetyAttributes value)

public SearchResponse.Summary.Builder mergeSafetyAttributes(SearchResponse.Summary.SafetyAttributes value)

A collection of Safety Attribute categories and their associated confidence scores.

.google.cloud.discoveryengine.v1.SearchResponse.Summary.SafetyAttributes safety_attributes = 3;

Parameter
NameDescription
valueSearchResponse.Summary.SafetyAttributes
Returns
TypeDescription
SearchResponse.Summary.Builder

mergeSummaryWithMetadata(SearchResponse.Summary.SummaryWithMetadata value)

public SearchResponse.Summary.Builder mergeSummaryWithMetadata(SearchResponse.Summary.SummaryWithMetadata value)

Summary with metadata information.

.google.cloud.discoveryengine.v1.SearchResponse.Summary.SummaryWithMetadata summary_with_metadata = 4;

Parameter
NameDescription
valueSearchResponse.Summary.SummaryWithMetadata
Returns
TypeDescription
SearchResponse.Summary.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final SearchResponse.Summary.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
SearchResponse.Summary.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public SearchResponse.Summary.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
SearchResponse.Summary.Builder
Overrides

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

public SearchResponse.Summary.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
SearchResponse.Summary.Builder
Overrides

setSafetyAttributes(SearchResponse.Summary.SafetyAttributes value)

public SearchResponse.Summary.Builder setSafetyAttributes(SearchResponse.Summary.SafetyAttributes value)

A collection of Safety Attribute categories and their associated confidence scores.

.google.cloud.discoveryengine.v1.SearchResponse.Summary.SafetyAttributes safety_attributes = 3;

Parameter
NameDescription
valueSearchResponse.Summary.SafetyAttributes
Returns
TypeDescription
SearchResponse.Summary.Builder

setSafetyAttributes(SearchResponse.Summary.SafetyAttributes.Builder builderForValue)

public SearchResponse.Summary.Builder setSafetyAttributes(SearchResponse.Summary.SafetyAttributes.Builder builderForValue)

A collection of Safety Attribute categories and their associated confidence scores.

.google.cloud.discoveryengine.v1.SearchResponse.Summary.SafetyAttributes safety_attributes = 3;

Parameter
NameDescription
builderForValueSearchResponse.Summary.SafetyAttributes.Builder
Returns
TypeDescription
SearchResponse.Summary.Builder

setSummarySkippedReasons(int index, SearchResponse.Summary.SummarySkippedReason value)

public SearchResponse.Summary.Builder setSummarySkippedReasons(int index, SearchResponse.Summary.SummarySkippedReason value)

Additional summary-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set.

repeated .google.cloud.discoveryengine.v1.SearchResponse.Summary.SummarySkippedReason summary_skipped_reasons = 2;

Parameters
NameDescription
indexint

The index to set the value at.

valueSearchResponse.Summary.SummarySkippedReason

The summarySkippedReasons to set.

Returns
TypeDescription
SearchResponse.Summary.Builder

This builder for chaining.

setSummarySkippedReasonsValue(int index, int value)

public SearchResponse.Summary.Builder setSummarySkippedReasonsValue(int index, int value)

Additional summary-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set.

repeated .google.cloud.discoveryengine.v1.SearchResponse.Summary.SummarySkippedReason summary_skipped_reasons = 2;

Parameters
NameDescription
indexint

The index to set the value at.

valueint

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

Returns
TypeDescription
SearchResponse.Summary.Builder

This builder for chaining.

setSummaryText(String value)

public SearchResponse.Summary.Builder setSummaryText(String value)

The summary content.

string summary_text = 1;

Parameter
NameDescription
valueString

The summaryText to set.

Returns
TypeDescription
SearchResponse.Summary.Builder

This builder for chaining.

setSummaryTextBytes(ByteString value)

public SearchResponse.Summary.Builder setSummaryTextBytes(ByteString value)

The summary content.

string summary_text = 1;

Parameter
NameDescription
valueByteString

The bytes for summaryText to set.

Returns
TypeDescription
SearchResponse.Summary.Builder

This builder for chaining.

setSummaryWithMetadata(SearchResponse.Summary.SummaryWithMetadata value)

public SearchResponse.Summary.Builder setSummaryWithMetadata(SearchResponse.Summary.SummaryWithMetadata value)

Summary with metadata information.

.google.cloud.discoveryengine.v1.SearchResponse.Summary.SummaryWithMetadata summary_with_metadata = 4;

Parameter
NameDescription
valueSearchResponse.Summary.SummaryWithMetadata
Returns
TypeDescription
SearchResponse.Summary.Builder

setSummaryWithMetadata(SearchResponse.Summary.SummaryWithMetadata.Builder builderForValue)

public SearchResponse.Summary.Builder setSummaryWithMetadata(SearchResponse.Summary.SummaryWithMetadata.Builder builderForValue)

Summary with metadata information.

.google.cloud.discoveryengine.v1.SearchResponse.Summary.SummaryWithMetadata summary_with_metadata = 4;

Parameter
NameDescription
builderForValueSearchResponse.Summary.SummaryWithMetadata.Builder
Returns
TypeDescription
SearchResponse.Summary.Builder

setUnknownFields(UnknownFieldSet unknownFields)

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