class Google::Apis::ContentV2_1::Segments

Dimensions according to which metrics are segmented in the response. Values of product dimensions, e.g., offer id, reflect the state of a product at the time of the corresponding event, e.g., impression or order. Segment fields cannot be selected in queries without also selecting at least one metric field. Values are only set for dimensions requested explicitly in the request's search query.

Attributes

brand[RW]

Brand of the product. Corresponds to the JSON property `brand` @return [String]

category_l1[RW]

[Product category (1st level)](developers.google.com/shopping-content/ guides/reports/segmentation#category_and_product_type) in Google's product taxonomy. Corresponds to the JSON property `categoryL1` @return [String]

category_l2[RW]

[Product category (2nd level)](developers.google.com/shopping-content/ guides/reports/segmentation#category_and_product_type) in Google's product taxonomy. Corresponds to the JSON property `categoryL2` @return [String]

category_l3[RW]

[Product category (3rd level)](developers.google.com/shopping-content/ guides/reports/segmentation#category_and_product_type) in Google's product taxonomy. Corresponds to the JSON property `categoryL3` @return [String]

category_l4[RW]

[Product category (4th level)](developers.google.com/shopping-content/ guides/reports/segmentation#category_and_product_type) in Google's product taxonomy. Corresponds to the JSON property `categoryL4` @return [String]

category_l5[RW]

[Product category (5th level)](developers.google.com/shopping-content/ guides/reports/segmentation#category_and_product_type) in Google's product taxonomy. Corresponds to the JSON property `categoryL5` @return [String]

currency_code[RW]

Currency in which price metrics are represented, e.g., if you select ` ordered_item_sales_micros`, the returned value will be represented by this currency. Corresponds to the JSON property `currencyCode` @return [String]

custom_label0[RW]

Custom label 0 for custom grouping of products. Corresponds to the JSON property `customLabel0` @return [String]

custom_label1[RW]

Custom label 1 for custom grouping of products. Corresponds to the JSON property `customLabel1` @return [String]

custom_label2[RW]

Custom label 2 for custom grouping of products. Corresponds to the JSON property `customLabel2` @return [String]

custom_label3[RW]

Custom label 3 for custom grouping of products. Corresponds to the JSON property `customLabel3` @return [String]

custom_label4[RW]

Custom label 4 for custom grouping of products. Corresponds to the JSON property `customLabel4` @return [String]

date[RW]

Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values * A month and day value, with a zero year, such as an anniversary * A year on its own, with zero month and day values * A year and month value, with a zero day, such as a credit card expiration date Related types are google.type.TimeOfDay and ` google.protobuf.Timestamp`. Corresponds to the JSON property `date` @return [Google::Apis::ContentV2_1::Date]

offer_id[RW]

Merchant-provided id of the product. Corresponds to the JSON property `offerId` @return [String]

product_type_l1[RW]

[Product type (1st level)](developers.google.com/shopping-content/ guides/reports/segmentation#category_and_product_type) in merchant's own product taxonomy. Corresponds to the JSON property `productTypeL1` @return [String]

product_type_l2[RW]

[Product type (2nd level)](developers.google.com/shopping-content/ guides/reports/segmentation#category_and_product_type) in merchant's own product taxonomy. Corresponds to the JSON property `productTypeL2` @return [String]

product_type_l3[RW]

[Product type (3rd level)](developers.google.com/shopping-content/ guides/reports/segmentation#category_and_product_type) in merchant's own product taxonomy. Corresponds to the JSON property `productTypeL3` @return [String]

product_type_l4[RW]

[Product type (4th level)](developers.google.com/shopping-content/ guides/reports/segmentation#category_and_product_type) in merchant's own product taxonomy. Corresponds to the JSON property `productTypeL4` @return [String]

product_type_l5[RW]

[Product type (5th level)](developers.google.com/shopping-content/ guides/reports/segmentation#category_and_product_type) in merchant's own product taxonomy. Corresponds to the JSON property `productTypeL5` @return [String]

program[RW]

Program to which metrics apply, e.g., Free Product Listing. Corresponds to the JSON property `program` @return [String]

title[RW]

Title of the product. Corresponds to the JSON property `title` @return [String]

week[RW]

Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values * A month and day value, with a zero year, such as an anniversary * A year on its own, with zero month and day values * A year and month value, with a zero day, such as a credit card expiration date Related types are google.type.TimeOfDay and ` google.protobuf.Timestamp`. Corresponds to the JSON property `week` @return [Google::Apis::ContentV2_1::Date]

Public Class Methods

new(**args) click to toggle source
# File lib/google/apis/content_v2_1/classes.rb, line 14027
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File lib/google/apis/content_v2_1/classes.rb, line 14032
def update!(**args)
  @brand = args[:brand] if args.key?(:brand)
  @category_l1 = args[:category_l1] if args.key?(:category_l1)
  @category_l2 = args[:category_l2] if args.key?(:category_l2)
  @category_l3 = args[:category_l3] if args.key?(:category_l3)
  @category_l4 = args[:category_l4] if args.key?(:category_l4)
  @category_l5 = args[:category_l5] if args.key?(:category_l5)
  @currency_code = args[:currency_code] if args.key?(:currency_code)
  @custom_label0 = args[:custom_label0] if args.key?(:custom_label0)
  @custom_label1 = args[:custom_label1] if args.key?(:custom_label1)
  @custom_label2 = args[:custom_label2] if args.key?(:custom_label2)
  @custom_label3 = args[:custom_label3] if args.key?(:custom_label3)
  @custom_label4 = args[:custom_label4] if args.key?(:custom_label4)
  @date = args[:date] if args.key?(:date)
  @offer_id = args[:offer_id] if args.key?(:offer_id)
  @product_type_l1 = args[:product_type_l1] if args.key?(:product_type_l1)
  @product_type_l2 = args[:product_type_l2] if args.key?(:product_type_l2)
  @product_type_l3 = args[:product_type_l3] if args.key?(:product_type_l3)
  @product_type_l4 = args[:product_type_l4] if args.key?(:product_type_l4)
  @product_type_l5 = args[:product_type_l5] if args.key?(:product_type_l5)
  @program = args[:program] if args.key?(:program)
  @title = args[:title] if args.key?(:title)
  @week = args[:week] if args.key?(:week)
end