From e5e739c4f718c5ff29194ecd6b312909676130d1 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 22 May 2024 21:28:05 +0530 Subject: [PATCH] feat: add `non_product_performance_view` table to Reports sub-API (#7325) * feat: A new enum `Effectiveness` is added feat: A new field `effectiveness` is added to message `.google.shopping.merchant.reports.v1beta.PriceInsightsProductView` docs: A comment for enum `AggregatedReportingContextStatus` is changed docs: A comment for field `shipping_label` in message `.google.shopping.merchant.reports.v1beta.ProductView` is changed docs: A comment for field `inventory_status` in message `.google.shopping.merchant.reports.v1beta.BestSellersProductClusterView` is changed docs: A comment for field `brand_inventory_status` in message `.google.shopping.merchant.reports.v1beta.BestSellersProductClusterView` is changed PiperOrigin-RevId: 635706104 Source-Link: https://github.com/googleapis/googleapis/commit/054146896ff300d6137157d18e6e76d506d9e729 Source-Link: https://github.com/googleapis/googleapis-gen/commit/809fa15e425a42645261004426b6ba776767ac23 Copy-Tag: eyJwIjoiU2hvcHBpbmdNZXJjaGFudFJlcG9ydHMvLk93bEJvdC55YW1sIiwiaCI6IjgwOWZhMTVlNDI1YTQyNjQ1MjYxMDA0NDI2YjZiYTc3Njc2N2FjMjMifQ== * feat: add `non_product_performance_view` table to Reports sub-API feat: add `effectiveness` field to `price_insights_product_view` table in Reports sub-API PiperOrigin-RevId: 635777166 Source-Link: https://github.com/googleapis/googleapis/commit/57514fbcb92c243fc478fdd540e5bf40bd91bf64 Source-Link: https://github.com/googleapis/googleapis-gen/commit/564835792365b80ff6e0248b50cda818bd18c0e5 Copy-Tag: eyJwIjoiU2hvcHBpbmdNZXJjaGFudFJlcG9ydHMvLk93bEJvdC55YW1sIiwiaCI6IjU2NDgzNTc5MjM2NWI4MGZmNmUwMjQ4YjUwY2RhODE4YmQxOGMwZTUifQ== --- .../metadata/V1Beta/Reports.php | Bin 13613 -> 14128 bytes .../V1beta/BestSellersProductClusterView.php | 40 +++++----- .../src/V1beta/NonProductPerformanceView.php | 52 ++++++------ .../src/V1beta/PriceInsightsProductView.php | 34 ++++++++ .../Effectiveness.php | 74 ++++++++++++++++++ .../src/V1beta/ProductView.php | 8 +- .../AggregatedReportingContextStatus.php | 2 +- .../src/V1beta/ReportRow.php | 44 +++++++++++ 8 files changed, 203 insertions(+), 51 deletions(-) create mode 100644 ShoppingMerchantReports/src/V1beta/PriceInsightsProductView/Effectiveness.php diff --git a/ShoppingMerchantReports/metadata/V1Beta/Reports.php b/ShoppingMerchantReports/metadata/V1Beta/Reports.php index 86bab1070db3663d1c23168104e7c4e63139db7a..12e2a9bb33c10faab09f3451f85e4fc55af4209f 100644 GIT binary patch delta 299 zcmZ3RwIOeVH#5_$^v%A^ml&BYa7JbOmX?}al3A9Tms(sbAqLdQXXFpk z2vjOzpy!G#t>nwaiy|N-%O&aR=H}`g;u+@Z=NcS5*;&GLvZKtE&G`xkIVJBia!CTM z4=Bn{DNQa3NG(dsFUn2KOHQ3Eudl`_&&5)nnwl-aG&xaA+9x?DGda6hf*I%lW)FrA zMn)kCF7C|Sf+C=^GV}9_C0M{Rj360#E+Me;_>zpG{L=J{_@cy;R0&p~0!9xepn}O? Md5t#fYyIN_0IJ+rdjJ3c delta 63 zcmV-F0KosSZmnvtO9KLzW3x>I(g6bI2a_QMZ?pOZh8G0T2MQRIKOh*hoE>2T2SNo3 V17B%mlQ0d|vymad39~aS{R+uK6}A8X diff --git a/ShoppingMerchantReports/src/V1beta/BestSellersProductClusterView.php b/ShoppingMerchantReports/src/V1beta/BestSellersProductClusterView.php index 1eb9b46f8d8..1bf3d09e8d8 100644 --- a/ShoppingMerchantReports/src/V1beta/BestSellersProductClusterView.php +++ b/ShoppingMerchantReports/src/V1beta/BestSellersProductClusterView.php @@ -120,9 +120,9 @@ class BestSellersProductClusterView extends \Google\Protobuf\Internal\Message */ private $variant_gtins; /** - * Whether the product cluster is `IN_STOCK` in your product feed in at least - * one of the countries, `OUT_OF_STOCK` in your product feed in all countries, - * or `NOT_IN_INVENTORY` at all. + * Whether the product cluster is `IN_STOCK` in your product data source in at + * least one of the countries, `OUT_OF_STOCK` in your product data source in + * all countries, or `NOT_IN_INVENTORY` at all. * The field doesn't take the Best sellers report country filter into account. * * Generated from protobuf field optional .google.shopping.merchant.reports.v1beta.BestSellersProductClusterView.InventoryStatus inventory_status = 14; @@ -130,8 +130,8 @@ class BestSellersProductClusterView extends \Google\Protobuf\Internal\Message protected $inventory_status = null; /** * Whether there is at least one product of the brand currently `IN_STOCK` in - * your product feed in at least one of the countries, all products are - * `OUT_OF_STOCK` in your product feed in all countries, or + * your product data source in at least one of the countries, all products are + * `OUT_OF_STOCK` in your product data source in all countries, or * `NOT_IN_INVENTORY`. * The field doesn't take the Best sellers report country filter into account. * @@ -230,14 +230,14 @@ class BestSellersProductClusterView extends \Google\Protobuf\Internal\Message * @type array|\Google\Protobuf\Internal\RepeatedField $variant_gtins * GTINs of example variants of the product cluster. * @type int $inventory_status - * Whether the product cluster is `IN_STOCK` in your product feed in at least - * one of the countries, `OUT_OF_STOCK` in your product feed in all countries, - * or `NOT_IN_INVENTORY` at all. + * Whether the product cluster is `IN_STOCK` in your product data source in at + * least one of the countries, `OUT_OF_STOCK` in your product data source in + * all countries, or `NOT_IN_INVENTORY` at all. * The field doesn't take the Best sellers report country filter into account. * @type int $brand_inventory_status * Whether there is at least one product of the brand currently `IN_STOCK` in - * your product feed in at least one of the countries, all products are - * `OUT_OF_STOCK` in your product feed in all countries, or + * your product data source in at least one of the countries, all products are + * `OUT_OF_STOCK` in your product data source in all countries, or * `NOT_IN_INVENTORY`. * The field doesn't take the Best sellers report country filter into account. * @type int|string $rank @@ -736,9 +736,9 @@ public function setVariantGtins($var) } /** - * Whether the product cluster is `IN_STOCK` in your product feed in at least - * one of the countries, `OUT_OF_STOCK` in your product feed in all countries, - * or `NOT_IN_INVENTORY` at all. + * Whether the product cluster is `IN_STOCK` in your product data source in at + * least one of the countries, `OUT_OF_STOCK` in your product data source in + * all countries, or `NOT_IN_INVENTORY` at all. * The field doesn't take the Best sellers report country filter into account. * * Generated from protobuf field optional .google.shopping.merchant.reports.v1beta.BestSellersProductClusterView.InventoryStatus inventory_status = 14; @@ -760,9 +760,9 @@ public function clearInventoryStatus() } /** - * Whether the product cluster is `IN_STOCK` in your product feed in at least - * one of the countries, `OUT_OF_STOCK` in your product feed in all countries, - * or `NOT_IN_INVENTORY` at all. + * Whether the product cluster is `IN_STOCK` in your product data source in at + * least one of the countries, `OUT_OF_STOCK` in your product data source in + * all countries, or `NOT_IN_INVENTORY` at all. * The field doesn't take the Best sellers report country filter into account. * * Generated from protobuf field optional .google.shopping.merchant.reports.v1beta.BestSellersProductClusterView.InventoryStatus inventory_status = 14; @@ -779,8 +779,8 @@ public function setInventoryStatus($var) /** * Whether there is at least one product of the brand currently `IN_STOCK` in - * your product feed in at least one of the countries, all products are - * `OUT_OF_STOCK` in your product feed in all countries, or + * your product data source in at least one of the countries, all products are + * `OUT_OF_STOCK` in your product data source in all countries, or * `NOT_IN_INVENTORY`. * The field doesn't take the Best sellers report country filter into account. * @@ -804,8 +804,8 @@ public function clearBrandInventoryStatus() /** * Whether there is at least one product of the brand currently `IN_STOCK` in - * your product feed in at least one of the countries, all products are - * `OUT_OF_STOCK` in your product feed in all countries, or + * your product data source in at least one of the countries, all products are + * `OUT_OF_STOCK` in your product data source in all countries, or * `NOT_IN_INVENTORY`. * The field doesn't take the Best sellers report country filter into account. * diff --git a/ShoppingMerchantReports/src/V1beta/NonProductPerformanceView.php b/ShoppingMerchantReports/src/V1beta/NonProductPerformanceView.php index 1dfa95ca927..262572a6638 100644 --- a/ShoppingMerchantReports/src/V1beta/NonProductPerformanceView.php +++ b/ShoppingMerchantReports/src/V1beta/NonProductPerformanceView.php @@ -10,8 +10,8 @@ /** * Fields available for query in `non_product_performance_view` table. - * Performance data on images and website links leading to your non-product - * website pages. This includes performance metrics (for example, `clicks`) + * Performance data on images and online store links leading to your non-product + * pages. This includes performance metrics (for example, `clicks`) * and dimensions according to which performance metrics are segmented (for * example, `date`). * Segment fields cannot be selected in queries without also selecting at least @@ -38,23 +38,23 @@ class NonProductPerformanceView extends \Google\Protobuf\Internal\Message */ protected $week = null; /** - * Number of clicks on images and website links leading to your non-product - * website pages. Metric. + * Number of clicks on images and online store links leading to your + * non-product pages. Metric. * * Generated from protobuf field optional int64 clicks = 3; */ protected $clicks = null; /** - * Number of times images and website links leading to your non-product - * website pages were shown. Metric. + * Number of times images and online store links leading to your non-product + * pages were shown. Metric. * * Generated from protobuf field optional int64 impressions = 4; */ protected $impressions = null; /** * Click-through rate - the number of clicks (`clicks`) divided by the number - * of impressions (`impressions`) of images and website links leading to your - * non-product website pages. Metric. + * of impressions (`impressions`) of images and online store links leading to + * your non-product pages. Metric. * * Generated from protobuf field optional double click_through_rate = 5; */ @@ -73,15 +73,15 @@ class NonProductPerformanceView extends \Google\Protobuf\Internal\Message * First day of the week (Monday) of the metrics date in the merchant * timezone. Segment. * @type int|string $clicks - * Number of clicks on images and website links leading to your non-product - * website pages. Metric. + * Number of clicks on images and online store links leading to your + * non-product pages. Metric. * @type int|string $impressions - * Number of times images and website links leading to your non-product - * website pages were shown. Metric. + * Number of times images and online store links leading to your non-product + * pages were shown. Metric. * @type float $click_through_rate * Click-through rate - the number of clicks (`clicks`) divided by the number - * of impressions (`impressions`) of images and website links leading to your - * non-product website pages. Metric. + * of impressions (`impressions`) of images and online store links leading to + * your non-product pages. Metric. * } */ public function __construct($data = NULL) { @@ -166,8 +166,8 @@ public function setWeek($var) } /** - * Number of clicks on images and website links leading to your non-product - * website pages. Metric. + * Number of clicks on images and online store links leading to your + * non-product pages. Metric. * * Generated from protobuf field optional int64 clicks = 3; * @return int|string @@ -188,8 +188,8 @@ public function clearClicks() } /** - * Number of clicks on images and website links leading to your non-product - * website pages. Metric. + * Number of clicks on images and online store links leading to your + * non-product pages. Metric. * * Generated from protobuf field optional int64 clicks = 3; * @param int|string $var @@ -204,8 +204,8 @@ public function setClicks($var) } /** - * Number of times images and website links leading to your non-product - * website pages were shown. Metric. + * Number of times images and online store links leading to your non-product + * pages were shown. Metric. * * Generated from protobuf field optional int64 impressions = 4; * @return int|string @@ -226,8 +226,8 @@ public function clearImpressions() } /** - * Number of times images and website links leading to your non-product - * website pages were shown. Metric. + * Number of times images and online store links leading to your non-product + * pages were shown. Metric. * * Generated from protobuf field optional int64 impressions = 4; * @param int|string $var @@ -243,8 +243,8 @@ public function setImpressions($var) /** * Click-through rate - the number of clicks (`clicks`) divided by the number - * of impressions (`impressions`) of images and website links leading to your - * non-product website pages. Metric. + * of impressions (`impressions`) of images and online store links leading to + * your non-product pages. Metric. * * Generated from protobuf field optional double click_through_rate = 5; * @return float @@ -266,8 +266,8 @@ public function clearClickThroughRate() /** * Click-through rate - the number of clicks (`clicks`) divided by the number - * of impressions (`impressions`) of images and website links leading to your - * non-product website pages. Metric. + * of impressions (`impressions`) of images and online store links leading to + * your non-product pages. Metric. * * Generated from protobuf field optional double click_through_rate = 5; * @param float $var diff --git a/ShoppingMerchantReports/src/V1beta/PriceInsightsProductView.php b/ShoppingMerchantReports/src/V1beta/PriceInsightsProductView.php index b53355a0c2a..497d56770ba 100644 --- a/ShoppingMerchantReports/src/V1beta/PriceInsightsProductView.php +++ b/ShoppingMerchantReports/src/V1beta/PriceInsightsProductView.php @@ -152,6 +152,12 @@ class PriceInsightsProductView extends \Google\Protobuf\Internal\Message * Generated from protobuf field optional double predicted_conversions_change_fraction = 19; */ protected $predicted_conversions_change_fraction = null; + /** + * The predicted effectiveness of applying the price suggestion, bucketed. + * + * Generated from protobuf field .google.shopping.merchant.reports.v1beta.PriceInsightsProductView.Effectiveness effectiveness = 22; + */ + protected $effectiveness = 0; /** * Constructor. @@ -216,6 +222,8 @@ class PriceInsightsProductView extends \Google\Protobuf\Internal\Message * Predicted change in conversions as a fraction after introducing the * suggested price compared to current active price. For example, 0.05 is a 5% * predicted increase in conversions). + * @type int $effectiveness + * The predicted effectiveness of applying the price suggestion, bucketed. * } */ public function __construct($data = NULL) { @@ -945,5 +953,31 @@ public function setPredictedConversionsChangeFraction($var) return $this; } + /** + * The predicted effectiveness of applying the price suggestion, bucketed. + * + * Generated from protobuf field .google.shopping.merchant.reports.v1beta.PriceInsightsProductView.Effectiveness effectiveness = 22; + * @return int + */ + public function getEffectiveness() + { + return $this->effectiveness; + } + + /** + * The predicted effectiveness of applying the price suggestion, bucketed. + * + * Generated from protobuf field .google.shopping.merchant.reports.v1beta.PriceInsightsProductView.Effectiveness effectiveness = 22; + * @param int $var + * @return $this + */ + public function setEffectiveness($var) + { + GPBUtil::checkEnum($var, \Google\Shopping\Merchant\Reports\V1beta\PriceInsightsProductView\Effectiveness::class); + $this->effectiveness = $var; + + return $this; + } + } diff --git a/ShoppingMerchantReports/src/V1beta/PriceInsightsProductView/Effectiveness.php b/ShoppingMerchantReports/src/V1beta/PriceInsightsProductView/Effectiveness.php new file mode 100644 index 00000000000..8df736edbef --- /dev/null +++ b/ShoppingMerchantReports/src/V1beta/PriceInsightsProductView/Effectiveness.php @@ -0,0 +1,74 @@ +google.shopping.merchant.reports.v1beta.PriceInsightsProductView.Effectiveness + */ +class Effectiveness +{ + /** + * Effectiveness is unknown. + * + * Generated from protobuf enum EFFECTIVENESS_UNSPECIFIED = 0; + */ + const EFFECTIVENESS_UNSPECIFIED = 0; + /** + * Effectiveness is low. + * + * Generated from protobuf enum LOW = 1; + */ + const LOW = 1; + /** + * Effectiveness is medium. + * + * Generated from protobuf enum MEDIUM = 2; + */ + const MEDIUM = 2; + /** + * Effectiveness is high. + * + * Generated from protobuf enum HIGH = 3; + */ + const HIGH = 3; + + private static $valueToName = [ + self::EFFECTIVENESS_UNSPECIFIED => 'EFFECTIVENESS_UNSPECIFIED', + self::LOW => 'LOW', + self::MEDIUM => 'MEDIUM', + self::HIGH => 'HIGH', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/ShoppingMerchantReports/src/V1beta/ProductView.php b/ShoppingMerchantReports/src/V1beta/ProductView.php index 40c7606b8e2..34a8c027f4d 100644 --- a/ShoppingMerchantReports/src/V1beta/ProductView.php +++ b/ShoppingMerchantReports/src/V1beta/ProductView.php @@ -162,7 +162,7 @@ class ProductView extends \Google\Protobuf\Internal\Message /** * Normalized [shipping * label](https://support.google.com/merchants/answer/6324504) specified in - * the feed. + * the data source. * * Generated from protobuf field optional string shipping_label = 20; */ @@ -295,7 +295,7 @@ class ProductView extends \Google\Protobuf\Internal\Message * @type string $shipping_label * Normalized [shipping * label](https://support.google.com/merchants/answer/6324504) specified in - * the feed. + * the data source. * @type array|\Google\Protobuf\Internal\RepeatedField $gtin * List of Global Trade Item Numbers (GTINs) of the product. * @type string $item_group_id @@ -1084,7 +1084,7 @@ public function setAvailability($var) /** * Normalized [shipping * label](https://support.google.com/merchants/answer/6324504) specified in - * the feed. + * the data source. * * Generated from protobuf field optional string shipping_label = 20; * @return string @@ -1107,7 +1107,7 @@ public function clearShippingLabel() /** * Normalized [shipping * label](https://support.google.com/merchants/answer/6324504) specified in - * the feed. + * the data source. * * Generated from protobuf field optional string shipping_label = 20; * @param string $var diff --git a/ShoppingMerchantReports/src/V1beta/ProductView/AggregatedReportingContextStatus.php b/ShoppingMerchantReports/src/V1beta/ProductView/AggregatedReportingContextStatus.php index 9e6a103dccb..575646bd3ca 100644 --- a/ShoppingMerchantReports/src/V1beta/ProductView/AggregatedReportingContextStatus.php +++ b/ShoppingMerchantReports/src/V1beta/ProductView/AggregatedReportingContextStatus.php @@ -9,7 +9,7 @@ /** * Status of the product aggregated for all reporting contexts. * Here's an example of how the aggregated status is computed: - * Free listings | Shopping Ads | Status + * Free listings | Shopping ads | Status * --------------|--------------|------------------------------ * Approved | Approved | ELIGIBLE * Approved | Pending | ELIGIBLE diff --git a/ShoppingMerchantReports/src/V1beta/ReportRow.php b/ShoppingMerchantReports/src/V1beta/ReportRow.php index c85412be9fe..79de75b0226 100644 --- a/ShoppingMerchantReports/src/V1beta/ReportRow.php +++ b/ShoppingMerchantReports/src/V1beta/ReportRow.php @@ -24,6 +24,12 @@ class ReportRow extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.shopping.merchant.reports.v1beta.ProductPerformanceView product_performance_view = 1; */ protected $product_performance_view = null; + /** + * Fields available for query in `non_product_performance_view` table. + * + * Generated from protobuf field .google.shopping.merchant.reports.v1beta.NonProductPerformanceView non_product_performance_view = 7; + */ + protected $non_product_performance_view = null; /** * Fields available for query in `product_view` table. * @@ -84,6 +90,8 @@ class ReportRow extends \Google\Protobuf\Internal\Message * * @type \Google\Shopping\Merchant\Reports\V1beta\ProductPerformanceView $product_performance_view * Fields available for query in `product_performance_view` table. + * @type \Google\Shopping\Merchant\Reports\V1beta\NonProductPerformanceView $non_product_performance_view + * Fields available for query in `non_product_performance_view` table. * @type \Google\Shopping\Merchant\Reports\V1beta\ProductView $product_view * Fields available for query in `product_view` table. * @type \Google\Shopping\Merchant\Reports\V1beta\PriceCompetitivenessProductView $price_competitiveness_product_view @@ -146,6 +154,42 @@ public function setProductPerformanceView($var) return $this; } + /** + * Fields available for query in `non_product_performance_view` table. + * + * Generated from protobuf field .google.shopping.merchant.reports.v1beta.NonProductPerformanceView non_product_performance_view = 7; + * @return \Google\Shopping\Merchant\Reports\V1beta\NonProductPerformanceView|null + */ + public function getNonProductPerformanceView() + { + return $this->non_product_performance_view; + } + + public function hasNonProductPerformanceView() + { + return isset($this->non_product_performance_view); + } + + public function clearNonProductPerformanceView() + { + unset($this->non_product_performance_view); + } + + /** + * Fields available for query in `non_product_performance_view` table. + * + * Generated from protobuf field .google.shopping.merchant.reports.v1beta.NonProductPerformanceView non_product_performance_view = 7; + * @param \Google\Shopping\Merchant\Reports\V1beta\NonProductPerformanceView $var + * @return $this + */ + public function setNonProductPerformanceView($var) + { + GPBUtil::checkMessage($var, \Google\Shopping\Merchant\Reports\V1beta\NonProductPerformanceView::class); + $this->non_product_performance_view = $var; + + return $this; + } + /** * Fields available for query in `product_view` table. *