target.apidocs.com.google.api.services.content.model.Segments.html Maven / Gradle / Ivy
Segments (Content API for Shopping v2.1-rev20240609-2.0.0)
com.google.api.services.content.model
Class Segments
- java.lang.Object
-
- java.util.AbstractMap<String,Object>
-
- com.google.api.client.util.GenericData
-
- com.google.api.client.json.GenericJson
-
- com.google.api.services.content.model.Segments
-
public final class Segments
extends com.google.api.client.json.GenericJson
Dimensions according to which metrics are segmented in the response. Values of product
dimensions, such as `offer_id`, reflect the state of a product at the time of the corresponding
event, for example, 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.
This is the Java data model class that specifies how to parse/serialize into the JSON that is
transmitted over HTTP when working with the Content API for Shopping. For a detailed explanation
see:
https://developers.google.com/api-client-library/java/google-http-java-client/json
- Author:
- Google, Inc.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.api.client.util.GenericData
com.google.api.client.util.GenericData.Flags
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
-
Constructor Summary
Constructors
Constructor and Description
Segments()
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
Segments
clone()
String
getBrand()
Brand of the product.
String
getCategoryL1()
[Product category (1st level)](https://developers.google.com/shopping-
content/guides/reports/segmentation#category_and_product_type) in Google's product taxonomy.
String
getCategoryL2()
[Product category (2nd level)](https://developers.google.com/shopping-
content/guides/reports/segmentation#category_and_product_type) in Google's product taxonomy.
String
getCategoryL3()
[Product category (3rd level)](https://developers.google.com/shopping-
content/guides/reports/segmentation#category_and_product_type) in Google's product taxonomy.
String
getCategoryL4()
[Product category (4th level)](https://developers.google.com/shopping-
content/guides/reports/segmentation#category_and_product_type) in Google's product taxonomy.
String
getCategoryL5()
[Product category (5th level)](https://developers.google.com/shopping-
content/guides/reports/segmentation#category_and_product_type) in Google's product taxonomy.
String
getCurrencyCode()
Currency in which price metrics are represented, for example, if you select
`ordered_item_sales_micros`, the returned value will be represented by this currency.
String
getCustomerCountryCode()
Code of the country where the customer is located at the time of the event.
String
getCustomLabel0()
Custom label 0 for custom grouping of products.
String
getCustomLabel1()
Custom label 1 for custom grouping of products.
String
getCustomLabel2()
Custom label 2 for custom grouping of products.
String
getCustomLabel3()
Custom label 3 for custom grouping of products.
String
getCustomLabel4()
Custom label 4 for custom grouping of products.
Date
getDate()
Date in the merchant timezone to which metrics apply.
String
getOfferId()
Merchant-provided id of the product.
String
getProductTypeL1()
[Product type (1st level)](https://developers.google.com/shopping-
content/guides/reports/segmentation#category_and_product_type) in merchant's own product
taxonomy.
String
getProductTypeL2()
[Product type (2nd level)](https://developers.google.com/shopping-
content/guides/reports/segmentation#category_and_product_type) in merchant's own product
taxonomy.
String
getProductTypeL3()
[Product type (3rd level)](https://developers.google.com/shopping-
content/guides/reports/segmentation#category_and_product_type) in merchant's own product
taxonomy.
String
getProductTypeL4()
[Product type (4th level)](https://developers.google.com/shopping-
content/guides/reports/segmentation#category_and_product_type) in merchant's own product
taxonomy.
String
getProductTypeL5()
[Product type (5th level)](https://developers.google.com/shopping-
content/guides/reports/segmentation#category_and_product_type) in merchant's own product
taxonomy.
String
getProgram()
Program to which metrics apply, for example, Free Product Listing.
String
getTitle()
Title of the product.
Date
getWeek()
First day of the week (Monday) of the metrics date in the merchant timezone.
Segments
set(String fieldName,
Object value)
Segments
setBrand(String brand)
Brand of the product.
Segments
setCategoryL1(String categoryL1)
[Product category (1st level)](https://developers.google.com/shopping-
content/guides/reports/segmentation#category_and_product_type) in Google's product taxonomy.
Segments
setCategoryL2(String categoryL2)
[Product category (2nd level)](https://developers.google.com/shopping-
content/guides/reports/segmentation#category_and_product_type) in Google's product taxonomy.
Segments
setCategoryL3(String categoryL3)
[Product category (3rd level)](https://developers.google.com/shopping-
content/guides/reports/segmentation#category_and_product_type) in Google's product taxonomy.
Segments
setCategoryL4(String categoryL4)
[Product category (4th level)](https://developers.google.com/shopping-
content/guides/reports/segmentation#category_and_product_type) in Google's product taxonomy.
Segments
setCategoryL5(String categoryL5)
[Product category (5th level)](https://developers.google.com/shopping-
content/guides/reports/segmentation#category_and_product_type) in Google's product taxonomy.
Segments
setCurrencyCode(String currencyCode)
Currency in which price metrics are represented, for example, if you select
`ordered_item_sales_micros`, the returned value will be represented by this currency.
Segments
setCustomerCountryCode(String customerCountryCode)
Code of the country where the customer is located at the time of the event.
Segments
setCustomLabel0(String customLabel0)
Custom label 0 for custom grouping of products.
Segments
setCustomLabel1(String customLabel1)
Custom label 1 for custom grouping of products.
Segments
setCustomLabel2(String customLabel2)
Custom label 2 for custom grouping of products.
Segments
setCustomLabel3(String customLabel3)
Custom label 3 for custom grouping of products.
Segments
setCustomLabel4(String customLabel4)
Custom label 4 for custom grouping of products.
Segments
setDate(Date date)
Date in the merchant timezone to which metrics apply.
Segments
setOfferId(String offerId)
Merchant-provided id of the product.
Segments
setProductTypeL1(String productTypeL1)
[Product type (1st level)](https://developers.google.com/shopping-
content/guides/reports/segmentation#category_and_product_type) in merchant's own product
taxonomy.
Segments
setProductTypeL2(String productTypeL2)
[Product type (2nd level)](https://developers.google.com/shopping-
content/guides/reports/segmentation#category_and_product_type) in merchant's own product
taxonomy.
Segments
setProductTypeL3(String productTypeL3)
[Product type (3rd level)](https://developers.google.com/shopping-
content/guides/reports/segmentation#category_and_product_type) in merchant's own product
taxonomy.
Segments
setProductTypeL4(String productTypeL4)
[Product type (4th level)](https://developers.google.com/shopping-
content/guides/reports/segmentation#category_and_product_type) in merchant's own product
taxonomy.
Segments
setProductTypeL5(String productTypeL5)
[Product type (5th level)](https://developers.google.com/shopping-
content/guides/reports/segmentation#category_and_product_type) in merchant's own product
taxonomy.
Segments
setProgram(String program)
Program to which metrics apply, for example, Free Product Listing.
Segments
setTitle(String title)
Title of the product.
Segments
setWeek(Date week)
First day of the week (Monday) of the metrics date in the merchant timezone.
-
Methods inherited from class com.google.api.client.json.GenericJson
getFactory, setFactory, toPrettyString, toString
-
Methods inherited from class com.google.api.client.util.GenericData
entrySet, equals, get, getClassInfo, getUnknownKeys, hashCode, put, putAll, remove, setUnknownKeys
-
Methods inherited from class java.util.AbstractMap
clear, containsKey, containsValue, isEmpty, keySet, size, values
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
Method Detail
-
getBrand
public String getBrand()
Brand of the product.
- Returns:
- value or
null
for none
-
setBrand
public Segments setBrand(String brand)
Brand of the product.
- Parameters:
brand
- brand or null
for none
-
getCategoryL1
public String getCategoryL1()
[Product category (1st level)](https://developers.google.com/shopping-
content/guides/reports/segmentation#category_and_product_type) in Google's product taxonomy.
- Returns:
- value or
null
for none
-
setCategoryL1
public Segments setCategoryL1(String categoryL1)
[Product category (1st level)](https://developers.google.com/shopping-
content/guides/reports/segmentation#category_and_product_type) in Google's product taxonomy.
- Parameters:
categoryL1
- categoryL1 or null
for none
-
getCategoryL2
public String getCategoryL2()
[Product category (2nd level)](https://developers.google.com/shopping-
content/guides/reports/segmentation#category_and_product_type) in Google's product taxonomy.
- Returns:
- value or
null
for none
-
setCategoryL2
public Segments setCategoryL2(String categoryL2)
[Product category (2nd level)](https://developers.google.com/shopping-
content/guides/reports/segmentation#category_and_product_type) in Google's product taxonomy.
- Parameters:
categoryL2
- categoryL2 or null
for none
-
getCategoryL3
public String getCategoryL3()
[Product category (3rd level)](https://developers.google.com/shopping-
content/guides/reports/segmentation#category_and_product_type) in Google's product taxonomy.
- Returns:
- value or
null
for none
-
setCategoryL3
public Segments setCategoryL3(String categoryL3)
[Product category (3rd level)](https://developers.google.com/shopping-
content/guides/reports/segmentation#category_and_product_type) in Google's product taxonomy.
- Parameters:
categoryL3
- categoryL3 or null
for none
-
getCategoryL4
public String getCategoryL4()
[Product category (4th level)](https://developers.google.com/shopping-
content/guides/reports/segmentation#category_and_product_type) in Google's product taxonomy.
- Returns:
- value or
null
for none
-
setCategoryL4
public Segments setCategoryL4(String categoryL4)
[Product category (4th level)](https://developers.google.com/shopping-
content/guides/reports/segmentation#category_and_product_type) in Google's product taxonomy.
- Parameters:
categoryL4
- categoryL4 or null
for none
-
getCategoryL5
public String getCategoryL5()
[Product category (5th level)](https://developers.google.com/shopping-
content/guides/reports/segmentation#category_and_product_type) in Google's product taxonomy.
- Returns:
- value or
null
for none
-
setCategoryL5
public Segments setCategoryL5(String categoryL5)
[Product category (5th level)](https://developers.google.com/shopping-
content/guides/reports/segmentation#category_and_product_type) in Google's product taxonomy.
- Parameters:
categoryL5
- categoryL5 or null
for none
-
getCurrencyCode
public String getCurrencyCode()
Currency in which price metrics are represented, for example, if you select
`ordered_item_sales_micros`, the returned value will be represented by this currency.
- Returns:
- value or
null
for none
-
setCurrencyCode
public Segments setCurrencyCode(String currencyCode)
Currency in which price metrics are represented, for example, if you select
`ordered_item_sales_micros`, the returned value will be represented by this currency.
- Parameters:
currencyCode
- currencyCode or null
for none
-
getCustomLabel0
public String getCustomLabel0()
Custom label 0 for custom grouping of products.
- Returns:
- value or
null
for none
-
setCustomLabel0
public Segments setCustomLabel0(String customLabel0)
Custom label 0 for custom grouping of products.
- Parameters:
customLabel0
- customLabel0 or null
for none
-
getCustomLabel1
public String getCustomLabel1()
Custom label 1 for custom grouping of products.
- Returns:
- value or
null
for none
-
setCustomLabel1
public Segments setCustomLabel1(String customLabel1)
Custom label 1 for custom grouping of products.
- Parameters:
customLabel1
- customLabel1 or null
for none
-
getCustomLabel2
public String getCustomLabel2()
Custom label 2 for custom grouping of products.
- Returns:
- value or
null
for none
-
setCustomLabel2
public Segments setCustomLabel2(String customLabel2)
Custom label 2 for custom grouping of products.
- Parameters:
customLabel2
- customLabel2 or null
for none
-
getCustomLabel3
public String getCustomLabel3()
Custom label 3 for custom grouping of products.
- Returns:
- value or
null
for none
-
setCustomLabel3
public Segments setCustomLabel3(String customLabel3)
Custom label 3 for custom grouping of products.
- Parameters:
customLabel3
- customLabel3 or null
for none
-
getCustomLabel4
public String getCustomLabel4()
Custom label 4 for custom grouping of products.
- Returns:
- value or
null
for none
-
setCustomLabel4
public Segments setCustomLabel4(String customLabel4)
Custom label 4 for custom grouping of products.
- Parameters:
customLabel4
- customLabel4 or null
for none
-
getCustomerCountryCode
public String getCustomerCountryCode()
Code of the country where the customer is located at the time of the event. Represented in the
ISO 3166 format. If the customer country cannot be determined, a special 'ZZ' code is returned.
- Returns:
- value or
null
for none
-
setCustomerCountryCode
public Segments setCustomerCountryCode(String customerCountryCode)
Code of the country where the customer is located at the time of the event. Represented in the
ISO 3166 format. If the customer country cannot be determined, a special 'ZZ' code is returned.
- Parameters:
customerCountryCode
- customerCountryCode or null
for none
-
getDate
public Date getDate()
Date in the merchant timezone to which metrics apply.
- Returns:
- value or
null
for none
-
setDate
public Segments setDate(Date date)
Date in the merchant timezone to which metrics apply.
- Parameters:
date
- date or null
for none
-
getOfferId
public String getOfferId()
Merchant-provided id of the product.
- Returns:
- value or
null
for none
-
setOfferId
public Segments setOfferId(String offerId)
Merchant-provided id of the product.
- Parameters:
offerId
- offerId or null
for none
-
getProductTypeL1
public String getProductTypeL1()
[Product type (1st level)](https://developers.google.com/shopping-
content/guides/reports/segmentation#category_and_product_type) in merchant's own product
taxonomy.
- Returns:
- value or
null
for none
-
setProductTypeL1
public Segments setProductTypeL1(String productTypeL1)
[Product type (1st level)](https://developers.google.com/shopping-
content/guides/reports/segmentation#category_and_product_type) in merchant's own product
taxonomy.
- Parameters:
productTypeL1
- productTypeL1 or null
for none
-
getProductTypeL2
public String getProductTypeL2()
[Product type (2nd level)](https://developers.google.com/shopping-
content/guides/reports/segmentation#category_and_product_type) in merchant's own product
taxonomy.
- Returns:
- value or
null
for none
-
setProductTypeL2
public Segments setProductTypeL2(String productTypeL2)
[Product type (2nd level)](https://developers.google.com/shopping-
content/guides/reports/segmentation#category_and_product_type) in merchant's own product
taxonomy.
- Parameters:
productTypeL2
- productTypeL2 or null
for none
-
getProductTypeL3
public String getProductTypeL3()
[Product type (3rd level)](https://developers.google.com/shopping-
content/guides/reports/segmentation#category_and_product_type) in merchant's own product
taxonomy.
- Returns:
- value or
null
for none
-
setProductTypeL3
public Segments setProductTypeL3(String productTypeL3)
[Product type (3rd level)](https://developers.google.com/shopping-
content/guides/reports/segmentation#category_and_product_type) in merchant's own product
taxonomy.
- Parameters:
productTypeL3
- productTypeL3 or null
for none
-
getProductTypeL4
public String getProductTypeL4()
[Product type (4th level)](https://developers.google.com/shopping-
content/guides/reports/segmentation#category_and_product_type) in merchant's own product
taxonomy.
- Returns:
- value or
null
for none
-
setProductTypeL4
public Segments setProductTypeL4(String productTypeL4)
[Product type (4th level)](https://developers.google.com/shopping-
content/guides/reports/segmentation#category_and_product_type) in merchant's own product
taxonomy.
- Parameters:
productTypeL4
- productTypeL4 or null
for none
-
getProductTypeL5
public String getProductTypeL5()
[Product type (5th level)](https://developers.google.com/shopping-
content/guides/reports/segmentation#category_and_product_type) in merchant's own product
taxonomy.
- Returns:
- value or
null
for none
-
setProductTypeL5
public Segments setProductTypeL5(String productTypeL5)
[Product type (5th level)](https://developers.google.com/shopping-
content/guides/reports/segmentation#category_and_product_type) in merchant's own product
taxonomy.
- Parameters:
productTypeL5
- productTypeL5 or null
for none
-
getProgram
public String getProgram()
Program to which metrics apply, for example, Free Product Listing.
- Returns:
- value or
null
for none
-
setProgram
public Segments setProgram(String program)
Program to which metrics apply, for example, Free Product Listing.
- Parameters:
program
- program or null
for none
-
getTitle
public String getTitle()
Title of the product.
- Returns:
- value or
null
for none
-
setTitle
public Segments setTitle(String title)
Title of the product.
- Parameters:
title
- title or null
for none
-
getWeek
public Date getWeek()
First day of the week (Monday) of the metrics date in the merchant timezone.
- Returns:
- value or
null
for none
-
setWeek
public Segments setWeek(Date week)
First day of the week (Monday) of the metrics date in the merchant timezone.
- Parameters:
week
- week or null
for none
-
set
public Segments set(String fieldName,
Object value)
- Overrides:
set
in class com.google.api.client.json.GenericJson
-
clone
public Segments clone()
- Overrides:
clone
in class com.google.api.client.json.GenericJson
Copyright © 2011–2024 Google. All rights reserved.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy