Class SearchResultItem (0.1.0)

public final class SearchResultItem extends GeneratedMessageV3 implements SearchResultItemOrBuilder

Search result contains asset name and corresponding time ranges.

Protobuf type google.cloud.visionai.v1.SearchResultItem

Static Fields

ANNOTATION_MATCHING_RESULTS_FIELD_NUMBER

public static final int ANNOTATION_MATCHING_RESULTS_FIELD_NUMBER
Field Value
Type Description
int

ASSET_FIELD_NUMBER

public static final int ASSET_FIELD_NUMBER
Field Value
Type Description
int

RELEVANCE_FIELD_NUMBER

public static final int RELEVANCE_FIELD_NUMBER
Field Value
Type Description
int

REQUESTED_ANNOTATIONS_FIELD_NUMBER

public static final int REQUESTED_ANNOTATIONS_FIELD_NUMBER
Field Value
Type Description
int

SEGMENTS_FIELD_NUMBER

public static final int SEGMENTS_FIELD_NUMBER
Field Value
Type Description
int

SEGMENT_FIELD_NUMBER

public static final int SEGMENT_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static SearchResultItem getDefaultInstance()
Returns
Type Description
SearchResultItem

getDescriptor()

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

newBuilder()

public static SearchResultItem.Builder newBuilder()
Returns
Type Description
SearchResultItem.Builder

newBuilder(SearchResultItem prototype)

public static SearchResultItem.Builder newBuilder(SearchResultItem prototype)
Parameter
Name Description
prototype SearchResultItem
Returns
Type Description
SearchResultItem.Builder

parseDelimitedFrom(InputStream input)

public static SearchResultItem parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
SearchResultItem
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static SearchResultItem parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
SearchResultItem
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static SearchResultItem parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
SearchResultItem
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static SearchResultItem parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
SearchResultItem
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static SearchResultItem parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
SearchResultItem
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static SearchResultItem parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
SearchResultItem
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static SearchResultItem parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
SearchResultItem
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static SearchResultItem parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
SearchResultItem
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static SearchResultItem parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
SearchResultItem
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static SearchResultItem parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
SearchResultItem
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static SearchResultItem parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
SearchResultItem
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static SearchResultItem parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
SearchResultItem
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<SearchResultItem> parser()
Returns
Type Description
Parser<SearchResultItem>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getAnnotationMatchingResults(int index)

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;

Parameter
Name Description
index int
Returns
Type Description
AnnotationMatchingResult

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;

Returns
Type Description
int

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;

Returns
Type Description
List<AnnotationMatchingResult>

getAnnotationMatchingResultsOrBuilder(int index)

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;

Parameter
Name Description
index int
Returns
Type Description
AnnotationMatchingResultOrBuilder

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;

Returns
Type Description
List<? extends com.google.cloud.visionai.v1.AnnotationMatchingResultOrBuilder>

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;

Returns
Type Description
String

The asset.

getAssetBytes()

public ByteString getAssetBytes()

The resource name of the asset. Format: projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}

string asset = 1;

Returns
Type Description
ByteString

The bytes for asset.

getDefaultInstanceForType()

public SearchResultItem getDefaultInstanceForType()
Returns
Type Description
SearchResultItem

getParserForType()

public Parser<SearchResultItem> getParserForType()
Returns
Type Description
Parser<SearchResultItem>
Overrides

getRelevance()

public double getRelevance()

Relevance of this SearchResultItem to user search request. Currently available only in Image Warehouse, and by default represents cosine similarity. In the future can be other measures such as "dot product" or "topicality" requested in the search request.

double relevance = 6;

Returns
Type Description
double

The relevance.

getRequestedAnnotations(int index)

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;

Parameter
Name Description
index int
Returns
Type Description
Annotation

getRequestedAnnotationsCount()

public int getRequestedAnnotationsCount()

Search result annotations specified by result_annotation_keys in search request.

repeated .google.cloud.visionai.v1.Annotation requested_annotations = 3;

Returns
Type Description
int

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;

Returns
Type Description
List<Annotation>

getRequestedAnnotationsOrBuilder(int index)

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;

Parameter
Name Description
index int
Returns
Type Description
AnnotationOrBuilder

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;

Returns
Type Description
List<? extends com.google.cloud.visionai.v1.AnnotationOrBuilder>

getSegment()

public Partition.TemporalPartition getSegment()

The matched asset segment.

.google.cloud.visionai.v1.Partition.TemporalPartition segment = 5;

Returns
Type Description
Partition.TemporalPartition

The segment.

getSegmentOrBuilder()

public Partition.TemporalPartitionOrBuilder getSegmentOrBuilder()

The matched asset segment.

.google.cloud.visionai.v1.Partition.TemporalPartition segment = 5;

Returns
Type Description
Partition.TemporalPartitionOrBuilder

getSegments(int index) (deprecated)

public Partition.TemporalPartition getSegments(int index)

The matched asset segments. Deprecated: please use singular segment field.

repeated .google.cloud.visionai.v1.Partition.TemporalPartition segments = 2 [deprecated = true];

Parameter
Name Description
index int
Returns
Type Description
Partition.TemporalPartition

getSegmentsCount() (deprecated)

public int getSegmentsCount()

The matched asset segments. Deprecated: please use singular segment field.

repeated .google.cloud.visionai.v1.Partition.TemporalPartition segments = 2 [deprecated = true];

Returns
Type Description
int

getSegmentsList() (deprecated)

public List<Partition.TemporalPartition> getSegmentsList()

The matched asset segments. Deprecated: please use singular segment field.

repeated .google.cloud.visionai.v1.Partition.TemporalPartition segments = 2 [deprecated = true];

Returns
Type Description
List<TemporalPartition>

getSegmentsOrBuilder(int index) (deprecated)

public Partition.TemporalPartitionOrBuilder getSegmentsOrBuilder(int index)

The matched asset segments. Deprecated: please use singular segment field.

repeated .google.cloud.visionai.v1.Partition.TemporalPartition segments = 2 [deprecated = true];

Parameter
Name Description
index int
Returns
Type Description
Partition.TemporalPartitionOrBuilder

getSegmentsOrBuilderList() (deprecated)

public List<? extends Partition.TemporalPartitionOrBuilder> getSegmentsOrBuilderList()

The matched asset segments. Deprecated: please use singular segment field.

repeated .google.cloud.visionai.v1.Partition.TemporalPartition segments = 2 [deprecated = true];

Returns
Type Description
List<? extends com.google.cloud.visionai.v1.Partition.TemporalPartitionOrBuilder>

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

hasSegment()

public boolean hasSegment()

The matched asset segment.

.google.cloud.visionai.v1.Partition.TemporalPartition segment = 5;

Returns
Type Description
boolean

Whether the segment field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public SearchResultItem.Builder newBuilderForType()
Returns
Type Description
SearchResultItem.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected SearchResultItem.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
SearchResultItem.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public SearchResultItem.Builder toBuilder()
Returns
Type Description
SearchResultItem.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException