Class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1ProductSearchResults

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/vision_v1p2beta1/classes.rb,
lib/google/apis/vision_v1p2beta1/representations.rb,
lib/google/apis/vision_v1p2beta1/representations.rb

Overview

Results for a product search request.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudVisionV1p2beta1ProductSearchResults

Returns a new instance of GoogleCloudVisionV1p2beta1ProductSearchResults.



4319
4320
4321
# File 'lib/google/apis/vision_v1p2beta1/classes.rb', line 4319

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#index_timeString

Timestamp of the index which provided these results. Products added to the product set and products removed from the product set after this time are not reflected in the current results. Corresponds to the JSON property indexTime

Returns:

  • (String)


4304
4305
4306
# File 'lib/google/apis/vision_v1p2beta1/classes.rb', line 4304

def index_time
  @index_time
end

#product_grouped_resultsArray<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1ProductSearchResultsGroupedResult>

List of results grouped by products detected in the query image. Each entry corresponds to one bounding polygon in the query image, and contains the matching products specific to that region. There may be duplicate product matches in the union of all the per-product results. Corresponds to the JSON property productGroupedResults



4312
4313
4314
# File 'lib/google/apis/vision_v1p2beta1/classes.rb', line 4312

def product_grouped_results
  @product_grouped_results
end

#resultsArray<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1ProductSearchResultsResult>

List of results, one for each product match. Corresponds to the JSON property results



4317
4318
4319
# File 'lib/google/apis/vision_v1p2beta1/classes.rb', line 4317

def results
  @results
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4324
4325
4326
4327
4328
# File 'lib/google/apis/vision_v1p2beta1/classes.rb', line 4324

def update!(**args)
  @index_time = args[:index_time] if args.key?(:index_time)
  @product_grouped_results = args[:product_grouped_results] if args.key?(:product_grouped_results)
  @results = args[:results] if args.key?(:results)
end