Class SearchResponse.Summary.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<SearchResponse.Summary.Builder>
com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.Builder
All Implemented Interfaces:
SearchResponse.SummaryOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
SearchResponse.Summary

public static final class SearchResponse.Summary.Builder extends com.google.protobuf.GeneratedMessage.Builder<SearchResponse.Summary.Builder> implements SearchResponse.SummaryOrBuilder
 Summary of the top N search results specified by the summary spec.
 
Protobuf type google.cloud.discoveryengine.v1beta.SearchResponse.Summary
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<SearchResponse.Summary.Builder>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<SearchResponse.Summary.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<SearchResponse.Summary.Builder>
    • getDefaultInstanceForType

      public SearchResponse.Summary getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public SearchResponse.Summary build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public SearchResponse.Summary buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public SearchResponse.Summary.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<SearchResponse.Summary.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<SearchResponse.Summary.Builder>
    • mergeFrom

      public SearchResponse.Summary.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<SearchResponse.Summary.Builder>
      Throws:
      IOException
    • getSummaryText

      public String getSummaryText()
       The summary content.
       
      string summary_text = 1;
      Specified by:
      getSummaryText in interface SearchResponse.SummaryOrBuilder
      Returns:
      The summaryText.
    • getSummaryTextBytes

      public com.google.protobuf.ByteString getSummaryTextBytes()
       The summary content.
       
      string summary_text = 1;
      Specified by:
      getSummaryTextBytes in interface SearchResponse.SummaryOrBuilder
      Returns:
      The bytes for summaryText.
    • setSummaryText

      public SearchResponse.Summary.Builder setSummaryText(String value)
       The summary content.
       
      string summary_text = 1;
      Parameters:
      value - The summaryText to set.
      Returns:
      This builder for chaining.
    • clearSummaryText

      public SearchResponse.Summary.Builder clearSummaryText()
       The summary content.
       
      string summary_text = 1;
      Returns:
      This builder for chaining.
    • setSummaryTextBytes

      public SearchResponse.Summary.Builder setSummaryTextBytes(com.google.protobuf.ByteString value)
       The summary content.
       
      string summary_text = 1;
      Parameters:
      value - The bytes for summaryText to set.
      Returns:
      This builder for chaining.
    • 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.v1beta.SearchResponse.Summary.SummarySkippedReason summary_skipped_reasons = 2;
      Specified by:
      getSummarySkippedReasonsList in interface SearchResponse.SummaryOrBuilder
      Returns:
      A list containing the summarySkippedReasons.
    • 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.v1beta.SearchResponse.Summary.SummarySkippedReason summary_skipped_reasons = 2;
      Specified by:
      getSummarySkippedReasonsCount in interface SearchResponse.SummaryOrBuilder
      Returns:
      The count of summarySkippedReasons.
    • getSummarySkippedReasons

      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.v1beta.SearchResponse.Summary.SummarySkippedReason summary_skipped_reasons = 2;
      Specified by:
      getSummarySkippedReasons in interface SearchResponse.SummaryOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The summarySkippedReasons at the given index.
    • setSummarySkippedReasons

      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.v1beta.SearchResponse.Summary.SummarySkippedReason summary_skipped_reasons = 2;
      Parameters:
      index - The index to set the value at.
      value - The summarySkippedReasons to set.
      Returns:
      This builder for chaining.
    • addSummarySkippedReasons

       Additional summary-skipped reasons. This provides the reason for ignored
       cases. If nothing is skipped, this field is not set.
       
      repeated .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.SummarySkippedReason summary_skipped_reasons = 2;
      Parameters:
      value - The summarySkippedReasons to add.
      Returns:
      This builder for chaining.
    • addAllSummarySkippedReasons

      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.v1beta.SearchResponse.Summary.SummarySkippedReason summary_skipped_reasons = 2;
      Parameters:
      values - The summarySkippedReasons to add.
      Returns:
      This builder for chaining.
    • 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.v1beta.SearchResponse.Summary.SummarySkippedReason summary_skipped_reasons = 2;
      Returns:
      This builder for chaining.
    • 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.v1beta.SearchResponse.Summary.SummarySkippedReason summary_skipped_reasons = 2;
      Specified by:
      getSummarySkippedReasonsValueList in interface SearchResponse.SummaryOrBuilder
      Returns:
      A list containing the enum numeric values on the wire for summarySkippedReasons.
    • getSummarySkippedReasonsValue

      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.v1beta.SearchResponse.Summary.SummarySkippedReason summary_skipped_reasons = 2;
      Specified by:
      getSummarySkippedReasonsValue in interface SearchResponse.SummaryOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The enum numeric value on the wire of summarySkippedReasons at the given index.
    • setSummarySkippedReasonsValue

      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.v1beta.SearchResponse.Summary.SummarySkippedReason summary_skipped_reasons = 2;
      Parameters:
      index - The index to set the value at.
      value - The enum numeric value on the wire for summarySkippedReasons to set.
      Returns:
      This builder for chaining.
    • addSummarySkippedReasonsValue

      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.v1beta.SearchResponse.Summary.SummarySkippedReason summary_skipped_reasons = 2;
      Parameters:
      value - The enum numeric value on the wire for summarySkippedReasons to add.
      Returns:
      This builder for chaining.
    • addAllSummarySkippedReasonsValue

      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.v1beta.SearchResponse.Summary.SummarySkippedReason summary_skipped_reasons = 2;
      Parameters:
      values - The enum numeric values on the wire for summarySkippedReasons to add.
      Returns:
      This builder for chaining.
    • hasSafetyAttributes

      public boolean hasSafetyAttributes()
       A collection of Safety Attribute categories and their associated
       confidence scores.
       
      .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.SafetyAttributes safety_attributes = 3;
      Specified by:
      hasSafetyAttributes in interface SearchResponse.SummaryOrBuilder
      Returns:
      Whether the safetyAttributes field is set.
    • getSafetyAttributes

      public SearchResponse.Summary.SafetyAttributes getSafetyAttributes()
       A collection of Safety Attribute categories and their associated
       confidence scores.
       
      .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.SafetyAttributes safety_attributes = 3;
      Specified by:
      getSafetyAttributes in interface SearchResponse.SummaryOrBuilder
      Returns:
      The safetyAttributes.
    • setSafetyAttributes

       A collection of Safety Attribute categories and their associated
       confidence scores.
       
      .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.SafetyAttributes safety_attributes = 3;
    • setSafetyAttributes

       A collection of Safety Attribute categories and their associated
       confidence scores.
       
      .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.SafetyAttributes safety_attributes = 3;
    • mergeSafetyAttributes

       A collection of Safety Attribute categories and their associated
       confidence scores.
       
      .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.SafetyAttributes safety_attributes = 3;
    • clearSafetyAttributes

      public SearchResponse.Summary.Builder clearSafetyAttributes()
       A collection of Safety Attribute categories and their associated
       confidence scores.
       
      .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.SafetyAttributes safety_attributes = 3;
    • getSafetyAttributesBuilder

      public SearchResponse.Summary.SafetyAttributes.Builder getSafetyAttributesBuilder()
       A collection of Safety Attribute categories and their associated
       confidence scores.
       
      .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.SafetyAttributes safety_attributes = 3;
    • getSafetyAttributesOrBuilder

      public SearchResponse.Summary.SafetyAttributesOrBuilder getSafetyAttributesOrBuilder()
       A collection of Safety Attribute categories and their associated
       confidence scores.
       
      .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.SafetyAttributes safety_attributes = 3;
      Specified by:
      getSafetyAttributesOrBuilder in interface SearchResponse.SummaryOrBuilder
    • hasSummaryWithMetadata

      public boolean hasSummaryWithMetadata()
       Summary with metadata information.
       
      .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.SummaryWithMetadata summary_with_metadata = 4;
      Specified by:
      hasSummaryWithMetadata in interface SearchResponse.SummaryOrBuilder
      Returns:
      Whether the summaryWithMetadata field is set.
    • getSummaryWithMetadata

      public SearchResponse.Summary.SummaryWithMetadata getSummaryWithMetadata()
       Summary with metadata information.
       
      .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.SummaryWithMetadata summary_with_metadata = 4;
      Specified by:
      getSummaryWithMetadata in interface SearchResponse.SummaryOrBuilder
      Returns:
      The summaryWithMetadata.
    • setSummaryWithMetadata

       Summary with metadata information.
       
      .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.SummaryWithMetadata summary_with_metadata = 4;
    • setSummaryWithMetadata

       Summary with metadata information.
       
      .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.SummaryWithMetadata summary_with_metadata = 4;
    • mergeSummaryWithMetadata

       Summary with metadata information.
       
      .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.SummaryWithMetadata summary_with_metadata = 4;
    • clearSummaryWithMetadata

      public SearchResponse.Summary.Builder clearSummaryWithMetadata()
       Summary with metadata information.
       
      .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.SummaryWithMetadata summary_with_metadata = 4;
    • getSummaryWithMetadataBuilder

      public SearchResponse.Summary.SummaryWithMetadata.Builder getSummaryWithMetadataBuilder()
       Summary with metadata information.
       
      .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.SummaryWithMetadata summary_with_metadata = 4;
    • getSummaryWithMetadataOrBuilder

      public SearchResponse.Summary.SummaryWithMetadataOrBuilder getSummaryWithMetadataOrBuilder()
       Summary with metadata information.
       
      .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.SummaryWithMetadata summary_with_metadata = 4;
      Specified by:
      getSummaryWithMetadataOrBuilder in interface SearchResponse.SummaryOrBuilder