Class: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaBranchQualityMetric
- Inherits:
-
Object
- Object
- Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaBranchQualityMetric
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/retail_v2alpha/classes.rb,
lib/google/apis/retail_v2alpha/representations.rb,
lib/google/apis/retail_v2alpha/representations.rb
Overview
Metric measured on a group of Products against a certain quality requirement. Contains the number of products that pass the check and the number of products that don't.
Instance Attribute Summary collapse
-
#qualified_product_count ⇒ Fixnum
Number of products passing the quality requirement check.
-
#requirement_key ⇒ String
The key that represents a quality requirement rule.
-
#suggested_quality_percent_threshold ⇒ Float
Value from 0 to 100 representing the suggested percentage of products that meet the quality requirements to get good search and recommendation performance.
-
#unqualified_product_count ⇒ Fixnum
Number of products failing the quality requirement check.
-
#unqualified_sample_products ⇒ Array<Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaProduct>
A list of a maximum of 100 sample products that do not qualify for this requirement.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudRetailV2alphaBranchQualityMetric
constructor
A new instance of GoogleCloudRetailV2alphaBranchQualityMetric.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudRetailV2alphaBranchQualityMetric
Returns a new instance of GoogleCloudRetailV2alphaBranchQualityMetric.
1868 1869 1870 |
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 1868 def initialize(**args) update!(**args) end |
Instance Attribute Details
#qualified_product_count ⇒ Fixnum
Number of products passing the quality requirement check. We only check
searchable products.
Corresponds to the JSON property qualifiedProductCount
1827 1828 1829 |
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 1827 def qualified_product_count @qualified_product_count end |
#requirement_key ⇒ String
The key that represents a quality requirement rule. Supported keys: * "has-
valid-uri": product has a valid and accessible uri. * "available-expire-time-
conformance": Product.available_time is early than "now", and Product.
expire_time is greater than "now". * "has-searchable-attributes": product has
at least one attribute set to searchable. * "has-description": product has non-
empty description. * "has-at-least-bigram-title": Product title has at least
two words. A comprehensive title helps to improve search quality. * "variant-
has-image": the variant products has at least one image. You may ignore this
metric if all your products are at primary level. * "variant-has-price-info":
the variant products has price_info set. You may ignore this metric if all
your products are at primary level. * "has-publish-time": product has non-
empty publish_time.
Corresponds to the JSON property requirementKey
1843 1844 1845 |
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 1843 def requirement_key @requirement_key end |
#suggested_quality_percent_threshold ⇒ Float
Value from 0 to 100 representing the suggested percentage of products that
meet the quality requirements to get good search and recommendation
performance. 100 * (qualified_product_count) / (qualified_product_count +
unqualified_product_count) should be greater or equal to this suggestion.
Corresponds to the JSON property suggestedQualityPercentThreshold
1851 1852 1853 |
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 1851 def suggested_quality_percent_threshold @suggested_quality_percent_threshold end |
#unqualified_product_count ⇒ Fixnum
Number of products failing the quality requirement check. We only check
searchable products.
Corresponds to the JSON property unqualifiedProductCount
1857 1858 1859 |
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 1857 def unqualified_product_count @unqualified_product_count end |
#unqualified_sample_products ⇒ Array<Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaProduct>
A list of a maximum of 100 sample products that do not qualify for this
requirement. This field is only populated in the response to BranchService.
GetBranch API, and is always empty for BranchService.ListBranches. Only the
following fields are set in the Product. * Product.name * Product.id * Product.
title
Corresponds to the JSON property unqualifiedSampleProducts
1866 1867 1868 |
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 1866 def unqualified_sample_products @unqualified_sample_products end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1873 1874 1875 1876 1877 1878 1879 |
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 1873 def update!(**args) @qualified_product_count = args[:qualified_product_count] if args.key?(:qualified_product_count) @requirement_key = args[:requirement_key] if args.key?(:requirement_key) @suggested_quality_percent_threshold = args[:suggested_quality_percent_threshold] if args.key?(:suggested_quality_percent_threshold) @unqualified_product_count = args[:unqualified_product_count] if args.key?(:unqualified_product_count) @unqualified_sample_products = args[:unqualified_sample_products] if args.key?(:unqualified_sample_products) end |