Class SearchResultItem

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.visionai.v1.SearchResultItem
All Implemented Interfaces:
SearchResultItemOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

@Generated public final class SearchResultItem extends com.google.protobuf.GeneratedMessage implements SearchResultItemOrBuilder
 Search result contains asset name and corresponding time ranges.
 
Protobuf type google.cloud.visionai.v1.SearchResultItem
See Also:
  • Field Details

    • ASSET_FIELD_NUMBER

      public static final int ASSET_FIELD_NUMBER
      See Also:
    • SEGMENTS_FIELD_NUMBER

      public static final int SEGMENTS_FIELD_NUMBER
      See Also:
    • SEGMENT_FIELD_NUMBER

      public static final int SEGMENT_FIELD_NUMBER
      See Also:
    • RELEVANCE_FIELD_NUMBER

      public static final int RELEVANCE_FIELD_NUMBER
      See Also:
    • REQUESTED_ANNOTATIONS_FIELD_NUMBER

      public static final int REQUESTED_ANNOTATIONS_FIELD_NUMBER
      See Also:
    • ANNOTATION_MATCHING_RESULTS_FIELD_NUMBER

      public static final int ANNOTATION_MATCHING_RESULTS_FIELD_NUMBER
      See Also:
  • 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
    • getAsset

      public String getAsset()
       The resource name of the asset.
       Format:
       `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
       
      string asset = 1;
      Specified by:
      getAsset in interface SearchResultItemOrBuilder
      Returns:
      The asset.
    • getAssetBytes

      public com.google.protobuf.ByteString getAssetBytes()
       The resource name of the asset.
       Format:
       `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
       
      string asset = 1;
      Specified by:
      getAssetBytes in interface SearchResultItemOrBuilder
      Returns:
      The bytes for asset.
    • getSegmentsList

      @Deprecated public List<Partition.TemporalPartition> getSegmentsList()
      Deprecated.
       The matched asset segments.
       Deprecated: please use singular `segment` field.
       
      repeated .google.cloud.visionai.v1.Partition.TemporalPartition segments = 2 [deprecated = true];
      Specified by:
      getSegmentsList in interface SearchResultItemOrBuilder
    • getSegmentsOrBuilderList

      @Deprecated public List<? extends Partition.TemporalPartitionOrBuilder> getSegmentsOrBuilderList()
      Deprecated.
       The matched asset segments.
       Deprecated: please use singular `segment` field.
       
      repeated .google.cloud.visionai.v1.Partition.TemporalPartition segments = 2 [deprecated = true];
      Specified by:
      getSegmentsOrBuilderList in interface SearchResultItemOrBuilder
    • getSegmentsCount

      @Deprecated public int getSegmentsCount()
      Deprecated.
       The matched asset segments.
       Deprecated: please use singular `segment` field.
       
      repeated .google.cloud.visionai.v1.Partition.TemporalPartition segments = 2 [deprecated = true];
      Specified by:
      getSegmentsCount in interface SearchResultItemOrBuilder
    • getSegments

      @Deprecated public Partition.TemporalPartition getSegments(int index)
      Deprecated.
       The matched asset segments.
       Deprecated: please use singular `segment` field.
       
      repeated .google.cloud.visionai.v1.Partition.TemporalPartition segments = 2 [deprecated = true];
      Specified by:
      getSegments in interface SearchResultItemOrBuilder
    • getSegmentsOrBuilder

      @Deprecated public Partition.TemporalPartitionOrBuilder getSegmentsOrBuilder(int index)
      Deprecated.
       The matched asset segments.
       Deprecated: please use singular `segment` field.
       
      repeated .google.cloud.visionai.v1.Partition.TemporalPartition segments = 2 [deprecated = true];
      Specified by:
      getSegmentsOrBuilder in interface SearchResultItemOrBuilder
    • hasSegment

      public boolean hasSegment()
       The matched asset segment.
       
      .google.cloud.visionai.v1.Partition.TemporalPartition segment = 5;
      Specified by:
      hasSegment in interface SearchResultItemOrBuilder
      Returns:
      Whether the segment field is set.
    • getSegment

      public Partition.TemporalPartition getSegment()
       The matched asset segment.
       
      .google.cloud.visionai.v1.Partition.TemporalPartition segment = 5;
      Specified by:
      getSegment in interface SearchResultItemOrBuilder
      Returns:
      The segment.
    • getSegmentOrBuilder

      public Partition.TemporalPartitionOrBuilder getSegmentOrBuilder()
       The matched asset segment.
       
      .google.cloud.visionai.v1.Partition.TemporalPartition segment = 5;
      Specified by:
      getSegmentOrBuilder in interface SearchResultItemOrBuilder
    • getRelevance

      public double getRelevance()
       Available to IMAGE corpus types.
       Relevance of this `SearchResultItem` to user search query (text query or
       image query).
       By default this represents cosine similarity between the query and the
       retrieved media content. The value is in the range of [-1, 1].
       Note that search ranking is not only decided by this relevance score, but
       also other factors such as the match of annotations.
       
      double relevance = 6;
      Specified by:
      getRelevance in interface SearchResultItemOrBuilder
      Returns:
      The relevance.
    • getRequestedAnnotationsList

      public List<Annotation> getRequestedAnnotationsList()
       Search result annotations specified by result_annotation_keys in search
       request.
       
      repeated .google.cloud.visionai.v1.Annotation requested_annotations = 3;
      Specified by:
      getRequestedAnnotationsList in interface SearchResultItemOrBuilder
    • getRequestedAnnotationsOrBuilderList

      public List<? extends AnnotationOrBuilder> getRequestedAnnotationsOrBuilderList()
       Search result annotations specified by result_annotation_keys in search
       request.
       
      repeated .google.cloud.visionai.v1.Annotation requested_annotations = 3;
      Specified by:
      getRequestedAnnotationsOrBuilderList in interface SearchResultItemOrBuilder
    • getRequestedAnnotationsCount

      public int getRequestedAnnotationsCount()
       Search result annotations specified by result_annotation_keys in search
       request.
       
      repeated .google.cloud.visionai.v1.Annotation requested_annotations = 3;
      Specified by:
      getRequestedAnnotationsCount in interface SearchResultItemOrBuilder
    • getRequestedAnnotations

      public Annotation getRequestedAnnotations(int index)
       Search result annotations specified by result_annotation_keys in search
       request.
       
      repeated .google.cloud.visionai.v1.Annotation requested_annotations = 3;
      Specified by:
      getRequestedAnnotations in interface SearchResultItemOrBuilder
    • getRequestedAnnotationsOrBuilder

      public AnnotationOrBuilder getRequestedAnnotationsOrBuilder(int index)
       Search result annotations specified by result_annotation_keys in search
       request.
       
      repeated .google.cloud.visionai.v1.Annotation requested_annotations = 3;
      Specified by:
      getRequestedAnnotationsOrBuilder in interface SearchResultItemOrBuilder
    • getAnnotationMatchingResultsList

      public List<AnnotationMatchingResult> getAnnotationMatchingResultsList()
       Criteria or facet-selection based annotation matching results associated to
       this search result item. Only contains results for criteria or
       facet_selections with fetch_matched_annotations=true.
       
      repeated .google.cloud.visionai.v1.AnnotationMatchingResult annotation_matching_results = 4;
      Specified by:
      getAnnotationMatchingResultsList in interface SearchResultItemOrBuilder
    • getAnnotationMatchingResultsOrBuilderList

      public List<? extends AnnotationMatchingResultOrBuilder> getAnnotationMatchingResultsOrBuilderList()
       Criteria or facet-selection based annotation matching results associated to
       this search result item. Only contains results for criteria or
       facet_selections with fetch_matched_annotations=true.
       
      repeated .google.cloud.visionai.v1.AnnotationMatchingResult annotation_matching_results = 4;
      Specified by:
      getAnnotationMatchingResultsOrBuilderList in interface SearchResultItemOrBuilder
    • getAnnotationMatchingResultsCount

      public int getAnnotationMatchingResultsCount()
       Criteria or facet-selection based annotation matching results associated to
       this search result item. Only contains results for criteria or
       facet_selections with fetch_matched_annotations=true.
       
      repeated .google.cloud.visionai.v1.AnnotationMatchingResult annotation_matching_results = 4;
      Specified by:
      getAnnotationMatchingResultsCount in interface SearchResultItemOrBuilder
    • getAnnotationMatchingResults

      public AnnotationMatchingResult getAnnotationMatchingResults(int index)
       Criteria or facet-selection based annotation matching results associated to
       this search result item. Only contains results for criteria or
       facet_selections with fetch_matched_annotations=true.
       
      repeated .google.cloud.visionai.v1.AnnotationMatchingResult annotation_matching_results = 4;
      Specified by:
      getAnnotationMatchingResults in interface SearchResultItemOrBuilder
    • getAnnotationMatchingResultsOrBuilder

      public AnnotationMatchingResultOrBuilder getAnnotationMatchingResultsOrBuilder(int index)
       Criteria or facet-selection based annotation matching results associated to
       this search result item. Only contains results for criteria or
       facet_selections with fetch_matched_annotations=true.
       
      repeated .google.cloud.visionai.v1.AnnotationMatchingResult annotation_matching_results = 4;
      Specified by:
      getAnnotationMatchingResultsOrBuilder in interface SearchResultItemOrBuilder
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static SearchResultItem parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static SearchResultItem parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static SearchResultItem parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static SearchResultItem parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static SearchResultItem parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static SearchResultItem parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static SearchResultItem parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static SearchResultItem parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static SearchResultItem parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static SearchResultItem parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static SearchResultItem parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static SearchResultItem parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public SearchResultItem.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static SearchResultItem.Builder newBuilder()
    • newBuilder

      public static SearchResultItem.Builder newBuilder(SearchResultItem prototype)
    • toBuilder

      public SearchResultItem.Builder toBuilder()
      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected SearchResultItem.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static SearchResultItem getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<SearchResultItem> parser()
    • getParserForType

      public com.google.protobuf.Parser<SearchResultItem> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessage
    • getDefaultInstanceForType

      public SearchResultItem getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder