Class: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaBranch

Inherits:
Object
  • Object
show all
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

A data branch that stores all instances of Products.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudRetailV2alphaBranch

Returns a new instance of GoogleCloudRetailV2alphaBranch.



1744
1745
1746
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 1744

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

Instance Attribute Details

#display_nameString

Output only. Human readable name of the branch to display in the UI. Corresponds to the JSON property displayName

Returns:

  • (String)


1688
1689
1690
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 1688

def display_name
  @display_name
end

#is_defaultBoolean Also known as: is_default?

Output only. Indicates whether this branch is set as the default branch of its parent catalog. Corresponds to the JSON property isDefault

Returns:

  • (Boolean)


1694
1695
1696
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 1694

def is_default
  @is_default
end

#last_product_import_timeString

Output only. Timestamp of last import through ProductService.ImportProducts. Empty value means no import has been made to this branch. Corresponds to the JSON property lastProductImportTime

Returns:

  • (String)


1701
1702
1703
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 1701

def last_product_import_time
  @last_product_import_time
end

#nameString

Immutable. Full resource name of the branch, such as projects/*/locations/ global/catalogs/default_catalog/branches/branch_id. Corresponds to the JSON property name

Returns:

  • (String)


1707
1708
1709
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 1707

def name
  @name
end

#product_count_statsArray<Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaBranchProductCountStatistic>

Output only. Statistics for number of products in the branch, provided for different scopes. This field is not populated in BranchView.BASIC view. Corresponds to the JSON property productCountStats



1713
1714
1715
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 1713

def product_count_stats
  @product_count_stats
end

#product_countsHash<String,Fixnum>

Output only. The number of products in different groups that this branch has. The key is a group representing a set of products, and the value is the number of products in that group. Note: keys in this map may change over time. Possible keys: * "primary-in-stock", products have Product.Type.PRIMARY type and Product.Availability.IN_STOCK availability. * "primary-out-of-stock", products have Product.Type.PRIMARY type and Product.Availability.OUT_OF_STOCK availability. * "primary-preorder", products have Product.Type.PRIMARY type and Product.Availability.PREORDER availability. * "primary-backorder", products have Product.Type.PRIMARY type and Product.Availability.BACKORDER availability. * "variant-in-stock", products have Product.Type.VARIANT type and Product.Availability.IN_STOCK availability. * "variant-out-of-stock", products have Product.Type.VARIANT type and Product.Availability.OUT_OF_STOCK availability. * "variant-preorder", products have Product.Type.VARIANT type and Product.Availability.PREORDER availability. * "variant-backorder", products have Product.Type.VARIANT type and Product.Availability.BACKORDER availability. * "price-discounted", products have [Product.price_info.price] < [Product.price_info.original_price]. This field is not populated in BranchView. BASIC view. Corresponds to the JSON property productCounts

Returns:

  • (Hash<String,Fixnum>)


1735
1736
1737
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 1735

def product_counts
  @product_counts
end

#quality_metricsArray<Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaBranchQualityMetric>

Output only. The quality metrics measured among products of this branch. See QualityMetric.requirement_key for supported metrics. Metrics could be missing if failed to retrieve. This field is not populated in BranchView.BASIC view. Corresponds to the JSON property qualityMetrics



1742
1743
1744
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 1742

def quality_metrics
  @quality_metrics
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1749
1750
1751
1752
1753
1754
1755
1756
1757
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 1749

def update!(**args)
  @display_name = args[:display_name] if args.key?(:display_name)
  @is_default = args[:is_default] if args.key?(:is_default)
  @last_product_import_time = args[:last_product_import_time] if args.key?(:last_product_import_time)
  @name = args[:name] if args.key?(:name)
  @product_count_stats = args[:product_count_stats] if args.key?(:product_count_stats)
  @product_counts = args[:product_counts] if args.key?(:product_counts)
  @quality_metrics = args[:quality_metrics] if args.key?(:quality_metrics)
end