diff --git a/AnalyticsData/src/V1alpha/CohortsRange/Granularity.php b/AnalyticsData/src/V1alpha/CohortsRange/Granularity.php
index d5c75924d4b8..ca2d1643d907 100644
--- a/AnalyticsData/src/V1alpha/CohortsRange/Granularity.php
+++ b/AnalyticsData/src/V1alpha/CohortsRange/Granularity.php
@@ -71,6 +71,4 @@ public static function value($name)
}
}
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(Granularity::class, \Google\Analytics\Data\V1alpha\CohortsRange_Granularity::class);
diff --git a/AnalyticsData/src/V1alpha/DimensionExpression/CaseExpression.php b/AnalyticsData/src/V1alpha/DimensionExpression/CaseExpression.php
index c9201ed88f3c..1641b5e56026 100644
--- a/AnalyticsData/src/V1alpha/DimensionExpression/CaseExpression.php
+++ b/AnalyticsData/src/V1alpha/DimensionExpression/CaseExpression.php
@@ -69,6 +69,4 @@ public function setDimensionName($var)
}
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(CaseExpression::class, \Google\Analytics\Data\V1alpha\DimensionExpression_CaseExpression::class);
diff --git a/AnalyticsData/src/V1alpha/DimensionExpression/ConcatenateExpression.php b/AnalyticsData/src/V1alpha/DimensionExpression/ConcatenateExpression.php
index e055aa6fd3d6..1ad42cc4c2f0 100644
--- a/AnalyticsData/src/V1alpha/DimensionExpression/ConcatenateExpression.php
+++ b/AnalyticsData/src/V1alpha/DimensionExpression/ConcatenateExpression.php
@@ -123,6 +123,4 @@ public function setDelimiter($var)
}
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(ConcatenateExpression::class, \Google\Analytics\Data\V1alpha\DimensionExpression_ConcatenateExpression::class);
diff --git a/AnalyticsData/src/V1alpha/Filter/BetweenFilter.php b/AnalyticsData/src/V1alpha/Filter/BetweenFilter.php
index ac78ec31a610..789fc09cdafd 100644
--- a/AnalyticsData/src/V1alpha/Filter/BetweenFilter.php
+++ b/AnalyticsData/src/V1alpha/Filter/BetweenFilter.php
@@ -119,6 +119,4 @@ public function setToValue($var)
}
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(BetweenFilter::class, \Google\Analytics\Data\V1alpha\Filter_BetweenFilter::class);
diff --git a/AnalyticsData/src/V1alpha/Filter/InListFilter.php b/AnalyticsData/src/V1alpha/Filter/InListFilter.php
index b163f197381a..7764b280fc62 100644
--- a/AnalyticsData/src/V1alpha/Filter/InListFilter.php
+++ b/AnalyticsData/src/V1alpha/Filter/InListFilter.php
@@ -103,6 +103,4 @@ public function setCaseSensitive($var)
}
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(InListFilter::class, \Google\Analytics\Data\V1alpha\Filter_InListFilter::class);
diff --git a/AnalyticsData/src/V1alpha/Filter/NumericFilter.php b/AnalyticsData/src/V1alpha/Filter/NumericFilter.php
index 7aded5d3352c..2275b237ff0c 100644
--- a/AnalyticsData/src/V1alpha/Filter/NumericFilter.php
+++ b/AnalyticsData/src/V1alpha/Filter/NumericFilter.php
@@ -109,6 +109,4 @@ public function setValue($var)
}
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(NumericFilter::class, \Google\Analytics\Data\V1alpha\Filter_NumericFilter::class);
diff --git a/AnalyticsData/src/V1alpha/Filter/StringFilter.php b/AnalyticsData/src/V1alpha/Filter/StringFilter.php
index 6792dd5cef46..e5aafb7b417e 100644
--- a/AnalyticsData/src/V1alpha/Filter/StringFilter.php
+++ b/AnalyticsData/src/V1alpha/Filter/StringFilter.php
@@ -133,6 +133,4 @@ public function setCaseSensitive($var)
}
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(StringFilter::class, \Google\Analytics\Data\V1alpha\Filter_StringFilter::class);
diff --git a/AnalyticsData/src/V1alpha/OrderBy/DimensionOrderBy.php b/AnalyticsData/src/V1alpha/OrderBy/DimensionOrderBy.php
index ab37860fbf06..75e5d46ec525 100644
--- a/AnalyticsData/src/V1alpha/OrderBy/DimensionOrderBy.php
+++ b/AnalyticsData/src/V1alpha/OrderBy/DimensionOrderBy.php
@@ -99,6 +99,4 @@ public function setOrderType($var)
}
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(DimensionOrderBy::class, \Google\Analytics\Data\V1alpha\OrderBy_DimensionOrderBy::class);
diff --git a/AnalyticsData/src/V1alpha/OrderBy/MetricOrderBy.php b/AnalyticsData/src/V1alpha/OrderBy/MetricOrderBy.php
index 8079c72b9d13..58aa5e2959a7 100644
--- a/AnalyticsData/src/V1alpha/OrderBy/MetricOrderBy.php
+++ b/AnalyticsData/src/V1alpha/OrderBy/MetricOrderBy.php
@@ -65,6 +65,4 @@ public function setMetricName($var)
}
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(MetricOrderBy::class, \Google\Analytics\Data\V1alpha\OrderBy_MetricOrderBy::class);
diff --git a/AnalyticsData/src/V1alpha/OrderBy/PivotOrderBy.php b/AnalyticsData/src/V1alpha/OrderBy/PivotOrderBy.php
index f5ab3cfc2fa7..b784a2a4eced 100644
--- a/AnalyticsData/src/V1alpha/OrderBy/PivotOrderBy.php
+++ b/AnalyticsData/src/V1alpha/OrderBy/PivotOrderBy.php
@@ -115,6 +115,4 @@ public function setPivotSelections($var)
}
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(PivotOrderBy::class, \Google\Analytics\Data\V1alpha\OrderBy_PivotOrderBy::class);
diff --git a/AnalyticsData/src/V1beta/BetaAnalyticsDataClient.php b/AnalyticsData/src/V1beta/BetaAnalyticsDataClient.php
index c9d3add4e7f6..3900e46de117 100644
--- a/AnalyticsData/src/V1beta/BetaAnalyticsDataClient.php
+++ b/AnalyticsData/src/V1beta/BetaAnalyticsDataClient.php
@@ -18,7 +18,7 @@
/*
* GENERATED CODE WARNING
* Generated by gapic-generator-php from the file
- * https://github.com/google/googleapis/blob/master/google/analytics/data/v1beta/analytics_data_api.proto
+ * https://github.com/googleapis/googleapis/blob/master/google/analytics/data/v1beta/analytics_data_api.proto
* Updates to the above are reflected here through a refresh process.
*
* @experimental
diff --git a/AnalyticsData/src/V1beta/CheckCompatibilityRequest.php b/AnalyticsData/src/V1beta/CheckCompatibilityRequest.php
index f2ed4b69e42d..eb2a2e6d4563 100644
--- a/AnalyticsData/src/V1beta/CheckCompatibilityRequest.php
+++ b/AnalyticsData/src/V1beta/CheckCompatibilityRequest.php
@@ -211,7 +211,7 @@ public function setMetrics($var)
*/
public function getDimensionFilter()
{
- return isset($this->dimension_filter) ? $this->dimension_filter : null;
+ return $this->dimension_filter;
}
public function hasDimensionFilter()
@@ -249,7 +249,7 @@ public function setDimensionFilter($var)
*/
public function getMetricFilter()
{
- return isset($this->metric_filter) ? $this->metric_filter : null;
+ return $this->metric_filter;
}
public function hasMetricFilter()
diff --git a/AnalyticsData/src/V1beta/Cohort.php b/AnalyticsData/src/V1beta/Cohort.php
index 3d9cf3109ed1..6fbc74195bbc 100644
--- a/AnalyticsData/src/V1beta/Cohort.php
+++ b/AnalyticsData/src/V1beta/Cohort.php
@@ -170,7 +170,7 @@ public function setDimension($var)
*/
public function getDateRange()
{
- return isset($this->date_range) ? $this->date_range : null;
+ return $this->date_range;
}
public function hasDateRange()
diff --git a/AnalyticsData/src/V1beta/CohortSpec.php b/AnalyticsData/src/V1beta/CohortSpec.php
index 73ff8d2d2a44..bac395487026 100644
--- a/AnalyticsData/src/V1beta/CohortSpec.php
+++ b/AnalyticsData/src/V1beta/CohortSpec.php
@@ -110,7 +110,7 @@ public function setCohorts($var)
*/
public function getCohortsRange()
{
- return isset($this->cohorts_range) ? $this->cohorts_range : null;
+ return $this->cohorts_range;
}
public function hasCohortsRange()
@@ -147,7 +147,7 @@ public function setCohortsRange($var)
*/
public function getCohortReportSettings()
{
- return isset($this->cohort_report_settings) ? $this->cohort_report_settings : null;
+ return $this->cohort_report_settings;
}
public function hasCohortReportSettings()
diff --git a/AnalyticsData/src/V1beta/CohortsRange/Granularity.php b/AnalyticsData/src/V1beta/CohortsRange/Granularity.php
index 541e282e3162..dc2f7a24f69b 100644
--- a/AnalyticsData/src/V1beta/CohortsRange/Granularity.php
+++ b/AnalyticsData/src/V1beta/CohortsRange/Granularity.php
@@ -71,6 +71,4 @@ public static function value($name)
}
}
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(Granularity::class, \Google\Analytics\Data\V1beta\CohortsRange_Granularity::class);
diff --git a/AnalyticsData/src/V1beta/Dimension.php b/AnalyticsData/src/V1beta/Dimension.php
index 5682935bdf53..93a1017e240f 100644
--- a/AnalyticsData/src/V1beta/Dimension.php
+++ b/AnalyticsData/src/V1beta/Dimension.php
@@ -26,7 +26,7 @@ class Dimension extends \Google\Protobuf\Internal\Message
* would like within the allowed character set. For example if a
* `dimensionExpression` concatenates `country` and `city`, you could call
* that dimension `countryAndCity`. Dimension names that you choose must match
- * the regular expression "^[a-zA-Z0-9_]$".
+ * the regular expression `^[a-zA-Z0-9_]$`.
* Dimensions are referenced by `name` in `dimensionFilter`, `orderBys`,
* `dimensionExpression`, and `pivots`.
*
@@ -55,7 +55,7 @@ class Dimension extends \Google\Protobuf\Internal\Message
* would like within the allowed character set. For example if a
* `dimensionExpression` concatenates `country` and `city`, you could call
* that dimension `countryAndCity`. Dimension names that you choose must match
- * the regular expression "^[a-zA-Z0-9_]$".
+ * the regular expression `^[a-zA-Z0-9_]$`.
* Dimensions are referenced by `name` in `dimensionFilter`, `orderBys`,
* `dimensionExpression`, and `pivots`.
* @type \Google\Analytics\Data\V1beta\DimensionExpression $dimension_expression
@@ -76,7 +76,7 @@ public function __construct($data = NULL) {
* would like within the allowed character set. For example if a
* `dimensionExpression` concatenates `country` and `city`, you could call
* that dimension `countryAndCity`. Dimension names that you choose must match
- * the regular expression "^[a-zA-Z0-9_]$".
+ * the regular expression `^[a-zA-Z0-9_]$`.
* Dimensions are referenced by `name` in `dimensionFilter`, `orderBys`,
* `dimensionExpression`, and `pivots`.
*
@@ -96,7 +96,7 @@ public function getName()
* would like within the allowed character set. For example if a
* `dimensionExpression` concatenates `country` and `city`, you could call
* that dimension `countryAndCity`. Dimension names that you choose must match
- * the regular expression "^[a-zA-Z0-9_]$".
+ * the regular expression `^[a-zA-Z0-9_]$`.
* Dimensions are referenced by `name` in `dimensionFilter`, `orderBys`,
* `dimensionExpression`, and `pivots`.
*
@@ -121,7 +121,7 @@ public function setName($var)
*/
public function getDimensionExpression()
{
- return isset($this->dimension_expression) ? $this->dimension_expression : null;
+ return $this->dimension_expression;
}
public function hasDimensionExpression()
diff --git a/AnalyticsData/src/V1beta/DimensionCompatibility.php b/AnalyticsData/src/V1beta/DimensionCompatibility.php
index edf9b282a4a4..929191b13314 100644
--- a/AnalyticsData/src/V1beta/DimensionCompatibility.php
+++ b/AnalyticsData/src/V1beta/DimensionCompatibility.php
@@ -20,14 +20,14 @@ class DimensionCompatibility extends \Google\Protobuf\Internal\Message
* information. The dimension metadata also contains other helpful information
* like the UI name and description.
*
- * Generated from protobuf field .google.analytics.data.v1beta.DimensionMetadata dimension_metadata = 1;
+ * Generated from protobuf field optional .google.analytics.data.v1beta.DimensionMetadata dimension_metadata = 1;
*/
private $dimension_metadata = null;
/**
* The compatibility of this dimension. If the compatibility is COMPATIBLE,
* this dimension can be successfully added to the report.
*
- * Generated from protobuf field .google.analytics.data.v1beta.Compatibility compatibility = 2;
+ * Generated from protobuf field optional .google.analytics.data.v1beta.Compatibility compatibility = 2;
*/
private $compatibility = null;
@@ -56,12 +56,12 @@ public function __construct($data = NULL) {
* information. The dimension metadata also contains other helpful information
* like the UI name and description.
*
- * Generated from protobuf field .google.analytics.data.v1beta.DimensionMetadata dimension_metadata = 1;
+ * Generated from protobuf field optional .google.analytics.data.v1beta.DimensionMetadata dimension_metadata = 1;
* @return \Google\Analytics\Data\V1beta\DimensionMetadata|null
*/
public function getDimensionMetadata()
{
- return isset($this->dimension_metadata) ? $this->dimension_metadata : null;
+ return $this->dimension_metadata;
}
public function hasDimensionMetadata()
@@ -79,7 +79,7 @@ public function clearDimensionMetadata()
* information. The dimension metadata also contains other helpful information
* like the UI name and description.
*
- * Generated from protobuf field .google.analytics.data.v1beta.DimensionMetadata dimension_metadata = 1;
+ * Generated from protobuf field optional .google.analytics.data.v1beta.DimensionMetadata dimension_metadata = 1;
* @param \Google\Analytics\Data\V1beta\DimensionMetadata $var
* @return $this
*/
@@ -95,7 +95,7 @@ public function setDimensionMetadata($var)
* The compatibility of this dimension. If the compatibility is COMPATIBLE,
* this dimension can be successfully added to the report.
*
- * Generated from protobuf field .google.analytics.data.v1beta.Compatibility compatibility = 2;
+ * Generated from protobuf field optional .google.analytics.data.v1beta.Compatibility compatibility = 2;
* @return int
*/
public function getCompatibility()
@@ -117,7 +117,7 @@ public function clearCompatibility()
* The compatibility of this dimension. If the compatibility is COMPATIBLE,
* this dimension can be successfully added to the report.
*
- * Generated from protobuf field .google.analytics.data.v1beta.Compatibility compatibility = 2;
+ * Generated from protobuf field optional .google.analytics.data.v1beta.Compatibility compatibility = 2;
* @param int $var
* @return $this
*/
diff --git a/AnalyticsData/src/V1beta/DimensionExpression/CaseExpression.php b/AnalyticsData/src/V1beta/DimensionExpression/CaseExpression.php
index 21054b49f89a..775e66705198 100644
--- a/AnalyticsData/src/V1beta/DimensionExpression/CaseExpression.php
+++ b/AnalyticsData/src/V1beta/DimensionExpression/CaseExpression.php
@@ -69,6 +69,4 @@ public function setDimensionName($var)
}
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(CaseExpression::class, \Google\Analytics\Data\V1beta\DimensionExpression_CaseExpression::class);
diff --git a/AnalyticsData/src/V1beta/DimensionExpression/ConcatenateExpression.php b/AnalyticsData/src/V1beta/DimensionExpression/ConcatenateExpression.php
index 42032061a770..7296f84bdbd6 100644
--- a/AnalyticsData/src/V1beta/DimensionExpression/ConcatenateExpression.php
+++ b/AnalyticsData/src/V1beta/DimensionExpression/ConcatenateExpression.php
@@ -123,6 +123,4 @@ public function setDelimiter($var)
}
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(ConcatenateExpression::class, \Google\Analytics\Data\V1beta\DimensionExpression_ConcatenateExpression::class);
diff --git a/AnalyticsData/src/V1beta/Filter/BetweenFilter.php b/AnalyticsData/src/V1beta/Filter/BetweenFilter.php
index 5c0099cca774..b9056e73e616 100644
--- a/AnalyticsData/src/V1beta/Filter/BetweenFilter.php
+++ b/AnalyticsData/src/V1beta/Filter/BetweenFilter.php
@@ -53,7 +53,7 @@ public function __construct($data = NULL) {
*/
public function getFromValue()
{
- return isset($this->from_value) ? $this->from_value : null;
+ return $this->from_value;
}
public function hasFromValue()
@@ -89,7 +89,7 @@ public function setFromValue($var)
*/
public function getToValue()
{
- return isset($this->to_value) ? $this->to_value : null;
+ return $this->to_value;
}
public function hasToValue()
@@ -119,6 +119,4 @@ public function setToValue($var)
}
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(BetweenFilter::class, \Google\Analytics\Data\V1beta\Filter_BetweenFilter::class);
diff --git a/AnalyticsData/src/V1beta/Filter/InListFilter.php b/AnalyticsData/src/V1beta/Filter/InListFilter.php
index 1982dd905719..47b60648248f 100644
--- a/AnalyticsData/src/V1beta/Filter/InListFilter.php
+++ b/AnalyticsData/src/V1beta/Filter/InListFilter.php
@@ -103,6 +103,4 @@ public function setCaseSensitive($var)
}
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(InListFilter::class, \Google\Analytics\Data\V1beta\Filter_InListFilter::class);
diff --git a/AnalyticsData/src/V1beta/Filter/NumericFilter.php b/AnalyticsData/src/V1beta/Filter/NumericFilter.php
index 4b758402482f..6e672861922c 100644
--- a/AnalyticsData/src/V1beta/Filter/NumericFilter.php
+++ b/AnalyticsData/src/V1beta/Filter/NumericFilter.php
@@ -79,7 +79,7 @@ public function setOperation($var)
*/
public function getValue()
{
- return isset($this->value) ? $this->value : null;
+ return $this->value;
}
public function hasValue()
@@ -109,6 +109,4 @@ public function setValue($var)
}
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(NumericFilter::class, \Google\Analytics\Data\V1beta\Filter_NumericFilter::class);
diff --git a/AnalyticsData/src/V1beta/Filter/StringFilter.php b/AnalyticsData/src/V1beta/Filter/StringFilter.php
index 4aef1d620e5d..48f4bc847e5d 100644
--- a/AnalyticsData/src/V1beta/Filter/StringFilter.php
+++ b/AnalyticsData/src/V1beta/Filter/StringFilter.php
@@ -133,6 +133,4 @@ public function setCaseSensitive($var)
}
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(StringFilter::class, \Google\Analytics\Data\V1beta\Filter_StringFilter::class);
diff --git a/AnalyticsData/src/V1beta/Gapic/BetaAnalyticsDataGapicClient.php b/AnalyticsData/src/V1beta/Gapic/BetaAnalyticsDataGapicClient.php
index 163126310880..15557af639e5 100644
--- a/AnalyticsData/src/V1beta/Gapic/BetaAnalyticsDataGapicClient.php
+++ b/AnalyticsData/src/V1beta/Gapic/BetaAnalyticsDataGapicClient.php
@@ -18,7 +18,7 @@
/*
* GENERATED CODE WARNING
* Generated by gapic-generator-php from the file
- * https://github.com/google/googleapis/blob/master/google/analytics/data/v1beta/analytics_data_api.proto
+ * https://github.com/googleapis/googleapis/blob/master/google/analytics/data/v1beta/analytics_data_api.proto
* Updates to the above are reflected here through a refresh process.
*
* @experimental
diff --git a/AnalyticsData/src/V1beta/Metric.php b/AnalyticsData/src/V1beta/Metric.php
index 0ff1541eda53..9c1cefe359e4 100644
--- a/AnalyticsData/src/V1beta/Metric.php
+++ b/AnalyticsData/src/V1beta/Metric.php
@@ -25,7 +25,7 @@ class Metric extends \Google\Protobuf\Internal\Message
* within the allowed character set. For example if `expression` is
* `screenPageViews/sessions`, you could call that metric's name =
* `viewsPerSession`. Metric names that you choose must match the regular
- * expression "^[a-zA-Z0-9_]$".
+ * expression `^[a-zA-Z0-9_]$`.
* Metrics are referenced by `name` in `metricFilter`, `orderBys`, and metric
* `expression`.
*
@@ -62,7 +62,7 @@ class Metric extends \Google\Protobuf\Internal\Message
* within the allowed character set. For example if `expression` is
* `screenPageViews/sessions`, you could call that metric's name =
* `viewsPerSession`. Metric names that you choose must match the regular
- * expression "^[a-zA-Z0-9_]$".
+ * expression `^[a-zA-Z0-9_]$`.
* Metrics are referenced by `name` in `metricFilter`, `orderBys`, and metric
* `expression`.
* @type string $expression
@@ -87,7 +87,7 @@ public function __construct($data = NULL) {
* within the allowed character set. For example if `expression` is
* `screenPageViews/sessions`, you could call that metric's name =
* `viewsPerSession`. Metric names that you choose must match the regular
- * expression "^[a-zA-Z0-9_]$".
+ * expression `^[a-zA-Z0-9_]$`.
* Metrics are referenced by `name` in `metricFilter`, `orderBys`, and metric
* `expression`.
*
@@ -107,7 +107,7 @@ public function getName()
* within the allowed character set. For example if `expression` is
* `screenPageViews/sessions`, you could call that metric's name =
* `viewsPerSession`. Metric names that you choose must match the regular
- * expression "^[a-zA-Z0-9_]$".
+ * expression `^[a-zA-Z0-9_]$`.
* Metrics are referenced by `name` in `metricFilter`, `orderBys`, and metric
* `expression`.
*
diff --git a/AnalyticsData/src/V1beta/MetricCompatibility.php b/AnalyticsData/src/V1beta/MetricCompatibility.php
index 5803b08fbf7f..6c4b7640faef 100644
--- a/AnalyticsData/src/V1beta/MetricCompatibility.php
+++ b/AnalyticsData/src/V1beta/MetricCompatibility.php
@@ -20,14 +20,14 @@ class MetricCompatibility extends \Google\Protobuf\Internal\Message
* information. The metric metadata also contains other helpful information
* like the UI name and description.
*
- * Generated from protobuf field .google.analytics.data.v1beta.MetricMetadata metric_metadata = 1;
+ * Generated from protobuf field optional .google.analytics.data.v1beta.MetricMetadata metric_metadata = 1;
*/
private $metric_metadata = null;
/**
* The compatibility of this metric. If the compatibility is COMPATIBLE,
* this metric can be successfully added to the report.
*
- * Generated from protobuf field .google.analytics.data.v1beta.Compatibility compatibility = 2;
+ * Generated from protobuf field optional .google.analytics.data.v1beta.Compatibility compatibility = 2;
*/
private $compatibility = null;
@@ -56,12 +56,12 @@ public function __construct($data = NULL) {
* information. The metric metadata also contains other helpful information
* like the UI name and description.
*
- * Generated from protobuf field .google.analytics.data.v1beta.MetricMetadata metric_metadata = 1;
+ * Generated from protobuf field optional .google.analytics.data.v1beta.MetricMetadata metric_metadata = 1;
* @return \Google\Analytics\Data\V1beta\MetricMetadata|null
*/
public function getMetricMetadata()
{
- return isset($this->metric_metadata) ? $this->metric_metadata : null;
+ return $this->metric_metadata;
}
public function hasMetricMetadata()
@@ -79,7 +79,7 @@ public function clearMetricMetadata()
* information. The metric metadata also contains other helpful information
* like the UI name and description.
*
- * Generated from protobuf field .google.analytics.data.v1beta.MetricMetadata metric_metadata = 1;
+ * Generated from protobuf field optional .google.analytics.data.v1beta.MetricMetadata metric_metadata = 1;
* @param \Google\Analytics\Data\V1beta\MetricMetadata $var
* @return $this
*/
@@ -95,7 +95,7 @@ public function setMetricMetadata($var)
* The compatibility of this metric. If the compatibility is COMPATIBLE,
* this metric can be successfully added to the report.
*
- * Generated from protobuf field .google.analytics.data.v1beta.Compatibility compatibility = 2;
+ * Generated from protobuf field optional .google.analytics.data.v1beta.Compatibility compatibility = 2;
* @return int
*/
public function getCompatibility()
@@ -117,7 +117,7 @@ public function clearCompatibility()
* The compatibility of this metric. If the compatibility is COMPATIBLE,
* this metric can be successfully added to the report.
*
- * Generated from protobuf field .google.analytics.data.v1beta.Compatibility compatibility = 2;
+ * Generated from protobuf field optional .google.analytics.data.v1beta.Compatibility compatibility = 2;
* @param int $var
* @return $this
*/
diff --git a/AnalyticsData/src/V1beta/MetricMetadata.php b/AnalyticsData/src/V1beta/MetricMetadata.php
index 71d33c9fd1fb..5653b2ef3d65 100644
--- a/AnalyticsData/src/V1beta/MetricMetadata.php
+++ b/AnalyticsData/src/V1beta/MetricMetadata.php
@@ -64,6 +64,18 @@ class MetricMetadata extends \Google\Protobuf\Internal\Message
* Generated from protobuf field bool custom_definition = 7;
*/
private $custom_definition = false;
+ /**
+ * If reasons are specified, your access is blocked to this metric for this
+ * property. API requests from you to this property for this metric will
+ * succeed; however, the report will contain only zeros for this metric. API
+ * requests with metric filters on blocked metrics will fail. If reasons are
+ * empty, you have access to this metric.
+ * To learn more, see [Access and data-restriction
+ * management](https://support.google.com/analytics/answer/10851388).
+ *
+ * Generated from protobuf field repeated .google.analytics.data.v1beta.MetricMetadata.BlockedReason blocked_reasons = 8;
+ */
+ private $blocked_reasons;
/**
* The display name of the category that this metrics belongs to. Similar
* dimensions and metrics are categorized together.
@@ -99,6 +111,14 @@ class MetricMetadata extends \Google\Protobuf\Internal\Message
* are not expressions, and for non-expressions, this field is empty.
* @type bool $custom_definition
* True if the metric is a custom metric for this property.
+ * @type int[]|\Google\Protobuf\Internal\RepeatedField $blocked_reasons
+ * If reasons are specified, your access is blocked to this metric for this
+ * property. API requests from you to this property for this metric will
+ * succeed; however, the report will contain only zeros for this metric. API
+ * requests with metric filters on blocked metrics will fail. If reasons are
+ * empty, you have access to this metric.
+ * To learn more, see [Access and data-restriction
+ * management](https://support.google.com/analytics/answer/10851388).
* @type string $category
* The display name of the category that this metrics belongs to. Similar
* dimensions and metrics are categorized together.
@@ -305,6 +325,44 @@ public function setCustomDefinition($var)
return $this;
}
+ /**
+ * If reasons are specified, your access is blocked to this metric for this
+ * property. API requests from you to this property for this metric will
+ * succeed; however, the report will contain only zeros for this metric. API
+ * requests with metric filters on blocked metrics will fail. If reasons are
+ * empty, you have access to this metric.
+ * To learn more, see [Access and data-restriction
+ * management](https://support.google.com/analytics/answer/10851388).
+ *
+ * Generated from protobuf field repeated .google.analytics.data.v1beta.MetricMetadata.BlockedReason blocked_reasons = 8;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getBlockedReasons()
+ {
+ return $this->blocked_reasons;
+ }
+
+ /**
+ * If reasons are specified, your access is blocked to this metric for this
+ * property. API requests from you to this property for this metric will
+ * succeed; however, the report will contain only zeros for this metric. API
+ * requests with metric filters on blocked metrics will fail. If reasons are
+ * empty, you have access to this metric.
+ * To learn more, see [Access and data-restriction
+ * management](https://support.google.com/analytics/answer/10851388).
+ *
+ * Generated from protobuf field repeated .google.analytics.data.v1beta.MetricMetadata.BlockedReason blocked_reasons = 8;
+ * @param int[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setBlockedReasons($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Analytics\Data\V1beta\MetricMetadata\BlockedReason::class);
+ $this->blocked_reasons = $arr;
+
+ return $this;
+ }
+
/**
* The display name of the category that this metrics belongs to. Similar
* dimensions and metrics are categorized together.
diff --git a/AnalyticsData/src/V1beta/MetricMetadata/BlockedReason.php b/AnalyticsData/src/V1beta/MetricMetadata/BlockedReason.php
new file mode 100644
index 000000000000..27b152514b06
--- /dev/null
+++ b/AnalyticsData/src/V1beta/MetricMetadata/BlockedReason.php
@@ -0,0 +1,64 @@
+google.analytics.data.v1beta.MetricMetadata.BlockedReason
+ */
+class BlockedReason
+{
+ /**
+ * Will never be specified in API response.
+ *
+ * Generated from protobuf enum BLOCKED_REASON_UNSPECIFIED = 0;
+ */
+ const BLOCKED_REASON_UNSPECIFIED = 0;
+ /**
+ * If present, your access is blocked to revenue related metrics for this
+ * property, and this metric is revenue related.
+ *
+ * Generated from protobuf enum NO_REVENUE_METRICS = 1;
+ */
+ const NO_REVENUE_METRICS = 1;
+ /**
+ * If present, your access is blocked to cost related metrics for this
+ * property, and this metric is cost related.
+ *
+ * Generated from protobuf enum NO_COST_METRICS = 2;
+ */
+ const NO_COST_METRICS = 2;
+
+ private static $valueToName = [
+ self::BLOCKED_REASON_UNSPECIFIED => 'BLOCKED_REASON_UNSPECIFIED',
+ self::NO_REVENUE_METRICS => 'NO_REVENUE_METRICS',
+ self::NO_COST_METRICS => 'NO_COST_METRICS',
+ ];
+
+ 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/AnalyticsData/src/V1beta/MinuteRange.php b/AnalyticsData/src/V1beta/MinuteRange.php
index f65bb09e80bc..5f4a576f6a3e 100644
--- a/AnalyticsData/src/V1beta/MinuteRange.php
+++ b/AnalyticsData/src/V1beta/MinuteRange.php
@@ -25,7 +25,7 @@ class MinuteRange extends \Google\Protobuf\Internal\Message
* (`startMinutesAgo <= 29`), and 360 Analytics properties can request up to
* the last 60 minutes of event data (`startMinutesAgo <= 59`).
*
- * Generated from protobuf field int32 start_minutes_ago = 1;
+ * Generated from protobuf field optional int32 start_minutes_ago = 1;
*/
private $start_minutes_ago = null;
/**
@@ -38,7 +38,7 @@ class MinuteRange extends \Google\Protobuf\Internal\Message
* (`endMinutesAgo <= 29`), and 360 Analytics properties can request any
* minute in the last 60 minutes of event data (`endMinutesAgo <= 59`).
*
- * Generated from protobuf field int32 end_minutes_ago = 2;
+ * Generated from protobuf field optional int32 end_minutes_ago = 2;
*/
private $end_minutes_ago = null;
/**
@@ -95,7 +95,7 @@ public function __construct($data = NULL) {
* (`startMinutesAgo <= 29`), and 360 Analytics properties can request up to
* the last 60 minutes of event data (`startMinutesAgo <= 59`).
*
- * Generated from protobuf field int32 start_minutes_ago = 1;
+ * Generated from protobuf field optional int32 start_minutes_ago = 1;
* @return int
*/
public function getStartMinutesAgo()
@@ -122,7 +122,7 @@ public function clearStartMinutesAgo()
* (`startMinutesAgo <= 29`), and 360 Analytics properties can request up to
* the last 60 minutes of event data (`startMinutesAgo <= 59`).
*
- * Generated from protobuf field int32 start_minutes_ago = 1;
+ * Generated from protobuf field optional int32 start_minutes_ago = 1;
* @param int $var
* @return $this
*/
@@ -144,7 +144,7 @@ public function setStartMinutesAgo($var)
* (`endMinutesAgo <= 29`), and 360 Analytics properties can request any
* minute in the last 60 minutes of event data (`endMinutesAgo <= 59`).
*
- * Generated from protobuf field int32 end_minutes_ago = 2;
+ * Generated from protobuf field optional int32 end_minutes_ago = 2;
* @return int
*/
public function getEndMinutesAgo()
@@ -172,7 +172,7 @@ public function clearEndMinutesAgo()
* (`endMinutesAgo <= 29`), and 360 Analytics properties can request any
* minute in the last 60 minutes of event data (`endMinutesAgo <= 59`).
*
- * Generated from protobuf field int32 end_minutes_ago = 2;
+ * Generated from protobuf field optional int32 end_minutes_ago = 2;
* @param int $var
* @return $this
*/
diff --git a/AnalyticsData/src/V1beta/OrderBy/DimensionOrderBy.php b/AnalyticsData/src/V1beta/OrderBy/DimensionOrderBy.php
index abfb286822f0..cad3b59598bb 100644
--- a/AnalyticsData/src/V1beta/OrderBy/DimensionOrderBy.php
+++ b/AnalyticsData/src/V1beta/OrderBy/DimensionOrderBy.php
@@ -99,6 +99,4 @@ public function setOrderType($var)
}
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(DimensionOrderBy::class, \Google\Analytics\Data\V1beta\OrderBy_DimensionOrderBy::class);
diff --git a/AnalyticsData/src/V1beta/OrderBy/MetricOrderBy.php b/AnalyticsData/src/V1beta/OrderBy/MetricOrderBy.php
index f6a2df8fd119..b3c5025e0255 100644
--- a/AnalyticsData/src/V1beta/OrderBy/MetricOrderBy.php
+++ b/AnalyticsData/src/V1beta/OrderBy/MetricOrderBy.php
@@ -65,6 +65,4 @@ public function setMetricName($var)
}
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(MetricOrderBy::class, \Google\Analytics\Data\V1beta\OrderBy_MetricOrderBy::class);
diff --git a/AnalyticsData/src/V1beta/OrderBy/PivotOrderBy.php b/AnalyticsData/src/V1beta/OrderBy/PivotOrderBy.php
index 7a51286c1673..76d11c71e302 100644
--- a/AnalyticsData/src/V1beta/OrderBy/PivotOrderBy.php
+++ b/AnalyticsData/src/V1beta/OrderBy/PivotOrderBy.php
@@ -115,6 +115,4 @@ public function setPivotSelections($var)
}
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(PivotOrderBy::class, \Google\Analytics\Data\V1beta\OrderBy_PivotOrderBy::class);
diff --git a/AnalyticsData/src/V1beta/PropertyQuota.php b/AnalyticsData/src/V1beta/PropertyQuota.php
index 58ca5e94c2e7..dc454cd35c00 100644
--- a/AnalyticsData/src/V1beta/PropertyQuota.php
+++ b/AnalyticsData/src/V1beta/PropertyQuota.php
@@ -103,7 +103,7 @@ public function __construct($data = NULL) {
*/
public function getTokensPerDay()
{
- return isset($this->tokens_per_day) ? $this->tokens_per_day : null;
+ return $this->tokens_per_day;
}
public function hasTokensPerDay()
@@ -144,7 +144,7 @@ public function setTokensPerDay($var)
*/
public function getTokensPerHour()
{
- return isset($this->tokens_per_hour) ? $this->tokens_per_hour : null;
+ return $this->tokens_per_hour;
}
public function hasTokensPerHour()
@@ -184,7 +184,7 @@ public function setTokensPerHour($var)
*/
public function getConcurrentRequests()
{
- return isset($this->concurrent_requests) ? $this->concurrent_requests : null;
+ return $this->concurrent_requests;
}
public function hasConcurrentRequests()
@@ -223,7 +223,7 @@ public function setConcurrentRequests($var)
*/
public function getServerErrorsPerProjectPerHour()
{
- return isset($this->server_errors_per_project_per_hour) ? $this->server_errors_per_project_per_hour : null;
+ return $this->server_errors_per_project_per_hour;
}
public function hasServerErrorsPerProjectPerHour()
@@ -264,7 +264,7 @@ public function setServerErrorsPerProjectPerHour($var)
*/
public function getPotentiallyThresholdedRequestsPerHour()
{
- return isset($this->potentially_thresholded_requests_per_hour) ? $this->potentially_thresholded_requests_per_hour : null;
+ return $this->potentially_thresholded_requests_per_hour;
}
public function hasPotentiallyThresholdedRequestsPerHour()
diff --git a/AnalyticsData/src/V1beta/ResponseMetaData.php b/AnalyticsData/src/V1beta/ResponseMetaData.php
index 5f366b279d05..dcf234214061 100644
--- a/AnalyticsData/src/V1beta/ResponseMetaData.php
+++ b/AnalyticsData/src/V1beta/ResponseMetaData.php
@@ -22,6 +22,43 @@ class ResponseMetaData extends \Google\Protobuf\Internal\Message
* Generated from protobuf field bool data_loss_from_other_row = 3;
*/
private $data_loss_from_other_row = false;
+ /**
+ * Describes the schema restrictions actively enforced in creating this
+ * report. To learn more, see [Access and data-restriction
+ * management](https://support.google.com/analytics/answer/10851388).
+ *
+ * Generated from protobuf field optional .google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse schema_restriction_response = 4;
+ */
+ private $schema_restriction_response = null;
+ /**
+ * The currency code used in this report. Intended to be used in formatting
+ * currency metrics like `purchaseRevenue` for visualization. If currency_code
+ * was specified in the request, this response parameter will echo the request
+ * parameter; otherwise, this response parameter is the property's current
+ * currency_code.
+ * Currency codes are string encodings of currency types from the ISO 4217
+ * standard (https://en.wikipedia.org/wiki/ISO_4217); for example "USD",
+ * "EUR", "JPY". To learn more, see
+ * https://support.google.com/analytics/answer/9796179.
+ *
+ * Generated from protobuf field optional string currency_code = 5;
+ */
+ private $currency_code = null;
+ /**
+ * The property's current timezone. Intended to be used to interpret
+ * time-based dimensions like `hour` and `minute`. Formatted as strings from
+ * the IANA Time Zone database (https://www.iana.org/time-zones); for example
+ * "America/New_York" or "Asia/Tokyo".
+ *
+ * Generated from protobuf field optional string time_zone = 6;
+ */
+ private $time_zone = null;
+ /**
+ * If empty reason is specified, the report is empty for this reason.
+ *
+ * Generated from protobuf field optional string empty_reason = 7;
+ */
+ private $empty_reason = null;
/**
* Constructor.
@@ -32,6 +69,27 @@ class ResponseMetaData extends \Google\Protobuf\Internal\Message
* @type bool $data_loss_from_other_row
* If true, indicates some buckets of dimension combinations are rolled into
* "(other)" row. This can happen for high cardinality reports.
+ * @type \Google\Analytics\Data\V1beta\ResponseMetaData\SchemaRestrictionResponse $schema_restriction_response
+ * Describes the schema restrictions actively enforced in creating this
+ * report. To learn more, see [Access and data-restriction
+ * management](https://support.google.com/analytics/answer/10851388).
+ * @type string $currency_code
+ * The currency code used in this report. Intended to be used in formatting
+ * currency metrics like `purchaseRevenue` for visualization. If currency_code
+ * was specified in the request, this response parameter will echo the request
+ * parameter; otherwise, this response parameter is the property's current
+ * currency_code.
+ * Currency codes are string encodings of currency types from the ISO 4217
+ * standard (https://en.wikipedia.org/wiki/ISO_4217); for example "USD",
+ * "EUR", "JPY". To learn more, see
+ * https://support.google.com/analytics/answer/9796179.
+ * @type string $time_zone
+ * The property's current timezone. Intended to be used to interpret
+ * time-based dimensions like `hour` and `minute`. Formatted as strings from
+ * the IANA Time Zone database (https://www.iana.org/time-zones); for example
+ * "America/New_York" or "Asia/Tokyo".
+ * @type string $empty_reason
+ * If empty reason is specified, the report is empty for this reason.
* }
*/
public function __construct($data = NULL) {
@@ -67,5 +125,175 @@ public function setDataLossFromOtherRow($var)
return $this;
}
+ /**
+ * Describes the schema restrictions actively enforced in creating this
+ * report. To learn more, see [Access and data-restriction
+ * management](https://support.google.com/analytics/answer/10851388).
+ *
+ * Generated from protobuf field optional .google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse schema_restriction_response = 4;
+ * @return \Google\Analytics\Data\V1beta\ResponseMetaData\SchemaRestrictionResponse|null
+ */
+ public function getSchemaRestrictionResponse()
+ {
+ return $this->schema_restriction_response;
+ }
+
+ public function hasSchemaRestrictionResponse()
+ {
+ return isset($this->schema_restriction_response);
+ }
+
+ public function clearSchemaRestrictionResponse()
+ {
+ unset($this->schema_restriction_response);
+ }
+
+ /**
+ * Describes the schema restrictions actively enforced in creating this
+ * report. To learn more, see [Access and data-restriction
+ * management](https://support.google.com/analytics/answer/10851388).
+ *
+ * Generated from protobuf field optional .google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse schema_restriction_response = 4;
+ * @param \Google\Analytics\Data\V1beta\ResponseMetaData\SchemaRestrictionResponse $var
+ * @return $this
+ */
+ public function setSchemaRestrictionResponse($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Analytics\Data\V1beta\ResponseMetaData\SchemaRestrictionResponse::class);
+ $this->schema_restriction_response = $var;
+
+ return $this;
+ }
+
+ /**
+ * The currency code used in this report. Intended to be used in formatting
+ * currency metrics like `purchaseRevenue` for visualization. If currency_code
+ * was specified in the request, this response parameter will echo the request
+ * parameter; otherwise, this response parameter is the property's current
+ * currency_code.
+ * Currency codes are string encodings of currency types from the ISO 4217
+ * standard (https://en.wikipedia.org/wiki/ISO_4217); for example "USD",
+ * "EUR", "JPY". To learn more, see
+ * https://support.google.com/analytics/answer/9796179.
+ *
+ * Generated from protobuf field optional string currency_code = 5;
+ * @return string
+ */
+ public function getCurrencyCode()
+ {
+ return isset($this->currency_code) ? $this->currency_code : '';
+ }
+
+ public function hasCurrencyCode()
+ {
+ return isset($this->currency_code);
+ }
+
+ public function clearCurrencyCode()
+ {
+ unset($this->currency_code);
+ }
+
+ /**
+ * The currency code used in this report. Intended to be used in formatting
+ * currency metrics like `purchaseRevenue` for visualization. If currency_code
+ * was specified in the request, this response parameter will echo the request
+ * parameter; otherwise, this response parameter is the property's current
+ * currency_code.
+ * Currency codes are string encodings of currency types from the ISO 4217
+ * standard (https://en.wikipedia.org/wiki/ISO_4217); for example "USD",
+ * "EUR", "JPY". To learn more, see
+ * https://support.google.com/analytics/answer/9796179.
+ *
+ * Generated from protobuf field optional string currency_code = 5;
+ * @param string $var
+ * @return $this
+ */
+ public function setCurrencyCode($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->currency_code = $var;
+
+ return $this;
+ }
+
+ /**
+ * The property's current timezone. Intended to be used to interpret
+ * time-based dimensions like `hour` and `minute`. Formatted as strings from
+ * the IANA Time Zone database (https://www.iana.org/time-zones); for example
+ * "America/New_York" or "Asia/Tokyo".
+ *
+ * Generated from protobuf field optional string time_zone = 6;
+ * @return string
+ */
+ public function getTimeZone()
+ {
+ return isset($this->time_zone) ? $this->time_zone : '';
+ }
+
+ public function hasTimeZone()
+ {
+ return isset($this->time_zone);
+ }
+
+ public function clearTimeZone()
+ {
+ unset($this->time_zone);
+ }
+
+ /**
+ * The property's current timezone. Intended to be used to interpret
+ * time-based dimensions like `hour` and `minute`. Formatted as strings from
+ * the IANA Time Zone database (https://www.iana.org/time-zones); for example
+ * "America/New_York" or "Asia/Tokyo".
+ *
+ * Generated from protobuf field optional string time_zone = 6;
+ * @param string $var
+ * @return $this
+ */
+ public function setTimeZone($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->time_zone = $var;
+
+ return $this;
+ }
+
+ /**
+ * If empty reason is specified, the report is empty for this reason.
+ *
+ * Generated from protobuf field optional string empty_reason = 7;
+ * @return string
+ */
+ public function getEmptyReason()
+ {
+ return isset($this->empty_reason) ? $this->empty_reason : '';
+ }
+
+ public function hasEmptyReason()
+ {
+ return isset($this->empty_reason);
+ }
+
+ public function clearEmptyReason()
+ {
+ unset($this->empty_reason);
+ }
+
+ /**
+ * If empty reason is specified, the report is empty for this reason.
+ *
+ * Generated from protobuf field optional string empty_reason = 7;
+ * @param string $var
+ * @return $this
+ */
+ public function setEmptyReason($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->empty_reason = $var;
+
+ return $this;
+ }
+
}
diff --git a/AnalyticsData/src/V1beta/ResponseMetaData/SchemaRestrictionResponse.php b/AnalyticsData/src/V1beta/ResponseMetaData/SchemaRestrictionResponse.php
new file mode 100644
index 000000000000..bc5420cbd616
--- /dev/null
+++ b/AnalyticsData/src/V1beta/ResponseMetaData/SchemaRestrictionResponse.php
@@ -0,0 +1,82 @@
+google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse
+ */
+class SchemaRestrictionResponse extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * All restrictions actively enforced in creating the report. For example,
+ * `purchaseRevenue` always has the restriction type `REVENUE_DATA`.
+ * However, this active response restriction is only populated if the user's
+ * custom role disallows access to `REVENUE_DATA`.
+ *
+ * Generated from protobuf field repeated .google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction active_metric_restrictions = 1;
+ */
+ private $active_metric_restrictions;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Google\Analytics\Data\V1beta\ResponseMetaData\SchemaRestrictionResponse\ActiveMetricRestriction[]|\Google\Protobuf\Internal\RepeatedField $active_metric_restrictions
+ * All restrictions actively enforced in creating the report. For example,
+ * `purchaseRevenue` always has the restriction type `REVENUE_DATA`.
+ * However, this active response restriction is only populated if the user's
+ * custom role disallows access to `REVENUE_DATA`.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Analytics\Data\V1Beta\Data::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * All restrictions actively enforced in creating the report. For example,
+ * `purchaseRevenue` always has the restriction type `REVENUE_DATA`.
+ * However, this active response restriction is only populated if the user's
+ * custom role disallows access to `REVENUE_DATA`.
+ *
+ * Generated from protobuf field repeated .google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction active_metric_restrictions = 1;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getActiveMetricRestrictions()
+ {
+ return $this->active_metric_restrictions;
+ }
+
+ /**
+ * All restrictions actively enforced in creating the report. For example,
+ * `purchaseRevenue` always has the restriction type `REVENUE_DATA`.
+ * However, this active response restriction is only populated if the user's
+ * custom role disallows access to `REVENUE_DATA`.
+ *
+ * Generated from protobuf field repeated .google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction active_metric_restrictions = 1;
+ * @param \Google\Analytics\Data\V1beta\ResponseMetaData\SchemaRestrictionResponse\ActiveMetricRestriction[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setActiveMetricRestrictions($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Data\V1beta\ResponseMetaData\SchemaRestrictionResponse\ActiveMetricRestriction::class);
+ $this->active_metric_restrictions = $arr;
+
+ return $this;
+ }
+
+}
+
+
diff --git a/AnalyticsData/src/V1beta/ResponseMetaData/SchemaRestrictionResponse/ActiveMetricRestriction.php b/AnalyticsData/src/V1beta/ResponseMetaData/SchemaRestrictionResponse/ActiveMetricRestriction.php
new file mode 100644
index 000000000000..d1dd783658ab
--- /dev/null
+++ b/AnalyticsData/src/V1beta/ResponseMetaData/SchemaRestrictionResponse/ActiveMetricRestriction.php
@@ -0,0 +1,114 @@
+google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction
+ */
+class ActiveMetricRestriction extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The name of the restricted metric.
+ *
+ * Generated from protobuf field optional string metric_name = 1;
+ */
+ private $metric_name = null;
+ /**
+ * The reason for this metric's restriction.
+ *
+ * Generated from protobuf field repeated .google.analytics.data.v1beta.RestrictedMetricType restricted_metric_types = 2;
+ */
+ private $restricted_metric_types;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $metric_name
+ * The name of the restricted metric.
+ * @type int[]|\Google\Protobuf\Internal\RepeatedField $restricted_metric_types
+ * The reason for this metric's restriction.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Analytics\Data\V1Beta\Data::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The name of the restricted metric.
+ *
+ * Generated from protobuf field optional string metric_name = 1;
+ * @return string
+ */
+ public function getMetricName()
+ {
+ return isset($this->metric_name) ? $this->metric_name : '';
+ }
+
+ public function hasMetricName()
+ {
+ return isset($this->metric_name);
+ }
+
+ public function clearMetricName()
+ {
+ unset($this->metric_name);
+ }
+
+ /**
+ * The name of the restricted metric.
+ *
+ * Generated from protobuf field optional string metric_name = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setMetricName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->metric_name = $var;
+
+ return $this;
+ }
+
+ /**
+ * The reason for this metric's restriction.
+ *
+ * Generated from protobuf field repeated .google.analytics.data.v1beta.RestrictedMetricType restricted_metric_types = 2;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getRestrictedMetricTypes()
+ {
+ return $this->restricted_metric_types;
+ }
+
+ /**
+ * The reason for this metric's restriction.
+ *
+ * Generated from protobuf field repeated .google.analytics.data.v1beta.RestrictedMetricType restricted_metric_types = 2;
+ * @param int[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setRestrictedMetricTypes($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Analytics\Data\V1beta\RestrictedMetricType::class);
+ $this->restricted_metric_types = $arr;
+
+ return $this;
+ }
+
+}
+
+// Adding a class alias for backwards compatibility with the previous class name.
+class_alias(ActiveMetricRestriction::class, \Google\Analytics\Data\V1beta\ResponseMetaData_SchemaRestrictionResponse_ActiveMetricRestriction::class);
+
diff --git a/AnalyticsData/src/V1beta/RestrictedMetricType.php b/AnalyticsData/src/V1beta/RestrictedMetricType.php
new file mode 100644
index 000000000000..4d77bccc2582
--- /dev/null
+++ b/AnalyticsData/src/V1beta/RestrictedMetricType.php
@@ -0,0 +1,62 @@
+google.analytics.data.v1beta.RestrictedMetricType
+ */
+class RestrictedMetricType
+{
+ /**
+ * Unspecified type.
+ *
+ * Generated from protobuf enum RESTRICTED_METRIC_TYPE_UNSPECIFIED = 0;
+ */
+ const RESTRICTED_METRIC_TYPE_UNSPECIFIED = 0;
+ /**
+ * Cost metrics such as `adCost`.
+ *
+ * Generated from protobuf enum COST_DATA = 1;
+ */
+ const COST_DATA = 1;
+ /**
+ * Revenue metrics such as `purchaseRevenue`.
+ *
+ * Generated from protobuf enum REVENUE_DATA = 2;
+ */
+ const REVENUE_DATA = 2;
+
+ private static $valueToName = [
+ self::RESTRICTED_METRIC_TYPE_UNSPECIFIED => 'RESTRICTED_METRIC_TYPE_UNSPECIFIED',
+ self::COST_DATA => 'COST_DATA',
+ self::REVENUE_DATA => 'REVENUE_DATA',
+ ];
+
+ 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/AnalyticsData/src/V1beta/RunPivotReportRequest.php b/AnalyticsData/src/V1beta/RunPivotReportRequest.php
index e0ea360d2820..a15f4193e66b 100644
--- a/AnalyticsData/src/V1beta/RunPivotReportRequest.php
+++ b/AnalyticsData/src/V1beta/RunPivotReportRequest.php
@@ -336,7 +336,7 @@ public function setPivots($var)
*/
public function getDimensionFilter()
{
- return isset($this->dimension_filter) ? $this->dimension_filter : null;
+ return $this->dimension_filter;
}
public function hasDimensionFilter()
@@ -375,7 +375,7 @@ public function setDimensionFilter($var)
*/
public function getMetricFilter()
{
- return isset($this->metric_filter) ? $this->metric_filter : null;
+ return $this->metric_filter;
}
public function hasMetricFilter()
@@ -442,7 +442,7 @@ public function setCurrencyCode($var)
*/
public function getCohortSpec()
{
- return isset($this->cohort_spec) ? $this->cohort_spec : null;
+ return $this->cohort_spec;
}
public function hasCohortSpec()
diff --git a/AnalyticsData/src/V1beta/RunPivotReportResponse.php b/AnalyticsData/src/V1beta/RunPivotReportResponse.php
index 6c469d4de63a..c55c469dd4a1 100644
--- a/AnalyticsData/src/V1beta/RunPivotReportResponse.php
+++ b/AnalyticsData/src/V1beta/RunPivotReportResponse.php
@@ -383,7 +383,7 @@ public function setAggregates($var)
*/
public function getMetadata()
{
- return isset($this->metadata) ? $this->metadata : null;
+ return $this->metadata;
}
public function hasMetadata()
@@ -419,7 +419,7 @@ public function setMetadata($var)
*/
public function getPropertyQuota()
{
- return isset($this->property_quota) ? $this->property_quota : null;
+ return $this->property_quota;
}
public function hasPropertyQuota()
diff --git a/AnalyticsData/src/V1beta/RunRealtimeReportRequest.php b/AnalyticsData/src/V1beta/RunRealtimeReportRequest.php
index 04042743cfc6..2c19e90a0c36 100644
--- a/AnalyticsData/src/V1beta/RunRealtimeReportRequest.php
+++ b/AnalyticsData/src/V1beta/RunRealtimeReportRequest.php
@@ -244,7 +244,7 @@ public function setMetrics($var)
*/
public function getDimensionFilter()
{
- return isset($this->dimension_filter) ? $this->dimension_filter : null;
+ return $this->dimension_filter;
}
public function hasDimensionFilter()
@@ -283,7 +283,7 @@ public function setDimensionFilter($var)
*/
public function getMetricFilter()
{
- return isset($this->metric_filter) ? $this->metric_filter : null;
+ return $this->metric_filter;
}
public function hasMetricFilter()
diff --git a/AnalyticsData/src/V1beta/RunRealtimeReportResponse.php b/AnalyticsData/src/V1beta/RunRealtimeReportResponse.php
index 31e51c562472..993d6a0ba760 100644
--- a/AnalyticsData/src/V1beta/RunRealtimeReportResponse.php
+++ b/AnalyticsData/src/V1beta/RunRealtimeReportResponse.php
@@ -319,7 +319,7 @@ public function setRowCount($var)
*/
public function getPropertyQuota()
{
- return isset($this->property_quota) ? $this->property_quota : null;
+ return $this->property_quota;
}
public function hasPropertyQuota()
diff --git a/AnalyticsData/src/V1beta/RunReportRequest.php b/AnalyticsData/src/V1beta/RunReportRequest.php
index e4a826633161..5821b42fa5f2 100644
--- a/AnalyticsData/src/V1beta/RunReportRequest.php
+++ b/AnalyticsData/src/V1beta/RunReportRequest.php
@@ -346,7 +346,7 @@ public function setDateRanges($var)
*/
public function getDimensionFilter()
{
- return isset($this->dimension_filter) ? $this->dimension_filter : null;
+ return $this->dimension_filter;
}
public function hasDimensionFilter()
@@ -386,7 +386,7 @@ public function setDimensionFilter($var)
*/
public function getMetricFilter()
{
- return isset($this->metric_filter) ? $this->metric_filter : null;
+ return $this->metric_filter;
}
public function hasMetricFilter()
@@ -588,7 +588,7 @@ public function setCurrencyCode($var)
*/
public function getCohortSpec()
{
- return isset($this->cohort_spec) ? $this->cohort_spec : null;
+ return $this->cohort_spec;
}
public function hasCohortSpec()
diff --git a/AnalyticsData/src/V1beta/RunReportResponse.php b/AnalyticsData/src/V1beta/RunReportResponse.php
index 6a5d7dc3a850..617edd4a8ad2 100644
--- a/AnalyticsData/src/V1beta/RunReportResponse.php
+++ b/AnalyticsData/src/V1beta/RunReportResponse.php
@@ -335,7 +335,7 @@ public function setRowCount($var)
*/
public function getMetadata()
{
- return isset($this->metadata) ? $this->metadata : null;
+ return $this->metadata;
}
public function hasMetadata()
@@ -371,7 +371,7 @@ public function setMetadata($var)
*/
public function getPropertyQuota()
{
- return isset($this->property_quota) ? $this->property_quota : null;
+ return $this->property_quota;
}
public function hasPropertyQuota()