diff --git a/AnalyticsData/.OwlBot.yaml b/AnalyticsData/.OwlBot.yaml
index f4c378eaf397..cf069d64e76d 100644
--- a/AnalyticsData/.OwlBot.yaml
+++ b/AnalyticsData/.OwlBot.yaml
@@ -1,4 +1,4 @@
deep-copy-regex:
- - source: /google/analytics/data/(v1alpha|v1beta)/.*-php/(.*)
+ - source: /google/analytics/data/(v1beta|v1alpha)/.*-php/(.*)
dest: /owl-bot-staging/AnalyticsData/$1/$2
api-name: AnalyticsData
diff --git a/AnalyticsData/owlbot.py b/AnalyticsData/owlbot.py
index 6d2c05c28890..bbdc1da374a6 100644
--- a/AnalyticsData/owlbot.py
+++ b/AnalyticsData/owlbot.py
@@ -1,4 +1,4 @@
-# Copyright 2020 Google LLC
+# Copyright 2024 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -30,13 +30,7 @@
# Added so that we can pass copy_excludes in the owlbot_main() call
_tracked_paths.add(src)
-php.owlbot_main(
- src=src,
- dest=dest,
- copy_excludes=[
- src / "**/[A-Z]*_*.php"
- ]
-)
+php.owlbot_main(src=src, dest=dest)
# remove class_alias code
s.replace(
@@ -47,33 +41,6 @@
+ "\n",
'')
-
-### [START] protoc backwards compatibility fixes
-
-# roll back to private properties.
-s.replace(
- "src/**/V*/**/*.php",
- r"Generated from protobuf field ([^\n]{0,})\n\s{5}\*/\n\s{4}protected \$",
- r"""Generated from protobuf field \1
- */
- private $""")
-
-# Replace "Unwrapped" with "Value" for method names.
-s.replace(
- "src/**/V*/**/*.php",
- r"public function ([s|g]\w{3,})Unwrapped",
- r"public function \1Value"
-)
-
-### [END] protoc backwards compatibility fixes
-
-# fix relative cloud.google.com links
-s.replace(
- "src/**/V*/**/*.php",
- r"(.{0,})\]\((/.{0,})\)",
- r"\1](https://cloud.google.com\2)"
-)
-
# format generated clients
subprocess.run([
'npm',
@@ -82,8 +49,8 @@
'--package=@prettier/plugin-php@^0.16',
'--',
'prettier',
- '**/Gapic/*',
+ '**/Client/*',
'--write',
'--parser=php',
'--single-quote',
- '--print-width=80'])
+ '--print-width=120'])
diff --git a/AnalyticsData/src/V1alpha/AlphaAnalyticsDataClient.php b/AnalyticsData/src/V1alpha/AlphaAnalyticsDataClient.php
deleted file mode 100644
index 16798405a819..000000000000
--- a/AnalyticsData/src/V1alpha/AlphaAnalyticsDataClient.php
+++ /dev/null
@@ -1,36 +0,0 @@
-_simpleRequest('/google.analytics.data.v1alpha.AlphaAnalyticsData/RunReport',
- $argument,
- ['\Google\Analytics\Data\V1alpha\RunReportResponse', 'decode'],
- $metadata, $options);
- }
-
- /**
- * Returns a customized pivot report of your Google Analytics event data.
- * Pivot reports are more advanced and expressive formats than regular
- * reports. In a pivot report, dimensions are only visible if they are
- * included in a pivot. Multiple pivots can be specified to further dissect
- * your data.
- * @param \Google\Analytics\Data\V1alpha\RunPivotReportRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function RunPivotReport(\Google\Analytics\Data\V1alpha\RunPivotReportRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.analytics.data.v1alpha.AlphaAnalyticsData/RunPivotReport',
- $argument,
- ['\Google\Analytics\Data\V1alpha\RunPivotReportResponse', 'decode'],
- $metadata, $options);
- }
-
- /**
- * Returns multiple reports in a batch. All reports must be for the same
- * Entity.
- * @param \Google\Analytics\Data\V1alpha\BatchRunReportsRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function BatchRunReports(\Google\Analytics\Data\V1alpha\BatchRunReportsRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.analytics.data.v1alpha.AlphaAnalyticsData/BatchRunReports',
- $argument,
- ['\Google\Analytics\Data\V1alpha\BatchRunReportsResponse', 'decode'],
- $metadata, $options);
- }
-
- /**
- * Returns multiple pivot reports in a batch. All reports must be for the same
- * Entity.
- * @param \Google\Analytics\Data\V1alpha\BatchRunPivotReportsRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function BatchRunPivotReports(\Google\Analytics\Data\V1alpha\BatchRunPivotReportsRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.analytics.data.v1alpha.AlphaAnalyticsData/BatchRunPivotReports',
- $argument,
- ['\Google\Analytics\Data\V1alpha\BatchRunPivotReportsResponse', 'decode'],
- $metadata, $options);
- }
-
- /**
- * Returns metadata for dimensions and metrics available in reporting methods.
- * Used to explore the dimensions and metrics. In this method, a Google
- * Analytics GA4 Property Identifier is specified in the request, and
- * the metadata response includes Custom dimensions and metrics as well as
- * Universal metadata.
- *
- * For example if a custom metric with parameter name `levels_unlocked` is
- * registered to a property, the Metadata response will contain
- * `customEvent:levels_unlocked`. Universal metadata are dimensions and
- * metrics applicable to any property such as `country` and `totalUsers`.
- * @param \Google\Analytics\Data\V1alpha\GetMetadataRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function GetMetadata(\Google\Analytics\Data\V1alpha\GetMetadataRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.analytics.data.v1alpha.AlphaAnalyticsData/GetMetadata',
- $argument,
- ['\Google\Analytics\Data\V1alpha\Metadata', 'decode'],
- $metadata, $options);
- }
-
- /**
- * The Google Analytics Realtime API returns a customized report of realtime
- * event data for your property. These reports show events and usage from the
- * last 30 minutes.
- * @param \Google\Analytics\Data\V1alpha\RunRealtimeReportRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function RunRealtimeReport(\Google\Analytics\Data\V1alpha\RunRealtimeReportRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.analytics.data.v1alpha.AlphaAnalyticsData/RunRealtimeReport',
- $argument,
- ['\Google\Analytics\Data\V1alpha\RunRealtimeReportResponse', 'decode'],
- $metadata, $options);
- }
-
-}
diff --git a/AnalyticsData/src/V1alpha/AudienceDimension.php b/AnalyticsData/src/V1alpha/AudienceDimension.php
index 0ecc4546ee7c..52ad212cf8ca 100644
--- a/AnalyticsData/src/V1alpha/AudienceDimension.php
+++ b/AnalyticsData/src/V1alpha/AudienceDimension.php
@@ -23,7 +23,7 @@ class AudienceDimension extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string dimension_name = 1 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $dimension_name = '';
+ protected $dimension_name = '';
/**
* Constructor.
diff --git a/AnalyticsData/src/V1alpha/AudienceList.php b/AnalyticsData/src/V1alpha/AudienceList.php
index cd0bc2d51d5e..f365d873b018 100644
--- a/AnalyticsData/src/V1alpha/AudienceList.php
+++ b/AnalyticsData/src/V1alpha/AudienceList.php
@@ -24,7 +24,7 @@ class AudienceList extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $name = '';
+ protected $name = '';
/**
* Required. The audience resource name. This resource name identifies the
* audience being listed and is shared between the Analytics Data & Admin
@@ -33,14 +33,14 @@ class AudienceList extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string audience = 2 [(.google.api.field_behavior) = REQUIRED];
*/
- private $audience = '';
+ protected $audience = '';
/**
* Output only. The descriptive display name for this audience. For example,
* "Purchasers".
*
* Generated from protobuf field string audience_display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $audience_display_name = '';
+ protected $audience_display_name = '';
/**
* Required. The dimensions requested and displayed in the query response.
*
@@ -52,14 +52,14 @@ class AudienceList extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field optional .google.analytics.data.v1alpha.AudienceList.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $state = null;
+ protected $state = null;
/**
* Output only. The time when CreateAudienceList was called and the
* AudienceList began the `CREATING` state.
*
* Generated from protobuf field optional .google.protobuf.Timestamp begin_creating_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $begin_creating_time = null;
+ protected $begin_creating_time = null;
/**
* Output only. The total quota tokens charged during creation of the
* AudienceList. Because this token count is based on activity from the
@@ -68,27 +68,27 @@ class AudienceList extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field int32 creation_quota_tokens_charged = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $creation_quota_tokens_charged = 0;
+ protected $creation_quota_tokens_charged = 0;
/**
* Output only. The total number of rows in the AudienceList result.
*
* Generated from protobuf field optional int32 row_count = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $row_count = null;
+ protected $row_count = null;
/**
* Output only. Error message is populated when an audience list fails during
* creation. A common reason for such a failure is quota exhaustion.
*
* Generated from protobuf field optional string error_message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $error_message = null;
+ protected $error_message = null;
/**
* Output only. The percentage completed for this audience export ranging
* between 0 to 100.
*
* Generated from protobuf field optional double percentage_completed = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $percentage_completed = null;
+ protected $percentage_completed = null;
/**
* Output only. The recurring audience list that created this audience list.
* Recurring audience lists create audience lists daily.
@@ -97,7 +97,7 @@ class AudienceList extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field optional string recurring_audience_list = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $recurring_audience_list = null;
+ protected $recurring_audience_list = null;
/**
* Optional. Configures webhook notifications to be sent from the Google
* Analytics Data API to your webhook server. Use of webhooks is optional. If
@@ -115,7 +115,7 @@ class AudienceList extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field optional .google.analytics.data.v1alpha.WebhookNotification webhook_notification = 13 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $webhook_notification = null;
+ protected $webhook_notification = null;
/**
* Constructor.
diff --git a/AnalyticsData/src/V1alpha/BatchRunPivotReportsRequest.php b/AnalyticsData/src/V1alpha/BatchRunPivotReportsRequest.php
deleted file mode 100644
index 278097096b22..000000000000
--- a/AnalyticsData/src/V1alpha/BatchRunPivotReportsRequest.php
+++ /dev/null
@@ -1,123 +0,0 @@
-google.analytics.data.v1alpha.BatchRunPivotReportsRequest
- */
-class BatchRunPivotReportsRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * A property whose events are tracked. This entity must be specified for the
- * batch. The entity within RunPivotReportRequest may either be unspecified or
- * consistent with this entity.
- *
- * Generated from protobuf field .google.analytics.data.v1alpha.Entity entity = 1;
- */
- private $entity = null;
- /**
- * Individual requests. Each request has a separate pivot report response.
- * Each batch request is allowed up to 5 requests.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.RunPivotReportRequest requests = 2;
- */
- private $requests;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Analytics\Data\V1alpha\Entity $entity
- * A property whose events are tracked. This entity must be specified for the
- * batch. The entity within RunPivotReportRequest may either be unspecified or
- * consistent with this entity.
- * @type \Google\Analytics\Data\V1alpha\RunPivotReportRequest[]|\Google\Protobuf\Internal\RepeatedField $requests
- * Individual requests. Each request has a separate pivot report response.
- * Each batch request is allowed up to 5 requests.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Analytics\Data\V1Alpha\AnalyticsDataApi::initOnce();
- parent::__construct($data);
- }
-
- /**
- * A property whose events are tracked. This entity must be specified for the
- * batch. The entity within RunPivotReportRequest may either be unspecified or
- * consistent with this entity.
- *
- * Generated from protobuf field .google.analytics.data.v1alpha.Entity entity = 1;
- * @return \Google\Analytics\Data\V1alpha\Entity|null
- */
- public function getEntity()
- {
- return isset($this->entity) ? $this->entity : null;
- }
-
- public function hasEntity()
- {
- return isset($this->entity);
- }
-
- public function clearEntity()
- {
- unset($this->entity);
- }
-
- /**
- * A property whose events are tracked. This entity must be specified for the
- * batch. The entity within RunPivotReportRequest may either be unspecified or
- * consistent with this entity.
- *
- * Generated from protobuf field .google.analytics.data.v1alpha.Entity entity = 1;
- * @param \Google\Analytics\Data\V1alpha\Entity $var
- * @return $this
- */
- public function setEntity($var)
- {
- GPBUtil::checkMessage($var, \Google\Analytics\Data\V1alpha\Entity::class);
- $this->entity = $var;
-
- return $this;
- }
-
- /**
- * Individual requests. Each request has a separate pivot report response.
- * Each batch request is allowed up to 5 requests.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.RunPivotReportRequest requests = 2;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getRequests()
- {
- return $this->requests;
- }
-
- /**
- * Individual requests. Each request has a separate pivot report response.
- * Each batch request is allowed up to 5 requests.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.RunPivotReportRequest requests = 2;
- * @param \Google\Analytics\Data\V1alpha\RunPivotReportRequest[]|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setRequests($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Data\V1alpha\RunPivotReportRequest::class);
- $this->requests = $arr;
-
- return $this;
- }
-
-}
-
diff --git a/AnalyticsData/src/V1alpha/BatchRunPivotReportsResponse.php b/AnalyticsData/src/V1alpha/BatchRunPivotReportsResponse.php
deleted file mode 100644
index f613633dd47d..000000000000
--- a/AnalyticsData/src/V1alpha/BatchRunPivotReportsResponse.php
+++ /dev/null
@@ -1,67 +0,0 @@
-google.analytics.data.v1alpha.BatchRunPivotReportsResponse
- */
-class BatchRunPivotReportsResponse extends \Google\Protobuf\Internal\Message
-{
- /**
- * Individual responses. Each response has a separate pivot report request.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.RunPivotReportResponse pivot_reports = 1;
- */
- private $pivot_reports;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Analytics\Data\V1alpha\RunPivotReportResponse[]|\Google\Protobuf\Internal\RepeatedField $pivot_reports
- * Individual responses. Each response has a separate pivot report request.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Analytics\Data\V1Alpha\AnalyticsDataApi::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Individual responses. Each response has a separate pivot report request.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.RunPivotReportResponse pivot_reports = 1;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getPivotReports()
- {
- return $this->pivot_reports;
- }
-
- /**
- * Individual responses. Each response has a separate pivot report request.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.RunPivotReportResponse pivot_reports = 1;
- * @param \Google\Analytics\Data\V1alpha\RunPivotReportResponse[]|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setPivotReports($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Data\V1alpha\RunPivotReportResponse::class);
- $this->pivot_reports = $arr;
-
- return $this;
- }
-
-}
-
diff --git a/AnalyticsData/src/V1alpha/BatchRunReportsRequest.php b/AnalyticsData/src/V1alpha/BatchRunReportsRequest.php
deleted file mode 100644
index d0a0e2d4160d..000000000000
--- a/AnalyticsData/src/V1alpha/BatchRunReportsRequest.php
+++ /dev/null
@@ -1,123 +0,0 @@
-google.analytics.data.v1alpha.BatchRunReportsRequest
- */
-class BatchRunReportsRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * A property whose events are tracked. This entity must be specified for the
- * batch. The entity within RunReportRequest may either be unspecified or
- * consistent with this entity.
- *
- * Generated from protobuf field .google.analytics.data.v1alpha.Entity entity = 1;
- */
- private $entity = null;
- /**
- * Individual requests. Each request has a separate report response. Each
- * batch request is allowed up to 5 requests.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.RunReportRequest requests = 2;
- */
- private $requests;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Analytics\Data\V1alpha\Entity $entity
- * A property whose events are tracked. This entity must be specified for the
- * batch. The entity within RunReportRequest may either be unspecified or
- * consistent with this entity.
- * @type \Google\Analytics\Data\V1alpha\RunReportRequest[]|\Google\Protobuf\Internal\RepeatedField $requests
- * Individual requests. Each request has a separate report response. Each
- * batch request is allowed up to 5 requests.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Analytics\Data\V1Alpha\AnalyticsDataApi::initOnce();
- parent::__construct($data);
- }
-
- /**
- * A property whose events are tracked. This entity must be specified for the
- * batch. The entity within RunReportRequest may either be unspecified or
- * consistent with this entity.
- *
- * Generated from protobuf field .google.analytics.data.v1alpha.Entity entity = 1;
- * @return \Google\Analytics\Data\V1alpha\Entity|null
- */
- public function getEntity()
- {
- return isset($this->entity) ? $this->entity : null;
- }
-
- public function hasEntity()
- {
- return isset($this->entity);
- }
-
- public function clearEntity()
- {
- unset($this->entity);
- }
-
- /**
- * A property whose events are tracked. This entity must be specified for the
- * batch. The entity within RunReportRequest may either be unspecified or
- * consistent with this entity.
- *
- * Generated from protobuf field .google.analytics.data.v1alpha.Entity entity = 1;
- * @param \Google\Analytics\Data\V1alpha\Entity $var
- * @return $this
- */
- public function setEntity($var)
- {
- GPBUtil::checkMessage($var, \Google\Analytics\Data\V1alpha\Entity::class);
- $this->entity = $var;
-
- return $this;
- }
-
- /**
- * Individual requests. Each request has a separate report response. Each
- * batch request is allowed up to 5 requests.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.RunReportRequest requests = 2;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getRequests()
- {
- return $this->requests;
- }
-
- /**
- * Individual requests. Each request has a separate report response. Each
- * batch request is allowed up to 5 requests.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.RunReportRequest requests = 2;
- * @param \Google\Analytics\Data\V1alpha\RunReportRequest[]|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setRequests($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Data\V1alpha\RunReportRequest::class);
- $this->requests = $arr;
-
- return $this;
- }
-
-}
-
diff --git a/AnalyticsData/src/V1alpha/BatchRunReportsResponse.php b/AnalyticsData/src/V1alpha/BatchRunReportsResponse.php
deleted file mode 100644
index caadbea9a786..000000000000
--- a/AnalyticsData/src/V1alpha/BatchRunReportsResponse.php
+++ /dev/null
@@ -1,67 +0,0 @@
-google.analytics.data.v1alpha.BatchRunReportsResponse
- */
-class BatchRunReportsResponse extends \Google\Protobuf\Internal\Message
-{
- /**
- * Individual responses. Each response has a separate report request.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.RunReportResponse reports = 1;
- */
- private $reports;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Analytics\Data\V1alpha\RunReportResponse[]|\Google\Protobuf\Internal\RepeatedField $reports
- * Individual responses. Each response has a separate report request.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Analytics\Data\V1Alpha\AnalyticsDataApi::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Individual responses. Each response has a separate report request.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.RunReportResponse reports = 1;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getReports()
- {
- return $this->reports;
- }
-
- /**
- * Individual responses. Each response has a separate report request.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.RunReportResponse reports = 1;
- * @param \Google\Analytics\Data\V1alpha\RunReportResponse[]|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setReports($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Data\V1alpha\RunReportResponse::class);
- $this->reports = $arr;
-
- return $this;
- }
-
-}
-
diff --git a/AnalyticsData/src/V1alpha/BetweenFilter.php b/AnalyticsData/src/V1alpha/BetweenFilter.php
index eb432c534d6d..1a3c30dd5716 100644
--- a/AnalyticsData/src/V1alpha/BetweenFilter.php
+++ b/AnalyticsData/src/V1alpha/BetweenFilter.php
@@ -20,13 +20,13 @@ class BetweenFilter extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.analytics.data.v1alpha.NumericValue from_value = 1;
*/
- private $from_value = null;
+ protected $from_value = null;
/**
* Ends with this number.
*
* Generated from protobuf field .google.analytics.data.v1alpha.NumericValue to_value = 2;
*/
- private $to_value = null;
+ protected $to_value = null;
/**
* Constructor.
diff --git a/AnalyticsData/src/V1alpha/Client/AlphaAnalyticsDataClient.php b/AnalyticsData/src/V1alpha/Client/AlphaAnalyticsDataClient.php
index 1930e1eff243..789b0ed4d1a3 100644
--- a/AnalyticsData/src/V1alpha/Client/AlphaAnalyticsDataClient.php
+++ b/AnalyticsData/src/V1alpha/Client/AlphaAnalyticsDataClient.php
@@ -52,7 +52,6 @@
use Google\ApiCore\ApiException;
use Google\ApiCore\CredentialsWrapper;
use Google\ApiCore\GapicClientTrait;
-use Google\ApiCore\LongRunning\OperationsClient;
use Google\ApiCore\OperationResponse;
use Google\ApiCore\PagedListResponse;
use Google\ApiCore\ResourceHelperTrait;
@@ -60,9 +59,9 @@
use Google\ApiCore\Transport\TransportInterface;
use Google\ApiCore\ValidationException;
use Google\Auth\FetchAuthTokenInterface;
+use Google\LongRunning\Client\OperationsClient;
use Google\LongRunning\Operation;
use GuzzleHttp\Promise\PromiseInterface;
-use Psr\Log\LoggerInterface;
/**
* Service Description: Google Analytics reporting data service.
@@ -173,12 +172,33 @@ public function getOperationsClient()
*/
public function resumeOperation($operationName, $methodName = null)
{
- $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : [];
+ $options = isset($this->descriptors[$methodName]['longRunning'])
+ ? $this->descriptors[$methodName]['longRunning']
+ : [];
$operation = new OperationResponse($operationName, $this->getOperationsClient(), $options);
$operation->reload();
return $operation;
}
+ /**
+ * Create the default operation client for the service.
+ *
+ * @param array $options ClientOptions for the client.
+ *
+ * @return OperationsClient
+ */
+ private function createOperationsClient(array $options)
+ {
+ // Unset client-specific configuration options
+ unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']);
+
+ if (isset($options['operationsClient'])) {
+ return $options['operationsClient'];
+ }
+
+ return new OperationsClient($options);
+ }
+
/**
* Formats a string containing the fully-qualified path to represent a
* audience_list resource.
@@ -286,8 +306,8 @@ public static function reportTaskName(string $property, string $reportTask): str
* listed, then parseName will check each of the supported templates, and return
* the first match.
*
- * @param string $formattedName The formatted name string
- * @param ?string $template Optional name of template to match
+ * @param string $formattedName The formatted name string
+ * @param string $template Optional name of template to match
*
* @return array An associative array from name component IDs to component values.
*
@@ -295,7 +315,7 @@ public static function reportTaskName(string $property, string $reportTask): str
*
* @experimental
*/
- public static function parseName(string $formattedName, ?string $template = null): array
+ public static function parseName(string $formattedName, string $template = null): array
{
return self::parseFormattedName($formattedName, $template);
}
@@ -350,9 +370,6 @@ public static function parseName(string $formattedName, ?string $template = null
* @type callable $clientCertSource
* A callable which returns the client cert as a string. This can be used to
* provide a certificate and private key to the transport layer for mTLS.
- * @type false|LoggerInterface $logger
- * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the
- * 'GOOGLE_SDK_PHP_LOGGING' environment flag
* }
*
* @throws ValidationException
@@ -470,8 +487,10 @@ public function createAudienceList(CreateAudienceListRequest $request, array $ca
*
* @experimental
*/
- public function createRecurringAudienceList(CreateRecurringAudienceListRequest $request, array $callOptions = []): RecurringAudienceList
- {
+ public function createRecurringAudienceList(
+ CreateRecurringAudienceListRequest $request,
+ array $callOptions = []
+ ): RecurringAudienceList {
return $this->startApiCall('CreateRecurringAudienceList', $request, $callOptions)->wait();
}
@@ -576,8 +595,10 @@ public function getAudienceList(GetAudienceListRequest $request, array $callOpti
*
* @experimental
*/
- public function getPropertyQuotasSnapshot(GetPropertyQuotasSnapshotRequest $request, array $callOptions = []): PropertyQuotasSnapshot
- {
+ public function getPropertyQuotasSnapshot(
+ GetPropertyQuotasSnapshotRequest $request,
+ array $callOptions = []
+ ): PropertyQuotasSnapshot {
return $this->startApiCall('GetPropertyQuotasSnapshot', $request, $callOptions)->wait();
}
@@ -615,8 +636,10 @@ public function getPropertyQuotasSnapshot(GetPropertyQuotasSnapshotRequest $requ
*
* @experimental
*/
- public function getRecurringAudienceList(GetRecurringAudienceListRequest $request, array $callOptions = []): RecurringAudienceList
- {
+ public function getRecurringAudienceList(
+ GetRecurringAudienceListRequest $request,
+ array $callOptions = []
+ ): RecurringAudienceList {
return $this->startApiCall('GetRecurringAudienceList', $request, $callOptions)->wait();
}
@@ -726,8 +749,10 @@ public function listAudienceLists(ListAudienceListsRequest $request, array $call
*
* @experimental
*/
- public function listRecurringAudienceLists(ListRecurringAudienceListsRequest $request, array $callOptions = []): PagedListResponse
- {
+ public function listRecurringAudienceLists(
+ ListRecurringAudienceListsRequest $request,
+ array $callOptions = []
+ ): PagedListResponse {
return $this->startApiCall('ListRecurringAudienceLists', $request, $callOptions);
}
@@ -799,8 +824,10 @@ public function listReportTasks(ListReportTasksRequest $request, array $callOpti
*
* @experimental
*/
- public function queryAudienceList(QueryAudienceListRequest $request, array $callOptions = []): QueryAudienceListResponse
- {
+ public function queryAudienceList(
+ QueryAudienceListRequest $request,
+ array $callOptions = []
+ ): QueryAudienceListResponse {
return $this->startApiCall('QueryAudienceList', $request, $callOptions)->wait();
}
@@ -921,8 +948,10 @@ public function runFunnelReport(RunFunnelReportRequest $request, array $callOpti
*
* @experimental
*/
- public function sheetExportAudienceList(SheetExportAudienceListRequest $request, array $callOptions = []): SheetExportAudienceListResponse
- {
+ public function sheetExportAudienceList(
+ SheetExportAudienceListRequest $request,
+ array $callOptions = []
+ ): SheetExportAudienceListResponse {
return $this->startApiCall('SheetExportAudienceList', $request, $callOptions)->wait();
}
}
diff --git a/AnalyticsData/src/V1alpha/Cohort.php b/AnalyticsData/src/V1alpha/Cohort.php
index 8594825d2ac4..ad2a39a68475 100644
--- a/AnalyticsData/src/V1alpha/Cohort.php
+++ b/AnalyticsData/src/V1alpha/Cohort.php
@@ -25,14 +25,14 @@ class Cohort extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1;
*/
- private $name = '';
+ protected $name = '';
/**
* Dimension used by the cohort. Required and only supports
* `firstSessionDate`.
*
* Generated from protobuf field string dimension = 2;
*/
- private $dimension = '';
+ protected $dimension = '';
/**
* The cohort selects users whose first touch date is between start date and
* end date defined in the `dateRange`. This `dateRange` does not specify the
@@ -51,7 +51,7 @@ class Cohort extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.analytics.data.v1alpha.DateRange date_range = 3;
*/
- private $date_range = null;
+ protected $date_range = null;
/**
* Constructor.
diff --git a/AnalyticsData/src/V1alpha/CohortReportSettings.php b/AnalyticsData/src/V1alpha/CohortReportSettings.php
index 60721375dead..4364a0b9c5a5 100644
--- a/AnalyticsData/src/V1alpha/CohortReportSettings.php
+++ b/AnalyticsData/src/V1alpha/CohortReportSettings.php
@@ -21,7 +21,7 @@ class CohortReportSettings extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field bool accumulate = 1;
*/
- private $accumulate = false;
+ protected $accumulate = false;
/**
* Constructor.
diff --git a/AnalyticsData/src/V1alpha/CohortSpec.php b/AnalyticsData/src/V1alpha/CohortSpec.php
index 822fec521a63..6de328bb2e3d 100644
--- a/AnalyticsData/src/V1alpha/CohortSpec.php
+++ b/AnalyticsData/src/V1alpha/CohortSpec.php
@@ -41,13 +41,13 @@ class CohortSpec extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.analytics.data.v1alpha.CohortsRange cohorts_range = 2;
*/
- private $cohorts_range = null;
+ protected $cohorts_range = null;
/**
* Optional settings for a cohort report.
*
* Generated from protobuf field .google.analytics.data.v1alpha.CohortReportSettings cohort_report_settings = 3;
*/
- private $cohort_report_settings = null;
+ protected $cohort_report_settings = null;
/**
* Constructor.
diff --git a/AnalyticsData/src/V1alpha/CohortsRange.php b/AnalyticsData/src/V1alpha/CohortsRange.php
index 796eaf0a3117..3133c9ca748f 100644
--- a/AnalyticsData/src/V1alpha/CohortsRange.php
+++ b/AnalyticsData/src/V1alpha/CohortsRange.php
@@ -22,7 +22,7 @@ class CohortsRange extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.analytics.data.v1alpha.CohortsRange.Granularity granularity = 1;
*/
- private $granularity = 0;
+ protected $granularity = 0;
/**
* `startOffset` specifies the start date of the extended reporting date range
* for a cohort report. `startOffset` is commonly set to 0 so that reports
@@ -36,7 +36,7 @@ class CohortsRange extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field int32 start_offset = 2;
*/
- private $start_offset = 0;
+ protected $start_offset = 0;
/**
* Required. `endOffset` specifies the end date of the extended reporting date
* range for a cohort report. `endOffset` can be any positive integer but is
@@ -51,7 +51,7 @@ class CohortsRange extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field int32 end_offset = 3;
*/
- private $end_offset = 0;
+ protected $end_offset = 0;
/**
* Constructor.
diff --git a/AnalyticsData/src/V1alpha/CreateAudienceListRequest.php b/AnalyticsData/src/V1alpha/CreateAudienceListRequest.php
index 059cab749622..3f2845a201c2 100644
--- a/AnalyticsData/src/V1alpha/CreateAudienceListRequest.php
+++ b/AnalyticsData/src/V1alpha/CreateAudienceListRequest.php
@@ -21,13 +21,13 @@ class CreateAudienceListRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
*/
- private $parent = '';
+ protected $parent = '';
/**
* Required. The audience list to create.
*
* Generated from protobuf field .google.analytics.data.v1alpha.AudienceList audience_list = 2 [(.google.api.field_behavior) = REQUIRED];
*/
- private $audience_list = null;
+ protected $audience_list = null;
/**
* @param string $parent Required. The parent resource where this audience list will be created.
diff --git a/AnalyticsData/src/V1alpha/CreateRecurringAudienceListRequest.php b/AnalyticsData/src/V1alpha/CreateRecurringAudienceListRequest.php
index 37ef089ef3e9..597ed8af253d 100644
--- a/AnalyticsData/src/V1alpha/CreateRecurringAudienceListRequest.php
+++ b/AnalyticsData/src/V1alpha/CreateRecurringAudienceListRequest.php
@@ -21,13 +21,13 @@ class CreateRecurringAudienceListRequest extends \Google\Protobuf\Internal\Messa
*
* Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
*/
- private $parent = '';
+ protected $parent = '';
/**
* Required. The recurring audience list to create.
*
* Generated from protobuf field .google.analytics.data.v1alpha.RecurringAudienceList recurring_audience_list = 2 [(.google.api.field_behavior) = REQUIRED];
*/
- private $recurring_audience_list = null;
+ protected $recurring_audience_list = null;
/**
* @param string $parent Required. The parent resource where this recurring audience list will be
diff --git a/AnalyticsData/src/V1alpha/CreateReportTaskRequest.php b/AnalyticsData/src/V1alpha/CreateReportTaskRequest.php
index 86b48a18bd5e..7c87d8ddfb7c 100644
--- a/AnalyticsData/src/V1alpha/CreateReportTaskRequest.php
+++ b/AnalyticsData/src/V1alpha/CreateReportTaskRequest.php
@@ -21,13 +21,13 @@ class CreateReportTaskRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
*/
- private $parent = '';
+ protected $parent = '';
/**
* Required. The report task configuration to create.
*
* Generated from protobuf field .google.analytics.data.v1alpha.ReportTask report_task = 2 [(.google.api.field_behavior) = REQUIRED];
*/
- private $report_task = null;
+ protected $report_task = null;
/**
* @param string $parent Required. The parent resource where this report task will be created.
diff --git a/AnalyticsData/src/V1alpha/DateRange.php b/AnalyticsData/src/V1alpha/DateRange.php
index 8fbe14ab61a5..0d7a4291b972 100644
--- a/AnalyticsData/src/V1alpha/DateRange.php
+++ b/AnalyticsData/src/V1alpha/DateRange.php
@@ -24,7 +24,7 @@ class DateRange extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string start_date = 1;
*/
- private $start_date = '';
+ protected $start_date = '';
/**
* The inclusive end date for the query in the format `YYYY-MM-DD`. Cannot
* be before `start_date`. The format `NdaysAgo`, `yesterday`, or `today` is
@@ -33,7 +33,7 @@ class DateRange extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string end_date = 2;
*/
- private $end_date = '';
+ protected $end_date = '';
/**
* Assigns a name to this date range. The dimension `dateRange` is valued to
* this name in a report response. If set, cannot begin with `date_range_` or
@@ -42,7 +42,7 @@ class DateRange extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 3;
*/
- private $name = '';
+ protected $name = '';
/**
* Constructor.
diff --git a/AnalyticsData/src/V1alpha/Dimension.php b/AnalyticsData/src/V1alpha/Dimension.php
index 539ce1a527e1..b1deaf994061 100644
--- a/AnalyticsData/src/V1alpha/Dimension.php
+++ b/AnalyticsData/src/V1alpha/Dimension.php
@@ -40,14 +40,14 @@ class Dimension extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1;
*/
- private $name = '';
+ protected $name = '';
/**
* One dimension can be the result of an expression of multiple dimensions.
* For example, dimension "country, city": concatenate(country, ", ", city).
*
* Generated from protobuf field .google.analytics.data.v1alpha.DimensionExpression dimension_expression = 2;
*/
- private $dimension_expression = null;
+ protected $dimension_expression = null;
/**
* Constructor.
diff --git a/AnalyticsData/src/V1alpha/DimensionExpression/CaseExpression.php b/AnalyticsData/src/V1alpha/DimensionExpression/CaseExpression.php
index 1641b5e56026..4d37bdb51386 100644
--- a/AnalyticsData/src/V1alpha/DimensionExpression/CaseExpression.php
+++ b/AnalyticsData/src/V1alpha/DimensionExpression/CaseExpression.php
@@ -21,7 +21,7 @@ class CaseExpression extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string dimension_name = 1;
*/
- private $dimension_name = '';
+ protected $dimension_name = '';
/**
* Constructor.
diff --git a/AnalyticsData/src/V1alpha/DimensionExpression/ConcatenateExpression.php b/AnalyticsData/src/V1alpha/DimensionExpression/ConcatenateExpression.php
index 58eed60c02cc..bfc97f5610f9 100644
--- a/AnalyticsData/src/V1alpha/DimensionExpression/ConcatenateExpression.php
+++ b/AnalyticsData/src/V1alpha/DimensionExpression/ConcatenateExpression.php
@@ -32,7 +32,7 @@ class ConcatenateExpression extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string delimiter = 2;
*/
- private $delimiter = '';
+ protected $delimiter = '';
/**
* Constructor.
diff --git a/AnalyticsData/src/V1alpha/DimensionHeader.php b/AnalyticsData/src/V1alpha/DimensionHeader.php
index 686464805636..3d84d708eee3 100644
--- a/AnalyticsData/src/V1alpha/DimensionHeader.php
+++ b/AnalyticsData/src/V1alpha/DimensionHeader.php
@@ -23,7 +23,7 @@ class DimensionHeader extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1;
*/
- private $name = '';
+ protected $name = '';
/**
* Constructor.
diff --git a/AnalyticsData/src/V1alpha/DimensionMetadata.php b/AnalyticsData/src/V1alpha/DimensionMetadata.php
deleted file mode 100644
index fcd4cf383677..000000000000
--- a/AnalyticsData/src/V1alpha/DimensionMetadata.php
+++ /dev/null
@@ -1,223 +0,0 @@
-google.analytics.data.v1alpha.DimensionMetadata
- */
-class DimensionMetadata extends \Google\Protobuf\Internal\Message
-{
- /**
- * This dimension's name. Useable in [Dimension](#Dimension)'s `name`. For
- * example, `eventName`.
- *
- * Generated from protobuf field string api_name = 1;
- */
- private $api_name = '';
- /**
- * This dimension's name within the Google Analytics user interface. For
- * example, `Event name`.
- *
- * Generated from protobuf field string ui_name = 2;
- */
- private $ui_name = '';
- /**
- * Description of how this dimension is used and calculated.
- *
- * Generated from protobuf field string description = 3;
- */
- private $description = '';
- /**
- * Still usable but deprecated names for this dimension. If populated, this
- * dimension is available by either `apiName` or one of `deprecatedApiNames`
- * for a period of time. After the deprecation period, the dimension will be
- * available only by `apiName`.
- *
- * Generated from protobuf field repeated string deprecated_api_names = 4;
- */
- private $deprecated_api_names;
- /**
- * True if the dimension is a custom dimension for this property.
- *
- * Generated from protobuf field bool custom_definition = 5;
- */
- private $custom_definition = false;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $api_name
- * This dimension's name. Useable in [Dimension](#Dimension)'s `name`. For
- * example, `eventName`.
- * @type string $ui_name
- * This dimension's name within the Google Analytics user interface. For
- * example, `Event name`.
- * @type string $description
- * Description of how this dimension is used and calculated.
- * @type string[]|\Google\Protobuf\Internal\RepeatedField $deprecated_api_names
- * Still usable but deprecated names for this dimension. If populated, this
- * dimension is available by either `apiName` or one of `deprecatedApiNames`
- * for a period of time. After the deprecation period, the dimension will be
- * available only by `apiName`.
- * @type bool $custom_definition
- * True if the dimension is a custom dimension for this property.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Analytics\Data\V1Alpha\Data::initOnce();
- parent::__construct($data);
- }
-
- /**
- * This dimension's name. Useable in [Dimension](#Dimension)'s `name`. For
- * example, `eventName`.
- *
- * Generated from protobuf field string api_name = 1;
- * @return string
- */
- public function getApiName()
- {
- return $this->api_name;
- }
-
- /**
- * This dimension's name. Useable in [Dimension](#Dimension)'s `name`. For
- * example, `eventName`.
- *
- * Generated from protobuf field string api_name = 1;
- * @param string $var
- * @return $this
- */
- public function setApiName($var)
- {
- GPBUtil::checkString($var, True);
- $this->api_name = $var;
-
- return $this;
- }
-
- /**
- * This dimension's name within the Google Analytics user interface. For
- * example, `Event name`.
- *
- * Generated from protobuf field string ui_name = 2;
- * @return string
- */
- public function getUiName()
- {
- return $this->ui_name;
- }
-
- /**
- * This dimension's name within the Google Analytics user interface. For
- * example, `Event name`.
- *
- * Generated from protobuf field string ui_name = 2;
- * @param string $var
- * @return $this
- */
- public function setUiName($var)
- {
- GPBUtil::checkString($var, True);
- $this->ui_name = $var;
-
- return $this;
- }
-
- /**
- * Description of how this dimension is used and calculated.
- *
- * Generated from protobuf field string description = 3;
- * @return string
- */
- public function getDescription()
- {
- return $this->description;
- }
-
- /**
- * Description of how this dimension is used and calculated.
- *
- * Generated from protobuf field string description = 3;
- * @param string $var
- * @return $this
- */
- public function setDescription($var)
- {
- GPBUtil::checkString($var, True);
- $this->description = $var;
-
- return $this;
- }
-
- /**
- * Still usable but deprecated names for this dimension. If populated, this
- * dimension is available by either `apiName` or one of `deprecatedApiNames`
- * for a period of time. After the deprecation period, the dimension will be
- * available only by `apiName`.
- *
- * Generated from protobuf field repeated string deprecated_api_names = 4;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getDeprecatedApiNames()
- {
- return $this->deprecated_api_names;
- }
-
- /**
- * Still usable but deprecated names for this dimension. If populated, this
- * dimension is available by either `apiName` or one of `deprecatedApiNames`
- * for a period of time. After the deprecation period, the dimension will be
- * available only by `apiName`.
- *
- * Generated from protobuf field repeated string deprecated_api_names = 4;
- * @param string[]|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setDeprecatedApiNames($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
- $this->deprecated_api_names = $arr;
-
- return $this;
- }
-
- /**
- * True if the dimension is a custom dimension for this property.
- *
- * Generated from protobuf field bool custom_definition = 5;
- * @return bool
- */
- public function getCustomDefinition()
- {
- return $this->custom_definition;
- }
-
- /**
- * True if the dimension is a custom dimension for this property.
- *
- * Generated from protobuf field bool custom_definition = 5;
- * @param bool $var
- * @return $this
- */
- public function setCustomDefinition($var)
- {
- GPBUtil::checkBool($var);
- $this->custom_definition = $var;
-
- return $this;
- }
-
-}
-
diff --git a/AnalyticsData/src/V1alpha/Entity.php b/AnalyticsData/src/V1alpha/Entity.php
deleted file mode 100644
index f1cc637d5be0..000000000000
--- a/AnalyticsData/src/V1alpha/Entity.php
+++ /dev/null
@@ -1,75 +0,0 @@
-google.analytics.data.v1alpha.Entity
- */
-class Entity extends \Google\Protobuf\Internal\Message
-{
- /**
- * A Google Analytics GA4 property id. To learn more, see [where to find your
- * Property
- * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
- *
- * Generated from protobuf field string property_id = 1;
- */
- private $property_id = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $property_id
- * A Google Analytics GA4 property id. To learn more, see [where to find your
- * Property
- * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Analytics\Data\V1Alpha\Data::initOnce();
- parent::__construct($data);
- }
-
- /**
- * A Google Analytics GA4 property id. To learn more, see [where to find your
- * Property
- * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
- *
- * Generated from protobuf field string property_id = 1;
- * @return string
- */
- public function getPropertyId()
- {
- return $this->property_id;
- }
-
- /**
- * A Google Analytics GA4 property id. To learn more, see [where to find your
- * Property
- * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
- *
- * Generated from protobuf field string property_id = 1;
- * @param string $var
- * @return $this
- */
- public function setPropertyId($var)
- {
- GPBUtil::checkString($var, True);
- $this->property_id = $var;
-
- return $this;
- }
-
-}
-
diff --git a/AnalyticsData/src/V1alpha/EventSegment.php b/AnalyticsData/src/V1alpha/EventSegment.php
index 26d96f0a5d52..1a9340fde934 100644
--- a/AnalyticsData/src/V1alpha/EventSegment.php
+++ b/AnalyticsData/src/V1alpha/EventSegment.php
@@ -22,13 +22,13 @@ class EventSegment extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.analytics.data.v1alpha.EventSegmentCriteria event_inclusion_criteria = 1;
*/
- private $event_inclusion_criteria = null;
+ protected $event_inclusion_criteria = null;
/**
* Defines which events are excluded in this segment. Optional.
*
* Generated from protobuf field .google.analytics.data.v1alpha.EventSegmentExclusion exclusion = 2;
*/
- private $exclusion = null;
+ protected $exclusion = null;
/**
* Constructor.
diff --git a/AnalyticsData/src/V1alpha/EventSegmentConditionGroup.php b/AnalyticsData/src/V1alpha/EventSegmentConditionGroup.php
index ccfeb2850a06..6ff4974e6ae6 100644
--- a/AnalyticsData/src/V1alpha/EventSegmentConditionGroup.php
+++ b/AnalyticsData/src/V1alpha/EventSegmentConditionGroup.php
@@ -23,7 +23,7 @@ class EventSegmentConditionGroup extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.analytics.data.v1alpha.EventCriteriaScoping condition_scoping = 1;
*/
- private $condition_scoping = 0;
+ protected $condition_scoping = 0;
/**
* Data is included or excluded from the segment based on if it matches
* this expression. Expressions express criteria on dimension, metrics,
@@ -31,7 +31,7 @@ class EventSegmentConditionGroup extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.analytics.data.v1alpha.SegmentFilterExpression segment_filter_expression = 2;
*/
- private $segment_filter_expression = null;
+ protected $segment_filter_expression = null;
/**
* Constructor.
diff --git a/AnalyticsData/src/V1alpha/EventSegmentExclusion.php b/AnalyticsData/src/V1alpha/EventSegmentExclusion.php
index c8a4bbd4d685..8c4db8412ddd 100644
--- a/AnalyticsData/src/V1alpha/EventSegmentExclusion.php
+++ b/AnalyticsData/src/V1alpha/EventSegmentExclusion.php
@@ -22,14 +22,14 @@ class EventSegmentExclusion extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.analytics.data.v1alpha.EventExclusionDuration event_exclusion_duration = 1;
*/
- private $event_exclusion_duration = 0;
+ protected $event_exclusion_duration = 0;
/**
* If an event meets this condition, the event is excluded from membership
* in the segment for the `eventExclusionDuration`.
*
* Generated from protobuf field .google.analytics.data.v1alpha.EventSegmentCriteria event_exclusion_criteria = 2;
*/
- private $event_exclusion_criteria = null;
+ protected $event_exclusion_criteria = null;
/**
* Constructor.
diff --git a/AnalyticsData/src/V1alpha/Filter.php b/AnalyticsData/src/V1alpha/Filter.php
index 6c758aa91778..5fd5d0320ce2 100644
--- a/AnalyticsData/src/V1alpha/Filter.php
+++ b/AnalyticsData/src/V1alpha/Filter.php
@@ -21,7 +21,7 @@ class Filter extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string field_name = 1;
*/
- private $field_name = '';
+ protected $field_name = '';
protected $one_filter;
/**
diff --git a/AnalyticsData/src/V1alpha/Filter/BetweenFilter.php b/AnalyticsData/src/V1alpha/Filter/BetweenFilter.php
deleted file mode 100644
index 789fc09cdafd..000000000000
--- a/AnalyticsData/src/V1alpha/Filter/BetweenFilter.php
+++ /dev/null
@@ -1,122 +0,0 @@
-google.analytics.data.v1alpha.Filter.BetweenFilter
- */
-class BetweenFilter extends \Google\Protobuf\Internal\Message
-{
- /**
- * Begins with this number.
- *
- * Generated from protobuf field .google.analytics.data.v1alpha.NumericValue from_value = 1;
- */
- private $from_value = null;
- /**
- * Ends with this number.
- *
- * Generated from protobuf field .google.analytics.data.v1alpha.NumericValue to_value = 2;
- */
- private $to_value = null;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Analytics\Data\V1alpha\NumericValue $from_value
- * Begins with this number.
- * @type \Google\Analytics\Data\V1alpha\NumericValue $to_value
- * Ends with this number.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Analytics\Data\V1Alpha\Data::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Begins with this number.
- *
- * Generated from protobuf field .google.analytics.data.v1alpha.NumericValue from_value = 1;
- * @return \Google\Analytics\Data\V1alpha\NumericValue|null
- */
- public function getFromValue()
- {
- return isset($this->from_value) ? $this->from_value : null;
- }
-
- public function hasFromValue()
- {
- return isset($this->from_value);
- }
-
- public function clearFromValue()
- {
- unset($this->from_value);
- }
-
- /**
- * Begins with this number.
- *
- * Generated from protobuf field .google.analytics.data.v1alpha.NumericValue from_value = 1;
- * @param \Google\Analytics\Data\V1alpha\NumericValue $var
- * @return $this
- */
- public function setFromValue($var)
- {
- GPBUtil::checkMessage($var, \Google\Analytics\Data\V1alpha\NumericValue::class);
- $this->from_value = $var;
-
- return $this;
- }
-
- /**
- * Ends with this number.
- *
- * Generated from protobuf field .google.analytics.data.v1alpha.NumericValue to_value = 2;
- * @return \Google\Analytics\Data\V1alpha\NumericValue|null
- */
- public function getToValue()
- {
- return isset($this->to_value) ? $this->to_value : null;
- }
-
- public function hasToValue()
- {
- return isset($this->to_value);
- }
-
- public function clearToValue()
- {
- unset($this->to_value);
- }
-
- /**
- * Ends with this number.
- *
- * Generated from protobuf field .google.analytics.data.v1alpha.NumericValue to_value = 2;
- * @param \Google\Analytics\Data\V1alpha\NumericValue $var
- * @return $this
- */
- public function setToValue($var)
- {
- GPBUtil::checkMessage($var, \Google\Analytics\Data\V1alpha\NumericValue::class);
- $this->to_value = $var;
-
- return $this;
- }
-
-}
-
-
diff --git a/AnalyticsData/src/V1alpha/Filter/InListFilter.php b/AnalyticsData/src/V1alpha/Filter/InListFilter.php
deleted file mode 100644
index 7764b280fc62..000000000000
--- a/AnalyticsData/src/V1alpha/Filter/InListFilter.php
+++ /dev/null
@@ -1,106 +0,0 @@
-google.analytics.data.v1alpha.Filter.InListFilter
- */
-class InListFilter extends \Google\Protobuf\Internal\Message
-{
- /**
- * The list of string values.
- * Must be non-empty.
- *
- * Generated from protobuf field repeated string values = 1;
- */
- private $values;
- /**
- * If true, the string value is case sensitive.
- *
- * Generated from protobuf field bool case_sensitive = 2;
- */
- private $case_sensitive = false;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string[]|\Google\Protobuf\Internal\RepeatedField $values
- * The list of string values.
- * Must be non-empty.
- * @type bool $case_sensitive
- * If true, the string value is case sensitive.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Analytics\Data\V1Alpha\Data::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The list of string values.
- * Must be non-empty.
- *
- * Generated from protobuf field repeated string values = 1;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getValues()
- {
- return $this->values;
- }
-
- /**
- * The list of string values.
- * Must be non-empty.
- *
- * Generated from protobuf field repeated string values = 1;
- * @param string[]|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setValues($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
- $this->values = $arr;
-
- return $this;
- }
-
- /**
- * If true, the string value is case sensitive.
- *
- * Generated from protobuf field bool case_sensitive = 2;
- * @return bool
- */
- public function getCaseSensitive()
- {
- return $this->case_sensitive;
- }
-
- /**
- * If true, the string value is case sensitive.
- *
- * Generated from protobuf field bool case_sensitive = 2;
- * @param bool $var
- * @return $this
- */
- public function setCaseSensitive($var)
- {
- GPBUtil::checkBool($var);
- $this->case_sensitive = $var;
-
- return $this;
- }
-
-}
-
-
diff --git a/AnalyticsData/src/V1alpha/Filter/NumericFilter.php b/AnalyticsData/src/V1alpha/Filter/NumericFilter.php
deleted file mode 100644
index 2275b237ff0c..000000000000
--- a/AnalyticsData/src/V1alpha/Filter/NumericFilter.php
+++ /dev/null
@@ -1,112 +0,0 @@
-google.analytics.data.v1alpha.Filter.NumericFilter
- */
-class NumericFilter extends \Google\Protobuf\Internal\Message
-{
- /**
- * The operation type for this filter.
- *
- * Generated from protobuf field .google.analytics.data.v1alpha.Filter.NumericFilter.Operation operation = 1;
- */
- private $operation = 0;
- /**
- * A numeric value or a date value.
- *
- * Generated from protobuf field .google.analytics.data.v1alpha.NumericValue value = 2;
- */
- private $value = null;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type int $operation
- * The operation type for this filter.
- * @type \Google\Analytics\Data\V1alpha\NumericValue $value
- * A numeric value or a date value.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Analytics\Data\V1Alpha\Data::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The operation type for this filter.
- *
- * Generated from protobuf field .google.analytics.data.v1alpha.Filter.NumericFilter.Operation operation = 1;
- * @return int
- */
- public function getOperation()
- {
- return $this->operation;
- }
-
- /**
- * The operation type for this filter.
- *
- * Generated from protobuf field .google.analytics.data.v1alpha.Filter.NumericFilter.Operation operation = 1;
- * @param int $var
- * @return $this
- */
- public function setOperation($var)
- {
- GPBUtil::checkEnum($var, \Google\Analytics\Data\V1alpha\Filter\NumericFilter\Operation::class);
- $this->operation = $var;
-
- return $this;
- }
-
- /**
- * A numeric value or a date value.
- *
- * Generated from protobuf field .google.analytics.data.v1alpha.NumericValue value = 2;
- * @return \Google\Analytics\Data\V1alpha\NumericValue|null
- */
- public function getValue()
- {
- return isset($this->value) ? $this->value : null;
- }
-
- public function hasValue()
- {
- return isset($this->value);
- }
-
- public function clearValue()
- {
- unset($this->value);
- }
-
- /**
- * A numeric value or a date value.
- *
- * Generated from protobuf field .google.analytics.data.v1alpha.NumericValue value = 2;
- * @param \Google\Analytics\Data\V1alpha\NumericValue $var
- * @return $this
- */
- public function setValue($var)
- {
- GPBUtil::checkMessage($var, \Google\Analytics\Data\V1alpha\NumericValue::class);
- $this->value = $var;
-
- return $this;
- }
-
-}
-
-
diff --git a/AnalyticsData/src/V1alpha/Filter/NumericFilter/Operation.php b/AnalyticsData/src/V1alpha/Filter/NumericFilter/Operation.php
deleted file mode 100644
index a6f42e78d534..000000000000
--- a/AnalyticsData/src/V1alpha/Filter/NumericFilter/Operation.php
+++ /dev/null
@@ -1,83 +0,0 @@
-google.analytics.data.v1alpha.Filter.NumericFilter.Operation
- */
-class Operation
-{
- /**
- * Unspecified.
- *
- * Generated from protobuf enum OPERATION_UNSPECIFIED = 0;
- */
- const OPERATION_UNSPECIFIED = 0;
- /**
- * Equal
- *
- * Generated from protobuf enum EQUAL = 1;
- */
- const EQUAL = 1;
- /**
- * Less than
- *
- * Generated from protobuf enum LESS_THAN = 2;
- */
- const LESS_THAN = 2;
- /**
- * Less than or equal
- *
- * Generated from protobuf enum LESS_THAN_OR_EQUAL = 3;
- */
- const LESS_THAN_OR_EQUAL = 3;
- /**
- * Greater than
- *
- * Generated from protobuf enum GREATER_THAN = 4;
- */
- const GREATER_THAN = 4;
- /**
- * Greater than or equal
- *
- * Generated from protobuf enum GREATER_THAN_OR_EQUAL = 5;
- */
- const GREATER_THAN_OR_EQUAL = 5;
-
- private static $valueToName = [
- self::OPERATION_UNSPECIFIED => 'OPERATION_UNSPECIFIED',
- self::EQUAL => 'EQUAL',
- self::LESS_THAN => 'LESS_THAN',
- self::LESS_THAN_OR_EQUAL => 'LESS_THAN_OR_EQUAL',
- self::GREATER_THAN => 'GREATER_THAN',
- self::GREATER_THAN_OR_EQUAL => 'GREATER_THAN_OR_EQUAL',
- ];
-
- 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/V1alpha/Filter/StringFilter.php b/AnalyticsData/src/V1alpha/Filter/StringFilter.php
deleted file mode 100644
index e5aafb7b417e..000000000000
--- a/AnalyticsData/src/V1alpha/Filter/StringFilter.php
+++ /dev/null
@@ -1,136 +0,0 @@
-google.analytics.data.v1alpha.Filter.StringFilter
- */
-class StringFilter extends \Google\Protobuf\Internal\Message
-{
- /**
- * The match type for this filter.
- *
- * Generated from protobuf field .google.analytics.data.v1alpha.Filter.StringFilter.MatchType match_type = 1;
- */
- private $match_type = 0;
- /**
- * The string value used for the matching.
- *
- * Generated from protobuf field string value = 2;
- */
- private $value = '';
- /**
- * If true, the string value is case sensitive.
- *
- * Generated from protobuf field bool case_sensitive = 3;
- */
- private $case_sensitive = false;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type int $match_type
- * The match type for this filter.
- * @type string $value
- * The string value used for the matching.
- * @type bool $case_sensitive
- * If true, the string value is case sensitive.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Analytics\Data\V1Alpha\Data::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The match type for this filter.
- *
- * Generated from protobuf field .google.analytics.data.v1alpha.Filter.StringFilter.MatchType match_type = 1;
- * @return int
- */
- public function getMatchType()
- {
- return $this->match_type;
- }
-
- /**
- * The match type for this filter.
- *
- * Generated from protobuf field .google.analytics.data.v1alpha.Filter.StringFilter.MatchType match_type = 1;
- * @param int $var
- * @return $this
- */
- public function setMatchType($var)
- {
- GPBUtil::checkEnum($var, \Google\Analytics\Data\V1alpha\Filter\StringFilter\MatchType::class);
- $this->match_type = $var;
-
- return $this;
- }
-
- /**
- * The string value used for the matching.
- *
- * Generated from protobuf field string value = 2;
- * @return string
- */
- public function getValue()
- {
- return $this->value;
- }
-
- /**
- * The string value used for the matching.
- *
- * Generated from protobuf field string value = 2;
- * @param string $var
- * @return $this
- */
- public function setValue($var)
- {
- GPBUtil::checkString($var, True);
- $this->value = $var;
-
- return $this;
- }
-
- /**
- * If true, the string value is case sensitive.
- *
- * Generated from protobuf field bool case_sensitive = 3;
- * @return bool
- */
- public function getCaseSensitive()
- {
- return $this->case_sensitive;
- }
-
- /**
- * If true, the string value is case sensitive.
- *
- * Generated from protobuf field bool case_sensitive = 3;
- * @param bool $var
- * @return $this
- */
- public function setCaseSensitive($var)
- {
- GPBUtil::checkBool($var);
- $this->case_sensitive = $var;
-
- return $this;
- }
-
-}
-
-
diff --git a/AnalyticsData/src/V1alpha/Filter/StringFilter/MatchType.php b/AnalyticsData/src/V1alpha/Filter/StringFilter/MatchType.php
deleted file mode 100644
index 3eccc61f0180..000000000000
--- a/AnalyticsData/src/V1alpha/Filter/StringFilter/MatchType.php
+++ /dev/null
@@ -1,90 +0,0 @@
-google.analytics.data.v1alpha.Filter.StringFilter.MatchType
- */
-class MatchType
-{
- /**
- * Unspecified
- *
- * Generated from protobuf enum MATCH_TYPE_UNSPECIFIED = 0;
- */
- const MATCH_TYPE_UNSPECIFIED = 0;
- /**
- * Exact match of the string value.
- *
- * Generated from protobuf enum EXACT = 1;
- */
- const EXACT = 1;
- /**
- * Begins with the string value.
- *
- * Generated from protobuf enum BEGINS_WITH = 2;
- */
- const BEGINS_WITH = 2;
- /**
- * Ends with the string value.
- *
- * Generated from protobuf enum ENDS_WITH = 3;
- */
- const ENDS_WITH = 3;
- /**
- * Contains the string value.
- *
- * Generated from protobuf enum CONTAINS = 4;
- */
- const CONTAINS = 4;
- /**
- * Full regular expression match with the string value.
- *
- * Generated from protobuf enum FULL_REGEXP = 5;
- */
- const FULL_REGEXP = 5;
- /**
- * Partial regular expression match with the string value.
- *
- * Generated from protobuf enum PARTIAL_REGEXP = 6;
- */
- const PARTIAL_REGEXP = 6;
-
- private static $valueToName = [
- self::MATCH_TYPE_UNSPECIFIED => 'MATCH_TYPE_UNSPECIFIED',
- self::EXACT => 'EXACT',
- self::BEGINS_WITH => 'BEGINS_WITH',
- self::ENDS_WITH => 'ENDS_WITH',
- self::CONTAINS => 'CONTAINS',
- self::FULL_REGEXP => 'FULL_REGEXP',
- self::PARTIAL_REGEXP => 'PARTIAL_REGEXP',
- ];
-
- 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/V1alpha/Funnel.php b/AnalyticsData/src/V1alpha/Funnel.php
index 17402fadf862..44df64bb9007 100644
--- a/AnalyticsData/src/V1alpha/Funnel.php
+++ b/AnalyticsData/src/V1alpha/Funnel.php
@@ -28,7 +28,7 @@ class Funnel extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field bool is_open_funnel = 1;
*/
- private $is_open_funnel = false;
+ protected $is_open_funnel = false;
/**
* The sequential steps of this funnel.
*
diff --git a/AnalyticsData/src/V1alpha/FunnelBreakdown.php b/AnalyticsData/src/V1alpha/FunnelBreakdown.php
index 1c6f59b3d8d9..0500c7956bd9 100644
--- a/AnalyticsData/src/V1alpha/FunnelBreakdown.php
+++ b/AnalyticsData/src/V1alpha/FunnelBreakdown.php
@@ -22,7 +22,7 @@ class FunnelBreakdown extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.analytics.data.v1alpha.Dimension breakdown_dimension = 1;
*/
- private $breakdown_dimension = null;
+ protected $breakdown_dimension = null;
/**
* The maximum number of distinct values of the breakdown dimension to return
* in the response. A `limit` of `5` is used if limit is not specified. Limit
@@ -30,7 +30,7 @@ class FunnelBreakdown extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field optional int64 limit = 2;
*/
- private $limit = null;
+ protected $limit = null;
/**
* Constructor.
diff --git a/AnalyticsData/src/V1alpha/FunnelEventFilter.php b/AnalyticsData/src/V1alpha/FunnelEventFilter.php
index 2da5113ec176..bd0a9458b387 100644
--- a/AnalyticsData/src/V1alpha/FunnelEventFilter.php
+++ b/AnalyticsData/src/V1alpha/FunnelEventFilter.php
@@ -24,7 +24,7 @@ class FunnelEventFilter extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field optional string event_name = 1;
*/
- private $event_name = null;
+ protected $event_name = null;
/**
* If specified, this filter matches events that match both the single event
* name and the parameter filter expressions.
@@ -33,7 +33,7 @@ class FunnelEventFilter extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field optional .google.analytics.data.v1alpha.FunnelParameterFilterExpression funnel_parameter_filter_expression = 2;
*/
- private $funnel_parameter_filter_expression = null;
+ protected $funnel_parameter_filter_expression = null;
/**
* Constructor.
diff --git a/AnalyticsData/src/V1alpha/FunnelFieldFilter.php b/AnalyticsData/src/V1alpha/FunnelFieldFilter.php
index db47e537b6b6..2b3cf703f566 100644
--- a/AnalyticsData/src/V1alpha/FunnelFieldFilter.php
+++ b/AnalyticsData/src/V1alpha/FunnelFieldFilter.php
@@ -20,7 +20,7 @@ class FunnelFieldFilter extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string field_name = 1;
*/
- private $field_name = '';
+ protected $field_name = '';
protected $one_filter;
/**
diff --git a/AnalyticsData/src/V1alpha/FunnelNextAction.php b/AnalyticsData/src/V1alpha/FunnelNextAction.php
index 78ec13a65b57..0292b72b3d98 100644
--- a/AnalyticsData/src/V1alpha/FunnelNextAction.php
+++ b/AnalyticsData/src/V1alpha/FunnelNextAction.php
@@ -30,7 +30,7 @@ class FunnelNextAction extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.analytics.data.v1alpha.Dimension next_action_dimension = 1;
*/
- private $next_action_dimension = null;
+ protected $next_action_dimension = null;
/**
* The maximum number of distinct values of the breakdown dimension to return
* in the response. A `limit` of `5` is used if limit is not specified. Limit
@@ -38,7 +38,7 @@ class FunnelNextAction extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field optional int64 limit = 2;
*/
- private $limit = null;
+ protected $limit = null;
/**
* Constructor.
diff --git a/AnalyticsData/src/V1alpha/FunnelStep.php b/AnalyticsData/src/V1alpha/FunnelStep.php
index d68ceceedfe7..bdb78764bf0c 100644
--- a/AnalyticsData/src/V1alpha/FunnelStep.php
+++ b/AnalyticsData/src/V1alpha/FunnelStep.php
@@ -26,7 +26,7 @@ class FunnelStep extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1;
*/
- private $name = '';
+ protected $name = '';
/**
* If true, this step must directly follow the previous step. If false,
* there can be events between the previous step and this step. If
@@ -34,7 +34,7 @@ class FunnelStep extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field bool is_directly_followed_by = 2;
*/
- private $is_directly_followed_by = false;
+ protected $is_directly_followed_by = false;
/**
* If specified, this step must complete within this duration of the
* completion of the prior step. `withinDurationFromPriorStep` is inclusive
@@ -46,14 +46,14 @@ class FunnelStep extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field optional .google.protobuf.Duration within_duration_from_prior_step = 3;
*/
- private $within_duration_from_prior_step = null;
+ protected $within_duration_from_prior_step = null;
/**
* The condition that your users must meet to be included in this step of
* the funnel journey.
*
* Generated from protobuf field .google.analytics.data.v1alpha.FunnelFilterExpression filter_expression = 4;
*/
- private $filter_expression = null;
+ protected $filter_expression = null;
/**
* Constructor.
diff --git a/AnalyticsData/src/V1alpha/FunnelSubReport.php b/AnalyticsData/src/V1alpha/FunnelSubReport.php
index b22feea6bb05..917e57462352 100644
--- a/AnalyticsData/src/V1alpha/FunnelSubReport.php
+++ b/AnalyticsData/src/V1alpha/FunnelSubReport.php
@@ -43,7 +43,7 @@ class FunnelSubReport extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.analytics.data.v1alpha.FunnelResponseMetadata metadata = 4;
*/
- private $metadata = null;
+ protected $metadata = null;
/**
* Constructor.
diff --git a/AnalyticsData/src/V1alpha/Gapic/AlphaAnalyticsDataGapicClient.php b/AnalyticsData/src/V1alpha/Gapic/AlphaAnalyticsDataGapicClient.php
deleted file mode 100644
index 1181886c84ba..000000000000
--- a/AnalyticsData/src/V1alpha/Gapic/AlphaAnalyticsDataGapicClient.php
+++ /dev/null
@@ -1,1729 +0,0 @@
-propertyName('[PROPERTY]');
- * $audienceList = new AudienceList();
- * $operationResponse = $alphaAnalyticsDataClient->createAudienceList($formattedParent, $audienceList);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * $result = $operationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $alphaAnalyticsDataClient->createAudienceList($formattedParent, $audienceList);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $alphaAnalyticsDataClient->resumeOperation($operationName, 'createAudienceList');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * $result = $newOperationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $alphaAnalyticsDataClient->close();
- * }
- * ```
- *
- * Many parameters require resource names to be formatted in a particular way. To
- * assist with these names, this class includes a format method for each type of
- * name, and additionally a parseName method to extract the individual identifiers
- * contained within formatted names that are returned by the API.
- *
- * @experimental
- *
- * @deprecated Please use the new service client {@see \Google\Analytics\Data\V1alpha\Client\AlphaAnalyticsDataClient}.
- */
-class AlphaAnalyticsDataGapicClient
-{
- use GapicClientTrait;
-
- /** The name of the service. */
- const SERVICE_NAME = 'google.analytics.data.v1alpha.AlphaAnalyticsData';
-
- /**
- * The default address of the service.
- *
- * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead.
- */
- const SERVICE_ADDRESS = 'analyticsdata.googleapis.com';
-
- /** The address template of the service. */
- private const SERVICE_ADDRESS_TEMPLATE = 'analyticsdata.UNIVERSE_DOMAIN';
-
- /** The default port of the service. */
- const DEFAULT_SERVICE_PORT = 443;
-
- /** The name of the code generator, to be included in the agent header. */
- const CODEGEN_NAME = 'gapic';
-
- /** The default scopes required by the service. */
- public static $serviceScopes = [
- 'https://www.googleapis.com/auth/analytics',
- 'https://www.googleapis.com/auth/analytics.readonly',
- 'https://www.googleapis.com/auth/drive',
- 'https://www.googleapis.com/auth/drive.file',
- 'https://www.googleapis.com/auth/spreadsheets',
- ];
-
- private static $audienceListNameTemplate;
-
- private static $propertyNameTemplate;
-
- private static $propertyQuotasSnapshotNameTemplate;
-
- private static $recurringAudienceListNameTemplate;
-
- private static $reportTaskNameTemplate;
-
- private static $pathTemplateMap;
-
- private $operationsClient;
-
- private static function getClientDefaults()
- {
- return [
- 'serviceName' => self::SERVICE_NAME,
- 'apiEndpoint' =>
- self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT,
- 'clientConfig' =>
- __DIR__ .
- '/../resources/alpha_analytics_data_client_config.json',
- 'descriptorsConfigPath' =>
- __DIR__ .
- '/../resources/alpha_analytics_data_descriptor_config.php',
- 'gcpApiConfigPath' =>
- __DIR__ . '/../resources/alpha_analytics_data_grpc_config.json',
- 'credentialsConfig' => [
- 'defaultScopes' => self::$serviceScopes,
- ],
- 'transportConfig' => [
- 'rest' => [
- 'restClientConfigPath' =>
- __DIR__ .
- '/../resources/alpha_analytics_data_rest_client_config.php',
- ],
- ],
- ];
- }
-
- private static function getAudienceListNameTemplate()
- {
- if (self::$audienceListNameTemplate == null) {
- self::$audienceListNameTemplate = new PathTemplate(
- 'properties/{property}/audienceLists/{audience_list}'
- );
- }
-
- return self::$audienceListNameTemplate;
- }
-
- private static function getPropertyNameTemplate()
- {
- if (self::$propertyNameTemplate == null) {
- self::$propertyNameTemplate = new PathTemplate(
- 'properties/{property}'
- );
- }
-
- return self::$propertyNameTemplate;
- }
-
- private static function getPropertyQuotasSnapshotNameTemplate()
- {
- if (self::$propertyQuotasSnapshotNameTemplate == null) {
- self::$propertyQuotasSnapshotNameTemplate = new PathTemplate(
- 'properties/{property}/propertyQuotasSnapshot'
- );
- }
-
- return self::$propertyQuotasSnapshotNameTemplate;
- }
-
- private static function getRecurringAudienceListNameTemplate()
- {
- if (self::$recurringAudienceListNameTemplate == null) {
- self::$recurringAudienceListNameTemplate = new PathTemplate(
- 'properties/{property}/recurringAudienceLists/{recurring_audience_list}'
- );
- }
-
- return self::$recurringAudienceListNameTemplate;
- }
-
- private static function getReportTaskNameTemplate()
- {
- if (self::$reportTaskNameTemplate == null) {
- self::$reportTaskNameTemplate = new PathTemplate(
- 'properties/{property}/reportTasks/{report_task}'
- );
- }
-
- return self::$reportTaskNameTemplate;
- }
-
- private static function getPathTemplateMap()
- {
- if (self::$pathTemplateMap == null) {
- self::$pathTemplateMap = [
- 'audienceList' => self::getAudienceListNameTemplate(),
- 'property' => self::getPropertyNameTemplate(),
- 'propertyQuotasSnapshot' => self::getPropertyQuotasSnapshotNameTemplate(),
- 'recurringAudienceList' => self::getRecurringAudienceListNameTemplate(),
- 'reportTask' => self::getReportTaskNameTemplate(),
- ];
- }
-
- return self::$pathTemplateMap;
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a
- * audience_list resource.
- *
- * @param string $property
- * @param string $audienceList
- *
- * @return string The formatted audience_list resource.
- *
- * @experimental
- */
- public static function audienceListName($property, $audienceList)
- {
- return self::getAudienceListNameTemplate()->render([
- 'property' => $property,
- 'audience_list' => $audienceList,
- ]);
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a property
- * resource.
- *
- * @param string $property
- *
- * @return string The formatted property resource.
- *
- * @experimental
- */
- public static function propertyName($property)
- {
- return self::getPropertyNameTemplate()->render([
- 'property' => $property,
- ]);
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a
- * property_quotas_snapshot resource.
- *
- * @param string $property
- *
- * @return string The formatted property_quotas_snapshot resource.
- *
- * @experimental
- */
- public static function propertyQuotasSnapshotName($property)
- {
- return self::getPropertyQuotasSnapshotNameTemplate()->render([
- 'property' => $property,
- ]);
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a
- * recurring_audience_list resource.
- *
- * @param string $property
- * @param string $recurringAudienceList
- *
- * @return string The formatted recurring_audience_list resource.
- *
- * @experimental
- */
- public static function recurringAudienceListName(
- $property,
- $recurringAudienceList
- ) {
- return self::getRecurringAudienceListNameTemplate()->render([
- 'property' => $property,
- 'recurring_audience_list' => $recurringAudienceList,
- ]);
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a report_task
- * resource.
- *
- * @param string $property
- * @param string $reportTask
- *
- * @return string The formatted report_task resource.
- *
- * @experimental
- */
- public static function reportTaskName($property, $reportTask)
- {
- return self::getReportTaskNameTemplate()->render([
- 'property' => $property,
- 'report_task' => $reportTask,
- ]);
- }
-
- /**
- * Parses a formatted name string and returns an associative array of the components in the name.
- * The following name formats are supported:
- * Template: Pattern
- * - audienceList: properties/{property}/audienceLists/{audience_list}
- * - property: properties/{property}
- * - propertyQuotasSnapshot: properties/{property}/propertyQuotasSnapshot
- * - recurringAudienceList: properties/{property}/recurringAudienceLists/{recurring_audience_list}
- * - reportTask: properties/{property}/reportTasks/{report_task}
- *
- * The optional $template argument can be supplied to specify a particular pattern,
- * and must match one of the templates listed above. If no $template argument is
- * provided, or if the $template argument does not match one of the templates
- * listed, then parseName will check each of the supported templates, and return
- * the first match.
- *
- * @param string $formattedName The formatted name string
- * @param string $template Optional name of template to match
- *
- * @return array An associative array from name component IDs to component values.
- *
- * @throws ValidationException If $formattedName could not be matched.
- *
- * @experimental
- */
- public static function parseName($formattedName, $template = null)
- {
- $templateMap = self::getPathTemplateMap();
- if ($template) {
- if (!isset($templateMap[$template])) {
- throw new ValidationException(
- "Template name $template does not exist"
- );
- }
-
- return $templateMap[$template]->match($formattedName);
- }
-
- foreach ($templateMap as $templateName => $pathTemplate) {
- try {
- return $pathTemplate->match($formattedName);
- } catch (ValidationException $ex) {
- // Swallow the exception to continue trying other path templates
- }
- }
-
- throw new ValidationException(
- "Input did not match any known format. Input: $formattedName"
- );
- }
-
- /**
- * Return an OperationsClient object with the same endpoint as $this.
- *
- * @return OperationsClient
- *
- * @experimental
- */
- public function getOperationsClient()
- {
- return $this->operationsClient;
- }
-
- /**
- * Resume an existing long running operation that was previously started by a long
- * running API method. If $methodName is not provided, or does not match a long
- * running API method, then the operation can still be resumed, but the
- * OperationResponse object will not deserialize the final response.
- *
- * @param string $operationName The name of the long running operation
- * @param string $methodName The name of the method used to start the operation
- *
- * @return OperationResponse
- *
- * @experimental
- */
- public function resumeOperation($operationName, $methodName = null)
- {
- $options = isset($this->descriptors[$methodName]['longRunning'])
- ? $this->descriptors[$methodName]['longRunning']
- : [];
- $operation = new OperationResponse(
- $operationName,
- $this->getOperationsClient(),
- $options
- );
- $operation->reload();
- return $operation;
- }
-
- /**
- * Constructor.
- *
- * @param array $options {
- * Optional. Options for configuring the service API wrapper.
- *
- * @type string $apiEndpoint
- * The address of the API remote host. May optionally include the port, formatted
- * as ":". Default 'analyticsdata.googleapis.com:443'.
- * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials
- * The credentials to be used by the client to authorize API calls. This option
- * accepts either a path to a credentials file, or a decoded credentials file as a
- * PHP array.
- * *Advanced usage*: In addition, this option can also accept a pre-constructed
- * {@see \Google\Auth\FetchAuthTokenInterface} object or
- * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these
- * objects are provided, any settings in $credentialsConfig will be ignored.
- * @type array $credentialsConfig
- * Options used to configure credentials, including auth token caching, for the
- * client. For a full list of supporting configuration options, see
- * {@see \Google\ApiCore\CredentialsWrapper::build()} .
- * @type bool $disableRetries
- * Determines whether or not retries defined by the client configuration should be
- * disabled. Defaults to `false`.
- * @type string|array $clientConfig
- * Client method configuration, including retry settings. This option can be either
- * a path to a JSON file, or a PHP array containing the decoded JSON data. By
- * default this settings points to the default client config file, which is
- * provided in the resources folder.
- * @type string|TransportInterface $transport
- * The transport used for executing network requests. May be either the string
- * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system.
- * *Advanced usage*: Additionally, it is possible to pass in an already
- * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note
- * that when this object is provided, any settings in $transportConfig, and any
- * $apiEndpoint setting, will be ignored.
- * @type array $transportConfig
- * Configuration options that will be used to construct the transport. Options for
- * each supported transport type should be passed in a key for that transport. For
- * example:
- * $transportConfig = [
- * 'grpc' => [...],
- * 'rest' => [...],
- * ];
- * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and
- * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the
- * supported options.
- * @type callable $clientCertSource
- * A callable which returns the client cert as a string. This can be used to
- * provide a certificate and private key to the transport layer for mTLS.
- * }
- *
- * @throws ValidationException
- *
- * @experimental
- */
- public function __construct(array $options = [])
- {
- $clientOptions = $this->buildClientOptions($options);
- $this->setClientOptions($clientOptions);
- $this->operationsClient = $this->createOperationsClient($clientOptions);
- }
-
- /**
- * Creates an audience list for later retrieval. This method quickly returns
- * the audience list's resource name and initiates a long running asynchronous
- * request to form an audience list. To list the users in an audience list,
- * first create the audience list through this method and then send the
- * audience resource name to the `QueryAudienceList` method.
- *
- * See [Creating an Audience
- * List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics)
- * for an introduction to Audience Lists with examples.
- *
- * An audience list is a snapshot of the users currently in the audience at
- * the time of audience list creation. Creating audience lists for one
- * audience on different days will return different results as users enter and
- * exit the audience.
- *
- * Audiences in Google Analytics 4 allow you to segment your users in the ways
- * that are important to your business. To learn more, see
- * https://support.google.com/analytics/answer/9267572. Audience lists contain
- * the users in each audience.
- *
- * This method is available at beta stability at
- * [audienceExports.create](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/create).
- * To give your feedback on this API, complete the [Google Analytics Audience
- * Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.
- *
- * Sample code:
- * ```
- * $alphaAnalyticsDataClient = new AlphaAnalyticsDataClient();
- * try {
- * $formattedParent = $alphaAnalyticsDataClient->propertyName('[PROPERTY]');
- * $audienceList = new AudienceList();
- * $operationResponse = $alphaAnalyticsDataClient->createAudienceList($formattedParent, $audienceList);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * $result = $operationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $alphaAnalyticsDataClient->createAudienceList($formattedParent, $audienceList);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $alphaAnalyticsDataClient->resumeOperation($operationName, 'createAudienceList');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * $result = $newOperationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $alphaAnalyticsDataClient->close();
- * }
- * ```
- *
- * @param string $parent Required. The parent resource where this audience list will be created.
- * Format: `properties/{property}`
- * @param AudienceList $audienceList Required. The audience list to create.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\ApiCore\OperationResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function createAudienceList(
- $parent,
- $audienceList,
- array $optionalArgs = []
- ) {
- $request = new CreateAudienceListRequest();
- $requestParamHeaders = [];
- $request->setParent($parent);
- $request->setAudienceList($audienceList);
- $requestParamHeaders['parent'] = $parent;
- $requestParams = new RequestParamsHeaderDescriptor(
- $requestParamHeaders
- );
- $optionalArgs['headers'] = isset($optionalArgs['headers'])
- ? array_merge($requestParams->getHeader(), $optionalArgs['headers'])
- : $requestParams->getHeader();
- return $this->startOperationsCall(
- 'CreateAudienceList',
- $optionalArgs,
- $request,
- $this->getOperationsClient()
- )->wait();
- }
-
- /**
- * Creates a recurring audience list. Recurring audience lists produces new
- * audience lists each day. Audience lists are users in an audience at the
- * time of the list's creation.
- *
- * A recurring audience list ensures that you have audience list based on the
- * most recent data available for use each day. If you manually create
- * audience list, you don't know when an audience list based on an additional
- * day's data is available. This recurring audience list automates the
- * creation of an audience list when an additional day's data is available.
- * You will consume fewer quota tokens by using recurring audience list versus
- * manually creating audience list at various times of day trying to guess
- * when an additional day's data is ready.
- *
- * This method is introduced at alpha stability with the intention of
- * gathering feedback on syntax and capabilities before entering beta. To give
- * your feedback on this API, complete the
- * [Google Analytics Audience Export API
- * Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.
- *
- * Sample code:
- * ```
- * $alphaAnalyticsDataClient = new AlphaAnalyticsDataClient();
- * try {
- * $formattedParent = $alphaAnalyticsDataClient->propertyName('[PROPERTY]');
- * $recurringAudienceList = new RecurringAudienceList();
- * $response = $alphaAnalyticsDataClient->createRecurringAudienceList($formattedParent, $recurringAudienceList);
- * } finally {
- * $alphaAnalyticsDataClient->close();
- * }
- * ```
- *
- * @param string $parent Required. The parent resource where this recurring audience list will be
- * created. Format: `properties/{property}`
- * @param RecurringAudienceList $recurringAudienceList Required. The recurring audience list to create.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\Analytics\Data\V1alpha\RecurringAudienceList
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function createRecurringAudienceList(
- $parent,
- $recurringAudienceList,
- array $optionalArgs = []
- ) {
- $request = new CreateRecurringAudienceListRequest();
- $requestParamHeaders = [];
- $request->setParent($parent);
- $request->setRecurringAudienceList($recurringAudienceList);
- $requestParamHeaders['parent'] = $parent;
- $requestParams = new RequestParamsHeaderDescriptor(
- $requestParamHeaders
- );
- $optionalArgs['headers'] = isset($optionalArgs['headers'])
- ? array_merge($requestParams->getHeader(), $optionalArgs['headers'])
- : $requestParams->getHeader();
- return $this->startCall(
- 'CreateRecurringAudienceList',
- RecurringAudienceList::class,
- $optionalArgs,
- $request
- )->wait();
- }
-
- /**
- * Initiates the creation of a report task. This method quickly
- * returns a report task and initiates a long running
- * asynchronous request to form a customized report of your Google Analytics
- * event data.
- *
- * A report task will be retained and available for querying for 72 hours
- * after it has been created.
- *
- * A report task created by one user can be listed and queried by all users
- * who have access to the property.
- *
- * Sample code:
- * ```
- * $alphaAnalyticsDataClient = new AlphaAnalyticsDataClient();
- * try {
- * $formattedParent = $alphaAnalyticsDataClient->propertyName('[PROPERTY]');
- * $reportTask = new ReportTask();
- * $operationResponse = $alphaAnalyticsDataClient->createReportTask($formattedParent, $reportTask);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * $result = $operationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $alphaAnalyticsDataClient->createReportTask($formattedParent, $reportTask);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $alphaAnalyticsDataClient->resumeOperation($operationName, 'createReportTask');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * $result = $newOperationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $alphaAnalyticsDataClient->close();
- * }
- * ```
- *
- * @param string $parent Required. The parent resource where this report task will be created.
- * Format: `properties/{propertyId}`
- * @param ReportTask $reportTask Required. The report task configuration to create.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\ApiCore\OperationResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function createReportTask(
- $parent,
- $reportTask,
- array $optionalArgs = []
- ) {
- $request = new CreateReportTaskRequest();
- $requestParamHeaders = [];
- $request->setParent($parent);
- $request->setReportTask($reportTask);
- $requestParamHeaders['parent'] = $parent;
- $requestParams = new RequestParamsHeaderDescriptor(
- $requestParamHeaders
- );
- $optionalArgs['headers'] = isset($optionalArgs['headers'])
- ? array_merge($requestParams->getHeader(), $optionalArgs['headers'])
- : $requestParams->getHeader();
- return $this->startOperationsCall(
- 'CreateReportTask',
- $optionalArgs,
- $request,
- $this->getOperationsClient()
- )->wait();
- }
-
- /**
- * Gets configuration metadata about a specific audience list. This method
- * can be used to understand an audience list after it has been created.
- *
- * See [Creating an Audience
- * List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics)
- * for an introduction to Audience Lists with examples.
- *
- * This method is available at beta stability at
- * [audienceExports.get](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/get).
- * To give your feedback on this API, complete the
- * [Google Analytics Audience Export API
- * Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.
- *
- * Sample code:
- * ```
- * $alphaAnalyticsDataClient = new AlphaAnalyticsDataClient();
- * try {
- * $formattedName = $alphaAnalyticsDataClient->audienceListName('[PROPERTY]', '[AUDIENCE_LIST]');
- * $response = $alphaAnalyticsDataClient->getAudienceList($formattedName);
- * } finally {
- * $alphaAnalyticsDataClient->close();
- * }
- * ```
- *
- * @param string $name Required. The audience list resource name.
- * Format: `properties/{property}/audienceLists/{audience_list}`
- * @param array $optionalArgs {
- * Optional.
- *
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\Analytics\Data\V1alpha\AudienceList
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function getAudienceList($name, array $optionalArgs = [])
- {
- $request = new GetAudienceListRequest();
- $requestParamHeaders = [];
- $request->setName($name);
- $requestParamHeaders['name'] = $name;
- $requestParams = new RequestParamsHeaderDescriptor(
- $requestParamHeaders
- );
- $optionalArgs['headers'] = isset($optionalArgs['headers'])
- ? array_merge($requestParams->getHeader(), $optionalArgs['headers'])
- : $requestParams->getHeader();
- return $this->startCall(
- 'GetAudienceList',
- AudienceList::class,
- $optionalArgs,
- $request
- )->wait();
- }
-
- /**
- * Get all property quotas organized by quota category for a given property.
- * This will charge 1 property quota from the category with the most quota.
- *
- * Sample code:
- * ```
- * $alphaAnalyticsDataClient = new AlphaAnalyticsDataClient();
- * try {
- * $formattedName = $alphaAnalyticsDataClient->propertyQuotasSnapshotName('[PROPERTY]');
- * $response = $alphaAnalyticsDataClient->getPropertyQuotasSnapshot($formattedName);
- * } finally {
- * $alphaAnalyticsDataClient->close();
- * }
- * ```
- *
- * @param string $name Required. Quotas from this property will be listed in the response.
- * Format: `properties/{property}/propertyQuotasSnapshot`
- * @param array $optionalArgs {
- * Optional.
- *
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\Analytics\Data\V1alpha\PropertyQuotasSnapshot
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function getPropertyQuotasSnapshot($name, array $optionalArgs = [])
- {
- $request = new GetPropertyQuotasSnapshotRequest();
- $requestParamHeaders = [];
- $request->setName($name);
- $requestParamHeaders['name'] = $name;
- $requestParams = new RequestParamsHeaderDescriptor(
- $requestParamHeaders
- );
- $optionalArgs['headers'] = isset($optionalArgs['headers'])
- ? array_merge($requestParams->getHeader(), $optionalArgs['headers'])
- : $requestParams->getHeader();
- return $this->startCall(
- 'GetPropertyQuotasSnapshot',
- PropertyQuotasSnapshot::class,
- $optionalArgs,
- $request
- )->wait();
- }
-
- /**
- * Gets configuration metadata about a specific recurring audience list. This
- * method can be used to understand a recurring audience list's state after it
- * has been created. For example, a recurring audience list resource will
- * generate audience list instances for each day, and this method can be used
- * to get the resource name of the most recent audience list instance.
- *
- * This method is introduced at alpha stability with the intention of
- * gathering feedback on syntax and capabilities before entering beta. To give
- * your feedback on this API, complete the
- * [Google Analytics Audience Export API
- * Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.
- *
- * Sample code:
- * ```
- * $alphaAnalyticsDataClient = new AlphaAnalyticsDataClient();
- * try {
- * $formattedName = $alphaAnalyticsDataClient->recurringAudienceListName('[PROPERTY]', '[RECURRING_AUDIENCE_LIST]');
- * $response = $alphaAnalyticsDataClient->getRecurringAudienceList($formattedName);
- * } finally {
- * $alphaAnalyticsDataClient->close();
- * }
- * ```
- *
- * @param string $name Required. The recurring audience list resource name.
- * Format:
- * `properties/{property}/recurringAudienceLists/{recurring_audience_list}`
- * @param array $optionalArgs {
- * Optional.
- *
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\Analytics\Data\V1alpha\RecurringAudienceList
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function getRecurringAudienceList($name, array $optionalArgs = [])
- {
- $request = new GetRecurringAudienceListRequest();
- $requestParamHeaders = [];
- $request->setName($name);
- $requestParamHeaders['name'] = $name;
- $requestParams = new RequestParamsHeaderDescriptor(
- $requestParamHeaders
- );
- $optionalArgs['headers'] = isset($optionalArgs['headers'])
- ? array_merge($requestParams->getHeader(), $optionalArgs['headers'])
- : $requestParams->getHeader();
- return $this->startCall(
- 'GetRecurringAudienceList',
- RecurringAudienceList::class,
- $optionalArgs,
- $request
- )->wait();
- }
-
- /**
- * Gets report metadata about a specific report task. After creating a report
- * task, use this method to check its processing state or inspect its
- * report definition.
- *
- * Sample code:
- * ```
- * $alphaAnalyticsDataClient = new AlphaAnalyticsDataClient();
- * try {
- * $formattedName = $alphaAnalyticsDataClient->reportTaskName('[PROPERTY]', '[REPORT_TASK]');
- * $response = $alphaAnalyticsDataClient->getReportTask($formattedName);
- * } finally {
- * $alphaAnalyticsDataClient->close();
- * }
- * ```
- *
- * @param string $name Required. The report task resource name.
- * Format: `properties/{property}/reportTasks/{report_task}`
- * @param array $optionalArgs {
- * Optional.
- *
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\Analytics\Data\V1alpha\ReportTask
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function getReportTask($name, array $optionalArgs = [])
- {
- $request = new GetReportTaskRequest();
- $requestParamHeaders = [];
- $request->setName($name);
- $requestParamHeaders['name'] = $name;
- $requestParams = new RequestParamsHeaderDescriptor(
- $requestParamHeaders
- );
- $optionalArgs['headers'] = isset($optionalArgs['headers'])
- ? array_merge($requestParams->getHeader(), $optionalArgs['headers'])
- : $requestParams->getHeader();
- return $this->startCall(
- 'GetReportTask',
- ReportTask::class,
- $optionalArgs,
- $request
- )->wait();
- }
-
- /**
- * Lists all audience lists for a property. This method can be used for you to
- * find and reuse existing audience lists rather than creating unnecessary new
- * audience lists. The same audience can have multiple audience lists that
- * represent the list of users that were in an audience on different days.
- *
- * See [Creating an Audience
- * List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics)
- * for an introduction to Audience Lists with examples.
- *
- * This method is available at beta stability at
- * [audienceExports.list](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/list).
- * To give your feedback on this API, complete the
- * [Google Analytics Audience Export API
- * Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.
- *
- * Sample code:
- * ```
- * $alphaAnalyticsDataClient = new AlphaAnalyticsDataClient();
- * try {
- * $formattedParent = $alphaAnalyticsDataClient->propertyName('[PROPERTY]');
- * // Iterate over pages of elements
- * $pagedResponse = $alphaAnalyticsDataClient->listAudienceLists($formattedParent);
- * foreach ($pagedResponse->iteratePages() as $page) {
- * foreach ($page as $element) {
- * // doSomethingWith($element);
- * }
- * }
- * // Alternatively:
- * // Iterate through all elements
- * $pagedResponse = $alphaAnalyticsDataClient->listAudienceLists($formattedParent);
- * foreach ($pagedResponse->iterateAllElements() as $element) {
- * // doSomethingWith($element);
- * }
- * } finally {
- * $alphaAnalyticsDataClient->close();
- * }
- * ```
- *
- * @param string $parent Required. All audience lists for this property will be listed in the
- * response. Format: `properties/{property}`
- * @param array $optionalArgs {
- * Optional.
- *
- * @type int $pageSize
- * The maximum number of resources contained in the underlying API
- * response. The API may return fewer values in a page, even if
- * there are additional values to be retrieved.
- * @type string $pageToken
- * A page token is used to specify a page of values to be returned.
- * If no page token is specified (the default), the first page
- * of values will be returned. Any page token used here must have
- * been generated by a previous call to the API.
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\ApiCore\PagedListResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function listAudienceLists($parent, array $optionalArgs = [])
- {
- $request = new ListAudienceListsRequest();
- $requestParamHeaders = [];
- $request->setParent($parent);
- $requestParamHeaders['parent'] = $parent;
- if (isset($optionalArgs['pageSize'])) {
- $request->setPageSize($optionalArgs['pageSize']);
- }
-
- if (isset($optionalArgs['pageToken'])) {
- $request->setPageToken($optionalArgs['pageToken']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor(
- $requestParamHeaders
- );
- $optionalArgs['headers'] = isset($optionalArgs['headers'])
- ? array_merge($requestParams->getHeader(), $optionalArgs['headers'])
- : $requestParams->getHeader();
- return $this->getPagedListResponse(
- 'ListAudienceLists',
- $optionalArgs,
- ListAudienceListsResponse::class,
- $request
- );
- }
-
- /**
- * Lists all recurring audience lists for a property. This method can be used
- * for you to find and reuse existing recurring audience lists rather than
- * creating unnecessary new recurring audience lists. The same audience can
- * have multiple recurring audience lists that represent different dimension
- * combinations; for example, just the dimension `deviceId` or both the
- * dimensions `deviceId` and `userId`.
- *
- * This method is introduced at alpha stability with the intention of
- * gathering feedback on syntax and capabilities before entering beta. To give
- * your feedback on this API, complete the
- * [Google Analytics Audience Export API
- * Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.
- *
- * Sample code:
- * ```
- * $alphaAnalyticsDataClient = new AlphaAnalyticsDataClient();
- * try {
- * $formattedParent = $alphaAnalyticsDataClient->propertyName('[PROPERTY]');
- * // Iterate over pages of elements
- * $pagedResponse = $alphaAnalyticsDataClient->listRecurringAudienceLists($formattedParent);
- * foreach ($pagedResponse->iteratePages() as $page) {
- * foreach ($page as $element) {
- * // doSomethingWith($element);
- * }
- * }
- * // Alternatively:
- * // Iterate through all elements
- * $pagedResponse = $alphaAnalyticsDataClient->listRecurringAudienceLists($formattedParent);
- * foreach ($pagedResponse->iterateAllElements() as $element) {
- * // doSomethingWith($element);
- * }
- * } finally {
- * $alphaAnalyticsDataClient->close();
- * }
- * ```
- *
- * @param string $parent Required. All recurring audience lists for this property will be listed in
- * the response. Format: `properties/{property}`
- * @param array $optionalArgs {
- * Optional.
- *
- * @type int $pageSize
- * The maximum number of resources contained in the underlying API
- * response. The API may return fewer values in a page, even if
- * there are additional values to be retrieved.
- * @type string $pageToken
- * A page token is used to specify a page of values to be returned.
- * If no page token is specified (the default), the first page
- * of values will be returned. Any page token used here must have
- * been generated by a previous call to the API.
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\ApiCore\PagedListResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function listRecurringAudienceLists(
- $parent,
- array $optionalArgs = []
- ) {
- $request = new ListRecurringAudienceListsRequest();
- $requestParamHeaders = [];
- $request->setParent($parent);
- $requestParamHeaders['parent'] = $parent;
- if (isset($optionalArgs['pageSize'])) {
- $request->setPageSize($optionalArgs['pageSize']);
- }
-
- if (isset($optionalArgs['pageToken'])) {
- $request->setPageToken($optionalArgs['pageToken']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor(
- $requestParamHeaders
- );
- $optionalArgs['headers'] = isset($optionalArgs['headers'])
- ? array_merge($requestParams->getHeader(), $optionalArgs['headers'])
- : $requestParams->getHeader();
- return $this->getPagedListResponse(
- 'ListRecurringAudienceLists',
- $optionalArgs,
- ListRecurringAudienceListsResponse::class,
- $request
- );
- }
-
- /**
- * Lists all report tasks for a property.
- *
- * Sample code:
- * ```
- * $alphaAnalyticsDataClient = new AlphaAnalyticsDataClient();
- * try {
- * $formattedParent = $alphaAnalyticsDataClient->propertyName('[PROPERTY]');
- * // Iterate over pages of elements
- * $pagedResponse = $alphaAnalyticsDataClient->listReportTasks($formattedParent);
- * foreach ($pagedResponse->iteratePages() as $page) {
- * foreach ($page as $element) {
- * // doSomethingWith($element);
- * }
- * }
- * // Alternatively:
- * // Iterate through all elements
- * $pagedResponse = $alphaAnalyticsDataClient->listReportTasks($formattedParent);
- * foreach ($pagedResponse->iterateAllElements() as $element) {
- * // doSomethingWith($element);
- * }
- * } finally {
- * $alphaAnalyticsDataClient->close();
- * }
- * ```
- *
- * @param string $parent Required. All report tasks for this property will be listed in the
- * response. Format: `properties/{property}`
- * @param array $optionalArgs {
- * Optional.
- *
- * @type int $pageSize
- * The maximum number of resources contained in the underlying API
- * response. The API may return fewer values in a page, even if
- * there are additional values to be retrieved.
- * @type string $pageToken
- * A page token is used to specify a page of values to be returned.
- * If no page token is specified (the default), the first page
- * of values will be returned. Any page token used here must have
- * been generated by a previous call to the API.
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\ApiCore\PagedListResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function listReportTasks($parent, array $optionalArgs = [])
- {
- $request = new ListReportTasksRequest();
- $requestParamHeaders = [];
- $request->setParent($parent);
- $requestParamHeaders['parent'] = $parent;
- if (isset($optionalArgs['pageSize'])) {
- $request->setPageSize($optionalArgs['pageSize']);
- }
-
- if (isset($optionalArgs['pageToken'])) {
- $request->setPageToken($optionalArgs['pageToken']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor(
- $requestParamHeaders
- );
- $optionalArgs['headers'] = isset($optionalArgs['headers'])
- ? array_merge($requestParams->getHeader(), $optionalArgs['headers'])
- : $requestParams->getHeader();
- return $this->getPagedListResponse(
- 'ListReportTasks',
- $optionalArgs,
- ListReportTasksResponse::class,
- $request
- );
- }
-
- /**
- * Retrieves an audience list of users. After creating an audience, the users
- * are not immediately available for listing. First, a request to
- * `CreateAudienceList` is necessary to create an audience list of users, and
- * then second, this method is used to retrieve the users in the audience
- * list.
- *
- * See [Creating an Audience
- * List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics)
- * for an introduction to Audience Lists with examples.
- *
- * Audiences in Google Analytics 4 allow you to segment your users in the ways
- * that are important to your business. To learn more, see
- * https://support.google.com/analytics/answer/9267572.
- *
- * This method is available at beta stability at
- * [audienceExports.query](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/query).
- * To give your feedback on this API, complete the [Google Analytics Audience
- * Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.
- *
- * Sample code:
- * ```
- * $alphaAnalyticsDataClient = new AlphaAnalyticsDataClient();
- * try {
- * $name = 'name';
- * $response = $alphaAnalyticsDataClient->queryAudienceList($name);
- * } finally {
- * $alphaAnalyticsDataClient->close();
- * }
- * ```
- *
- * @param string $name Required. The name of the audience list to retrieve users from.
- * Format: `properties/{property}/audienceLists/{audience_list}`
- * @param array $optionalArgs {
- * Optional.
- *
- * @type int $offset
- * Optional. The row count of the start row. The first row is counted as row
- * 0.
- *
- * When paging, the first request does not specify offset; or equivalently,
- * sets offset to 0; the first request returns the first `limit` of rows. The
- * second request sets offset to the `limit` of the first request; the second
- * request returns the second `limit` of rows.
- *
- * To learn more about this pagination parameter, see
- * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
- * @type int $limit
- * Optional. The number of rows to return. If unspecified, 10,000 rows are
- * returned. The API returns a maximum of 250,000 rows per request, no matter
- * how many you ask for. `limit` must be positive.
- *
- * The API can also return fewer rows than the requested `limit`, if there
- * aren't as many dimension values as the `limit`.
- *
- * To learn more about this pagination parameter, see
- * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\Analytics\Data\V1alpha\QueryAudienceListResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function queryAudienceList($name, array $optionalArgs = [])
- {
- $request = new QueryAudienceListRequest();
- $requestParamHeaders = [];
- $request->setName($name);
- $requestParamHeaders['name'] = $name;
- if (isset($optionalArgs['offset'])) {
- $request->setOffset($optionalArgs['offset']);
- }
-
- if (isset($optionalArgs['limit'])) {
- $request->setLimit($optionalArgs['limit']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor(
- $requestParamHeaders
- );
- $optionalArgs['headers'] = isset($optionalArgs['headers'])
- ? array_merge($requestParams->getHeader(), $optionalArgs['headers'])
- : $requestParams->getHeader();
- return $this->startCall(
- 'QueryAudienceList',
- QueryAudienceListResponse::class,
- $optionalArgs,
- $request
- )->wait();
- }
-
- /**
- * Retrieves a report task's content. After requesting the `CreateReportTask`,
- * you are able to retrieve the report content once the report is
- * ACTIVE. This method will return an error if the report task's state is not
- * `ACTIVE`. A query response will return the tabular row & column values of
- * the report.
- *
- * Sample code:
- * ```
- * $alphaAnalyticsDataClient = new AlphaAnalyticsDataClient();
- * try {
- * $name = 'name';
- * $response = $alphaAnalyticsDataClient->queryReportTask($name);
- * } finally {
- * $alphaAnalyticsDataClient->close();
- * }
- * ```
- *
- * @param string $name Required. The report source name.
- * Format: `properties/{property}/reportTasks/{report}`
- * @param array $optionalArgs {
- * Optional.
- *
- * @type int $offset
- * Optional. The row count of the start row in the report. The first row is
- * counted as row 0.
- *
- * When paging, the first request does not specify offset; or equivalently,
- * sets offset to 0; the first request returns the first `limit` of rows. The
- * second request sets offset to the `limit` of the first request; the second
- * request returns the second `limit` of rows.
- *
- * To learn more about this pagination parameter, see
- * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
- * @type int $limit
- * Optional. The number of rows to return from the report. If unspecified,
- * 10,000 rows are returned. The API returns a maximum of 250,000 rows per
- * request, no matter how many you ask for. `limit` must be positive.
- *
- * The API can also return fewer rows than the requested `limit`, if there
- * aren't as many dimension values as the `limit`. The number of rows
- * available to a QueryReportTaskRequest is further limited by the limit of
- * the associated ReportTask. A query can retrieve at most ReportTask.limit
- * rows. For example, if the ReportTask has a limit of 1,000, then a
- * QueryReportTask request with offset=900 and limit=500 will return at most
- * 100 rows.
- *
- * To learn more about this pagination parameter, see
- * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\Analytics\Data\V1alpha\QueryReportTaskResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function queryReportTask($name, array $optionalArgs = [])
- {
- $request = new QueryReportTaskRequest();
- $requestParamHeaders = [];
- $request->setName($name);
- $requestParamHeaders['name'] = $name;
- if (isset($optionalArgs['offset'])) {
- $request->setOffset($optionalArgs['offset']);
- }
-
- if (isset($optionalArgs['limit'])) {
- $request->setLimit($optionalArgs['limit']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor(
- $requestParamHeaders
- );
- $optionalArgs['headers'] = isset($optionalArgs['headers'])
- ? array_merge($requestParams->getHeader(), $optionalArgs['headers'])
- : $requestParams->getHeader();
- return $this->startCall(
- 'QueryReportTask',
- QueryReportTaskResponse::class,
- $optionalArgs,
- $request
- )->wait();
- }
-
- /**
- * Returns a customized funnel report of your Google Analytics event data. The
- * data returned from the API is as a table with columns for the requested
- * dimensions and metrics.
- *
- * Funnel exploration lets you visualize the steps your users take to complete
- * a task and quickly see how well they are succeeding or failing at each
- * step. For example, how do prospects become shoppers and then become buyers?
- * How do one time buyers become repeat buyers? With this information, you can
- * improve inefficient or abandoned customer journeys. To learn more, see [GA4
- * Funnel Explorations](https://support.google.com/analytics/answer/9327974).
- *
- * This method is introduced at alpha stability with the intention of
- * gathering feedback on syntax and capabilities before entering beta. To give
- * your feedback on this API, complete the [Google Analytics Data API Funnel
- * Reporting
- * Feedback](https://docs.google.com/forms/d/e/1FAIpQLSdwOlQDJAUoBiIgUZZ3S_Lwi8gr7Bb0k1jhvc-DEg7Rol3UjA/viewform).
- *
- * Sample code:
- * ```
- * $alphaAnalyticsDataClient = new AlphaAnalyticsDataClient();
- * try {
- * $response = $alphaAnalyticsDataClient->runFunnelReport();
- * } finally {
- * $alphaAnalyticsDataClient->close();
- * }
- * ```
- *
- * @param array $optionalArgs {
- * Optional.
- *
- * @type string $property
- * Optional. A Google Analytics property identifier whose events are tracked.
- * Specified in the URL path and not the body. To learn more, see [where to
- * find your Property
- * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
- * Within a batch request, this property should either be unspecified or
- * consistent with the batch-level property.
- *
- * Example: properties/1234
- * @type DateRange[] $dateRanges
- * Optional. Date ranges of data to read. If multiple date ranges are
- * requested, each response row will contain a zero based date range index. If
- * two date ranges overlap, the event data for the overlapping days is
- * included in the response rows for both date ranges.
- * @type Funnel $funnel
- * Optional. The configuration of this request's funnel. This funnel
- * configuration is required.
- * @type FunnelBreakdown $funnelBreakdown
- * Optional. If specified, this breakdown adds a dimension to the funnel table
- * sub report response. This breakdown dimension expands each funnel step to
- * the unique values of the breakdown dimension. For example, a breakdown by
- * the `deviceCategory` dimension will create rows for `mobile`, `tablet`,
- * `desktop`, and the total.
- * @type FunnelNextAction $funnelNextAction
- * Optional. If specified, next action adds a dimension to the funnel
- * visualization sub report response. This next action dimension expands each
- * funnel step to the unique values of the next action. For example a next
- * action of the `eventName` dimension will create rows for several events
- * (for example `session_start` & `click`) and the total.
- *
- * Next action only supports `eventName` and most Page / Screen dimensions
- * like `pageTitle` and `pagePath`.
- * @type int $funnelVisualizationType
- * Optional. The funnel visualization type controls the dimensions present in
- * the funnel visualization sub report response. If not specified,
- * `STANDARD_FUNNEL` is used.
- * For allowed values, use constants defined on {@see \Google\Analytics\Data\V1alpha\RunFunnelReportRequest\FunnelVisualizationType}
- * @type Segment[] $segments
- * Optional. The configurations of segments. Segments are subsets of a
- * property's data. In a funnel report with segments, the funnel is evaluated
- * in each segment.
- *
- * Each segment specified in this request
- * produces a separate row in the response; in the response, each segment
- * identified by its name.
- *
- * The segments parameter is optional. Requests are limited to 4 segments.
- * @type int $limit
- * Optional. The number of rows to return. If unspecified, 10,000 rows are
- * returned. The API returns a maximum of 250,000 rows per request, no matter
- * how many you ask for. `limit` must be positive.
- *
- * The API can also return fewer rows than the requested `limit`, if there
- * aren't as many dimension values as the `limit`.
- * @type FilterExpression $dimensionFilter
- * Optional. Dimension filters allow you to ask for only specific dimension
- * values in the report. To learn more, see [Creating a Report: Dimension
- * Filters](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters)
- * for examples. Metrics cannot be used in this filter.
- * @type bool $returnPropertyQuota
- * Optional. Toggles whether to return the current state of this Analytics
- * Property's quota. Quota is returned in [PropertyQuota](#PropertyQuota).
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\Analytics\Data\V1alpha\RunFunnelReportResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function runFunnelReport(array $optionalArgs = [])
- {
- $request = new RunFunnelReportRequest();
- $requestParamHeaders = [];
- if (isset($optionalArgs['property'])) {
- $request->setProperty($optionalArgs['property']);
- $requestParamHeaders['property'] = $optionalArgs['property'];
- }
-
- if (isset($optionalArgs['dateRanges'])) {
- $request->setDateRanges($optionalArgs['dateRanges']);
- }
-
- if (isset($optionalArgs['funnel'])) {
- $request->setFunnel($optionalArgs['funnel']);
- }
-
- if (isset($optionalArgs['funnelBreakdown'])) {
- $request->setFunnelBreakdown($optionalArgs['funnelBreakdown']);
- }
-
- if (isset($optionalArgs['funnelNextAction'])) {
- $request->setFunnelNextAction($optionalArgs['funnelNextAction']);
- }
-
- if (isset($optionalArgs['funnelVisualizationType'])) {
- $request->setFunnelVisualizationType(
- $optionalArgs['funnelVisualizationType']
- );
- }
-
- if (isset($optionalArgs['segments'])) {
- $request->setSegments($optionalArgs['segments']);
- }
-
- if (isset($optionalArgs['limit'])) {
- $request->setLimit($optionalArgs['limit']);
- }
-
- if (isset($optionalArgs['dimensionFilter'])) {
- $request->setDimensionFilter($optionalArgs['dimensionFilter']);
- }
-
- if (isset($optionalArgs['returnPropertyQuota'])) {
- $request->setReturnPropertyQuota(
- $optionalArgs['returnPropertyQuota']
- );
- }
-
- $requestParams = new RequestParamsHeaderDescriptor(
- $requestParamHeaders
- );
- $optionalArgs['headers'] = isset($optionalArgs['headers'])
- ? array_merge($requestParams->getHeader(), $optionalArgs['headers'])
- : $requestParams->getHeader();
- return $this->startCall(
- 'RunFunnelReport',
- RunFunnelReportResponse::class,
- $optionalArgs,
- $request
- )->wait();
- }
-
- /**
- * Exports an audience list of users to a Google Sheet. After creating an
- * audience, the users are not immediately available for listing. First, a
- * request to `CreateAudienceList` is necessary to create an audience list of
- * users, and then second, this method is used to export those users in the
- * audience list to a Google Sheet.
- *
- * See [Creating an Audience
- * List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics)
- * for an introduction to Audience Lists with examples.
- *
- * Audiences in Google Analytics 4 allow you to segment your users in the ways
- * that are important to your business. To learn more, see
- * https://support.google.com/analytics/answer/9267572.
- *
- * This method is introduced at alpha stability with the intention of
- * gathering feedback on syntax and capabilities before entering beta. To give
- * your feedback on this API, complete the
- * [Google Analytics Audience Export API
- * Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.
- *
- * Sample code:
- * ```
- * $alphaAnalyticsDataClient = new AlphaAnalyticsDataClient();
- * try {
- * $formattedName = $alphaAnalyticsDataClient->audienceListName('[PROPERTY]', '[AUDIENCE_LIST]');
- * $response = $alphaAnalyticsDataClient->sheetExportAudienceList($formattedName);
- * } finally {
- * $alphaAnalyticsDataClient->close();
- * }
- * ```
- *
- * @param string $name Required. The name of the audience list to retrieve users from.
- * Format: `properties/{property}/audienceLists/{audience_list}`
- * @param array $optionalArgs {
- * Optional.
- *
- * @type int $offset
- * Optional. The row count of the start row. The first row is counted as row
- * 0.
- *
- * When paging, the first request does not specify offset; or equivalently,
- * sets offset to 0; the first request returns the first `limit` of rows. The
- * second request sets offset to the `limit` of the first request; the second
- * request returns the second `limit` of rows.
- *
- * To learn more about this pagination parameter, see
- * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
- * @type int $limit
- * Optional. The number of rows to return. If unspecified, 10,000 rows are
- * returned. The API returns a maximum of 250,000 rows per request, no matter
- * how many you ask for. `limit` must be positive.
- *
- * The API can also return fewer rows than the requested `limit`, if there
- * aren't as many dimension values as the `limit`.
- *
- * To learn more about this pagination parameter, see
- * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\Analytics\Data\V1alpha\SheetExportAudienceListResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function sheetExportAudienceList($name, array $optionalArgs = [])
- {
- $request = new SheetExportAudienceListRequest();
- $requestParamHeaders = [];
- $request->setName($name);
- $requestParamHeaders['name'] = $name;
- if (isset($optionalArgs['offset'])) {
- $request->setOffset($optionalArgs['offset']);
- }
-
- if (isset($optionalArgs['limit'])) {
- $request->setLimit($optionalArgs['limit']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor(
- $requestParamHeaders
- );
- $optionalArgs['headers'] = isset($optionalArgs['headers'])
- ? array_merge($requestParams->getHeader(), $optionalArgs['headers'])
- : $requestParams->getHeader();
- return $this->startCall(
- 'SheetExportAudienceList',
- SheetExportAudienceListResponse::class,
- $optionalArgs,
- $request
- )->wait();
- }
-}
diff --git a/AnalyticsData/src/V1alpha/GetAudienceListRequest.php b/AnalyticsData/src/V1alpha/GetAudienceListRequest.php
index 19ee0a818611..b0b4e994fe0c 100644
--- a/AnalyticsData/src/V1alpha/GetAudienceListRequest.php
+++ b/AnalyticsData/src/V1alpha/GetAudienceListRequest.php
@@ -21,7 +21,7 @@ class GetAudienceListRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
*/
- private $name = '';
+ protected $name = '';
/**
* @param string $name Required. The audience list resource name.
diff --git a/AnalyticsData/src/V1alpha/GetMetadataRequest.php b/AnalyticsData/src/V1alpha/GetMetadataRequest.php
deleted file mode 100644
index b49d9d593e99..000000000000
--- a/AnalyticsData/src/V1alpha/GetMetadataRequest.php
+++ /dev/null
@@ -1,99 +0,0 @@
-google.analytics.data.v1alpha.GetMetadataRequest
- */
-class GetMetadataRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The resource name of the metadata to retrieve. This name field is
- * specified in the URL path and not URL parameters. Property is a numeric
- * Google Analytics GA4 Property identifier. To learn more, see [where to find
- * your Property
- * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
- * Example: properties/1234/metadata
- * Set the Property ID to 0 for dimensions and metrics common to all
- * properties. In this special mode, this method will not return custom
- * dimensions and metrics.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- private $name = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * Required. The resource name of the metadata to retrieve. This name field is
- * specified in the URL path and not URL parameters. Property is a numeric
- * Google Analytics GA4 Property identifier. To learn more, see [where to find
- * your Property
- * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
- * Example: properties/1234/metadata
- * Set the Property ID to 0 for dimensions and metrics common to all
- * properties. In this special mode, this method will not return custom
- * dimensions and metrics.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Analytics\Data\V1Alpha\AnalyticsDataApi::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The resource name of the metadata to retrieve. This name field is
- * specified in the URL path and not URL parameters. Property is a numeric
- * Google Analytics GA4 Property identifier. To learn more, see [where to find
- * your Property
- * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
- * Example: properties/1234/metadata
- * Set the Property ID to 0 for dimensions and metrics common to all
- * properties. In this special mode, this method will not return custom
- * dimensions and metrics.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Required. The resource name of the metadata to retrieve. This name field is
- * specified in the URL path and not URL parameters. Property is a numeric
- * Google Analytics GA4 Property identifier. To learn more, see [where to find
- * your Property
- * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
- * Example: properties/1234/metadata
- * Set the Property ID to 0 for dimensions and metrics common to all
- * properties. In this special mode, this method will not return custom
- * dimensions and metrics.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
-}
-
diff --git a/AnalyticsData/src/V1alpha/GetPropertyQuotasSnapshotRequest.php b/AnalyticsData/src/V1alpha/GetPropertyQuotasSnapshotRequest.php
index cdc27c4a2bf5..499e0aec5cd7 100644
--- a/AnalyticsData/src/V1alpha/GetPropertyQuotasSnapshotRequest.php
+++ b/AnalyticsData/src/V1alpha/GetPropertyQuotasSnapshotRequest.php
@@ -21,7 +21,7 @@ class GetPropertyQuotasSnapshotRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
*/
- private $name = '';
+ protected $name = '';
/**
* @param string $name Required. Quotas from this property will be listed in the response.
diff --git a/AnalyticsData/src/V1alpha/GetRecurringAudienceListRequest.php b/AnalyticsData/src/V1alpha/GetRecurringAudienceListRequest.php
index ba968d7adf4a..62483c22faa6 100644
--- a/AnalyticsData/src/V1alpha/GetRecurringAudienceListRequest.php
+++ b/AnalyticsData/src/V1alpha/GetRecurringAudienceListRequest.php
@@ -23,7 +23,7 @@ class GetRecurringAudienceListRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
*/
- private $name = '';
+ protected $name = '';
/**
* @param string $name Required. The recurring audience list resource name.
diff --git a/AnalyticsData/src/V1alpha/GetReportTaskRequest.php b/AnalyticsData/src/V1alpha/GetReportTaskRequest.php
index e50713f7969d..b0bbbd7685cf 100644
--- a/AnalyticsData/src/V1alpha/GetReportTaskRequest.php
+++ b/AnalyticsData/src/V1alpha/GetReportTaskRequest.php
@@ -21,7 +21,7 @@ class GetReportTaskRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
*/
- private $name = '';
+ protected $name = '';
/**
* @param string $name Required. The report task resource name.
diff --git a/AnalyticsData/src/V1alpha/InListFilter.php b/AnalyticsData/src/V1alpha/InListFilter.php
index 605fa64ecb5f..6a21d6edf156 100644
--- a/AnalyticsData/src/V1alpha/InListFilter.php
+++ b/AnalyticsData/src/V1alpha/InListFilter.php
@@ -27,7 +27,7 @@ class InListFilter extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field bool case_sensitive = 2;
*/
- private $case_sensitive = false;
+ protected $case_sensitive = false;
/**
* Constructor.
diff --git a/AnalyticsData/src/V1alpha/ListAudienceListsRequest.php b/AnalyticsData/src/V1alpha/ListAudienceListsRequest.php
index afc643b64ebd..f5a915fcf453 100644
--- a/AnalyticsData/src/V1alpha/ListAudienceListsRequest.php
+++ b/AnalyticsData/src/V1alpha/ListAudienceListsRequest.php
@@ -21,7 +21,7 @@ class ListAudienceListsRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
*/
- private $parent = '';
+ protected $parent = '';
/**
* Optional. The maximum number of audience lists to return. The service may
* return fewer than this value. If unspecified, at most 200 audience lists
@@ -30,7 +30,7 @@ class ListAudienceListsRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $page_size = 0;
+ protected $page_size = 0;
/**
* Optional. A page token, received from a previous `ListAudienceLists` call.
* Provide this to retrieve the subsequent page.
@@ -39,7 +39,7 @@ class ListAudienceListsRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $page_token = '';
+ protected $page_token = '';
/**
* @param string $parent Required. All audience lists for this property will be listed in the
diff --git a/AnalyticsData/src/V1alpha/ListAudienceListsResponse.php b/AnalyticsData/src/V1alpha/ListAudienceListsResponse.php
index 17d946b8c750..af435a8bb383 100644
--- a/AnalyticsData/src/V1alpha/ListAudienceListsResponse.php
+++ b/AnalyticsData/src/V1alpha/ListAudienceListsResponse.php
@@ -27,7 +27,7 @@ class ListAudienceListsResponse extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field optional string next_page_token = 2;
*/
- private $next_page_token = null;
+ protected $next_page_token = null;
/**
* Constructor.
diff --git a/AnalyticsData/src/V1alpha/ListRecurringAudienceListsRequest.php b/AnalyticsData/src/V1alpha/ListRecurringAudienceListsRequest.php
index eb4dd7a872bd..c0ce897dbad9 100644
--- a/AnalyticsData/src/V1alpha/ListRecurringAudienceListsRequest.php
+++ b/AnalyticsData/src/V1alpha/ListRecurringAudienceListsRequest.php
@@ -21,7 +21,7 @@ class ListRecurringAudienceListsRequest extends \Google\Protobuf\Internal\Messag
*
* Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
*/
- private $parent = '';
+ protected $parent = '';
/**
* Optional. The maximum number of recurring audience lists to return. The
* service may return fewer than this value. If unspecified, at most 200
@@ -30,7 +30,7 @@ class ListRecurringAudienceListsRequest extends \Google\Protobuf\Internal\Messag
*
* Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $page_size = 0;
+ protected $page_size = 0;
/**
* Optional. A page token, received from a previous
* `ListRecurringAudienceLists` call. Provide this to retrieve the subsequent
@@ -41,7 +41,7 @@ class ListRecurringAudienceListsRequest extends \Google\Protobuf\Internal\Messag
*
* Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $page_token = '';
+ protected $page_token = '';
/**
* @param string $parent Required. All recurring audience lists for this property will be listed in
diff --git a/AnalyticsData/src/V1alpha/ListRecurringAudienceListsResponse.php b/AnalyticsData/src/V1alpha/ListRecurringAudienceListsResponse.php
index f5baa43fd016..0a48186323f6 100644
--- a/AnalyticsData/src/V1alpha/ListRecurringAudienceListsResponse.php
+++ b/AnalyticsData/src/V1alpha/ListRecurringAudienceListsResponse.php
@@ -27,7 +27,7 @@ class ListRecurringAudienceListsResponse extends \Google\Protobuf\Internal\Messa
*
* Generated from protobuf field optional string next_page_token = 2;
*/
- private $next_page_token = null;
+ protected $next_page_token = null;
/**
* Constructor.
diff --git a/AnalyticsData/src/V1alpha/ListReportTasksRequest.php b/AnalyticsData/src/V1alpha/ListReportTasksRequest.php
index 5d2935453bf6..12429e405d16 100644
--- a/AnalyticsData/src/V1alpha/ListReportTasksRequest.php
+++ b/AnalyticsData/src/V1alpha/ListReportTasksRequest.php
@@ -21,20 +21,20 @@ class ListReportTasksRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
*/
- private $parent = '';
+ protected $parent = '';
/**
* Optional. The maximum number of report tasks to return.
*
* Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $page_size = 0;
+ protected $page_size = 0;
/**
* Optional. A page token, received from a previous `ListReportTasks` call.
* Provide this to retrieve the subsequent page.
*
* Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $page_token = '';
+ protected $page_token = '';
/**
* @param string $parent Required. All report tasks for this property will be listed in the
diff --git a/AnalyticsData/src/V1alpha/ListReportTasksResponse.php b/AnalyticsData/src/V1alpha/ListReportTasksResponse.php
index a8917c897668..48be01c1d7a8 100644
--- a/AnalyticsData/src/V1alpha/ListReportTasksResponse.php
+++ b/AnalyticsData/src/V1alpha/ListReportTasksResponse.php
@@ -27,7 +27,7 @@ class ListReportTasksResponse extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field optional string next_page_token = 2;
*/
- private $next_page_token = null;
+ protected $next_page_token = null;
/**
* Constructor.
diff --git a/AnalyticsData/src/V1alpha/Metadata.php b/AnalyticsData/src/V1alpha/Metadata.php
deleted file mode 100644
index 2f9b791c0e76..000000000000
--- a/AnalyticsData/src/V1alpha/Metadata.php
+++ /dev/null
@@ -1,135 +0,0 @@
-google.analytics.data.v1alpha.Metadata
- */
-class Metadata extends \Google\Protobuf\Internal\Message
-{
- /**
- * Resource name of this metadata.
- *
- * Generated from protobuf field string name = 3;
- */
- private $name = '';
- /**
- * The dimension descriptions.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.DimensionMetadata dimensions = 1;
- */
- private $dimensions;
- /**
- * The metric descriptions.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.MetricMetadata metrics = 2;
- */
- private $metrics;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * Resource name of this metadata.
- * @type \Google\Analytics\Data\V1alpha\DimensionMetadata[]|\Google\Protobuf\Internal\RepeatedField $dimensions
- * The dimension descriptions.
- * @type \Google\Analytics\Data\V1alpha\MetricMetadata[]|\Google\Protobuf\Internal\RepeatedField $metrics
- * The metric descriptions.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Analytics\Data\V1Alpha\AnalyticsDataApi::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Resource name of this metadata.
- *
- * Generated from protobuf field string name = 3;
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Resource name of this metadata.
- *
- * Generated from protobuf field string name = 3;
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
- /**
- * The dimension descriptions.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.DimensionMetadata dimensions = 1;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getDimensions()
- {
- return $this->dimensions;
- }
-
- /**
- * The dimension descriptions.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.DimensionMetadata dimensions = 1;
- * @param \Google\Analytics\Data\V1alpha\DimensionMetadata[]|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setDimensions($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Data\V1alpha\DimensionMetadata::class);
- $this->dimensions = $arr;
-
- return $this;
- }
-
- /**
- * The metric descriptions.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.MetricMetadata metrics = 2;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getMetrics()
- {
- return $this->metrics;
- }
-
- /**
- * The metric descriptions.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.MetricMetadata metrics = 2;
- * @param \Google\Analytics\Data\V1alpha\MetricMetadata[]|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setMetrics($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Data\V1alpha\MetricMetadata::class);
- $this->metrics = $arr;
-
- return $this;
- }
-
-}
-
diff --git a/AnalyticsData/src/V1alpha/Metric.php b/AnalyticsData/src/V1alpha/Metric.php
index 1ec6f928792f..87da0af9af02 100644
--- a/AnalyticsData/src/V1alpha/Metric.php
+++ b/AnalyticsData/src/V1alpha/Metric.php
@@ -40,14 +40,14 @@ class Metric extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1;
*/
- private $name = '';
+ protected $name = '';
/**
* A mathematical expression for derived metrics. For example, the metric
* Event count per user is `eventCount/totalUsers`.
*
* Generated from protobuf field string expression = 2;
*/
- private $expression = '';
+ protected $expression = '';
/**
* Indicates if a metric is invisible in the report response. If a metric is
* invisible, the metric will not produce a column in the response, but can be
@@ -55,7 +55,7 @@ class Metric extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field bool invisible = 3;
*/
- private $invisible = false;
+ protected $invisible = false;
/**
* Constructor.
diff --git a/AnalyticsData/src/V1alpha/MetricHeader.php b/AnalyticsData/src/V1alpha/MetricHeader.php
index 8222845db999..ed4f1ecb9a8d 100644
--- a/AnalyticsData/src/V1alpha/MetricHeader.php
+++ b/AnalyticsData/src/V1alpha/MetricHeader.php
@@ -23,13 +23,13 @@ class MetricHeader extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1;
*/
- private $name = '';
+ protected $name = '';
/**
* The metric's data type.
*
* Generated from protobuf field .google.analytics.data.v1alpha.MetricType type = 2;
*/
- private $type = 0;
+ protected $type = 0;
/**
* Constructor.
diff --git a/AnalyticsData/src/V1alpha/MetricMetadata.php b/AnalyticsData/src/V1alpha/MetricMetadata.php
deleted file mode 100644
index e643ca325244..000000000000
--- a/AnalyticsData/src/V1alpha/MetricMetadata.php
+++ /dev/null
@@ -1,299 +0,0 @@
-google.analytics.data.v1alpha.MetricMetadata
- */
-class MetricMetadata extends \Google\Protobuf\Internal\Message
-{
- /**
- * A metric name. Useable in [Metric](#Metric)'s `name`. For example,
- * `eventCount`.
- *
- * Generated from protobuf field string api_name = 1;
- */
- private $api_name = '';
- /**
- * This metric's name within the Google Analytics user interface. For example,
- * `Event count`.
- *
- * Generated from protobuf field string ui_name = 2;
- */
- private $ui_name = '';
- /**
- * Description of how this metric is used and calculated.
- *
- * Generated from protobuf field string description = 3;
- */
- private $description = '';
- /**
- * Still usable but deprecated names for this metric. If populated, this
- * metric is available by either `apiName` or one of `deprecatedApiNames`
- * for a period of time. After the deprecation period, the metric will be
- * available only by `apiName`.
- *
- * Generated from protobuf field repeated string deprecated_api_names = 4;
- */
- private $deprecated_api_names;
- /**
- * The type of this metric.
- *
- * Generated from protobuf field .google.analytics.data.v1alpha.MetricType type = 5;
- */
- private $type = 0;
- /**
- * The mathematical expression for this derived metric. Can be used in
- * [Metric](#Metric)'s `expression` field for equivalent reports. Most metrics
- * are not expressions, and for non-expressions, this field is empty.
- *
- * Generated from protobuf field string expression = 6;
- */
- private $expression = '';
- /**
- * True if the metric is a custom metric for this property.
- *
- * Generated from protobuf field bool custom_definition = 7;
- */
- private $custom_definition = false;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $api_name
- * A metric name. Useable in [Metric](#Metric)'s `name`. For example,
- * `eventCount`.
- * @type string $ui_name
- * This metric's name within the Google Analytics user interface. For example,
- * `Event count`.
- * @type string $description
- * Description of how this metric is used and calculated.
- * @type string[]|\Google\Protobuf\Internal\RepeatedField $deprecated_api_names
- * Still usable but deprecated names for this metric. If populated, this
- * metric is available by either `apiName` or one of `deprecatedApiNames`
- * for a period of time. After the deprecation period, the metric will be
- * available only by `apiName`.
- * @type int $type
- * The type of this metric.
- * @type string $expression
- * The mathematical expression for this derived metric. Can be used in
- * [Metric](#Metric)'s `expression` field for equivalent reports. Most metrics
- * 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.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Analytics\Data\V1Alpha\Data::initOnce();
- parent::__construct($data);
- }
-
- /**
- * A metric name. Useable in [Metric](#Metric)'s `name`. For example,
- * `eventCount`.
- *
- * Generated from protobuf field string api_name = 1;
- * @return string
- */
- public function getApiName()
- {
- return $this->api_name;
- }
-
- /**
- * A metric name. Useable in [Metric](#Metric)'s `name`. For example,
- * `eventCount`.
- *
- * Generated from protobuf field string api_name = 1;
- * @param string $var
- * @return $this
- */
- public function setApiName($var)
- {
- GPBUtil::checkString($var, True);
- $this->api_name = $var;
-
- return $this;
- }
-
- /**
- * This metric's name within the Google Analytics user interface. For example,
- * `Event count`.
- *
- * Generated from protobuf field string ui_name = 2;
- * @return string
- */
- public function getUiName()
- {
- return $this->ui_name;
- }
-
- /**
- * This metric's name within the Google Analytics user interface. For example,
- * `Event count`.
- *
- * Generated from protobuf field string ui_name = 2;
- * @param string $var
- * @return $this
- */
- public function setUiName($var)
- {
- GPBUtil::checkString($var, True);
- $this->ui_name = $var;
-
- return $this;
- }
-
- /**
- * Description of how this metric is used and calculated.
- *
- * Generated from protobuf field string description = 3;
- * @return string
- */
- public function getDescription()
- {
- return $this->description;
- }
-
- /**
- * Description of how this metric is used and calculated.
- *
- * Generated from protobuf field string description = 3;
- * @param string $var
- * @return $this
- */
- public function setDescription($var)
- {
- GPBUtil::checkString($var, True);
- $this->description = $var;
-
- return $this;
- }
-
- /**
- * Still usable but deprecated names for this metric. If populated, this
- * metric is available by either `apiName` or one of `deprecatedApiNames`
- * for a period of time. After the deprecation period, the metric will be
- * available only by `apiName`.
- *
- * Generated from protobuf field repeated string deprecated_api_names = 4;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getDeprecatedApiNames()
- {
- return $this->deprecated_api_names;
- }
-
- /**
- * Still usable but deprecated names for this metric. If populated, this
- * metric is available by either `apiName` or one of `deprecatedApiNames`
- * for a period of time. After the deprecation period, the metric will be
- * available only by `apiName`.
- *
- * Generated from protobuf field repeated string deprecated_api_names = 4;
- * @param string[]|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setDeprecatedApiNames($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
- $this->deprecated_api_names = $arr;
-
- return $this;
- }
-
- /**
- * The type of this metric.
- *
- * Generated from protobuf field .google.analytics.data.v1alpha.MetricType type = 5;
- * @return int
- */
- public function getType()
- {
- return $this->type;
- }
-
- /**
- * The type of this metric.
- *
- * Generated from protobuf field .google.analytics.data.v1alpha.MetricType type = 5;
- * @param int $var
- * @return $this
- */
- public function setType($var)
- {
- GPBUtil::checkEnum($var, \Google\Analytics\Data\V1alpha\MetricType::class);
- $this->type = $var;
-
- return $this;
- }
-
- /**
- * The mathematical expression for this derived metric. Can be used in
- * [Metric](#Metric)'s `expression` field for equivalent reports. Most metrics
- * are not expressions, and for non-expressions, this field is empty.
- *
- * Generated from protobuf field string expression = 6;
- * @return string
- */
- public function getExpression()
- {
- return $this->expression;
- }
-
- /**
- * The mathematical expression for this derived metric. Can be used in
- * [Metric](#Metric)'s `expression` field for equivalent reports. Most metrics
- * are not expressions, and for non-expressions, this field is empty.
- *
- * Generated from protobuf field string expression = 6;
- * @param string $var
- * @return $this
- */
- public function setExpression($var)
- {
- GPBUtil::checkString($var, True);
- $this->expression = $var;
-
- return $this;
- }
-
- /**
- * True if the metric is a custom metric for this property.
- *
- * Generated from protobuf field bool custom_definition = 7;
- * @return bool
- */
- public function getCustomDefinition()
- {
- return $this->custom_definition;
- }
-
- /**
- * True if the metric is a custom metric for this property.
- *
- * Generated from protobuf field bool custom_definition = 7;
- * @param bool $var
- * @return $this
- */
- public function setCustomDefinition($var)
- {
- GPBUtil::checkBool($var);
- $this->custom_definition = $var;
-
- return $this;
- }
-
-}
-
diff --git a/AnalyticsData/src/V1alpha/NumericFilter.php b/AnalyticsData/src/V1alpha/NumericFilter.php
index 29fe252ea2a8..6a6fb83e34ec 100644
--- a/AnalyticsData/src/V1alpha/NumericFilter.php
+++ b/AnalyticsData/src/V1alpha/NumericFilter.php
@@ -20,13 +20,13 @@ class NumericFilter extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.analytics.data.v1alpha.NumericFilter.Operation operation = 1;
*/
- private $operation = 0;
+ protected $operation = 0;
/**
* A numeric value or a date value.
*
* Generated from protobuf field .google.analytics.data.v1alpha.NumericValue value = 2;
*/
- private $value = null;
+ protected $value = null;
/**
* Constructor.
diff --git a/AnalyticsData/src/V1alpha/OrderBy.php b/AnalyticsData/src/V1alpha/OrderBy.php
index b94bbe77863b..957ad52e335b 100644
--- a/AnalyticsData/src/V1alpha/OrderBy.php
+++ b/AnalyticsData/src/V1alpha/OrderBy.php
@@ -22,7 +22,7 @@ class OrderBy extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field bool desc = 4;
*/
- private $desc = false;
+ protected $desc = false;
protected $one_order_by;
/**
diff --git a/AnalyticsData/src/V1alpha/OrderBy/DimensionOrderBy.php b/AnalyticsData/src/V1alpha/OrderBy/DimensionOrderBy.php
index 75e5d46ec525..b0cbd7de96af 100644
--- a/AnalyticsData/src/V1alpha/OrderBy/DimensionOrderBy.php
+++ b/AnalyticsData/src/V1alpha/OrderBy/DimensionOrderBy.php
@@ -20,13 +20,13 @@ class DimensionOrderBy extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string dimension_name = 1;
*/
- private $dimension_name = '';
+ protected $dimension_name = '';
/**
* Controls the rule for dimension value ordering.
*
* Generated from protobuf field .google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.OrderType order_type = 2;
*/
- private $order_type = 0;
+ protected $order_type = 0;
/**
* Constructor.
diff --git a/AnalyticsData/src/V1alpha/OrderBy/MetricOrderBy.php b/AnalyticsData/src/V1alpha/OrderBy/MetricOrderBy.php
index 58aa5e2959a7..ddb596f43df6 100644
--- a/AnalyticsData/src/V1alpha/OrderBy/MetricOrderBy.php
+++ b/AnalyticsData/src/V1alpha/OrderBy/MetricOrderBy.php
@@ -20,7 +20,7 @@ class MetricOrderBy extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string metric_name = 1;
*/
- private $metric_name = '';
+ protected $metric_name = '';
/**
* Constructor.
diff --git a/AnalyticsData/src/V1alpha/OrderBy/PivotOrderBy.php b/AnalyticsData/src/V1alpha/OrderBy/PivotOrderBy.php
deleted file mode 100644
index b784a2a4eced..000000000000
--- a/AnalyticsData/src/V1alpha/OrderBy/PivotOrderBy.php
+++ /dev/null
@@ -1,118 +0,0 @@
-google.analytics.data.v1alpha.OrderBy.PivotOrderBy
- */
-class PivotOrderBy extends \Google\Protobuf\Internal\Message
-{
- /**
- * In the response to order by, order rows by this column. Must be a metric
- * name from the request.
- *
- * Generated from protobuf field string metric_name = 1;
- */
- private $metric_name = '';
- /**
- * Used to select a dimension name and value pivot. If multiple pivot
- * selections are given, the sort occurs on rows where all pivot selection
- * dimension name and value pairs match the row's dimension name and value
- * pair.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.OrderBy.PivotOrderBy.PivotSelection pivot_selections = 2;
- */
- private $pivot_selections;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $metric_name
- * In the response to order by, order rows by this column. Must be a metric
- * name from the request.
- * @type \Google\Analytics\Data\V1alpha\OrderBy\PivotOrderBy\PivotSelection[]|\Google\Protobuf\Internal\RepeatedField $pivot_selections
- * Used to select a dimension name and value pivot. If multiple pivot
- * selections are given, the sort occurs on rows where all pivot selection
- * dimension name and value pairs match the row's dimension name and value
- * pair.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Analytics\Data\V1Alpha\Data::initOnce();
- parent::__construct($data);
- }
-
- /**
- * In the response to order by, order rows by this column. Must be a metric
- * name from the request.
- *
- * Generated from protobuf field string metric_name = 1;
- * @return string
- */
- public function getMetricName()
- {
- return $this->metric_name;
- }
-
- /**
- * In the response to order by, order rows by this column. Must be a metric
- * name from the request.
- *
- * Generated from protobuf field string metric_name = 1;
- * @param string $var
- * @return $this
- */
- public function setMetricName($var)
- {
- GPBUtil::checkString($var, True);
- $this->metric_name = $var;
-
- return $this;
- }
-
- /**
- * Used to select a dimension name and value pivot. If multiple pivot
- * selections are given, the sort occurs on rows where all pivot selection
- * dimension name and value pairs match the row's dimension name and value
- * pair.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.OrderBy.PivotOrderBy.PivotSelection pivot_selections = 2;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getPivotSelections()
- {
- return $this->pivot_selections;
- }
-
- /**
- * Used to select a dimension name and value pivot. If multiple pivot
- * selections are given, the sort occurs on rows where all pivot selection
- * dimension name and value pairs match the row's dimension name and value
- * pair.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.OrderBy.PivotOrderBy.PivotSelection pivot_selections = 2;
- * @param \Google\Analytics\Data\V1alpha\OrderBy\PivotOrderBy\PivotSelection[]|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setPivotSelections($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Data\V1alpha\OrderBy\PivotOrderBy\PivotSelection::class);
- $this->pivot_selections = $arr;
-
- return $this;
- }
-
-}
-
-
diff --git a/AnalyticsData/src/V1alpha/OrderBy/PivotOrderBy/PivotSelection.php b/AnalyticsData/src/V1alpha/OrderBy/PivotOrderBy/PivotSelection.php
deleted file mode 100644
index b3c0c7046e20..000000000000
--- a/AnalyticsData/src/V1alpha/OrderBy/PivotOrderBy/PivotSelection.php
+++ /dev/null
@@ -1,115 +0,0 @@
-google.analytics.data.v1alpha.OrderBy.PivotOrderBy.PivotSelection
- */
-class PivotSelection extends \Google\Protobuf\Internal\Message
-{
- /**
- * Must be a dimension name from the request.
- *
- * Generated from protobuf field string dimension_name = 1;
- */
- private $dimension_name = '';
- /**
- * Order by only when the named dimension is this value.
- *
- * Generated from protobuf field string dimension_value = 2;
- */
- private $dimension_value = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $dimension_name
- * Must be a dimension name from the request.
- * @type string $dimension_value
- * Order by only when the named dimension is this value.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Analytics\Data\V1Alpha\Data::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Must be a dimension name from the request.
- *
- * Generated from protobuf field string dimension_name = 1;
- * @return string
- */
- public function getDimensionName()
- {
- return $this->dimension_name;
- }
-
- /**
- * Must be a dimension name from the request.
- *
- * Generated from protobuf field string dimension_name = 1;
- * @param string $var
- * @return $this
- */
- public function setDimensionName($var)
- {
- GPBUtil::checkString($var, True);
- $this->dimension_name = $var;
-
- return $this;
- }
-
- /**
- * Order by only when the named dimension is this value.
- *
- * Generated from protobuf field string dimension_value = 2;
- * @return string
- */
- public function getDimensionValue()
- {
- return $this->dimension_value;
- }
-
- /**
- * Order by only when the named dimension is this value.
- *
- * Generated from protobuf field string dimension_value = 2;
- * @param string $var
- * @return $this
- */
- public function setDimensionValue($var)
- {
- GPBUtil::checkString($var, True);
- $this->dimension_value = $var;
-
- return $this;
- }
-
-}
-
-
diff --git a/AnalyticsData/src/V1alpha/Pivot.php b/AnalyticsData/src/V1alpha/Pivot.php
deleted file mode 100644
index a4f4e684d05c..000000000000
--- a/AnalyticsData/src/V1alpha/Pivot.php
+++ /dev/null
@@ -1,239 +0,0 @@
-google.analytics.data.v1alpha.Pivot
- */
-class Pivot extends \Google\Protobuf\Internal\Message
-{
- /**
- * Dimension names for visible columns in the report response. Including
- * "dateRange" produces a date range column; for each row in the response,
- * dimension values in the date range column will indicate the corresponding
- * date range from the request.
- *
- * Generated from protobuf field repeated string field_names = 1;
- */
- private $field_names;
- /**
- * Specifies how dimensions are ordered in the pivot. In the first Pivot, the
- * OrderBys determine Row and PivotDimensionHeader ordering; in subsequent
- * Pivots, the OrderBys determine only PivotDimensionHeader ordering.
- * Dimensions specified in these OrderBys must be a subset of
- * Pivot.field_names.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.OrderBy order_bys = 2;
- */
- private $order_bys;
- /**
- * The row count of the start row. The first row is counted as row 0.
- *
- * Generated from protobuf field int64 offset = 3;
- */
- private $offset = 0;
- /**
- * The number of rows to return in this pivot. If unspecified, 10 rows are
- * returned. If -1, all rows are returned.
- *
- * Generated from protobuf field int64 limit = 4;
- */
- private $limit = 0;
- /**
- * Aggregate the metrics by dimensions in this pivot using the specified
- * metric_aggregations.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.MetricAggregation metric_aggregations = 5;
- */
- private $metric_aggregations;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string[]|\Google\Protobuf\Internal\RepeatedField $field_names
- * Dimension names for visible columns in the report response. Including
- * "dateRange" produces a date range column; for each row in the response,
- * dimension values in the date range column will indicate the corresponding
- * date range from the request.
- * @type \Google\Analytics\Data\V1alpha\OrderBy[]|\Google\Protobuf\Internal\RepeatedField $order_bys
- * Specifies how dimensions are ordered in the pivot. In the first Pivot, the
- * OrderBys determine Row and PivotDimensionHeader ordering; in subsequent
- * Pivots, the OrderBys determine only PivotDimensionHeader ordering.
- * Dimensions specified in these OrderBys must be a subset of
- * Pivot.field_names.
- * @type int|string $offset
- * The row count of the start row. The first row is counted as row 0.
- * @type int|string $limit
- * The number of rows to return in this pivot. If unspecified, 10 rows are
- * returned. If -1, all rows are returned.
- * @type int[]|\Google\Protobuf\Internal\RepeatedField $metric_aggregations
- * Aggregate the metrics by dimensions in this pivot using the specified
- * metric_aggregations.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Analytics\Data\V1Alpha\Data::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Dimension names for visible columns in the report response. Including
- * "dateRange" produces a date range column; for each row in the response,
- * dimension values in the date range column will indicate the corresponding
- * date range from the request.
- *
- * Generated from protobuf field repeated string field_names = 1;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getFieldNames()
- {
- return $this->field_names;
- }
-
- /**
- * Dimension names for visible columns in the report response. Including
- * "dateRange" produces a date range column; for each row in the response,
- * dimension values in the date range column will indicate the corresponding
- * date range from the request.
- *
- * Generated from protobuf field repeated string field_names = 1;
- * @param string[]|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setFieldNames($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
- $this->field_names = $arr;
-
- return $this;
- }
-
- /**
- * Specifies how dimensions are ordered in the pivot. In the first Pivot, the
- * OrderBys determine Row and PivotDimensionHeader ordering; in subsequent
- * Pivots, the OrderBys determine only PivotDimensionHeader ordering.
- * Dimensions specified in these OrderBys must be a subset of
- * Pivot.field_names.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.OrderBy order_bys = 2;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getOrderBys()
- {
- return $this->order_bys;
- }
-
- /**
- * Specifies how dimensions are ordered in the pivot. In the first Pivot, the
- * OrderBys determine Row and PivotDimensionHeader ordering; in subsequent
- * Pivots, the OrderBys determine only PivotDimensionHeader ordering.
- * Dimensions specified in these OrderBys must be a subset of
- * Pivot.field_names.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.OrderBy order_bys = 2;
- * @param \Google\Analytics\Data\V1alpha\OrderBy[]|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setOrderBys($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Data\V1alpha\OrderBy::class);
- $this->order_bys = $arr;
-
- return $this;
- }
-
- /**
- * The row count of the start row. The first row is counted as row 0.
- *
- * Generated from protobuf field int64 offset = 3;
- * @return int|string
- */
- public function getOffset()
- {
- return $this->offset;
- }
-
- /**
- * The row count of the start row. The first row is counted as row 0.
- *
- * Generated from protobuf field int64 offset = 3;
- * @param int|string $var
- * @return $this
- */
- public function setOffset($var)
- {
- GPBUtil::checkInt64($var);
- $this->offset = $var;
-
- return $this;
- }
-
- /**
- * The number of rows to return in this pivot. If unspecified, 10 rows are
- * returned. If -1, all rows are returned.
- *
- * Generated from protobuf field int64 limit = 4;
- * @return int|string
- */
- public function getLimit()
- {
- return $this->limit;
- }
-
- /**
- * The number of rows to return in this pivot. If unspecified, 10 rows are
- * returned. If -1, all rows are returned.
- *
- * Generated from protobuf field int64 limit = 4;
- * @param int|string $var
- * @return $this
- */
- public function setLimit($var)
- {
- GPBUtil::checkInt64($var);
- $this->limit = $var;
-
- return $this;
- }
-
- /**
- * Aggregate the metrics by dimensions in this pivot using the specified
- * metric_aggregations.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.MetricAggregation metric_aggregations = 5;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getMetricAggregations()
- {
- return $this->metric_aggregations;
- }
-
- /**
- * Aggregate the metrics by dimensions in this pivot using the specified
- * metric_aggregations.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.MetricAggregation metric_aggregations = 5;
- * @param int[]|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setMetricAggregations($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Analytics\Data\V1alpha\MetricAggregation::class);
- $this->metric_aggregations = $arr;
-
- return $this;
- }
-
-}
-
diff --git a/AnalyticsData/src/V1alpha/PivotDimensionHeader.php b/AnalyticsData/src/V1alpha/PivotDimensionHeader.php
deleted file mode 100644
index 125113040839..000000000000
--- a/AnalyticsData/src/V1alpha/PivotDimensionHeader.php
+++ /dev/null
@@ -1,67 +0,0 @@
-google.analytics.data.v1alpha.PivotDimensionHeader
- */
-class PivotDimensionHeader extends \Google\Protobuf\Internal\Message
-{
- /**
- * Values of multiple dimensions in a pivot.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.DimensionValue dimension_values = 1;
- */
- private $dimension_values;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Analytics\Data\V1alpha\DimensionValue[]|\Google\Protobuf\Internal\RepeatedField $dimension_values
- * Values of multiple dimensions in a pivot.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Analytics\Data\V1Alpha\Data::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Values of multiple dimensions in a pivot.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.DimensionValue dimension_values = 1;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getDimensionValues()
- {
- return $this->dimension_values;
- }
-
- /**
- * Values of multiple dimensions in a pivot.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.DimensionValue dimension_values = 1;
- * @param \Google\Analytics\Data\V1alpha\DimensionValue[]|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setDimensionValues($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Data\V1alpha\DimensionValue::class);
- $this->dimension_values = $arr;
-
- return $this;
- }
-
-}
-
diff --git a/AnalyticsData/src/V1alpha/PivotHeader.php b/AnalyticsData/src/V1alpha/PivotHeader.php
deleted file mode 100644
index 2cd2a595525f..000000000000
--- a/AnalyticsData/src/V1alpha/PivotHeader.php
+++ /dev/null
@@ -1,113 +0,0 @@
-google.analytics.data.v1alpha.PivotHeader
- */
-class PivotHeader extends \Google\Protobuf\Internal\Message
-{
- /**
- * The size is the same as the cardinality of the corresponding dimension
- * combinations.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.PivotDimensionHeader pivot_dimension_headers = 1;
- */
- private $pivot_dimension_headers;
- /**
- * The cardinality of the pivot as if offset = 0 and limit = -1. The total
- * number of rows for this pivot's fields regardless of how the parameters
- * offset and limit are specified in the request.
- *
- * Generated from protobuf field int32 row_count = 2;
- */
- private $row_count = 0;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Analytics\Data\V1alpha\PivotDimensionHeader[]|\Google\Protobuf\Internal\RepeatedField $pivot_dimension_headers
- * The size is the same as the cardinality of the corresponding dimension
- * combinations.
- * @type int $row_count
- * The cardinality of the pivot as if offset = 0 and limit = -1. The total
- * number of rows for this pivot's fields regardless of how the parameters
- * offset and limit are specified in the request.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Analytics\Data\V1Alpha\Data::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The size is the same as the cardinality of the corresponding dimension
- * combinations.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.PivotDimensionHeader pivot_dimension_headers = 1;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getPivotDimensionHeaders()
- {
- return $this->pivot_dimension_headers;
- }
-
- /**
- * The size is the same as the cardinality of the corresponding dimension
- * combinations.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.PivotDimensionHeader pivot_dimension_headers = 1;
- * @param \Google\Analytics\Data\V1alpha\PivotDimensionHeader[]|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setPivotDimensionHeaders($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Data\V1alpha\PivotDimensionHeader::class);
- $this->pivot_dimension_headers = $arr;
-
- return $this;
- }
-
- /**
- * The cardinality of the pivot as if offset = 0 and limit = -1. The total
- * number of rows for this pivot's fields regardless of how the parameters
- * offset and limit are specified in the request.
- *
- * Generated from protobuf field int32 row_count = 2;
- * @return int
- */
- public function getRowCount()
- {
- return $this->row_count;
- }
-
- /**
- * The cardinality of the pivot as if offset = 0 and limit = -1. The total
- * number of rows for this pivot's fields regardless of how the parameters
- * offset and limit are specified in the request.
- *
- * Generated from protobuf field int32 row_count = 2;
- * @param int $var
- * @return $this
- */
- public function setRowCount($var)
- {
- GPBUtil::checkInt32($var);
- $this->row_count = $var;
-
- return $this;
- }
-
-}
-
diff --git a/AnalyticsData/src/V1alpha/PropertyQuota.php b/AnalyticsData/src/V1alpha/PropertyQuota.php
index b4c208c4e9ca..37c205d8251b 100644
--- a/AnalyticsData/src/V1alpha/PropertyQuota.php
+++ b/AnalyticsData/src/V1alpha/PropertyQuota.php
@@ -24,7 +24,7 @@ class PropertyQuota extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.analytics.data.v1alpha.QuotaStatus tokens_per_day = 1;
*/
- private $tokens_per_day = null;
+ protected $tokens_per_day = null;
/**
* Standard Analytics Properties can use up to 40,000 tokens per hour;
* Analytics 360 Properties can use 400,000 tokens per hour. An API request
@@ -33,14 +33,14 @@ class PropertyQuota extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.analytics.data.v1alpha.QuotaStatus tokens_per_hour = 2;
*/
- private $tokens_per_hour = null;
+ protected $tokens_per_hour = null;
/**
* Standard Analytics Properties can send up to 10 concurrent requests;
* Analytics 360 Properties can use up to 50 concurrent requests.
*
* Generated from protobuf field .google.analytics.data.v1alpha.QuotaStatus concurrent_requests = 3;
*/
- private $concurrent_requests = null;
+ protected $concurrent_requests = null;
/**
* Standard Analytics Properties and cloud project pairs can have up to 10
* server errors per hour; Analytics 360 Properties and cloud project pairs
@@ -48,7 +48,7 @@ class PropertyQuota extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.analytics.data.v1alpha.QuotaStatus server_errors_per_project_per_hour = 4;
*/
- private $server_errors_per_project_per_hour = null;
+ protected $server_errors_per_project_per_hour = null;
/**
* Analytics Properties can send up to 120 requests with potentially
* thresholded dimensions per hour. In a batch request, each report request
@@ -57,7 +57,7 @@ class PropertyQuota extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.analytics.data.v1alpha.QuotaStatus potentially_thresholded_requests_per_hour = 5;
*/
- private $potentially_thresholded_requests_per_hour = null;
+ protected $potentially_thresholded_requests_per_hour = null;
/**
* Analytics Properties can use up to 35% of their tokens per project per
* hour. This amounts to standard Analytics Properties can use up to 14,000
@@ -68,7 +68,7 @@ class PropertyQuota extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.analytics.data.v1alpha.QuotaStatus tokens_per_project_per_hour = 6;
*/
- private $tokens_per_project_per_hour = null;
+ protected $tokens_per_project_per_hour = null;
/**
* Constructor.
diff --git a/AnalyticsData/src/V1alpha/PropertyQuotasSnapshot.php b/AnalyticsData/src/V1alpha/PropertyQuotasSnapshot.php
index 2e339e91c599..3386d2697d2e 100644
--- a/AnalyticsData/src/V1alpha/PropertyQuotasSnapshot.php
+++ b/AnalyticsData/src/V1alpha/PropertyQuotasSnapshot.php
@@ -20,25 +20,25 @@ class PropertyQuotasSnapshot extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 4 [(.google.api.field_behavior) = IDENTIFIER];
*/
- private $name = '';
+ protected $name = '';
/**
* Property Quota for core property tokens
*
* Generated from protobuf field .google.analytics.data.v1alpha.PropertyQuota core_property_quota = 1;
*/
- private $core_property_quota = null;
+ protected $core_property_quota = null;
/**
* Property Quota for realtime property tokens
*
* Generated from protobuf field .google.analytics.data.v1alpha.PropertyQuota realtime_property_quota = 2;
*/
- private $realtime_property_quota = null;
+ protected $realtime_property_quota = null;
/**
* Property Quota for funnel property tokens
*
* Generated from protobuf field .google.analytics.data.v1alpha.PropertyQuota funnel_property_quota = 3;
*/
- private $funnel_property_quota = null;
+ protected $funnel_property_quota = null;
/**
* Constructor.
diff --git a/AnalyticsData/src/V1alpha/QueryAudienceListRequest.php b/AnalyticsData/src/V1alpha/QueryAudienceListRequest.php
index f4772fccc4af..1e552270bd7b 100644
--- a/AnalyticsData/src/V1alpha/QueryAudienceListRequest.php
+++ b/AnalyticsData/src/V1alpha/QueryAudienceListRequest.php
@@ -21,7 +21,7 @@ class QueryAudienceListRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
*/
- private $name = '';
+ protected $name = '';
/**
* Optional. The row count of the start row. The first row is counted as row
* 0.
@@ -34,7 +34,7 @@ class QueryAudienceListRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field int64 offset = 2 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $offset = 0;
+ protected $offset = 0;
/**
* Optional. The number of rows to return. If unspecified, 10,000 rows are
* returned. The API returns a maximum of 250,000 rows per request, no matter
@@ -46,7 +46,7 @@ class QueryAudienceListRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field int64 limit = 3 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $limit = 0;
+ protected $limit = 0;
/**
* @param string $name Required. The name of the audience list to retrieve users from.
diff --git a/AnalyticsData/src/V1alpha/QueryAudienceListResponse.php b/AnalyticsData/src/V1alpha/QueryAudienceListResponse.php
index cfb4b5c542bd..34eacd07d7f2 100644
--- a/AnalyticsData/src/V1alpha/QueryAudienceListResponse.php
+++ b/AnalyticsData/src/V1alpha/QueryAudienceListResponse.php
@@ -22,7 +22,7 @@ class QueryAudienceListResponse extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field optional .google.analytics.data.v1alpha.AudienceList audience_list = 1;
*/
- private $audience_list = null;
+ protected $audience_list = null;
/**
* Rows for each user in an audience list. The number of rows in this
* response will be less than or equal to request's page size.
@@ -41,7 +41,7 @@ class QueryAudienceListResponse extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field optional int32 row_count = 3;
*/
- private $row_count = null;
+ protected $row_count = null;
/**
* Constructor.
diff --git a/AnalyticsData/src/V1alpha/QueryReportTaskRequest.php b/AnalyticsData/src/V1alpha/QueryReportTaskRequest.php
index 4f58b1384f41..17ab1b591dc9 100644
--- a/AnalyticsData/src/V1alpha/QueryReportTaskRequest.php
+++ b/AnalyticsData/src/V1alpha/QueryReportTaskRequest.php
@@ -21,7 +21,7 @@ class QueryReportTaskRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
*/
- private $name = '';
+ protected $name = '';
/**
* Optional. The row count of the start row in the report. The first row is
* counted as row 0.
@@ -34,7 +34,7 @@ class QueryReportTaskRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field int64 offset = 2 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $offset = 0;
+ protected $offset = 0;
/**
* Optional. The number of rows to return from the report. If unspecified,
* 10,000 rows are returned. The API returns a maximum of 250,000 rows per
@@ -51,7 +51,7 @@ class QueryReportTaskRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field int64 limit = 3 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $limit = 0;
+ protected $limit = 0;
/**
* @param string $name Required. The report source name.
diff --git a/AnalyticsData/src/V1alpha/QueryReportTaskResponse.php b/AnalyticsData/src/V1alpha/QueryReportTaskResponse.php
index 6d04e25e9d27..cc6ed351abce 100644
--- a/AnalyticsData/src/V1alpha/QueryReportTaskResponse.php
+++ b/AnalyticsData/src/V1alpha/QueryReportTaskResponse.php
@@ -58,13 +58,13 @@ class QueryReportTaskResponse extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field int32 row_count = 7;
*/
- private $row_count = 0;
+ protected $row_count = 0;
/**
* Metadata for the report.
*
* Generated from protobuf field .google.analytics.data.v1alpha.ResponseMetaData metadata = 8;
*/
- private $metadata = null;
+ protected $metadata = null;
/**
* Constructor.
diff --git a/AnalyticsData/src/V1alpha/QuotaStatus.php b/AnalyticsData/src/V1alpha/QuotaStatus.php
index 2cd0c62d6ca7..d0e52585a08c 100644
--- a/AnalyticsData/src/V1alpha/QuotaStatus.php
+++ b/AnalyticsData/src/V1alpha/QuotaStatus.php
@@ -20,13 +20,13 @@ class QuotaStatus extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field int32 consumed = 1;
*/
- private $consumed = 0;
+ protected $consumed = 0;
/**
* Quota remaining after this request.
*
* Generated from protobuf field int32 remaining = 2;
*/
- private $remaining = 0;
+ protected $remaining = 0;
/**
* Constructor.
diff --git a/AnalyticsData/src/V1alpha/README.md b/AnalyticsData/src/V1alpha/README.md
deleted file mode 100644
index 2933d945f62d..000000000000
--- a/AnalyticsData/src/V1alpha/README.md
+++ /dev/null
@@ -1,24 +0,0 @@
-# Google Analytics Data V1alpha generated client for PHP
-
-### Sample
-
-```php
-require 'vendor/autoload.php';
-
-use Google\Analytics\Data\V1alpha\AlphaAnalyticsDataClient;
-use Google\Analytics\Data\V1alpha\Entity;
-
-$client = new AlphaAnalyticsDataClient();
-
-$response = $client->runReport([
- 'entity' => new Entity([
- 'property_id' => '[YOUR_PROPERTY_ID]'
- ])
-]);
-
-foreach ($response->getRows() as $row) {
- foreach ($row->getDimensionValues() as $dimensionValue) {
- print 'Dimension Value: ' . $dimensionValue->getValue() . PHP_EOL;
- }
-}
-```
diff --git a/AnalyticsData/src/V1alpha/RecurringAudienceList.php b/AnalyticsData/src/V1alpha/RecurringAudienceList.php
index f36c7324d305..39bf50246674 100644
--- a/AnalyticsData/src/V1alpha/RecurringAudienceList.php
+++ b/AnalyticsData/src/V1alpha/RecurringAudienceList.php
@@ -27,7 +27,7 @@ class RecurringAudienceList extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $name = '';
+ protected $name = '';
/**
* Required. The audience resource name. This resource name identifies the
* audience being listed and is shared between the Analytics Data & Admin
@@ -36,14 +36,14 @@ class RecurringAudienceList extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string audience = 2 [(.google.api.field_behavior) = REQUIRED];
*/
- private $audience = '';
+ protected $audience = '';
/**
* Output only. The descriptive display name for this audience. For example,
* "Purchasers".
*
* Generated from protobuf field string audience_display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $audience_display_name = '';
+ protected $audience_display_name = '';
/**
* Required. The dimensions requested and displayed in the audience list
* response.
@@ -63,7 +63,7 @@ class RecurringAudienceList extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field optional int32 active_days_remaining = 5 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $active_days_remaining = null;
+ protected $active_days_remaining = null;
/**
* Output only. Audience list resource names for audience list instances
* created for this recurring audience list. One audience list is created for
@@ -88,7 +88,7 @@ class RecurringAudienceList extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field optional .google.analytics.data.v1alpha.WebhookNotification webhook_notification = 8 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $webhook_notification = null;
+ protected $webhook_notification = null;
/**
* Constructor.
diff --git a/AnalyticsData/src/V1alpha/ReportTask.php b/AnalyticsData/src/V1alpha/ReportTask.php
index 0b02911ad64b..21bb03288be3 100644
--- a/AnalyticsData/src/V1alpha/ReportTask.php
+++ b/AnalyticsData/src/V1alpha/ReportTask.php
@@ -21,7 +21,7 @@ class ReportTask extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $name = '';
+ protected $name = '';
/**
* Optional. A report definition to fetch report data, which describes the
* structure of a report. It typically includes the fields that will be
@@ -30,7 +30,7 @@ class ReportTask extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.analytics.data.v1alpha.ReportTask.ReportDefinition report_definition = 2 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $report_definition = null;
+ protected $report_definition = null;
/**
* Output only. The report metadata for a specific report task, which provides
* information about a report. It typically includes the following
@@ -39,7 +39,7 @@ class ReportTask extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.analytics.data.v1alpha.ReportTask.ReportMetadata report_metadata = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $report_metadata = null;
+ protected $report_metadata = null;
/**
* Constructor.
diff --git a/AnalyticsData/src/V1alpha/ReportTask/ReportDefinition.php b/AnalyticsData/src/V1alpha/ReportTask/ReportDefinition.php
index 1aaec94828ea..ff362427cc2c 100644
--- a/AnalyticsData/src/V1alpha/ReportTask/ReportDefinition.php
+++ b/AnalyticsData/src/V1alpha/ReportTask/ReportDefinition.php
@@ -45,7 +45,7 @@ class ReportDefinition extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.analytics.data.v1alpha.FilterExpression dimension_filter = 5 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $dimension_filter = null;
+ protected $dimension_filter = null;
/**
* Optional. The filter clause of metrics. Applied after aggregating the
* report's rows, similar to SQL having-clause. Dimensions cannot be used in
@@ -53,7 +53,7 @@ class ReportDefinition extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.analytics.data.v1alpha.FilterExpression metric_filter = 6 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $metric_filter = null;
+ protected $metric_filter = null;
/**
* Optional. The row count of the start row from Google Analytics Storage.
* The first row is counted as row 0.
@@ -67,7 +67,7 @@ class ReportDefinition extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field int64 offset = 7 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $offset = 0;
+ protected $offset = 0;
/**
* Optional. The number of rows to return in the Report. If unspecified,
* 10,000 rows are returned. The API returns a maximum of 250,000 rows per
@@ -80,7 +80,7 @@ class ReportDefinition extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field int64 limit = 8 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $limit = 0;
+ protected $limit = 0;
/**
* Optional. Aggregation of metrics. Aggregated metric values will be shown
* in rows where the dimension_values are set to
@@ -101,14 +101,14 @@ class ReportDefinition extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string currency_code = 11 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $currency_code = '';
+ protected $currency_code = '';
/**
* Optional. Cohort group associated with this request. If there is a cohort
* group in the request the 'cohort' dimension must be present.
*
* Generated from protobuf field .google.analytics.data.v1alpha.CohortSpec cohort_spec = 12 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $cohort_spec = null;
+ protected $cohort_spec = null;
/**
* Optional. If false or unspecified, each row with all metrics equal to 0
* will not be returned. If true, these rows will be returned if they are
@@ -121,13 +121,13 @@ class ReportDefinition extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field bool keep_empty_rows = 13 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $keep_empty_rows = false;
+ protected $keep_empty_rows = false;
/**
* Optional. The report's sampling level.
*
* Generated from protobuf field optional .google.analytics.data.v1alpha.SamplingLevel sampling_level = 14 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $sampling_level = null;
+ protected $sampling_level = null;
/**
* Constructor.
diff --git a/AnalyticsData/src/V1alpha/ReportTask/ReportMetadata.php b/AnalyticsData/src/V1alpha/ReportTask/ReportMetadata.php
index f8dbf6056acb..bca72a7b33db 100644
--- a/AnalyticsData/src/V1alpha/ReportTask/ReportMetadata.php
+++ b/AnalyticsData/src/V1alpha/ReportTask/ReportMetadata.php
@@ -20,14 +20,14 @@ class ReportMetadata extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field optional .google.analytics.data.v1alpha.ReportTask.ReportMetadata.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $state = null;
+ protected $state = null;
/**
* Output only. The time when `CreateReportTask` was called and the report
* began the `CREATING` state.
*
* Generated from protobuf field optional .google.protobuf.Timestamp begin_creating_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $begin_creating_time = null;
+ protected $begin_creating_time = null;
/**
* Output only. The total quota tokens charged during creation of the
* report. Because this token count is based on activity from the `CREATING`
@@ -36,7 +36,7 @@ class ReportMetadata extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field int32 creation_quota_tokens_charged = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $creation_quota_tokens_charged = 0;
+ protected $creation_quota_tokens_charged = 0;
/**
* Output only. The total number of rows in the report result. This field
* will be populated when the state is active. You can utilize
@@ -45,14 +45,14 @@ class ReportMetadata extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field optional int32 task_row_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $task_row_count = null;
+ protected $task_row_count = null;
/**
* Output only. Error message is populated if a report task fails during
* creation.
*
* Generated from protobuf field optional string error_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $error_message = null;
+ protected $error_message = null;
/**
* Output only. The total number of rows in Google Analytics storage. If you
* want to query additional data rows beyond the current report, they can
@@ -71,7 +71,7 @@ class ReportMetadata extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field optional int32 total_row_count = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $total_row_count = null;
+ protected $total_row_count = null;
/**
* Constructor.
diff --git a/AnalyticsData/src/V1alpha/ResponseMetaData.php b/AnalyticsData/src/V1alpha/ResponseMetaData.php
index d0b7c3744a18..5ca294217821 100644
--- a/AnalyticsData/src/V1alpha/ResponseMetaData.php
+++ b/AnalyticsData/src/V1alpha/ResponseMetaData.php
@@ -30,7 +30,7 @@ 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;
+ protected $data_loss_from_other_row = false;
/**
* Describes the schema restrictions actively enforced in creating this
* report. To learn more, see [Access and data-restriction
@@ -38,7 +38,7 @@ class ResponseMetaData extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field optional .google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse schema_restriction_response = 4;
*/
- private $schema_restriction_response = null;
+ protected $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
@@ -52,7 +52,7 @@ class ResponseMetaData extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field optional string currency_code = 5;
*/
- private $currency_code = null;
+ protected $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
@@ -61,13 +61,13 @@ class ResponseMetaData extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field optional string time_zone = 6;
*/
- private $time_zone = null;
+ protected $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;
+ protected $empty_reason = null;
/**
* If `subjectToThresholding` is true, this report is subject to thresholding
* and only returns data that meets the minimum aggregation thresholds. It is
@@ -80,7 +80,7 @@ class ResponseMetaData extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field optional bool subject_to_thresholding = 8;
*/
- private $subject_to_thresholding = null;
+ protected $subject_to_thresholding = null;
/**
* If this report's results are
* [sampled](https://support.google.com/analytics/answer/13331292), this
diff --git a/AnalyticsData/src/V1alpha/ResponseMetaData/SchemaRestrictionResponse/ActiveMetricRestriction.php b/AnalyticsData/src/V1alpha/ResponseMetaData/SchemaRestrictionResponse/ActiveMetricRestriction.php
index 1d3df5152fab..1afc966279f9 100644
--- a/AnalyticsData/src/V1alpha/ResponseMetaData/SchemaRestrictionResponse/ActiveMetricRestriction.php
+++ b/AnalyticsData/src/V1alpha/ResponseMetaData/SchemaRestrictionResponse/ActiveMetricRestriction.php
@@ -20,7 +20,7 @@ class ActiveMetricRestriction extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field optional string metric_name = 1;
*/
- private $metric_name = null;
+ protected $metric_name = null;
/**
* The reason for this metric's restriction.
*
diff --git a/AnalyticsData/src/V1alpha/RunFunnelReportRequest.php b/AnalyticsData/src/V1alpha/RunFunnelReportRequest.php
index aa6ef6f3fa30..50fc21f1bb30 100644
--- a/AnalyticsData/src/V1alpha/RunFunnelReportRequest.php
+++ b/AnalyticsData/src/V1alpha/RunFunnelReportRequest.php
@@ -26,7 +26,7 @@ class RunFunnelReportRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string property = 1 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $property = '';
+ protected $property = '';
/**
* Optional. Date ranges of data to read. If multiple date ranges are
* requested, each response row will contain a zero based date range index. If
@@ -42,7 +42,7 @@ class RunFunnelReportRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.analytics.data.v1alpha.Funnel funnel = 3 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $funnel = null;
+ protected $funnel = null;
/**
* Optional. If specified, this breakdown adds a dimension to the funnel table
* sub report response. This breakdown dimension expands each funnel step to
@@ -52,7 +52,7 @@ class RunFunnelReportRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.analytics.data.v1alpha.FunnelBreakdown funnel_breakdown = 4 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $funnel_breakdown = null;
+ protected $funnel_breakdown = null;
/**
* Optional. If specified, next action adds a dimension to the funnel
* visualization sub report response. This next action dimension expands each
@@ -64,7 +64,7 @@ class RunFunnelReportRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.analytics.data.v1alpha.FunnelNextAction funnel_next_action = 5 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $funnel_next_action = null;
+ protected $funnel_next_action = null;
/**
* Optional. The funnel visualization type controls the dimensions present in
* the funnel visualization sub report response. If not specified,
@@ -72,7 +72,7 @@ class RunFunnelReportRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.analytics.data.v1alpha.RunFunnelReportRequest.FunnelVisualizationType funnel_visualization_type = 6 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $funnel_visualization_type = 0;
+ protected $funnel_visualization_type = 0;
/**
* Optional. The configurations of segments. Segments are subsets of a
* property's data. In a funnel report with segments, the funnel is evaluated
@@ -94,7 +94,7 @@ class RunFunnelReportRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field int64 limit = 9 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $limit = 0;
+ protected $limit = 0;
/**
* Optional. Dimension filters allow you to ask for only specific dimension
* values in the report. To learn more, see [Creating a Report: Dimension
@@ -103,14 +103,14 @@ class RunFunnelReportRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.analytics.data.v1alpha.FilterExpression dimension_filter = 10 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $dimension_filter = null;
+ protected $dimension_filter = null;
/**
* Optional. Toggles whether to return the current state of this Analytics
* Property's quota. Quota is returned in [PropertyQuota](#PropertyQuota).
*
* Generated from protobuf field bool return_property_quota = 12 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $return_property_quota = false;
+ protected $return_property_quota = false;
/**
* Constructor.
diff --git a/AnalyticsData/src/V1alpha/RunFunnelReportResponse.php b/AnalyticsData/src/V1alpha/RunFunnelReportResponse.php
index ccd724f744ea..7e62c5adcd82 100644
--- a/AnalyticsData/src/V1alpha/RunFunnelReportResponse.php
+++ b/AnalyticsData/src/V1alpha/RunFunnelReportResponse.php
@@ -26,7 +26,7 @@ class RunFunnelReportResponse extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.analytics.data.v1alpha.FunnelSubReport funnel_table = 1;
*/
- private $funnel_table = null;
+ protected $funnel_table = null;
/**
* The funnel visualization is a report with the funnel step, segment, date,
* next action dimension, and active users.
@@ -37,13 +37,13 @@ class RunFunnelReportResponse extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.analytics.data.v1alpha.FunnelSubReport funnel_visualization = 2;
*/
- private $funnel_visualization = null;
+ protected $funnel_visualization = null;
/**
* This Analytics Property's quota state including this request.
*
* Generated from protobuf field .google.analytics.data.v1alpha.PropertyQuota property_quota = 3;
*/
- private $property_quota = null;
+ protected $property_quota = null;
/**
* Identifies what kind of resource this message is. This `kind` is always the
* fixed string "analyticsData#runFunnelReport". Useful to distinguish between
@@ -51,7 +51,7 @@ class RunFunnelReportResponse extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string kind = 4;
*/
- private $kind = '';
+ protected $kind = '';
/**
* Constructor.
diff --git a/AnalyticsData/src/V1alpha/RunPivotReportRequest.php b/AnalyticsData/src/V1alpha/RunPivotReportRequest.php
deleted file mode 100644
index f4d5a7e6807c..000000000000
--- a/AnalyticsData/src/V1alpha/RunPivotReportRequest.php
+++ /dev/null
@@ -1,523 +0,0 @@
-google.analytics.data.v1alpha.RunPivotReportRequest
- */
-class RunPivotReportRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * A property whose events are tracked. Within a batch request, this entity
- * should either be unspecified or consistent with the batch-level entity.
- *
- * Generated from protobuf field .google.analytics.data.v1alpha.Entity entity = 1;
- */
- private $entity = null;
- /**
- * The dimensions requested. All defined dimensions must be used by one of the
- * following: dimension_expression, dimension_filter, pivots, order_bys.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.Dimension dimensions = 2;
- */
- private $dimensions;
- /**
- * The metrics requested, at least one metric needs to be specified. All
- * defined metrics must be used by one of the following: metric_expression,
- * metric_filter, order_bys.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.Metric metrics = 3;
- */
- private $metrics;
- /**
- * The filter clause of dimensions. Dimensions must be requested to be used in
- * this filter. Metrics cannot be used in this filter.
- *
- * Generated from protobuf field .google.analytics.data.v1alpha.FilterExpression dimension_filter = 4;
- */
- private $dimension_filter = null;
- /**
- * The filter clause of metrics. Applied at post aggregation phase, similar to
- * SQL having-clause. Metrics must be requested to be used in this filter.
- * Dimensions cannot be used in this filter.
- *
- * Generated from protobuf field .google.analytics.data.v1alpha.FilterExpression metric_filter = 5;
- */
- private $metric_filter = null;
- /**
- * Describes the visual format of the report's dimensions in columns or rows.
- * The union of the fieldNames (dimension names) in all pivots must be a
- * subset of dimension names defined in Dimensions. No two pivots can share a
- * dimension. A dimension is only visible if it appears in a pivot.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.Pivot pivots = 6;
- */
- private $pivots;
- /**
- * The date range to retrieve event data for the report. If multiple date
- * ranges are specified, event data from each date range is used in the
- * report. A special dimension with field name "dateRange" can be included in
- * a Pivot's field names; if included, the report compares between date
- * ranges. In a cohort request, this `dateRanges` must be unspecified.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.DateRange date_ranges = 7;
- */
- private $date_ranges;
- /**
- * A currency code in ISO4217 format, such as "AED", "USD", "JPY".
- * If the field is empty, the report uses the entity's default currency.
- *
- * Generated from protobuf field string currency_code = 8;
- */
- private $currency_code = '';
- /**
- * Cohort group associated with this request. If there is a cohort group
- * in the request the 'cohort' dimension must be present.
- *
- * Generated from protobuf field .google.analytics.data.v1alpha.CohortSpec cohort_spec = 9;
- */
- private $cohort_spec = null;
- /**
- * If false or unspecified, each row with all metrics equal to 0 will not be
- * returned. If true, these rows will be returned if they are not separately
- * removed by a filter.
- *
- * Generated from protobuf field bool keep_empty_rows = 10;
- */
- private $keep_empty_rows = false;
- /**
- * Toggles whether to return the current state of this Analytics Property's
- * quota. Quota is returned in [PropertyQuota](#PropertyQuota).
- *
- * Generated from protobuf field bool return_property_quota = 11;
- */
- private $return_property_quota = false;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Analytics\Data\V1alpha\Entity $entity
- * A property whose events are tracked. Within a batch request, this entity
- * should either be unspecified or consistent with the batch-level entity.
- * @type \Google\Analytics\Data\V1alpha\Dimension[]|\Google\Protobuf\Internal\RepeatedField $dimensions
- * The dimensions requested. All defined dimensions must be used by one of the
- * following: dimension_expression, dimension_filter, pivots, order_bys.
- * @type \Google\Analytics\Data\V1alpha\Metric[]|\Google\Protobuf\Internal\RepeatedField $metrics
- * The metrics requested, at least one metric needs to be specified. All
- * defined metrics must be used by one of the following: metric_expression,
- * metric_filter, order_bys.
- * @type \Google\Analytics\Data\V1alpha\FilterExpression $dimension_filter
- * The filter clause of dimensions. Dimensions must be requested to be used in
- * this filter. Metrics cannot be used in this filter.
- * @type \Google\Analytics\Data\V1alpha\FilterExpression $metric_filter
- * The filter clause of metrics. Applied at post aggregation phase, similar to
- * SQL having-clause. Metrics must be requested to be used in this filter.
- * Dimensions cannot be used in this filter.
- * @type \Google\Analytics\Data\V1alpha\Pivot[]|\Google\Protobuf\Internal\RepeatedField $pivots
- * Describes the visual format of the report's dimensions in columns or rows.
- * The union of the fieldNames (dimension names) in all pivots must be a
- * subset of dimension names defined in Dimensions. No two pivots can share a
- * dimension. A dimension is only visible if it appears in a pivot.
- * @type \Google\Analytics\Data\V1alpha\DateRange[]|\Google\Protobuf\Internal\RepeatedField $date_ranges
- * The date range to retrieve event data for the report. If multiple date
- * ranges are specified, event data from each date range is used in the
- * report. A special dimension with field name "dateRange" can be included in
- * a Pivot's field names; if included, the report compares between date
- * ranges. In a cohort request, this `dateRanges` must be unspecified.
- * @type string $currency_code
- * A currency code in ISO4217 format, such as "AED", "USD", "JPY".
- * If the field is empty, the report uses the entity's default currency.
- * @type \Google\Analytics\Data\V1alpha\CohortSpec $cohort_spec
- * Cohort group associated with this request. If there is a cohort group
- * in the request the 'cohort' dimension must be present.
- * @type bool $keep_empty_rows
- * If false or unspecified, each row with all metrics equal to 0 will not be
- * returned. If true, these rows will be returned if they are not separately
- * removed by a filter.
- * @type bool $return_property_quota
- * Toggles whether to return the current state of this Analytics Property's
- * quota. Quota is returned in [PropertyQuota](#PropertyQuota).
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Analytics\Data\V1Alpha\AnalyticsDataApi::initOnce();
- parent::__construct($data);
- }
-
- /**
- * A property whose events are tracked. Within a batch request, this entity
- * should either be unspecified or consistent with the batch-level entity.
- *
- * Generated from protobuf field .google.analytics.data.v1alpha.Entity entity = 1;
- * @return \Google\Analytics\Data\V1alpha\Entity|null
- */
- public function getEntity()
- {
- return isset($this->entity) ? $this->entity : null;
- }
-
- public function hasEntity()
- {
- return isset($this->entity);
- }
-
- public function clearEntity()
- {
- unset($this->entity);
- }
-
- /**
- * A property whose events are tracked. Within a batch request, this entity
- * should either be unspecified or consistent with the batch-level entity.
- *
- * Generated from protobuf field .google.analytics.data.v1alpha.Entity entity = 1;
- * @param \Google\Analytics\Data\V1alpha\Entity $var
- * @return $this
- */
- public function setEntity($var)
- {
- GPBUtil::checkMessage($var, \Google\Analytics\Data\V1alpha\Entity::class);
- $this->entity = $var;
-
- return $this;
- }
-
- /**
- * The dimensions requested. All defined dimensions must be used by one of the
- * following: dimension_expression, dimension_filter, pivots, order_bys.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.Dimension dimensions = 2;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getDimensions()
- {
- return $this->dimensions;
- }
-
- /**
- * The dimensions requested. All defined dimensions must be used by one of the
- * following: dimension_expression, dimension_filter, pivots, order_bys.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.Dimension dimensions = 2;
- * @param \Google\Analytics\Data\V1alpha\Dimension[]|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setDimensions($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Data\V1alpha\Dimension::class);
- $this->dimensions = $arr;
-
- return $this;
- }
-
- /**
- * The metrics requested, at least one metric needs to be specified. All
- * defined metrics must be used by one of the following: metric_expression,
- * metric_filter, order_bys.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.Metric metrics = 3;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getMetrics()
- {
- return $this->metrics;
- }
-
- /**
- * The metrics requested, at least one metric needs to be specified. All
- * defined metrics must be used by one of the following: metric_expression,
- * metric_filter, order_bys.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.Metric metrics = 3;
- * @param \Google\Analytics\Data\V1alpha\Metric[]|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setMetrics($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Data\V1alpha\Metric::class);
- $this->metrics = $arr;
-
- return $this;
- }
-
- /**
- * The filter clause of dimensions. Dimensions must be requested to be used in
- * this filter. Metrics cannot be used in this filter.
- *
- * Generated from protobuf field .google.analytics.data.v1alpha.FilterExpression dimension_filter = 4;
- * @return \Google\Analytics\Data\V1alpha\FilterExpression|null
- */
- public function getDimensionFilter()
- {
- return isset($this->dimension_filter) ? $this->dimension_filter : null;
- }
-
- public function hasDimensionFilter()
- {
- return isset($this->dimension_filter);
- }
-
- public function clearDimensionFilter()
- {
- unset($this->dimension_filter);
- }
-
- /**
- * The filter clause of dimensions. Dimensions must be requested to be used in
- * this filter. Metrics cannot be used in this filter.
- *
- * Generated from protobuf field .google.analytics.data.v1alpha.FilterExpression dimension_filter = 4;
- * @param \Google\Analytics\Data\V1alpha\FilterExpression $var
- * @return $this
- */
- public function setDimensionFilter($var)
- {
- GPBUtil::checkMessage($var, \Google\Analytics\Data\V1alpha\FilterExpression::class);
- $this->dimension_filter = $var;
-
- return $this;
- }
-
- /**
- * The filter clause of metrics. Applied at post aggregation phase, similar to
- * SQL having-clause. Metrics must be requested to be used in this filter.
- * Dimensions cannot be used in this filter.
- *
- * Generated from protobuf field .google.analytics.data.v1alpha.FilterExpression metric_filter = 5;
- * @return \Google\Analytics\Data\V1alpha\FilterExpression|null
- */
- public function getMetricFilter()
- {
- return isset($this->metric_filter) ? $this->metric_filter : null;
- }
-
- public function hasMetricFilter()
- {
- return isset($this->metric_filter);
- }
-
- public function clearMetricFilter()
- {
- unset($this->metric_filter);
- }
-
- /**
- * The filter clause of metrics. Applied at post aggregation phase, similar to
- * SQL having-clause. Metrics must be requested to be used in this filter.
- * Dimensions cannot be used in this filter.
- *
- * Generated from protobuf field .google.analytics.data.v1alpha.FilterExpression metric_filter = 5;
- * @param \Google\Analytics\Data\V1alpha\FilterExpression $var
- * @return $this
- */
- public function setMetricFilter($var)
- {
- GPBUtil::checkMessage($var, \Google\Analytics\Data\V1alpha\FilterExpression::class);
- $this->metric_filter = $var;
-
- return $this;
- }
-
- /**
- * Describes the visual format of the report's dimensions in columns or rows.
- * The union of the fieldNames (dimension names) in all pivots must be a
- * subset of dimension names defined in Dimensions. No two pivots can share a
- * dimension. A dimension is only visible if it appears in a pivot.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.Pivot pivots = 6;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getPivots()
- {
- return $this->pivots;
- }
-
- /**
- * Describes the visual format of the report's dimensions in columns or rows.
- * The union of the fieldNames (dimension names) in all pivots must be a
- * subset of dimension names defined in Dimensions. No two pivots can share a
- * dimension. A dimension is only visible if it appears in a pivot.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.Pivot pivots = 6;
- * @param \Google\Analytics\Data\V1alpha\Pivot[]|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setPivots($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Data\V1alpha\Pivot::class);
- $this->pivots = $arr;
-
- return $this;
- }
-
- /**
- * The date range to retrieve event data for the report. If multiple date
- * ranges are specified, event data from each date range is used in the
- * report. A special dimension with field name "dateRange" can be included in
- * a Pivot's field names; if included, the report compares between date
- * ranges. In a cohort request, this `dateRanges` must be unspecified.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.DateRange date_ranges = 7;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getDateRanges()
- {
- return $this->date_ranges;
- }
-
- /**
- * The date range to retrieve event data for the report. If multiple date
- * ranges are specified, event data from each date range is used in the
- * report. A special dimension with field name "dateRange" can be included in
- * a Pivot's field names; if included, the report compares between date
- * ranges. In a cohort request, this `dateRanges` must be unspecified.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.DateRange date_ranges = 7;
- * @param \Google\Analytics\Data\V1alpha\DateRange[]|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setDateRanges($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Data\V1alpha\DateRange::class);
- $this->date_ranges = $arr;
-
- return $this;
- }
-
- /**
- * A currency code in ISO4217 format, such as "AED", "USD", "JPY".
- * If the field is empty, the report uses the entity's default currency.
- *
- * Generated from protobuf field string currency_code = 8;
- * @return string
- */
- public function getCurrencyCode()
- {
- return $this->currency_code;
- }
-
- /**
- * A currency code in ISO4217 format, such as "AED", "USD", "JPY".
- * If the field is empty, the report uses the entity's default currency.
- *
- * Generated from protobuf field string currency_code = 8;
- * @param string $var
- * @return $this
- */
- public function setCurrencyCode($var)
- {
- GPBUtil::checkString($var, True);
- $this->currency_code = $var;
-
- return $this;
- }
-
- /**
- * Cohort group associated with this request. If there is a cohort group
- * in the request the 'cohort' dimension must be present.
- *
- * Generated from protobuf field .google.analytics.data.v1alpha.CohortSpec cohort_spec = 9;
- * @return \Google\Analytics\Data\V1alpha\CohortSpec|null
- */
- public function getCohortSpec()
- {
- return isset($this->cohort_spec) ? $this->cohort_spec : null;
- }
-
- public function hasCohortSpec()
- {
- return isset($this->cohort_spec);
- }
-
- public function clearCohortSpec()
- {
- unset($this->cohort_spec);
- }
-
- /**
- * Cohort group associated with this request. If there is a cohort group
- * in the request the 'cohort' dimension must be present.
- *
- * Generated from protobuf field .google.analytics.data.v1alpha.CohortSpec cohort_spec = 9;
- * @param \Google\Analytics\Data\V1alpha\CohortSpec $var
- * @return $this
- */
- public function setCohortSpec($var)
- {
- GPBUtil::checkMessage($var, \Google\Analytics\Data\V1alpha\CohortSpec::class);
- $this->cohort_spec = $var;
-
- return $this;
- }
-
- /**
- * If false or unspecified, each row with all metrics equal to 0 will not be
- * returned. If true, these rows will be returned if they are not separately
- * removed by a filter.
- *
- * Generated from protobuf field bool keep_empty_rows = 10;
- * @return bool
- */
- public function getKeepEmptyRows()
- {
- return $this->keep_empty_rows;
- }
-
- /**
- * If false or unspecified, each row with all metrics equal to 0 will not be
- * returned. If true, these rows will be returned if they are not separately
- * removed by a filter.
- *
- * Generated from protobuf field bool keep_empty_rows = 10;
- * @param bool $var
- * @return $this
- */
- public function setKeepEmptyRows($var)
- {
- GPBUtil::checkBool($var);
- $this->keep_empty_rows = $var;
-
- return $this;
- }
-
- /**
- * Toggles whether to return the current state of this Analytics Property's
- * quota. Quota is returned in [PropertyQuota](#PropertyQuota).
- *
- * Generated from protobuf field bool return_property_quota = 11;
- * @return bool
- */
- public function getReturnPropertyQuota()
- {
- return $this->return_property_quota;
- }
-
- /**
- * Toggles whether to return the current state of this Analytics Property's
- * quota. Quota is returned in [PropertyQuota](#PropertyQuota).
- *
- * Generated from protobuf field bool return_property_quota = 11;
- * @param bool $var
- * @return $this
- */
- public function setReturnPropertyQuota($var)
- {
- GPBUtil::checkBool($var);
- $this->return_property_quota = $var;
-
- return $this;
- }
-
-}
-
diff --git a/AnalyticsData/src/V1alpha/RunPivotReportResponse.php b/AnalyticsData/src/V1alpha/RunPivotReportResponse.php
deleted file mode 100644
index 49b5a65db303..000000000000
--- a/AnalyticsData/src/V1alpha/RunPivotReportResponse.php
+++ /dev/null
@@ -1,439 +0,0 @@
-google.analytics.data.v1alpha.RunPivotReportResponse
- */
-class RunPivotReportResponse extends \Google\Protobuf\Internal\Message
-{
- /**
- * Summarizes the columns and rows created by a pivot. Each pivot in the
- * request produces one header in the response. If we have a request like
- * this:
- * "pivots": [{
- * "fieldNames": ["country",
- * "city"]
- * },
- * {
- * "fieldNames": "eventName"
- * }]
- * We will have the following `pivotHeaders` in the response:
- * "pivotHeaders" : [{
- * "dimensionHeaders": [{
- * "dimensionValues": [
- * { "value": "United Kingdom" },
- * { "value": "London" }
- * ]
- * },
- * {
- * "dimensionValues": [
- * { "value": "Japan" },
- * { "value": "Osaka" }
- * ]
- * }]
- * },
- * {
- * "dimensionHeaders": [{
- * "dimensionValues": [{ "value": "session_start" }]
- * },
- * {
- * "dimensionValues": [{ "value": "scroll" }]
- * }]
- * }]
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.PivotHeader pivot_headers = 1;
- */
- private $pivot_headers;
- /**
- * Describes dimension columns. The number of DimensionHeaders and ordering of
- * DimensionHeaders matches the dimensions present in rows.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.DimensionHeader dimension_headers = 7;
- */
- private $dimension_headers;
- /**
- * Describes metric columns. The number of MetricHeaders and ordering of
- * MetricHeaders matches the metrics present in rows.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.MetricHeader metric_headers = 2;
- */
- private $metric_headers;
- /**
- * Rows of dimension value combinations and metric values in the report.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.Row rows = 3;
- */
- private $rows;
- /**
- * Aggregation of metric values. Can be totals, minimums, or maximums. The
- * returned aggregations are controlled by the metric_aggregations in the
- * pivot. The type of aggregation returned in each row is shown by the
- * dimension_values which are set to "RESERVED_".
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.Row aggregates = 4;
- */
- private $aggregates;
- /**
- * Metadata for the report.
- *
- * Generated from protobuf field .google.analytics.data.v1alpha.ResponseMetaData metadata = 5;
- */
- private $metadata = null;
- /**
- * This Analytics Property's quota state including this request.
- *
- * Generated from protobuf field .google.analytics.data.v1alpha.PropertyQuota property_quota = 6;
- */
- private $property_quota = null;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Analytics\Data\V1alpha\PivotHeader[]|\Google\Protobuf\Internal\RepeatedField $pivot_headers
- * Summarizes the columns and rows created by a pivot. Each pivot in the
- * request produces one header in the response. If we have a request like
- * this:
- * "pivots": [{
- * "fieldNames": ["country",
- * "city"]
- * },
- * {
- * "fieldNames": "eventName"
- * }]
- * We will have the following `pivotHeaders` in the response:
- * "pivotHeaders" : [{
- * "dimensionHeaders": [{
- * "dimensionValues": [
- * { "value": "United Kingdom" },
- * { "value": "London" }
- * ]
- * },
- * {
- * "dimensionValues": [
- * { "value": "Japan" },
- * { "value": "Osaka" }
- * ]
- * }]
- * },
- * {
- * "dimensionHeaders": [{
- * "dimensionValues": [{ "value": "session_start" }]
- * },
- * {
- * "dimensionValues": [{ "value": "scroll" }]
- * }]
- * }]
- * @type \Google\Analytics\Data\V1alpha\DimensionHeader[]|\Google\Protobuf\Internal\RepeatedField $dimension_headers
- * Describes dimension columns. The number of DimensionHeaders and ordering of
- * DimensionHeaders matches the dimensions present in rows.
- * @type \Google\Analytics\Data\V1alpha\MetricHeader[]|\Google\Protobuf\Internal\RepeatedField $metric_headers
- * Describes metric columns. The number of MetricHeaders and ordering of
- * MetricHeaders matches the metrics present in rows.
- * @type \Google\Analytics\Data\V1alpha\Row[]|\Google\Protobuf\Internal\RepeatedField $rows
- * Rows of dimension value combinations and metric values in the report.
- * @type \Google\Analytics\Data\V1alpha\Row[]|\Google\Protobuf\Internal\RepeatedField $aggregates
- * Aggregation of metric values. Can be totals, minimums, or maximums. The
- * returned aggregations are controlled by the metric_aggregations in the
- * pivot. The type of aggregation returned in each row is shown by the
- * dimension_values which are set to "RESERVED_".
- * @type \Google\Analytics\Data\V1alpha\ResponseMetaData $metadata
- * Metadata for the report.
- * @type \Google\Analytics\Data\V1alpha\PropertyQuota $property_quota
- * This Analytics Property's quota state including this request.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Analytics\Data\V1Alpha\AnalyticsDataApi::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Summarizes the columns and rows created by a pivot. Each pivot in the
- * request produces one header in the response. If we have a request like
- * this:
- * "pivots": [{
- * "fieldNames": ["country",
- * "city"]
- * },
- * {
- * "fieldNames": "eventName"
- * }]
- * We will have the following `pivotHeaders` in the response:
- * "pivotHeaders" : [{
- * "dimensionHeaders": [{
- * "dimensionValues": [
- * { "value": "United Kingdom" },
- * { "value": "London" }
- * ]
- * },
- * {
- * "dimensionValues": [
- * { "value": "Japan" },
- * { "value": "Osaka" }
- * ]
- * }]
- * },
- * {
- * "dimensionHeaders": [{
- * "dimensionValues": [{ "value": "session_start" }]
- * },
- * {
- * "dimensionValues": [{ "value": "scroll" }]
- * }]
- * }]
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.PivotHeader pivot_headers = 1;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getPivotHeaders()
- {
- return $this->pivot_headers;
- }
-
- /**
- * Summarizes the columns and rows created by a pivot. Each pivot in the
- * request produces one header in the response. If we have a request like
- * this:
- * "pivots": [{
- * "fieldNames": ["country",
- * "city"]
- * },
- * {
- * "fieldNames": "eventName"
- * }]
- * We will have the following `pivotHeaders` in the response:
- * "pivotHeaders" : [{
- * "dimensionHeaders": [{
- * "dimensionValues": [
- * { "value": "United Kingdom" },
- * { "value": "London" }
- * ]
- * },
- * {
- * "dimensionValues": [
- * { "value": "Japan" },
- * { "value": "Osaka" }
- * ]
- * }]
- * },
- * {
- * "dimensionHeaders": [{
- * "dimensionValues": [{ "value": "session_start" }]
- * },
- * {
- * "dimensionValues": [{ "value": "scroll" }]
- * }]
- * }]
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.PivotHeader pivot_headers = 1;
- * @param \Google\Analytics\Data\V1alpha\PivotHeader[]|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setPivotHeaders($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Data\V1alpha\PivotHeader::class);
- $this->pivot_headers = $arr;
-
- return $this;
- }
-
- /**
- * Describes dimension columns. The number of DimensionHeaders and ordering of
- * DimensionHeaders matches the dimensions present in rows.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.DimensionHeader dimension_headers = 7;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getDimensionHeaders()
- {
- return $this->dimension_headers;
- }
-
- /**
- * Describes dimension columns. The number of DimensionHeaders and ordering of
- * DimensionHeaders matches the dimensions present in rows.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.DimensionHeader dimension_headers = 7;
- * @param \Google\Analytics\Data\V1alpha\DimensionHeader[]|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setDimensionHeaders($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Data\V1alpha\DimensionHeader::class);
- $this->dimension_headers = $arr;
-
- return $this;
- }
-
- /**
- * Describes metric columns. The number of MetricHeaders and ordering of
- * MetricHeaders matches the metrics present in rows.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.MetricHeader metric_headers = 2;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getMetricHeaders()
- {
- return $this->metric_headers;
- }
-
- /**
- * Describes metric columns. The number of MetricHeaders and ordering of
- * MetricHeaders matches the metrics present in rows.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.MetricHeader metric_headers = 2;
- * @param \Google\Analytics\Data\V1alpha\MetricHeader[]|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setMetricHeaders($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Data\V1alpha\MetricHeader::class);
- $this->metric_headers = $arr;
-
- return $this;
- }
-
- /**
- * Rows of dimension value combinations and metric values in the report.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.Row rows = 3;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getRows()
- {
- return $this->rows;
- }
-
- /**
- * Rows of dimension value combinations and metric values in the report.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.Row rows = 3;
- * @param \Google\Analytics\Data\V1alpha\Row[]|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setRows($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Data\V1alpha\Row::class);
- $this->rows = $arr;
-
- return $this;
- }
-
- /**
- * Aggregation of metric values. Can be totals, minimums, or maximums. The
- * returned aggregations are controlled by the metric_aggregations in the
- * pivot. The type of aggregation returned in each row is shown by the
- * dimension_values which are set to "RESERVED_".
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.Row aggregates = 4;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getAggregates()
- {
- return $this->aggregates;
- }
-
- /**
- * Aggregation of metric values. Can be totals, minimums, or maximums. The
- * returned aggregations are controlled by the metric_aggregations in the
- * pivot. The type of aggregation returned in each row is shown by the
- * dimension_values which are set to "RESERVED_".
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.Row aggregates = 4;
- * @param \Google\Analytics\Data\V1alpha\Row[]|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setAggregates($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Data\V1alpha\Row::class);
- $this->aggregates = $arr;
-
- return $this;
- }
-
- /**
- * Metadata for the report.
- *
- * Generated from protobuf field .google.analytics.data.v1alpha.ResponseMetaData metadata = 5;
- * @return \Google\Analytics\Data\V1alpha\ResponseMetaData|null
- */
- public function getMetadata()
- {
- return isset($this->metadata) ? $this->metadata : null;
- }
-
- public function hasMetadata()
- {
- return isset($this->metadata);
- }
-
- public function clearMetadata()
- {
- unset($this->metadata);
- }
-
- /**
- * Metadata for the report.
- *
- * Generated from protobuf field .google.analytics.data.v1alpha.ResponseMetaData metadata = 5;
- * @param \Google\Analytics\Data\V1alpha\ResponseMetaData $var
- * @return $this
- */
- public function setMetadata($var)
- {
- GPBUtil::checkMessage($var, \Google\Analytics\Data\V1alpha\ResponseMetaData::class);
- $this->metadata = $var;
-
- return $this;
- }
-
- /**
- * This Analytics Property's quota state including this request.
- *
- * Generated from protobuf field .google.analytics.data.v1alpha.PropertyQuota property_quota = 6;
- * @return \Google\Analytics\Data\V1alpha\PropertyQuota|null
- */
- public function getPropertyQuota()
- {
- return isset($this->property_quota) ? $this->property_quota : null;
- }
-
- public function hasPropertyQuota()
- {
- return isset($this->property_quota);
- }
-
- public function clearPropertyQuota()
- {
- unset($this->property_quota);
- }
-
- /**
- * This Analytics Property's quota state including this request.
- *
- * Generated from protobuf field .google.analytics.data.v1alpha.PropertyQuota property_quota = 6;
- * @param \Google\Analytics\Data\V1alpha\PropertyQuota $var
- * @return $this
- */
- public function setPropertyQuota($var)
- {
- GPBUtil::checkMessage($var, \Google\Analytics\Data\V1alpha\PropertyQuota::class);
- $this->property_quota = $var;
-
- return $this;
- }
-
-}
-
diff --git a/AnalyticsData/src/V1alpha/RunRealtimeReportRequest.php b/AnalyticsData/src/V1alpha/RunRealtimeReportRequest.php
deleted file mode 100644
index 1ac501be23f6..000000000000
--- a/AnalyticsData/src/V1alpha/RunRealtimeReportRequest.php
+++ /dev/null
@@ -1,399 +0,0 @@
-google.analytics.data.v1alpha.RunRealtimeReportRequest
- */
-class RunRealtimeReportRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * A Google Analytics GA4 property identifier whose events are tracked.
- * Specified in the URL path and not the body. To learn more, see [where to
- * find your Property
- * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
- * Example: properties/1234
- *
- * Generated from protobuf field string property = 1;
- */
- private $property = '';
- /**
- * The dimensions requested and displayed.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.Dimension dimensions = 2;
- */
- private $dimensions;
- /**
- * The metrics requested and displayed.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.Metric metrics = 3;
- */
- private $metrics;
- /**
- * The number of rows to return. If unspecified, 10 rows are returned. If
- * -1, all rows are returned.
- *
- * Generated from protobuf field int64 limit = 4;
- */
- private $limit = 0;
- /**
- * The filter clause of dimensions. Dimensions must be requested to be used in
- * this filter. Metrics cannot be used in this filter.
- *
- * Generated from protobuf field .google.analytics.data.v1alpha.FilterExpression dimension_filter = 5;
- */
- private $dimension_filter = null;
- /**
- * The filter clause of metrics. Applied at post aggregation phase, similar to
- * SQL having-clause. Metrics must be requested to be used in this filter.
- * Dimensions cannot be used in this filter.
- *
- * Generated from protobuf field .google.analytics.data.v1alpha.FilterExpression metric_filter = 6;
- */
- private $metric_filter = null;
- /**
- * Aggregation of metrics. Aggregated metric values will be shown in rows
- * where the dimension_values are set to "RESERVED_(MetricAggregation)".
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.MetricAggregation metric_aggregations = 7;
- */
- private $metric_aggregations;
- /**
- * Specifies how rows are ordered in the response.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.OrderBy order_bys = 8;
- */
- private $order_bys;
- /**
- * Toggles whether to return the current state of this Analytics Property's
- * Realtime quota. Quota is returned in [PropertyQuota](#PropertyQuota).
- *
- * Generated from protobuf field bool return_property_quota = 9;
- */
- private $return_property_quota = false;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $property
- * A Google Analytics GA4 property identifier whose events are tracked.
- * Specified in the URL path and not the body. To learn more, see [where to
- * find your Property
- * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
- * Example: properties/1234
- * @type \Google\Analytics\Data\V1alpha\Dimension[]|\Google\Protobuf\Internal\RepeatedField $dimensions
- * The dimensions requested and displayed.
- * @type \Google\Analytics\Data\V1alpha\Metric[]|\Google\Protobuf\Internal\RepeatedField $metrics
- * The metrics requested and displayed.
- * @type int|string $limit
- * The number of rows to return. If unspecified, 10 rows are returned. If
- * -1, all rows are returned.
- * @type \Google\Analytics\Data\V1alpha\FilterExpression $dimension_filter
- * The filter clause of dimensions. Dimensions must be requested to be used in
- * this filter. Metrics cannot be used in this filter.
- * @type \Google\Analytics\Data\V1alpha\FilterExpression $metric_filter
- * The filter clause of metrics. Applied at post aggregation phase, similar to
- * SQL having-clause. Metrics must be requested to be used in this filter.
- * Dimensions cannot be used in this filter.
- * @type int[]|\Google\Protobuf\Internal\RepeatedField $metric_aggregations
- * Aggregation of metrics. Aggregated metric values will be shown in rows
- * where the dimension_values are set to "RESERVED_(MetricAggregation)".
- * @type \Google\Analytics\Data\V1alpha\OrderBy[]|\Google\Protobuf\Internal\RepeatedField $order_bys
- * Specifies how rows are ordered in the response.
- * @type bool $return_property_quota
- * Toggles whether to return the current state of this Analytics Property's
- * Realtime quota. Quota is returned in [PropertyQuota](#PropertyQuota).
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Analytics\Data\V1Alpha\AnalyticsDataApi::initOnce();
- parent::__construct($data);
- }
-
- /**
- * A Google Analytics GA4 property identifier whose events are tracked.
- * Specified in the URL path and not the body. To learn more, see [where to
- * find your Property
- * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
- * Example: properties/1234
- *
- * Generated from protobuf field string property = 1;
- * @return string
- */
- public function getProperty()
- {
- return $this->property;
- }
-
- /**
- * A Google Analytics GA4 property identifier whose events are tracked.
- * Specified in the URL path and not the body. To learn more, see [where to
- * find your Property
- * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
- * Example: properties/1234
- *
- * Generated from protobuf field string property = 1;
- * @param string $var
- * @return $this
- */
- public function setProperty($var)
- {
- GPBUtil::checkString($var, True);
- $this->property = $var;
-
- return $this;
- }
-
- /**
- * The dimensions requested and displayed.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.Dimension dimensions = 2;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getDimensions()
- {
- return $this->dimensions;
- }
-
- /**
- * The dimensions requested and displayed.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.Dimension dimensions = 2;
- * @param \Google\Analytics\Data\V1alpha\Dimension[]|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setDimensions($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Data\V1alpha\Dimension::class);
- $this->dimensions = $arr;
-
- return $this;
- }
-
- /**
- * The metrics requested and displayed.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.Metric metrics = 3;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getMetrics()
- {
- return $this->metrics;
- }
-
- /**
- * The metrics requested and displayed.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.Metric metrics = 3;
- * @param \Google\Analytics\Data\V1alpha\Metric[]|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setMetrics($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Data\V1alpha\Metric::class);
- $this->metrics = $arr;
-
- return $this;
- }
-
- /**
- * The number of rows to return. If unspecified, 10 rows are returned. If
- * -1, all rows are returned.
- *
- * Generated from protobuf field int64 limit = 4;
- * @return int|string
- */
- public function getLimit()
- {
- return $this->limit;
- }
-
- /**
- * The number of rows to return. If unspecified, 10 rows are returned. If
- * -1, all rows are returned.
- *
- * Generated from protobuf field int64 limit = 4;
- * @param int|string $var
- * @return $this
- */
- public function setLimit($var)
- {
- GPBUtil::checkInt64($var);
- $this->limit = $var;
-
- return $this;
- }
-
- /**
- * The filter clause of dimensions. Dimensions must be requested to be used in
- * this filter. Metrics cannot be used in this filter.
- *
- * Generated from protobuf field .google.analytics.data.v1alpha.FilterExpression dimension_filter = 5;
- * @return \Google\Analytics\Data\V1alpha\FilterExpression|null
- */
- public function getDimensionFilter()
- {
- return isset($this->dimension_filter) ? $this->dimension_filter : null;
- }
-
- public function hasDimensionFilter()
- {
- return isset($this->dimension_filter);
- }
-
- public function clearDimensionFilter()
- {
- unset($this->dimension_filter);
- }
-
- /**
- * The filter clause of dimensions. Dimensions must be requested to be used in
- * this filter. Metrics cannot be used in this filter.
- *
- * Generated from protobuf field .google.analytics.data.v1alpha.FilterExpression dimension_filter = 5;
- * @param \Google\Analytics\Data\V1alpha\FilterExpression $var
- * @return $this
- */
- public function setDimensionFilter($var)
- {
- GPBUtil::checkMessage($var, \Google\Analytics\Data\V1alpha\FilterExpression::class);
- $this->dimension_filter = $var;
-
- return $this;
- }
-
- /**
- * The filter clause of metrics. Applied at post aggregation phase, similar to
- * SQL having-clause. Metrics must be requested to be used in this filter.
- * Dimensions cannot be used in this filter.
- *
- * Generated from protobuf field .google.analytics.data.v1alpha.FilterExpression metric_filter = 6;
- * @return \Google\Analytics\Data\V1alpha\FilterExpression|null
- */
- public function getMetricFilter()
- {
- return isset($this->metric_filter) ? $this->metric_filter : null;
- }
-
- public function hasMetricFilter()
- {
- return isset($this->metric_filter);
- }
-
- public function clearMetricFilter()
- {
- unset($this->metric_filter);
- }
-
- /**
- * The filter clause of metrics. Applied at post aggregation phase, similar to
- * SQL having-clause. Metrics must be requested to be used in this filter.
- * Dimensions cannot be used in this filter.
- *
- * Generated from protobuf field .google.analytics.data.v1alpha.FilterExpression metric_filter = 6;
- * @param \Google\Analytics\Data\V1alpha\FilterExpression $var
- * @return $this
- */
- public function setMetricFilter($var)
- {
- GPBUtil::checkMessage($var, \Google\Analytics\Data\V1alpha\FilterExpression::class);
- $this->metric_filter = $var;
-
- return $this;
- }
-
- /**
- * Aggregation of metrics. Aggregated metric values will be shown in rows
- * where the dimension_values are set to "RESERVED_(MetricAggregation)".
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.MetricAggregation metric_aggregations = 7;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getMetricAggregations()
- {
- return $this->metric_aggregations;
- }
-
- /**
- * Aggregation of metrics. Aggregated metric values will be shown in rows
- * where the dimension_values are set to "RESERVED_(MetricAggregation)".
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.MetricAggregation metric_aggregations = 7;
- * @param int[]|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setMetricAggregations($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Analytics\Data\V1alpha\MetricAggregation::class);
- $this->metric_aggregations = $arr;
-
- return $this;
- }
-
- /**
- * Specifies how rows are ordered in the response.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.OrderBy order_bys = 8;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getOrderBys()
- {
- return $this->order_bys;
- }
-
- /**
- * Specifies how rows are ordered in the response.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.OrderBy order_bys = 8;
- * @param \Google\Analytics\Data\V1alpha\OrderBy[]|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setOrderBys($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Data\V1alpha\OrderBy::class);
- $this->order_bys = $arr;
-
- return $this;
- }
-
- /**
- * Toggles whether to return the current state of this Analytics Property's
- * Realtime quota. Quota is returned in [PropertyQuota](#PropertyQuota).
- *
- * Generated from protobuf field bool return_property_quota = 9;
- * @return bool
- */
- public function getReturnPropertyQuota()
- {
- return $this->return_property_quota;
- }
-
- /**
- * Toggles whether to return the current state of this Analytics Property's
- * Realtime quota. Quota is returned in [PropertyQuota](#PropertyQuota).
- *
- * Generated from protobuf field bool return_property_quota = 9;
- * @param bool $var
- * @return $this
- */
- public function setReturnPropertyQuota($var)
- {
- GPBUtil::checkBool($var);
- $this->return_property_quota = $var;
-
- return $this;
- }
-
-}
-
diff --git a/AnalyticsData/src/V1alpha/RunRealtimeReportResponse.php b/AnalyticsData/src/V1alpha/RunRealtimeReportResponse.php
deleted file mode 100644
index ae0b8abc4d70..000000000000
--- a/AnalyticsData/src/V1alpha/RunRealtimeReportResponse.php
+++ /dev/null
@@ -1,335 +0,0 @@
-google.analytics.data.v1alpha.RunRealtimeReportResponse
- */
-class RunRealtimeReportResponse extends \Google\Protobuf\Internal\Message
-{
- /**
- * Describes dimension columns. The number of DimensionHeaders and ordering of
- * DimensionHeaders matches the dimensions present in rows.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.DimensionHeader dimension_headers = 1;
- */
- private $dimension_headers;
- /**
- * Describes metric columns. The number of MetricHeaders and ordering of
- * MetricHeaders matches the metrics present in rows.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.MetricHeader metric_headers = 2;
- */
- private $metric_headers;
- /**
- * Rows of dimension value combinations and metric values in the report.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.Row rows = 3;
- */
- private $rows;
- /**
- * If requested, the totaled values of metrics.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.Row totals = 4;
- */
- private $totals;
- /**
- * If requested, the maximum values of metrics.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.Row maximums = 5;
- */
- private $maximums;
- /**
- * If requested, the minimum values of metrics.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.Row minimums = 6;
- */
- private $minimums;
- /**
- * The total number of rows in the query result, regardless of the number of
- * rows returned in the response. For example if a query returns 175 rows and
- * includes limit = 50 in the API request, the response will contain row_count
- * = 175 but only 50 rows.
- *
- * Generated from protobuf field int32 row_count = 7;
- */
- private $row_count = 0;
- /**
- * This Analytics Property's Realtime quota state including this request.
- *
- * Generated from protobuf field .google.analytics.data.v1alpha.PropertyQuota property_quota = 8;
- */
- private $property_quota = null;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Analytics\Data\V1alpha\DimensionHeader[]|\Google\Protobuf\Internal\RepeatedField $dimension_headers
- * Describes dimension columns. The number of DimensionHeaders and ordering of
- * DimensionHeaders matches the dimensions present in rows.
- * @type \Google\Analytics\Data\V1alpha\MetricHeader[]|\Google\Protobuf\Internal\RepeatedField $metric_headers
- * Describes metric columns. The number of MetricHeaders and ordering of
- * MetricHeaders matches the metrics present in rows.
- * @type \Google\Analytics\Data\V1alpha\Row[]|\Google\Protobuf\Internal\RepeatedField $rows
- * Rows of dimension value combinations and metric values in the report.
- * @type \Google\Analytics\Data\V1alpha\Row[]|\Google\Protobuf\Internal\RepeatedField $totals
- * If requested, the totaled values of metrics.
- * @type \Google\Analytics\Data\V1alpha\Row[]|\Google\Protobuf\Internal\RepeatedField $maximums
- * If requested, the maximum values of metrics.
- * @type \Google\Analytics\Data\V1alpha\Row[]|\Google\Protobuf\Internal\RepeatedField $minimums
- * If requested, the minimum values of metrics.
- * @type int $row_count
- * The total number of rows in the query result, regardless of the number of
- * rows returned in the response. For example if a query returns 175 rows and
- * includes limit = 50 in the API request, the response will contain row_count
- * = 175 but only 50 rows.
- * @type \Google\Analytics\Data\V1alpha\PropertyQuota $property_quota
- * This Analytics Property's Realtime quota state including this request.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Analytics\Data\V1Alpha\AnalyticsDataApi::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Describes dimension columns. The number of DimensionHeaders and ordering of
- * DimensionHeaders matches the dimensions present in rows.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.DimensionHeader dimension_headers = 1;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getDimensionHeaders()
- {
- return $this->dimension_headers;
- }
-
- /**
- * Describes dimension columns. The number of DimensionHeaders and ordering of
- * DimensionHeaders matches the dimensions present in rows.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.DimensionHeader dimension_headers = 1;
- * @param \Google\Analytics\Data\V1alpha\DimensionHeader[]|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setDimensionHeaders($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Data\V1alpha\DimensionHeader::class);
- $this->dimension_headers = $arr;
-
- return $this;
- }
-
- /**
- * Describes metric columns. The number of MetricHeaders and ordering of
- * MetricHeaders matches the metrics present in rows.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.MetricHeader metric_headers = 2;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getMetricHeaders()
- {
- return $this->metric_headers;
- }
-
- /**
- * Describes metric columns. The number of MetricHeaders and ordering of
- * MetricHeaders matches the metrics present in rows.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.MetricHeader metric_headers = 2;
- * @param \Google\Analytics\Data\V1alpha\MetricHeader[]|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setMetricHeaders($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Data\V1alpha\MetricHeader::class);
- $this->metric_headers = $arr;
-
- return $this;
- }
-
- /**
- * Rows of dimension value combinations and metric values in the report.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.Row rows = 3;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getRows()
- {
- return $this->rows;
- }
-
- /**
- * Rows of dimension value combinations and metric values in the report.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.Row rows = 3;
- * @param \Google\Analytics\Data\V1alpha\Row[]|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setRows($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Data\V1alpha\Row::class);
- $this->rows = $arr;
-
- return $this;
- }
-
- /**
- * If requested, the totaled values of metrics.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.Row totals = 4;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getTotals()
- {
- return $this->totals;
- }
-
- /**
- * If requested, the totaled values of metrics.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.Row totals = 4;
- * @param \Google\Analytics\Data\V1alpha\Row[]|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setTotals($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Data\V1alpha\Row::class);
- $this->totals = $arr;
-
- return $this;
- }
-
- /**
- * If requested, the maximum values of metrics.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.Row maximums = 5;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getMaximums()
- {
- return $this->maximums;
- }
-
- /**
- * If requested, the maximum values of metrics.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.Row maximums = 5;
- * @param \Google\Analytics\Data\V1alpha\Row[]|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setMaximums($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Data\V1alpha\Row::class);
- $this->maximums = $arr;
-
- return $this;
- }
-
- /**
- * If requested, the minimum values of metrics.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.Row minimums = 6;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getMinimums()
- {
- return $this->minimums;
- }
-
- /**
- * If requested, the minimum values of metrics.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.Row minimums = 6;
- * @param \Google\Analytics\Data\V1alpha\Row[]|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setMinimums($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Data\V1alpha\Row::class);
- $this->minimums = $arr;
-
- return $this;
- }
-
- /**
- * The total number of rows in the query result, regardless of the number of
- * rows returned in the response. For example if a query returns 175 rows and
- * includes limit = 50 in the API request, the response will contain row_count
- * = 175 but only 50 rows.
- *
- * Generated from protobuf field int32 row_count = 7;
- * @return int
- */
- public function getRowCount()
- {
- return $this->row_count;
- }
-
- /**
- * The total number of rows in the query result, regardless of the number of
- * rows returned in the response. For example if a query returns 175 rows and
- * includes limit = 50 in the API request, the response will contain row_count
- * = 175 but only 50 rows.
- *
- * Generated from protobuf field int32 row_count = 7;
- * @param int $var
- * @return $this
- */
- public function setRowCount($var)
- {
- GPBUtil::checkInt32($var);
- $this->row_count = $var;
-
- return $this;
- }
-
- /**
- * This Analytics Property's Realtime quota state including this request.
- *
- * Generated from protobuf field .google.analytics.data.v1alpha.PropertyQuota property_quota = 8;
- * @return \Google\Analytics\Data\V1alpha\PropertyQuota|null
- */
- public function getPropertyQuota()
- {
- return isset($this->property_quota) ? $this->property_quota : null;
- }
-
- public function hasPropertyQuota()
- {
- return isset($this->property_quota);
- }
-
- public function clearPropertyQuota()
- {
- unset($this->property_quota);
- }
-
- /**
- * This Analytics Property's Realtime quota state including this request.
- *
- * Generated from protobuf field .google.analytics.data.v1alpha.PropertyQuota property_quota = 8;
- * @param \Google\Analytics\Data\V1alpha\PropertyQuota $var
- * @return $this
- */
- public function setPropertyQuota($var)
- {
- GPBUtil::checkMessage($var, \Google\Analytics\Data\V1alpha\PropertyQuota::class);
- $this->property_quota = $var;
-
- return $this;
- }
-
-}
-
diff --git a/AnalyticsData/src/V1alpha/RunReportRequest.php b/AnalyticsData/src/V1alpha/RunReportRequest.php
deleted file mode 100644
index fec4db6c1d2b..000000000000
--- a/AnalyticsData/src/V1alpha/RunReportRequest.php
+++ /dev/null
@@ -1,625 +0,0 @@
-google.analytics.data.v1alpha.RunReportRequest
- */
-class RunReportRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * A property whose events are tracked. Within a batch request, this entity
- * should either be unspecified or consistent with the batch-level entity.
- *
- * Generated from protobuf field .google.analytics.data.v1alpha.Entity entity = 1;
- */
- private $entity = null;
- /**
- * The dimensions requested and displayed.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.Dimension dimensions = 2;
- */
- private $dimensions;
- /**
- * The metrics requested and displayed.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.Metric metrics = 3;
- */
- private $metrics;
- /**
- * Date ranges of data to read. If multiple date ranges are requested, each
- * response row will contain a zero based date range index. If two date
- * ranges overlap, the event data for the overlapping days is included in the
- * response rows for both date ranges. In a cohort request, this `dateRanges`
- * must be unspecified.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.DateRange date_ranges = 4;
- */
- private $date_ranges;
- /**
- * The row count of the start row. The first row is counted as row 0.
- * To learn more about this pagination parameter, see
- * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
- *
- * Generated from protobuf field int64 offset = 5;
- */
- private $offset = 0;
- /**
- * The number of rows to return. If unspecified, 10 rows are returned. If
- * -1, all rows are returned.
- * To learn more about this pagination parameter, see
- * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
- *
- * Generated from protobuf field int64 limit = 6;
- */
- private $limit = 0;
- /**
- * Aggregation of metrics. Aggregated metric values will be shown in rows
- * where the dimension_values are set to "RESERVED_(MetricAggregation)".
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.MetricAggregation metric_aggregations = 7;
- */
- private $metric_aggregations;
- /**
- * The filter clause of dimensions. Dimensions must be requested to be used in
- * this filter. Metrics cannot be used in this filter.
- *
- * Generated from protobuf field .google.analytics.data.v1alpha.FilterExpression dimension_filter = 8;
- */
- private $dimension_filter = null;
- /**
- * The filter clause of metrics. Applied at post aggregation phase, similar to
- * SQL having-clause. Metrics must be requested to be used in this filter.
- * Dimensions cannot be used in this filter.
- *
- * Generated from protobuf field .google.analytics.data.v1alpha.FilterExpression metric_filter = 9;
- */
- private $metric_filter = null;
- /**
- * Specifies how rows are ordered in the response.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.OrderBy order_bys = 10;
- */
- private $order_bys;
- /**
- * A currency code in ISO4217 format, such as "AED", "USD", "JPY".
- * If the field is empty, the report uses the entity's default currency.
- *
- * Generated from protobuf field string currency_code = 11;
- */
- private $currency_code = '';
- /**
- * Cohort group associated with this request. If there is a cohort group
- * in the request the 'cohort' dimension must be present.
- *
- * Generated from protobuf field .google.analytics.data.v1alpha.CohortSpec cohort_spec = 12;
- */
- private $cohort_spec = null;
- /**
- * If false or unspecified, each row with all metrics equal to 0 will not be
- * returned. If true, these rows will be returned if they are not separately
- * removed by a filter.
- *
- * Generated from protobuf field bool keep_empty_rows = 13;
- */
- private $keep_empty_rows = false;
- /**
- * Toggles whether to return the current state of this Analytics Property's
- * quota. Quota is returned in [PropertyQuota](#PropertyQuota).
- *
- * Generated from protobuf field bool return_property_quota = 14;
- */
- private $return_property_quota = false;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Analytics\Data\V1alpha\Entity $entity
- * A property whose events are tracked. Within a batch request, this entity
- * should either be unspecified or consistent with the batch-level entity.
- * @type \Google\Analytics\Data\V1alpha\Dimension[]|\Google\Protobuf\Internal\RepeatedField $dimensions
- * The dimensions requested and displayed.
- * @type \Google\Analytics\Data\V1alpha\Metric[]|\Google\Protobuf\Internal\RepeatedField $metrics
- * The metrics requested and displayed.
- * @type \Google\Analytics\Data\V1alpha\DateRange[]|\Google\Protobuf\Internal\RepeatedField $date_ranges
- * Date ranges of data to read. If multiple date ranges are requested, each
- * response row will contain a zero based date range index. If two date
- * ranges overlap, the event data for the overlapping days is included in the
- * response rows for both date ranges. In a cohort request, this `dateRanges`
- * must be unspecified.
- * @type int|string $offset
- * The row count of the start row. The first row is counted as row 0.
- * To learn more about this pagination parameter, see
- * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
- * @type int|string $limit
- * The number of rows to return. If unspecified, 10 rows are returned. If
- * -1, all rows are returned.
- * To learn more about this pagination parameter, see
- * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
- * @type int[]|\Google\Protobuf\Internal\RepeatedField $metric_aggregations
- * Aggregation of metrics. Aggregated metric values will be shown in rows
- * where the dimension_values are set to "RESERVED_(MetricAggregation)".
- * @type \Google\Analytics\Data\V1alpha\FilterExpression $dimension_filter
- * The filter clause of dimensions. Dimensions must be requested to be used in
- * this filter. Metrics cannot be used in this filter.
- * @type \Google\Analytics\Data\V1alpha\FilterExpression $metric_filter
- * The filter clause of metrics. Applied at post aggregation phase, similar to
- * SQL having-clause. Metrics must be requested to be used in this filter.
- * Dimensions cannot be used in this filter.
- * @type \Google\Analytics\Data\V1alpha\OrderBy[]|\Google\Protobuf\Internal\RepeatedField $order_bys
- * Specifies how rows are ordered in the response.
- * @type string $currency_code
- * A currency code in ISO4217 format, such as "AED", "USD", "JPY".
- * If the field is empty, the report uses the entity's default currency.
- * @type \Google\Analytics\Data\V1alpha\CohortSpec $cohort_spec
- * Cohort group associated with this request. If there is a cohort group
- * in the request the 'cohort' dimension must be present.
- * @type bool $keep_empty_rows
- * If false or unspecified, each row with all metrics equal to 0 will not be
- * returned. If true, these rows will be returned if they are not separately
- * removed by a filter.
- * @type bool $return_property_quota
- * Toggles whether to return the current state of this Analytics Property's
- * quota. Quota is returned in [PropertyQuota](#PropertyQuota).
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Analytics\Data\V1Alpha\AnalyticsDataApi::initOnce();
- parent::__construct($data);
- }
-
- /**
- * A property whose events are tracked. Within a batch request, this entity
- * should either be unspecified or consistent with the batch-level entity.
- *
- * Generated from protobuf field .google.analytics.data.v1alpha.Entity entity = 1;
- * @return \Google\Analytics\Data\V1alpha\Entity|null
- */
- public function getEntity()
- {
- return isset($this->entity) ? $this->entity : null;
- }
-
- public function hasEntity()
- {
- return isset($this->entity);
- }
-
- public function clearEntity()
- {
- unset($this->entity);
- }
-
- /**
- * A property whose events are tracked. Within a batch request, this entity
- * should either be unspecified or consistent with the batch-level entity.
- *
- * Generated from protobuf field .google.analytics.data.v1alpha.Entity entity = 1;
- * @param \Google\Analytics\Data\V1alpha\Entity $var
- * @return $this
- */
- public function setEntity($var)
- {
- GPBUtil::checkMessage($var, \Google\Analytics\Data\V1alpha\Entity::class);
- $this->entity = $var;
-
- return $this;
- }
-
- /**
- * The dimensions requested and displayed.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.Dimension dimensions = 2;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getDimensions()
- {
- return $this->dimensions;
- }
-
- /**
- * The dimensions requested and displayed.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.Dimension dimensions = 2;
- * @param \Google\Analytics\Data\V1alpha\Dimension[]|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setDimensions($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Data\V1alpha\Dimension::class);
- $this->dimensions = $arr;
-
- return $this;
- }
-
- /**
- * The metrics requested and displayed.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.Metric metrics = 3;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getMetrics()
- {
- return $this->metrics;
- }
-
- /**
- * The metrics requested and displayed.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.Metric metrics = 3;
- * @param \Google\Analytics\Data\V1alpha\Metric[]|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setMetrics($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Data\V1alpha\Metric::class);
- $this->metrics = $arr;
-
- return $this;
- }
-
- /**
- * Date ranges of data to read. If multiple date ranges are requested, each
- * response row will contain a zero based date range index. If two date
- * ranges overlap, the event data for the overlapping days is included in the
- * response rows for both date ranges. In a cohort request, this `dateRanges`
- * must be unspecified.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.DateRange date_ranges = 4;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getDateRanges()
- {
- return $this->date_ranges;
- }
-
- /**
- * Date ranges of data to read. If multiple date ranges are requested, each
- * response row will contain a zero based date range index. If two date
- * ranges overlap, the event data for the overlapping days is included in the
- * response rows for both date ranges. In a cohort request, this `dateRanges`
- * must be unspecified.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.DateRange date_ranges = 4;
- * @param \Google\Analytics\Data\V1alpha\DateRange[]|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setDateRanges($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Data\V1alpha\DateRange::class);
- $this->date_ranges = $arr;
-
- return $this;
- }
-
- /**
- * The row count of the start row. The first row is counted as row 0.
- * To learn more about this pagination parameter, see
- * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
- *
- * Generated from protobuf field int64 offset = 5;
- * @return int|string
- */
- public function getOffset()
- {
- return $this->offset;
- }
-
- /**
- * The row count of the start row. The first row is counted as row 0.
- * To learn more about this pagination parameter, see
- * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
- *
- * Generated from protobuf field int64 offset = 5;
- * @param int|string $var
- * @return $this
- */
- public function setOffset($var)
- {
- GPBUtil::checkInt64($var);
- $this->offset = $var;
-
- return $this;
- }
-
- /**
- * The number of rows to return. If unspecified, 10 rows are returned. If
- * -1, all rows are returned.
- * To learn more about this pagination parameter, see
- * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
- *
- * Generated from protobuf field int64 limit = 6;
- * @return int|string
- */
- public function getLimit()
- {
- return $this->limit;
- }
-
- /**
- * The number of rows to return. If unspecified, 10 rows are returned. If
- * -1, all rows are returned.
- * To learn more about this pagination parameter, see
- * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
- *
- * Generated from protobuf field int64 limit = 6;
- * @param int|string $var
- * @return $this
- */
- public function setLimit($var)
- {
- GPBUtil::checkInt64($var);
- $this->limit = $var;
-
- return $this;
- }
-
- /**
- * Aggregation of metrics. Aggregated metric values will be shown in rows
- * where the dimension_values are set to "RESERVED_(MetricAggregation)".
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.MetricAggregation metric_aggregations = 7;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getMetricAggregations()
- {
- return $this->metric_aggregations;
- }
-
- /**
- * Aggregation of metrics. Aggregated metric values will be shown in rows
- * where the dimension_values are set to "RESERVED_(MetricAggregation)".
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.MetricAggregation metric_aggregations = 7;
- * @param int[]|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setMetricAggregations($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Analytics\Data\V1alpha\MetricAggregation::class);
- $this->metric_aggregations = $arr;
-
- return $this;
- }
-
- /**
- * The filter clause of dimensions. Dimensions must be requested to be used in
- * this filter. Metrics cannot be used in this filter.
- *
- * Generated from protobuf field .google.analytics.data.v1alpha.FilterExpression dimension_filter = 8;
- * @return \Google\Analytics\Data\V1alpha\FilterExpression|null
- */
- public function getDimensionFilter()
- {
- return isset($this->dimension_filter) ? $this->dimension_filter : null;
- }
-
- public function hasDimensionFilter()
- {
- return isset($this->dimension_filter);
- }
-
- public function clearDimensionFilter()
- {
- unset($this->dimension_filter);
- }
-
- /**
- * The filter clause of dimensions. Dimensions must be requested to be used in
- * this filter. Metrics cannot be used in this filter.
- *
- * Generated from protobuf field .google.analytics.data.v1alpha.FilterExpression dimension_filter = 8;
- * @param \Google\Analytics\Data\V1alpha\FilterExpression $var
- * @return $this
- */
- public function setDimensionFilter($var)
- {
- GPBUtil::checkMessage($var, \Google\Analytics\Data\V1alpha\FilterExpression::class);
- $this->dimension_filter = $var;
-
- return $this;
- }
-
- /**
- * The filter clause of metrics. Applied at post aggregation phase, similar to
- * SQL having-clause. Metrics must be requested to be used in this filter.
- * Dimensions cannot be used in this filter.
- *
- * Generated from protobuf field .google.analytics.data.v1alpha.FilterExpression metric_filter = 9;
- * @return \Google\Analytics\Data\V1alpha\FilterExpression|null
- */
- public function getMetricFilter()
- {
- return isset($this->metric_filter) ? $this->metric_filter : null;
- }
-
- public function hasMetricFilter()
- {
- return isset($this->metric_filter);
- }
-
- public function clearMetricFilter()
- {
- unset($this->metric_filter);
- }
-
- /**
- * The filter clause of metrics. Applied at post aggregation phase, similar to
- * SQL having-clause. Metrics must be requested to be used in this filter.
- * Dimensions cannot be used in this filter.
- *
- * Generated from protobuf field .google.analytics.data.v1alpha.FilterExpression metric_filter = 9;
- * @param \Google\Analytics\Data\V1alpha\FilterExpression $var
- * @return $this
- */
- public function setMetricFilter($var)
- {
- GPBUtil::checkMessage($var, \Google\Analytics\Data\V1alpha\FilterExpression::class);
- $this->metric_filter = $var;
-
- return $this;
- }
-
- /**
- * Specifies how rows are ordered in the response.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.OrderBy order_bys = 10;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getOrderBys()
- {
- return $this->order_bys;
- }
-
- /**
- * Specifies how rows are ordered in the response.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.OrderBy order_bys = 10;
- * @param \Google\Analytics\Data\V1alpha\OrderBy[]|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setOrderBys($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Data\V1alpha\OrderBy::class);
- $this->order_bys = $arr;
-
- return $this;
- }
-
- /**
- * A currency code in ISO4217 format, such as "AED", "USD", "JPY".
- * If the field is empty, the report uses the entity's default currency.
- *
- * Generated from protobuf field string currency_code = 11;
- * @return string
- */
- public function getCurrencyCode()
- {
- return $this->currency_code;
- }
-
- /**
- * A currency code in ISO4217 format, such as "AED", "USD", "JPY".
- * If the field is empty, the report uses the entity's default currency.
- *
- * Generated from protobuf field string currency_code = 11;
- * @param string $var
- * @return $this
- */
- public function setCurrencyCode($var)
- {
- GPBUtil::checkString($var, True);
- $this->currency_code = $var;
-
- return $this;
- }
-
- /**
- * Cohort group associated with this request. If there is a cohort group
- * in the request the 'cohort' dimension must be present.
- *
- * Generated from protobuf field .google.analytics.data.v1alpha.CohortSpec cohort_spec = 12;
- * @return \Google\Analytics\Data\V1alpha\CohortSpec|null
- */
- public function getCohortSpec()
- {
- return isset($this->cohort_spec) ? $this->cohort_spec : null;
- }
-
- public function hasCohortSpec()
- {
- return isset($this->cohort_spec);
- }
-
- public function clearCohortSpec()
- {
- unset($this->cohort_spec);
- }
-
- /**
- * Cohort group associated with this request. If there is a cohort group
- * in the request the 'cohort' dimension must be present.
- *
- * Generated from protobuf field .google.analytics.data.v1alpha.CohortSpec cohort_spec = 12;
- * @param \Google\Analytics\Data\V1alpha\CohortSpec $var
- * @return $this
- */
- public function setCohortSpec($var)
- {
- GPBUtil::checkMessage($var, \Google\Analytics\Data\V1alpha\CohortSpec::class);
- $this->cohort_spec = $var;
-
- return $this;
- }
-
- /**
- * If false or unspecified, each row with all metrics equal to 0 will not be
- * returned. If true, these rows will be returned if they are not separately
- * removed by a filter.
- *
- * Generated from protobuf field bool keep_empty_rows = 13;
- * @return bool
- */
- public function getKeepEmptyRows()
- {
- return $this->keep_empty_rows;
- }
-
- /**
- * If false or unspecified, each row with all metrics equal to 0 will not be
- * returned. If true, these rows will be returned if they are not separately
- * removed by a filter.
- *
- * Generated from protobuf field bool keep_empty_rows = 13;
- * @param bool $var
- * @return $this
- */
- public function setKeepEmptyRows($var)
- {
- GPBUtil::checkBool($var);
- $this->keep_empty_rows = $var;
-
- return $this;
- }
-
- /**
- * Toggles whether to return the current state of this Analytics Property's
- * quota. Quota is returned in [PropertyQuota](#PropertyQuota).
- *
- * Generated from protobuf field bool return_property_quota = 14;
- * @return bool
- */
- public function getReturnPropertyQuota()
- {
- return $this->return_property_quota;
- }
-
- /**
- * Toggles whether to return the current state of this Analytics Property's
- * quota. Quota is returned in [PropertyQuota](#PropertyQuota).
- *
- * Generated from protobuf field bool return_property_quota = 14;
- * @param bool $var
- * @return $this
- */
- public function setReturnPropertyQuota($var)
- {
- GPBUtil::checkBool($var);
- $this->return_property_quota = $var;
-
- return $this;
- }
-
-}
-
diff --git a/AnalyticsData/src/V1alpha/RunReportResponse.php b/AnalyticsData/src/V1alpha/RunReportResponse.php
deleted file mode 100644
index c79b2b963ac6..000000000000
--- a/AnalyticsData/src/V1alpha/RunReportResponse.php
+++ /dev/null
@@ -1,387 +0,0 @@
-google.analytics.data.v1alpha.RunReportResponse
- */
-class RunReportResponse extends \Google\Protobuf\Internal\Message
-{
- /**
- * Describes dimension columns. The number of DimensionHeaders and ordering of
- * DimensionHeaders matches the dimensions present in rows.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.DimensionHeader dimension_headers = 11;
- */
- private $dimension_headers;
- /**
- * Describes metric columns. The number of MetricHeaders and ordering of
- * MetricHeaders matches the metrics present in rows.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.MetricHeader metric_headers = 1;
- */
- private $metric_headers;
- /**
- * Rows of dimension value combinations and metric values in the report.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.Row rows = 2;
- */
- private $rows;
- /**
- * If requested, the totaled values of metrics.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.Row totals = 8;
- */
- private $totals;
- /**
- * If requested, the maximum values of metrics.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.Row maximums = 9;
- */
- private $maximums;
- /**
- * If requested, the minimum values of metrics.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.Row minimums = 10;
- */
- private $minimums;
- /**
- * The total number of rows in the query result, regardless of the number of
- * rows returned in the response. For example if a query returns 175 rows and
- * includes limit = 50 in the API request, the response will contain row_count
- * = 175 but only 50 rows.
- * To learn more about this pagination parameter, see
- * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
- *
- * Generated from protobuf field int32 row_count = 12;
- */
- private $row_count = 0;
- /**
- * Metadata for the report.
- *
- * Generated from protobuf field .google.analytics.data.v1alpha.ResponseMetaData metadata = 6;
- */
- private $metadata = null;
- /**
- * This Analytics Property's quota state including this request.
- *
- * Generated from protobuf field .google.analytics.data.v1alpha.PropertyQuota property_quota = 7;
- */
- private $property_quota = null;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Analytics\Data\V1alpha\DimensionHeader[]|\Google\Protobuf\Internal\RepeatedField $dimension_headers
- * Describes dimension columns. The number of DimensionHeaders and ordering of
- * DimensionHeaders matches the dimensions present in rows.
- * @type \Google\Analytics\Data\V1alpha\MetricHeader[]|\Google\Protobuf\Internal\RepeatedField $metric_headers
- * Describes metric columns. The number of MetricHeaders and ordering of
- * MetricHeaders matches the metrics present in rows.
- * @type \Google\Analytics\Data\V1alpha\Row[]|\Google\Protobuf\Internal\RepeatedField $rows
- * Rows of dimension value combinations and metric values in the report.
- * @type \Google\Analytics\Data\V1alpha\Row[]|\Google\Protobuf\Internal\RepeatedField $totals
- * If requested, the totaled values of metrics.
- * @type \Google\Analytics\Data\V1alpha\Row[]|\Google\Protobuf\Internal\RepeatedField $maximums
- * If requested, the maximum values of metrics.
- * @type \Google\Analytics\Data\V1alpha\Row[]|\Google\Protobuf\Internal\RepeatedField $minimums
- * If requested, the minimum values of metrics.
- * @type int $row_count
- * The total number of rows in the query result, regardless of the number of
- * rows returned in the response. For example if a query returns 175 rows and
- * includes limit = 50 in the API request, the response will contain row_count
- * = 175 but only 50 rows.
- * To learn more about this pagination parameter, see
- * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
- * @type \Google\Analytics\Data\V1alpha\ResponseMetaData $metadata
- * Metadata for the report.
- * @type \Google\Analytics\Data\V1alpha\PropertyQuota $property_quota
- * This Analytics Property's quota state including this request.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Analytics\Data\V1Alpha\AnalyticsDataApi::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Describes dimension columns. The number of DimensionHeaders and ordering of
- * DimensionHeaders matches the dimensions present in rows.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.DimensionHeader dimension_headers = 11;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getDimensionHeaders()
- {
- return $this->dimension_headers;
- }
-
- /**
- * Describes dimension columns. The number of DimensionHeaders and ordering of
- * DimensionHeaders matches the dimensions present in rows.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.DimensionHeader dimension_headers = 11;
- * @param \Google\Analytics\Data\V1alpha\DimensionHeader[]|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setDimensionHeaders($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Data\V1alpha\DimensionHeader::class);
- $this->dimension_headers = $arr;
-
- return $this;
- }
-
- /**
- * Describes metric columns. The number of MetricHeaders and ordering of
- * MetricHeaders matches the metrics present in rows.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.MetricHeader metric_headers = 1;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getMetricHeaders()
- {
- return $this->metric_headers;
- }
-
- /**
- * Describes metric columns. The number of MetricHeaders and ordering of
- * MetricHeaders matches the metrics present in rows.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.MetricHeader metric_headers = 1;
- * @param \Google\Analytics\Data\V1alpha\MetricHeader[]|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setMetricHeaders($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Data\V1alpha\MetricHeader::class);
- $this->metric_headers = $arr;
-
- return $this;
- }
-
- /**
- * Rows of dimension value combinations and metric values in the report.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.Row rows = 2;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getRows()
- {
- return $this->rows;
- }
-
- /**
- * Rows of dimension value combinations and metric values in the report.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.Row rows = 2;
- * @param \Google\Analytics\Data\V1alpha\Row[]|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setRows($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Data\V1alpha\Row::class);
- $this->rows = $arr;
-
- return $this;
- }
-
- /**
- * If requested, the totaled values of metrics.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.Row totals = 8;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getTotals()
- {
- return $this->totals;
- }
-
- /**
- * If requested, the totaled values of metrics.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.Row totals = 8;
- * @param \Google\Analytics\Data\V1alpha\Row[]|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setTotals($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Data\V1alpha\Row::class);
- $this->totals = $arr;
-
- return $this;
- }
-
- /**
- * If requested, the maximum values of metrics.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.Row maximums = 9;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getMaximums()
- {
- return $this->maximums;
- }
-
- /**
- * If requested, the maximum values of metrics.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.Row maximums = 9;
- * @param \Google\Analytics\Data\V1alpha\Row[]|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setMaximums($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Data\V1alpha\Row::class);
- $this->maximums = $arr;
-
- return $this;
- }
-
- /**
- * If requested, the minimum values of metrics.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.Row minimums = 10;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getMinimums()
- {
- return $this->minimums;
- }
-
- /**
- * If requested, the minimum values of metrics.
- *
- * Generated from protobuf field repeated .google.analytics.data.v1alpha.Row minimums = 10;
- * @param \Google\Analytics\Data\V1alpha\Row[]|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setMinimums($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Data\V1alpha\Row::class);
- $this->minimums = $arr;
-
- return $this;
- }
-
- /**
- * The total number of rows in the query result, regardless of the number of
- * rows returned in the response. For example if a query returns 175 rows and
- * includes limit = 50 in the API request, the response will contain row_count
- * = 175 but only 50 rows.
- * To learn more about this pagination parameter, see
- * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
- *
- * Generated from protobuf field int32 row_count = 12;
- * @return int
- */
- public function getRowCount()
- {
- return $this->row_count;
- }
-
- /**
- * The total number of rows in the query result, regardless of the number of
- * rows returned in the response. For example if a query returns 175 rows and
- * includes limit = 50 in the API request, the response will contain row_count
- * = 175 but only 50 rows.
- * To learn more about this pagination parameter, see
- * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
- *
- * Generated from protobuf field int32 row_count = 12;
- * @param int $var
- * @return $this
- */
- public function setRowCount($var)
- {
- GPBUtil::checkInt32($var);
- $this->row_count = $var;
-
- return $this;
- }
-
- /**
- * Metadata for the report.
- *
- * Generated from protobuf field .google.analytics.data.v1alpha.ResponseMetaData metadata = 6;
- * @return \Google\Analytics\Data\V1alpha\ResponseMetaData|null
- */
- public function getMetadata()
- {
- return isset($this->metadata) ? $this->metadata : null;
- }
-
- public function hasMetadata()
- {
- return isset($this->metadata);
- }
-
- public function clearMetadata()
- {
- unset($this->metadata);
- }
-
- /**
- * Metadata for the report.
- *
- * Generated from protobuf field .google.analytics.data.v1alpha.ResponseMetaData metadata = 6;
- * @param \Google\Analytics\Data\V1alpha\ResponseMetaData $var
- * @return $this
- */
- public function setMetadata($var)
- {
- GPBUtil::checkMessage($var, \Google\Analytics\Data\V1alpha\ResponseMetaData::class);
- $this->metadata = $var;
-
- return $this;
- }
-
- /**
- * This Analytics Property's quota state including this request.
- *
- * Generated from protobuf field .google.analytics.data.v1alpha.PropertyQuota property_quota = 7;
- * @return \Google\Analytics\Data\V1alpha\PropertyQuota|null
- */
- public function getPropertyQuota()
- {
- return isset($this->property_quota) ? $this->property_quota : null;
- }
-
- public function hasPropertyQuota()
- {
- return isset($this->property_quota);
- }
-
- public function clearPropertyQuota()
- {
- unset($this->property_quota);
- }
-
- /**
- * This Analytics Property's quota state including this request.
- *
- * Generated from protobuf field .google.analytics.data.v1alpha.PropertyQuota property_quota = 7;
- * @param \Google\Analytics\Data\V1alpha\PropertyQuota $var
- * @return $this
- */
- public function setPropertyQuota($var)
- {
- GPBUtil::checkMessage($var, \Google\Analytics\Data\V1alpha\PropertyQuota::class);
- $this->property_quota = $var;
-
- return $this;
- }
-
-}
-
diff --git a/AnalyticsData/src/V1alpha/SamplingMetadata.php b/AnalyticsData/src/V1alpha/SamplingMetadata.php
index b6028d145f3e..1c501d95f5e2 100644
--- a/AnalyticsData/src/V1alpha/SamplingMetadata.php
+++ b/AnalyticsData/src/V1alpha/SamplingMetadata.php
@@ -27,7 +27,7 @@ class SamplingMetadata extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field int64 samples_read_count = 1;
*/
- private $samples_read_count = 0;
+ protected $samples_read_count = 0;
/**
* The total number of events present in this property's data that could
* have been analyzed in this funnel report for a date range. Sampling
@@ -38,7 +38,7 @@ class SamplingMetadata extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field int64 sampling_space_size = 2;
*/
- private $sampling_space_size = 0;
+ protected $sampling_space_size = 0;
/**
* Constructor.
diff --git a/AnalyticsData/src/V1alpha/Segment.php b/AnalyticsData/src/V1alpha/Segment.php
index 42a8eeb450c2..b8b7819bb443 100644
--- a/AnalyticsData/src/V1alpha/Segment.php
+++ b/AnalyticsData/src/V1alpha/Segment.php
@@ -28,7 +28,7 @@ class Segment extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1;
*/
- private $name = '';
+ protected $name = '';
protected $one_segment_scope;
/**
diff --git a/AnalyticsData/src/V1alpha/SegmentEventFilter.php b/AnalyticsData/src/V1alpha/SegmentEventFilter.php
index 61309d7e93bf..4947a2698cf3 100644
--- a/AnalyticsData/src/V1alpha/SegmentEventFilter.php
+++ b/AnalyticsData/src/V1alpha/SegmentEventFilter.php
@@ -24,7 +24,7 @@ class SegmentEventFilter extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field optional string event_name = 1;
*/
- private $event_name = null;
+ protected $event_name = null;
/**
* If specified, this filter matches events that match both the single event
* name and the parameter filter expressions.
@@ -33,7 +33,7 @@ class SegmentEventFilter extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field optional .google.analytics.data.v1alpha.SegmentParameterFilterExpression segment_parameter_filter_expression = 2;
*/
- private $segment_parameter_filter_expression = null;
+ protected $segment_parameter_filter_expression = null;
/**
* Constructor.
diff --git a/AnalyticsData/src/V1alpha/SegmentFilter.php b/AnalyticsData/src/V1alpha/SegmentFilter.php
index 0b94e6737ac7..ee3af867491e 100644
--- a/AnalyticsData/src/V1alpha/SegmentFilter.php
+++ b/AnalyticsData/src/V1alpha/SegmentFilter.php
@@ -20,13 +20,13 @@ class SegmentFilter extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string field_name = 1;
*/
- private $field_name = '';
+ protected $field_name = '';
/**
* Specifies the scope for the filter.
*
* Generated from protobuf field .google.analytics.data.v1alpha.SegmentFilterScoping filter_scoping = 8;
*/
- private $filter_scoping = null;
+ protected $filter_scoping = null;
protected $one_filter;
/**
diff --git a/AnalyticsData/src/V1alpha/SegmentFilterScoping.php b/AnalyticsData/src/V1alpha/SegmentFilterScoping.php
index d33e539e4a9f..8af2c7927bcf 100644
--- a/AnalyticsData/src/V1alpha/SegmentFilterScoping.php
+++ b/AnalyticsData/src/V1alpha/SegmentFilterScoping.php
@@ -31,7 +31,7 @@ class SegmentFilterScoping extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field optional bool at_any_point_in_time = 1;
*/
- private $at_any_point_in_time = null;
+ protected $at_any_point_in_time = null;
/**
* Constructor.
diff --git a/AnalyticsData/src/V1alpha/SegmentParameterFilter.php b/AnalyticsData/src/V1alpha/SegmentParameterFilter.php
index 464f15edc5b0..e161480fd216 100644
--- a/AnalyticsData/src/V1alpha/SegmentParameterFilter.php
+++ b/AnalyticsData/src/V1alpha/SegmentParameterFilter.php
@@ -20,7 +20,7 @@ class SegmentParameterFilter extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.analytics.data.v1alpha.SegmentParameterFilterScoping filter_scoping = 8;
*/
- private $filter_scoping = null;
+ protected $filter_scoping = null;
protected $one_parameter;
protected $one_filter;
diff --git a/AnalyticsData/src/V1alpha/SegmentParameterFilterScoping.php b/AnalyticsData/src/V1alpha/SegmentParameterFilterScoping.php
index 954407c45613..052ccb6aefb9 100644
--- a/AnalyticsData/src/V1alpha/SegmentParameterFilterScoping.php
+++ b/AnalyticsData/src/V1alpha/SegmentParameterFilterScoping.php
@@ -41,7 +41,7 @@ class SegmentParameterFilterScoping extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field optional int64 in_any_n_day_period = 1;
*/
- private $in_any_n_day_period = null;
+ protected $in_any_n_day_period = null;
/**
* Constructor.
diff --git a/AnalyticsData/src/V1alpha/SessionSegment.php b/AnalyticsData/src/V1alpha/SessionSegment.php
index 17cac010dcd2..032ea93baa80 100644
--- a/AnalyticsData/src/V1alpha/SessionSegment.php
+++ b/AnalyticsData/src/V1alpha/SessionSegment.php
@@ -22,13 +22,13 @@ class SessionSegment extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.analytics.data.v1alpha.SessionSegmentCriteria session_inclusion_criteria = 1;
*/
- private $session_inclusion_criteria = null;
+ protected $session_inclusion_criteria = null;
/**
* Defines which sessions are excluded in this segment. Optional.
*
* Generated from protobuf field .google.analytics.data.v1alpha.SessionSegmentExclusion exclusion = 2;
*/
- private $exclusion = null;
+ protected $exclusion = null;
/**
* Constructor.
diff --git a/AnalyticsData/src/V1alpha/SessionSegmentConditionGroup.php b/AnalyticsData/src/V1alpha/SessionSegmentConditionGroup.php
index 69610f201e5a..54cfa44dc516 100644
--- a/AnalyticsData/src/V1alpha/SessionSegmentConditionGroup.php
+++ b/AnalyticsData/src/V1alpha/SessionSegmentConditionGroup.php
@@ -32,7 +32,7 @@ class SessionSegmentConditionGroup extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.analytics.data.v1alpha.SessionCriteriaScoping condition_scoping = 1;
*/
- private $condition_scoping = 0;
+ protected $condition_scoping = 0;
/**
* Data is included or excluded from the segment based on if it matches
* this expression. Expressions express criteria on dimension, metrics,
@@ -40,7 +40,7 @@ class SessionSegmentConditionGroup extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.analytics.data.v1alpha.SegmentFilterExpression segment_filter_expression = 2;
*/
- private $segment_filter_expression = null;
+ protected $segment_filter_expression = null;
/**
* Constructor.
diff --git a/AnalyticsData/src/V1alpha/SessionSegmentExclusion.php b/AnalyticsData/src/V1alpha/SessionSegmentExclusion.php
index 0d4f893fc592..7c6f5f25cf38 100644
--- a/AnalyticsData/src/V1alpha/SessionSegmentExclusion.php
+++ b/AnalyticsData/src/V1alpha/SessionSegmentExclusion.php
@@ -23,14 +23,14 @@ class SessionSegmentExclusion extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.analytics.data.v1alpha.SessionExclusionDuration session_exclusion_duration = 1;
*/
- private $session_exclusion_duration = 0;
+ protected $session_exclusion_duration = 0;
/**
* If a session meets this condition, the session is excluded from
* membership in the segment for the `sessionExclusionDuration`.
*
* Generated from protobuf field .google.analytics.data.v1alpha.SessionSegmentCriteria session_exclusion_criteria = 2;
*/
- private $session_exclusion_criteria = null;
+ protected $session_exclusion_criteria = null;
/**
* Constructor.
diff --git a/AnalyticsData/src/V1alpha/SheetExportAudienceListRequest.php b/AnalyticsData/src/V1alpha/SheetExportAudienceListRequest.php
index 0ba88a429c75..b431bc30f8f7 100644
--- a/AnalyticsData/src/V1alpha/SheetExportAudienceListRequest.php
+++ b/AnalyticsData/src/V1alpha/SheetExportAudienceListRequest.php
@@ -21,7 +21,7 @@ class SheetExportAudienceListRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
*/
- private $name = '';
+ protected $name = '';
/**
* Optional. The row count of the start row. The first row is counted as row
* 0.
@@ -34,7 +34,7 @@ class SheetExportAudienceListRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field int64 offset = 2 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $offset = 0;
+ protected $offset = 0;
/**
* Optional. The number of rows to return. If unspecified, 10,000 rows are
* returned. The API returns a maximum of 250,000 rows per request, no matter
@@ -46,7 +46,7 @@ class SheetExportAudienceListRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field int64 limit = 3 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $limit = 0;
+ protected $limit = 0;
/**
* @param string $name Required. The name of the audience list to retrieve users from.
diff --git a/AnalyticsData/src/V1alpha/SheetExportAudienceListResponse.php b/AnalyticsData/src/V1alpha/SheetExportAudienceListResponse.php
index 27e741de6fef..e73e6e086e26 100644
--- a/AnalyticsData/src/V1alpha/SheetExportAudienceListResponse.php
+++ b/AnalyticsData/src/V1alpha/SheetExportAudienceListResponse.php
@@ -20,13 +20,13 @@ class SheetExportAudienceListResponse extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field optional string spreadsheet_uri = 1;
*/
- private $spreadsheet_uri = null;
+ protected $spreadsheet_uri = null;
/**
* An ID that identifies the created Google Sheet resource.
*
* Generated from protobuf field optional string spreadsheet_id = 2;
*/
- private $spreadsheet_id = null;
+ protected $spreadsheet_id = null;
/**
* The total number of rows in the AudienceList result. `rowCount` is
* independent of the number of rows returned in the response, the `limit`
@@ -38,7 +38,7 @@ class SheetExportAudienceListResponse extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field optional int32 row_count = 3;
*/
- private $row_count = null;
+ protected $row_count = null;
/**
* Configuration data about AudienceList being exported. Returned to help
* interpret the AudienceList in the Google Sheet of this response.
@@ -49,7 +49,7 @@ class SheetExportAudienceListResponse extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field optional .google.analytics.data.v1alpha.AudienceList audience_list = 4;
*/
- private $audience_list = null;
+ protected $audience_list = null;
/**
* Constructor.
diff --git a/AnalyticsData/src/V1alpha/StringFilter.php b/AnalyticsData/src/V1alpha/StringFilter.php
index a38fd1c18701..eb4772bde8fa 100644
--- a/AnalyticsData/src/V1alpha/StringFilter.php
+++ b/AnalyticsData/src/V1alpha/StringFilter.php
@@ -20,19 +20,19 @@ class StringFilter extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.analytics.data.v1alpha.StringFilter.MatchType match_type = 1;
*/
- private $match_type = 0;
+ protected $match_type = 0;
/**
* The string value used for the matching.
*
* Generated from protobuf field string value = 2;
*/
- private $value = '';
+ protected $value = '';
/**
* If true, the string value is case sensitive.
*
* Generated from protobuf field bool case_sensitive = 3;
*/
- private $case_sensitive = false;
+ protected $case_sensitive = false;
/**
* Constructor.
diff --git a/AnalyticsData/src/V1alpha/UserSegment.php b/AnalyticsData/src/V1alpha/UserSegment.php
index 7bc114b546c1..0bfd9be4499f 100644
--- a/AnalyticsData/src/V1alpha/UserSegment.php
+++ b/AnalyticsData/src/V1alpha/UserSegment.php
@@ -22,13 +22,13 @@ class UserSegment extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.analytics.data.v1alpha.UserSegmentCriteria user_inclusion_criteria = 1;
*/
- private $user_inclusion_criteria = null;
+ protected $user_inclusion_criteria = null;
/**
* Defines which users are excluded in this segment. Optional.
*
* Generated from protobuf field .google.analytics.data.v1alpha.UserSegmentExclusion exclusion = 2;
*/
- private $exclusion = null;
+ protected $exclusion = null;
/**
* Constructor.
diff --git a/AnalyticsData/src/V1alpha/UserSegmentConditionGroup.php b/AnalyticsData/src/V1alpha/UserSegmentConditionGroup.php
index 23b8b473e490..d2f547575d06 100644
--- a/AnalyticsData/src/V1alpha/UserSegmentConditionGroup.php
+++ b/AnalyticsData/src/V1alpha/UserSegmentConditionGroup.php
@@ -32,7 +32,7 @@ class UserSegmentConditionGroup extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.analytics.data.v1alpha.UserCriteriaScoping condition_scoping = 1;
*/
- private $condition_scoping = 0;
+ protected $condition_scoping = 0;
/**
* Data is included or excluded from the segment based on if it matches
* this expression. Expressions express criteria on dimension, metrics,
@@ -40,7 +40,7 @@ class UserSegmentConditionGroup extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.analytics.data.v1alpha.SegmentFilterExpression segment_filter_expression = 2;
*/
- private $segment_filter_expression = null;
+ protected $segment_filter_expression = null;
/**
* Constructor.
diff --git a/AnalyticsData/src/V1alpha/UserSegmentExclusion.php b/AnalyticsData/src/V1alpha/UserSegmentExclusion.php
index 6db8a8e9856f..25cff90f0b1c 100644
--- a/AnalyticsData/src/V1alpha/UserSegmentExclusion.php
+++ b/AnalyticsData/src/V1alpha/UserSegmentExclusion.php
@@ -23,14 +23,14 @@ class UserSegmentExclusion extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.analytics.data.v1alpha.UserExclusionDuration user_exclusion_duration = 1;
*/
- private $user_exclusion_duration = 0;
+ protected $user_exclusion_duration = 0;
/**
* If a user meets this condition, the user is excluded from membership in
* the segment for the `userExclusionDuration`.
*
* Generated from protobuf field .google.analytics.data.v1alpha.UserSegmentCriteria user_exclusion_criteria = 2;
*/
- private $user_exclusion_criteria = null;
+ protected $user_exclusion_criteria = null;
/**
* Constructor.
diff --git a/AnalyticsData/src/V1alpha/UserSegmentSequenceGroup.php b/AnalyticsData/src/V1alpha/UserSegmentSequenceGroup.php
index b9f63eeddabf..3f6d5d1ed4fb 100644
--- a/AnalyticsData/src/V1alpha/UserSegmentSequenceGroup.php
+++ b/AnalyticsData/src/V1alpha/UserSegmentSequenceGroup.php
@@ -27,7 +27,7 @@ class UserSegmentSequenceGroup extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.analytics.data.v1alpha.UserCriteriaScoping sequence_scoping = 1;
*/
- private $sequence_scoping = 0;
+ protected $sequence_scoping = 0;
/**
* Defines the time period in which the whole sequence must occur; for
* example, 30 Minutes. `sequenceMaximumDuration` is inclusive
@@ -39,7 +39,7 @@ class UserSegmentSequenceGroup extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.protobuf.Duration sequence_maximum_duration = 2;
*/
- private $sequence_maximum_duration = null;
+ protected $sequence_maximum_duration = null;
/**
* An ordered sequence of condition steps. A user's events must complete
* each step in order for the user to match the
diff --git a/AnalyticsData/src/V1alpha/UserSequenceStep.php b/AnalyticsData/src/V1alpha/UserSequenceStep.php
index 0834ad888b10..25397518d562 100644
--- a/AnalyticsData/src/V1alpha/UserSequenceStep.php
+++ b/AnalyticsData/src/V1alpha/UserSequenceStep.php
@@ -25,7 +25,7 @@ class UserSequenceStep extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field bool is_directly_followed_by = 1;
*/
- private $is_directly_followed_by = false;
+ protected $is_directly_followed_by = false;
/**
* This sequence step must be satisfied in the scoping for the user to
* match the sequence. For example if `sequenceScoping =
@@ -38,7 +38,7 @@ class UserSequenceStep extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.analytics.data.v1alpha.UserCriteriaScoping step_scoping = 2;
*/
- private $step_scoping = 0;
+ protected $step_scoping = 0;
/**
* A user matches this sequence step if their events match this
* expression. Expressions express criteria on dimension, metrics,
@@ -46,7 +46,7 @@ class UserSequenceStep extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.analytics.data.v1alpha.SegmentFilterExpression segment_filter_expression = 3;
*/
- private $segment_filter_expression = null;
+ protected $segment_filter_expression = null;
/**
* Constructor.
diff --git a/AnalyticsData/src/V1alpha/WebhookNotification.php b/AnalyticsData/src/V1alpha/WebhookNotification.php
index 0a4b5af88720..7325fcd52a85 100644
--- a/AnalyticsData/src/V1alpha/WebhookNotification.php
+++ b/AnalyticsData/src/V1alpha/WebhookNotification.php
@@ -53,7 +53,7 @@ class WebhookNotification extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field optional string uri = 1 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $uri = null;
+ protected $uri = null;
/**
* Optional. The channel token is an arbitrary string value and must have a
* maximum string length of 64 characters. Channel tokens allow you to verify
@@ -64,7 +64,7 @@ class WebhookNotification extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field optional string channel_token = 2 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $channel_token = null;
+ protected $channel_token = null;
/**
* Constructor.
diff --git a/AnalyticsData/src/V1beta/AudienceDimension.php b/AnalyticsData/src/V1beta/AudienceDimension.php
index 0134ef38a989..52a8bdc010d8 100644
--- a/AnalyticsData/src/V1beta/AudienceDimension.php
+++ b/AnalyticsData/src/V1beta/AudienceDimension.php
@@ -23,7 +23,7 @@ class AudienceDimension extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string dimension_name = 1 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $dimension_name = '';
+ protected $dimension_name = '';
/**
* Constructor.
diff --git a/AnalyticsData/src/V1beta/AudienceExport.php b/AnalyticsData/src/V1beta/AudienceExport.php
index ffe1e91e4b31..3630d8dfb88d 100644
--- a/AnalyticsData/src/V1beta/AudienceExport.php
+++ b/AnalyticsData/src/V1beta/AudienceExport.php
@@ -24,7 +24,7 @@ class AudienceExport extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $name = '';
+ protected $name = '';
/**
* Required. The audience resource name. This resource name identifies the
* audience being listed and is shared between the Analytics Data & Admin
@@ -33,14 +33,14 @@ class AudienceExport extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string audience = 2 [(.google.api.field_behavior) = REQUIRED];
*/
- private $audience = '';
+ protected $audience = '';
/**
* Output only. The descriptive display name for this audience. For example,
* "Purchasers".
*
* Generated from protobuf field string audience_display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $audience_display_name = '';
+ protected $audience_display_name = '';
/**
* Required. The dimensions requested and displayed in the query response.
*
@@ -52,14 +52,14 @@ class AudienceExport extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field optional .google.analytics.data.v1beta.AudienceExport.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $state = null;
+ protected $state = null;
/**
* Output only. The time when CreateAudienceExport was called and the
* AudienceExport began the `CREATING` state.
*
* Generated from protobuf field optional .google.protobuf.Timestamp begin_creating_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $begin_creating_time = null;
+ protected $begin_creating_time = null;
/**
* Output only. The total quota tokens charged during creation of the
* AudienceExport. Because this token count is based on activity from the
@@ -68,27 +68,27 @@ class AudienceExport extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field int32 creation_quota_tokens_charged = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $creation_quota_tokens_charged = 0;
+ protected $creation_quota_tokens_charged = 0;
/**
* Output only. The total number of rows in the AudienceExport result.
*
* Generated from protobuf field optional int32 row_count = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $row_count = null;
+ protected $row_count = null;
/**
* Output only. Error message is populated when an audience export fails
* during creation. A common reason for such a failure is quota exhaustion.
*
* Generated from protobuf field optional string error_message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $error_message = null;
+ protected $error_message = null;
/**
* Output only. The percentage completed for this audience export ranging
* between 0 to 100.
*
* Generated from protobuf field optional double percentage_completed = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $percentage_completed = null;
+ protected $percentage_completed = null;
/**
* Constructor.
diff --git a/AnalyticsData/src/V1beta/BatchRunPivotReportsRequest.php b/AnalyticsData/src/V1beta/BatchRunPivotReportsRequest.php
index 1c17aa50d2b2..6fab1570cf65 100644
--- a/AnalyticsData/src/V1beta/BatchRunPivotReportsRequest.php
+++ b/AnalyticsData/src/V1beta/BatchRunPivotReportsRequest.php
@@ -27,7 +27,7 @@ class BatchRunPivotReportsRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string property = 1;
*/
- private $property = '';
+ protected $property = '';
/**
* Individual requests. Each request has a separate pivot report response.
* Each batch request is allowed up to 5 requests.
diff --git a/AnalyticsData/src/V1beta/BatchRunPivotReportsResponse.php b/AnalyticsData/src/V1beta/BatchRunPivotReportsResponse.php
index 2e8f439bf57d..3b7abe9c8acf 100644
--- a/AnalyticsData/src/V1beta/BatchRunPivotReportsResponse.php
+++ b/AnalyticsData/src/V1beta/BatchRunPivotReportsResponse.php
@@ -28,7 +28,7 @@ class BatchRunPivotReportsResponse extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string kind = 2;
*/
- private $kind = '';
+ protected $kind = '';
/**
* Constructor.
diff --git a/AnalyticsData/src/V1beta/BatchRunReportsRequest.php b/AnalyticsData/src/V1beta/BatchRunReportsRequest.php
index 9b7735708d98..f4957f8abe59 100644
--- a/AnalyticsData/src/V1beta/BatchRunReportsRequest.php
+++ b/AnalyticsData/src/V1beta/BatchRunReportsRequest.php
@@ -27,7 +27,7 @@ class BatchRunReportsRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string property = 1;
*/
- private $property = '';
+ protected $property = '';
/**
* Individual requests. Each request has a separate report response. Each
* batch request is allowed up to 5 requests.
diff --git a/AnalyticsData/src/V1beta/BatchRunReportsResponse.php b/AnalyticsData/src/V1beta/BatchRunReportsResponse.php
index d87d82685273..f45db6b80c2d 100644
--- a/AnalyticsData/src/V1beta/BatchRunReportsResponse.php
+++ b/AnalyticsData/src/V1beta/BatchRunReportsResponse.php
@@ -28,7 +28,7 @@ class BatchRunReportsResponse extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string kind = 2;
*/
- private $kind = '';
+ protected $kind = '';
/**
* Constructor.
diff --git a/AnalyticsData/src/V1beta/BetaAnalyticsDataClient.php b/AnalyticsData/src/V1beta/BetaAnalyticsDataClient.php
deleted file mode 100644
index 3900e46de117..000000000000
--- a/AnalyticsData/src/V1beta/BetaAnalyticsDataClient.php
+++ /dev/null
@@ -1,36 +0,0 @@
-_simpleRequest('/google.analytics.data.v1beta.BetaAnalyticsData/RunReport',
- $argument,
- ['\Google\Analytics\Data\V1beta\RunReportResponse', 'decode'],
- $metadata, $options);
- }
-
- /**
- * Returns a customized pivot report of your Google Analytics event data.
- * Pivot reports are more advanced and expressive formats than regular
- * reports. In a pivot report, dimensions are only visible if they are
- * included in a pivot. Multiple pivots can be specified to further dissect
- * your data.
- * @param \Google\Analytics\Data\V1beta\RunPivotReportRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function RunPivotReport(\Google\Analytics\Data\V1beta\RunPivotReportRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.analytics.data.v1beta.BetaAnalyticsData/RunPivotReport',
- $argument,
- ['\Google\Analytics\Data\V1beta\RunPivotReportResponse', 'decode'],
- $metadata, $options);
- }
-
- /**
- * Returns multiple reports in a batch. All reports must be for the same
- * GA4 Property.
- * @param \Google\Analytics\Data\V1beta\BatchRunReportsRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function BatchRunReports(\Google\Analytics\Data\V1beta\BatchRunReportsRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.analytics.data.v1beta.BetaAnalyticsData/BatchRunReports',
- $argument,
- ['\Google\Analytics\Data\V1beta\BatchRunReportsResponse', 'decode'],
- $metadata, $options);
- }
-
- /**
- * Returns multiple pivot reports in a batch. All reports must be for the same
- * GA4 Property.
- * @param \Google\Analytics\Data\V1beta\BatchRunPivotReportsRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function BatchRunPivotReports(\Google\Analytics\Data\V1beta\BatchRunPivotReportsRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.analytics.data.v1beta.BetaAnalyticsData/BatchRunPivotReports',
- $argument,
- ['\Google\Analytics\Data\V1beta\BatchRunPivotReportsResponse', 'decode'],
- $metadata, $options);
- }
-
- /**
- * Returns metadata for dimensions and metrics available in reporting methods.
- * Used to explore the dimensions and metrics. In this method, a Google
- * Analytics GA4 Property Identifier is specified in the request, and
- * the metadata response includes Custom dimensions and metrics as well as
- * Universal metadata.
- *
- * For example if a custom metric with parameter name `levels_unlocked` is
- * registered to a property, the Metadata response will contain
- * `customEvent:levels_unlocked`. Universal metadata are dimensions and
- * metrics applicable to any property such as `country` and `totalUsers`.
- * @param \Google\Analytics\Data\V1beta\GetMetadataRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function GetMetadata(\Google\Analytics\Data\V1beta\GetMetadataRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.analytics.data.v1beta.BetaAnalyticsData/GetMetadata',
- $argument,
- ['\Google\Analytics\Data\V1beta\Metadata', 'decode'],
- $metadata, $options);
- }
-
- /**
- * Returns a customized report of realtime event data for your property.
- * Events appear in realtime reports seconds after they have been sent to
- * the Google Analytics. Realtime reports show events and usage data for the
- * periods of time ranging from the present moment to 30 minutes ago (up to
- * 60 minutes for Google Analytics 360 properties).
- *
- * For a guide to constructing realtime requests & understanding responses,
- * see [Creating a Realtime
- * Report](https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-basics).
- * @param \Google\Analytics\Data\V1beta\RunRealtimeReportRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function RunRealtimeReport(\Google\Analytics\Data\V1beta\RunRealtimeReportRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.analytics.data.v1beta.BetaAnalyticsData/RunRealtimeReport',
- $argument,
- ['\Google\Analytics\Data\V1beta\RunRealtimeReportResponse', 'decode'],
- $metadata, $options);
- }
-
- /**
- * This compatibility method lists dimensions and metrics that can be added to
- * a report request and maintain compatibility. This method fails if the
- * request's dimensions and metrics are incompatible.
- *
- * In Google Analytics, reports fail if they request incompatible dimensions
- * and/or metrics; in that case, you will need to remove dimensions and/or
- * metrics from the incompatible report until the report is compatible.
- *
- * The Realtime and Core reports have different compatibility rules. This
- * method checks compatibility for Core reports.
- * @param \Google\Analytics\Data\V1beta\CheckCompatibilityRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function CheckCompatibility(\Google\Analytics\Data\V1beta\CheckCompatibilityRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.analytics.data.v1beta.BetaAnalyticsData/CheckCompatibility',
- $argument,
- ['\Google\Analytics\Data\V1beta\CheckCompatibilityResponse', 'decode'],
- $metadata, $options);
- }
-
-}
diff --git a/AnalyticsData/src/V1beta/CheckCompatibilityRequest.php b/AnalyticsData/src/V1beta/CheckCompatibilityRequest.php
index f058187a4a0d..0613f70a4013 100644
--- a/AnalyticsData/src/V1beta/CheckCompatibilityRequest.php
+++ b/AnalyticsData/src/V1beta/CheckCompatibilityRequest.php
@@ -27,7 +27,7 @@ class CheckCompatibilityRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string property = 1;
*/
- private $property = '';
+ protected $property = '';
/**
* The dimensions in this report. `dimensions` should be the same value as in
* your `runReport` request.
@@ -48,14 +48,14 @@ class CheckCompatibilityRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.analytics.data.v1beta.FilterExpression dimension_filter = 4;
*/
- private $dimension_filter = null;
+ protected $dimension_filter = null;
/**
* The filter clause of metrics. `metricFilter` should be the same value as in
* your `runReport` request
*
* Generated from protobuf field .google.analytics.data.v1beta.FilterExpression metric_filter = 5;
*/
- private $metric_filter = null;
+ protected $metric_filter = null;
/**
* Filters the dimensions and metrics in the response to just this
* compatibility. Commonly used as `”compatibilityFilter”: “COMPATIBLE”`
@@ -63,7 +63,7 @@ class CheckCompatibilityRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.analytics.data.v1beta.Compatibility compatibility_filter = 6;
*/
- private $compatibility_filter = 0;
+ protected $compatibility_filter = 0;
/**
* Constructor.
diff --git a/AnalyticsData/src/V1beta/Client/BetaAnalyticsDataClient.php b/AnalyticsData/src/V1beta/Client/BetaAnalyticsDataClient.php
index e3ed7caa67f8..a4300ba006c7 100644
--- a/AnalyticsData/src/V1beta/Client/BetaAnalyticsDataClient.php
+++ b/AnalyticsData/src/V1beta/Client/BetaAnalyticsDataClient.php
@@ -1,6 +1,6 @@
descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : [];
+ $options = isset($this->descriptors[$methodName]['longRunning'])
+ ? $this->descriptors[$methodName]['longRunning']
+ : [];
$operation = new OperationResponse($operationName, $this->getOperationsClient(), $options);
$operation->reload();
return $operation;
}
+ /**
+ * Create the default operation client for the service.
+ *
+ * @param array $options ClientOptions for the client.
+ *
+ * @return OperationsClient
+ */
+ private function createOperationsClient(array $options)
+ {
+ // Unset client-specific configuration options
+ unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']);
+
+ if (isset($options['operationsClient'])) {
+ return $options['operationsClient'];
+ }
+
+ return new OperationsClient($options);
+ }
+
/**
* Formats a string containing the fully-qualified path to represent a
* audience_export resource.
@@ -239,8 +259,8 @@ public static function propertyName(string $property): string
* listed, then parseName will check each of the supported templates, and return
* the first match.
*
- * @param string $formattedName The formatted name string
- * @param ?string $template Optional name of template to match
+ * @param string $formattedName The formatted name string
+ * @param string $template Optional name of template to match
*
* @return array An associative array from name component IDs to component values.
*
@@ -248,7 +268,7 @@ public static function propertyName(string $property): string
*
* @experimental
*/
- public static function parseName(string $formattedName, ?string $template = null): array
+ public static function parseName(string $formattedName, string $template = null): array
{
return self::parseFormattedName($formattedName, $template);
}
@@ -303,9 +323,6 @@ public static function parseName(string $formattedName, ?string $template = null
* @type callable $clientCertSource
* A callable which returns the client cert as a string. This can be used to
* provide a certificate and private key to the transport layer for mTLS.
- * @type false|LoggerInterface $logger
- * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the
- * 'GOOGLE_SDK_PHP_LOGGING' environment flag
* }
*
* @throws ValidationException
@@ -355,8 +372,10 @@ public function __call($method, $args)
*
* @experimental
*/
- public function batchRunPivotReports(BatchRunPivotReportsRequest $request, array $callOptions = []): BatchRunPivotReportsResponse
- {
+ public function batchRunPivotReports(
+ BatchRunPivotReportsRequest $request,
+ array $callOptions = []
+ ): BatchRunPivotReportsResponse {
return $this->startApiCall('BatchRunPivotReports', $request, $callOptions)->wait();
}
@@ -421,8 +440,10 @@ public function batchRunReports(BatchRunReportsRequest $request, array $callOpti
*
* @experimental
*/
- public function checkCompatibility(CheckCompatibilityRequest $request, array $callOptions = []): CheckCompatibilityResponse
- {
+ public function checkCompatibility(
+ CheckCompatibilityRequest $request,
+ array $callOptions = []
+ ): CheckCompatibilityResponse {
return $this->startApiCall('CheckCompatibility', $request, $callOptions)->wait();
}
@@ -474,8 +495,10 @@ public function checkCompatibility(CheckCompatibilityRequest $request, array $ca
*
* @experimental
*/
- public function createAudienceExport(CreateAudienceExportRequest $request, array $callOptions = []): OperationResponse
- {
+ public function createAudienceExport(
+ CreateAudienceExportRequest $request,
+ array $callOptions = []
+ ): OperationResponse {
return $this->startApiCall('CreateAudienceExport', $request, $callOptions)->wait();
}
@@ -640,8 +663,10 @@ public function listAudienceExports(ListAudienceExportsRequest $request, array $
*
* @experimental
*/
- public function queryAudienceExport(QueryAudienceExportRequest $request, array $callOptions = []): QueryAudienceExportResponse
- {
+ public function queryAudienceExport(
+ QueryAudienceExportRequest $request,
+ array $callOptions = []
+ ): QueryAudienceExportResponse {
return $this->startApiCall('QueryAudienceExport', $request, $callOptions)->wait();
}
@@ -708,8 +733,10 @@ public function runPivotReport(RunPivotReportRequest $request, array $callOption
*
* @experimental
*/
- public function runRealtimeReport(RunRealtimeReportRequest $request, array $callOptions = []): RunRealtimeReportResponse
- {
+ public function runRealtimeReport(
+ RunRealtimeReportRequest $request,
+ array $callOptions = []
+ ): RunRealtimeReportResponse {
return $this->startApiCall('RunRealtimeReport', $request, $callOptions)->wait();
}
diff --git a/AnalyticsData/src/V1beta/Cohort.php b/AnalyticsData/src/V1beta/Cohort.php
index 6fbc74195bbc..2af25ee8e361 100644
--- a/AnalyticsData/src/V1beta/Cohort.php
+++ b/AnalyticsData/src/V1beta/Cohort.php
@@ -25,14 +25,14 @@ class Cohort extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1;
*/
- private $name = '';
+ protected $name = '';
/**
* Dimension used by the cohort. Required and only supports
* `firstSessionDate`.
*
* Generated from protobuf field string dimension = 2;
*/
- private $dimension = '';
+ protected $dimension = '';
/**
* The cohort selects users whose first touch date is between start date and
* end date defined in the `dateRange`. This `dateRange` does not specify the
@@ -51,7 +51,7 @@ class Cohort extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.analytics.data.v1beta.DateRange date_range = 3;
*/
- private $date_range = null;
+ protected $date_range = null;
/**
* Constructor.
diff --git a/AnalyticsData/src/V1beta/CohortReportSettings.php b/AnalyticsData/src/V1beta/CohortReportSettings.php
index 8c7a9177ecfe..188313861746 100644
--- a/AnalyticsData/src/V1beta/CohortReportSettings.php
+++ b/AnalyticsData/src/V1beta/CohortReportSettings.php
@@ -21,7 +21,7 @@ class CohortReportSettings extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field bool accumulate = 1;
*/
- private $accumulate = false;
+ protected $accumulate = false;
/**
* Constructor.
diff --git a/AnalyticsData/src/V1beta/CohortSpec.php b/AnalyticsData/src/V1beta/CohortSpec.php
index 1edc19c9279d..3fb245a459c2 100644
--- a/AnalyticsData/src/V1beta/CohortSpec.php
+++ b/AnalyticsData/src/V1beta/CohortSpec.php
@@ -41,13 +41,13 @@ class CohortSpec extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.analytics.data.v1beta.CohortsRange cohorts_range = 2;
*/
- private $cohorts_range = null;
+ protected $cohorts_range = null;
/**
* Optional settings for a cohort report.
*
* Generated from protobuf field .google.analytics.data.v1beta.CohortReportSettings cohort_report_settings = 3;
*/
- private $cohort_report_settings = null;
+ protected $cohort_report_settings = null;
/**
* Constructor.
diff --git a/AnalyticsData/src/V1beta/CohortsRange.php b/AnalyticsData/src/V1beta/CohortsRange.php
index b05da1355c35..2877e4dbc3a4 100644
--- a/AnalyticsData/src/V1beta/CohortsRange.php
+++ b/AnalyticsData/src/V1beta/CohortsRange.php
@@ -22,7 +22,7 @@ class CohortsRange extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.analytics.data.v1beta.CohortsRange.Granularity granularity = 1;
*/
- private $granularity = 0;
+ protected $granularity = 0;
/**
* `startOffset` specifies the start date of the extended reporting date range
* for a cohort report. `startOffset` is commonly set to 0 so that reports
@@ -36,7 +36,7 @@ class CohortsRange extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field int32 start_offset = 2;
*/
- private $start_offset = 0;
+ protected $start_offset = 0;
/**
* Required. `endOffset` specifies the end date of the extended reporting date
* range for a cohort report. `endOffset` can be any positive integer but is
@@ -51,7 +51,7 @@ class CohortsRange extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field int32 end_offset = 3;
*/
- private $end_offset = 0;
+ protected $end_offset = 0;
/**
* Constructor.
diff --git a/AnalyticsData/src/V1beta/Comparison.php b/AnalyticsData/src/V1beta/Comparison.php
index a8ce11508620..7f5eac6903ec 100644
--- a/AnalyticsData/src/V1beta/Comparison.php
+++ b/AnalyticsData/src/V1beta/Comparison.php
@@ -23,7 +23,7 @@ class Comparison extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field optional string name = 1;
*/
- private $name = null;
+ protected $name = null;
protected $one_comparison;
/**
diff --git a/AnalyticsData/src/V1beta/ComparisonMetadata.php b/AnalyticsData/src/V1beta/ComparisonMetadata.php
index d9354c0f6f73..608a011a3e95 100644
--- a/AnalyticsData/src/V1beta/ComparisonMetadata.php
+++ b/AnalyticsData/src/V1beta/ComparisonMetadata.php
@@ -21,19 +21,19 @@ class ComparisonMetadata extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string api_name = 1;
*/
- private $api_name = '';
+ protected $api_name = '';
/**
* This comparison's name within the Google Analytics user interface.
*
* Generated from protobuf field string ui_name = 2;
*/
- private $ui_name = '';
+ protected $ui_name = '';
/**
* This comparison's description.
*
* Generated from protobuf field string description = 3;
*/
- private $description = '';
+ protected $description = '';
/**
* Constructor.
diff --git a/AnalyticsData/src/V1beta/CreateAudienceExportRequest.php b/AnalyticsData/src/V1beta/CreateAudienceExportRequest.php
index 79bd26453305..5fbfebf75fde 100644
--- a/AnalyticsData/src/V1beta/CreateAudienceExportRequest.php
+++ b/AnalyticsData/src/V1beta/CreateAudienceExportRequest.php
@@ -21,13 +21,13 @@ class CreateAudienceExportRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
*/
- private $parent = '';
+ protected $parent = '';
/**
* Required. The audience export to create.
*
* Generated from protobuf field .google.analytics.data.v1beta.AudienceExport audience_export = 2 [(.google.api.field_behavior) = REQUIRED];
*/
- private $audience_export = null;
+ protected $audience_export = null;
/**
* @param string $parent Required. The parent resource where this audience export will be created.
diff --git a/AnalyticsData/src/V1beta/DateRange.php b/AnalyticsData/src/V1beta/DateRange.php
index 7c8515fbe9d4..9c0ef0525f64 100644
--- a/AnalyticsData/src/V1beta/DateRange.php
+++ b/AnalyticsData/src/V1beta/DateRange.php
@@ -24,7 +24,7 @@ class DateRange extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string start_date = 1;
*/
- private $start_date = '';
+ protected $start_date = '';
/**
* The inclusive end date for the query in the format `YYYY-MM-DD`. Cannot
* be before `start_date`. The format `NdaysAgo`, `yesterday`, or `today` is
@@ -33,7 +33,7 @@ class DateRange extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string end_date = 2;
*/
- private $end_date = '';
+ protected $end_date = '';
/**
* Assigns a name to this date range. The dimension `dateRange` is valued to
* this name in a report response. If set, cannot begin with `date_range_` or
@@ -42,7 +42,7 @@ class DateRange extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 3;
*/
- private $name = '';
+ protected $name = '';
/**
* Constructor.
diff --git a/AnalyticsData/src/V1beta/Dimension.php b/AnalyticsData/src/V1beta/Dimension.php
index eac6909c4e09..4fe7c3aed86d 100644
--- a/AnalyticsData/src/V1beta/Dimension.php
+++ b/AnalyticsData/src/V1beta/Dimension.php
@@ -41,14 +41,14 @@ class Dimension extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1;
*/
- private $name = '';
+ protected $name = '';
/**
* One dimension can be the result of an expression of multiple dimensions.
* For example, dimension "country, city": concatenate(country, ", ", city).
*
* Generated from protobuf field .google.analytics.data.v1beta.DimensionExpression dimension_expression = 2;
*/
- private $dimension_expression = null;
+ protected $dimension_expression = null;
/**
* Constructor.
diff --git a/AnalyticsData/src/V1beta/DimensionCompatibility.php b/AnalyticsData/src/V1beta/DimensionCompatibility.php
index 929191b13314..ff6d5ae0fc6c 100644
--- a/AnalyticsData/src/V1beta/DimensionCompatibility.php
+++ b/AnalyticsData/src/V1beta/DimensionCompatibility.php
@@ -22,14 +22,14 @@ class DimensionCompatibility extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field optional .google.analytics.data.v1beta.DimensionMetadata dimension_metadata = 1;
*/
- private $dimension_metadata = null;
+ protected $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 optional .google.analytics.data.v1beta.Compatibility compatibility = 2;
*/
- private $compatibility = null;
+ protected $compatibility = null;
/**
* Constructor.
diff --git a/AnalyticsData/src/V1beta/DimensionExpression/CaseExpression.php b/AnalyticsData/src/V1beta/DimensionExpression/CaseExpression.php
index 775e66705198..d030ef370e1c 100644
--- a/AnalyticsData/src/V1beta/DimensionExpression/CaseExpression.php
+++ b/AnalyticsData/src/V1beta/DimensionExpression/CaseExpression.php
@@ -21,7 +21,7 @@ class CaseExpression extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string dimension_name = 1;
*/
- private $dimension_name = '';
+ protected $dimension_name = '';
/**
* Constructor.
diff --git a/AnalyticsData/src/V1beta/DimensionExpression/ConcatenateExpression.php b/AnalyticsData/src/V1beta/DimensionExpression/ConcatenateExpression.php
index 974bbc857ad7..f2bc8e705207 100644
--- a/AnalyticsData/src/V1beta/DimensionExpression/ConcatenateExpression.php
+++ b/AnalyticsData/src/V1beta/DimensionExpression/ConcatenateExpression.php
@@ -32,7 +32,7 @@ class ConcatenateExpression extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string delimiter = 2;
*/
- private $delimiter = '';
+ protected $delimiter = '';
/**
* Constructor.
diff --git a/AnalyticsData/src/V1beta/DimensionHeader.php b/AnalyticsData/src/V1beta/DimensionHeader.php
index 28ef2975010a..fe4f90d2a87c 100644
--- a/AnalyticsData/src/V1beta/DimensionHeader.php
+++ b/AnalyticsData/src/V1beta/DimensionHeader.php
@@ -23,7 +23,7 @@ class DimensionHeader extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1;
*/
- private $name = '';
+ protected $name = '';
/**
* Constructor.
diff --git a/AnalyticsData/src/V1beta/DimensionMetadata.php b/AnalyticsData/src/V1beta/DimensionMetadata.php
index e5353c3be604..510ff8718583 100644
--- a/AnalyticsData/src/V1beta/DimensionMetadata.php
+++ b/AnalyticsData/src/V1beta/DimensionMetadata.php
@@ -21,20 +21,20 @@ class DimensionMetadata extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string api_name = 1;
*/
- private $api_name = '';
+ protected $api_name = '';
/**
* This dimension's name within the Google Analytics user interface. For
* example, `Event name`.
*
* Generated from protobuf field string ui_name = 2;
*/
- private $ui_name = '';
+ protected $ui_name = '';
/**
* Description of how this dimension is used and calculated.
*
* Generated from protobuf field string description = 3;
*/
- private $description = '';
+ protected $description = '';
/**
* Still usable but deprecated names for this dimension. If populated, this
* dimension is available by either `apiName` or one of `deprecatedApiNames`
@@ -53,14 +53,14 @@ class DimensionMetadata extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field bool custom_definition = 5;
*/
- private $custom_definition = false;
+ protected $custom_definition = false;
/**
* The display name of the category that this dimension belongs to. Similar
* dimensions and metrics are categorized together.
*
* Generated from protobuf field string category = 7;
*/
- private $category = '';
+ protected $category = '';
/**
* Constructor.
diff --git a/AnalyticsData/src/V1beta/Filter.php b/AnalyticsData/src/V1beta/Filter.php
index a97a0d71b48e..cb2cac1fc593 100644
--- a/AnalyticsData/src/V1beta/Filter.php
+++ b/AnalyticsData/src/V1beta/Filter.php
@@ -24,7 +24,7 @@ class Filter extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string field_name = 1;
*/
- private $field_name = '';
+ protected $field_name = '';
protected $one_filter;
/**
diff --git a/AnalyticsData/src/V1beta/Filter/BetweenFilter.php b/AnalyticsData/src/V1beta/Filter/BetweenFilter.php
index b9056e73e616..0871b84e5373 100644
--- a/AnalyticsData/src/V1beta/Filter/BetweenFilter.php
+++ b/AnalyticsData/src/V1beta/Filter/BetweenFilter.php
@@ -20,13 +20,13 @@ class BetweenFilter extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.analytics.data.v1beta.NumericValue from_value = 1;
*/
- private $from_value = null;
+ protected $from_value = null;
/**
* Ends with this number.
*
* Generated from protobuf field .google.analytics.data.v1beta.NumericValue to_value = 2;
*/
- private $to_value = null;
+ protected $to_value = null;
/**
* Constructor.
diff --git a/AnalyticsData/src/V1beta/Filter/InListFilter.php b/AnalyticsData/src/V1beta/Filter/InListFilter.php
index 2236b4b4c751..afbea03ca631 100644
--- a/AnalyticsData/src/V1beta/Filter/InListFilter.php
+++ b/AnalyticsData/src/V1beta/Filter/InListFilter.php
@@ -27,7 +27,7 @@ class InListFilter extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field bool case_sensitive = 2;
*/
- private $case_sensitive = false;
+ protected $case_sensitive = false;
/**
* Constructor.
diff --git a/AnalyticsData/src/V1beta/Filter/NumericFilter.php b/AnalyticsData/src/V1beta/Filter/NumericFilter.php
index 6e672861922c..5b18c962a6b3 100644
--- a/AnalyticsData/src/V1beta/Filter/NumericFilter.php
+++ b/AnalyticsData/src/V1beta/Filter/NumericFilter.php
@@ -20,13 +20,13 @@ class NumericFilter extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.analytics.data.v1beta.Filter.NumericFilter.Operation operation = 1;
*/
- private $operation = 0;
+ protected $operation = 0;
/**
* A numeric value or a date value.
*
* Generated from protobuf field .google.analytics.data.v1beta.NumericValue value = 2;
*/
- private $value = null;
+ protected $value = null;
/**
* Constructor.
diff --git a/AnalyticsData/src/V1beta/Filter/StringFilter.php b/AnalyticsData/src/V1beta/Filter/StringFilter.php
index 48f4bc847e5d..45f599e078dd 100644
--- a/AnalyticsData/src/V1beta/Filter/StringFilter.php
+++ b/AnalyticsData/src/V1beta/Filter/StringFilter.php
@@ -20,19 +20,19 @@ class StringFilter extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.analytics.data.v1beta.Filter.StringFilter.MatchType match_type = 1;
*/
- private $match_type = 0;
+ protected $match_type = 0;
/**
* The string value used for the matching.
*
* Generated from protobuf field string value = 2;
*/
- private $value = '';
+ protected $value = '';
/**
* If true, the string value is case sensitive.
*
* Generated from protobuf field bool case_sensitive = 3;
*/
- private $case_sensitive = false;
+ protected $case_sensitive = false;
/**
* Constructor.
diff --git a/AnalyticsData/src/V1beta/Gapic/BetaAnalyticsDataGapicClient.php b/AnalyticsData/src/V1beta/Gapic/BetaAnalyticsDataGapicClient.php
deleted file mode 100644
index e7552b88c90f..000000000000
--- a/AnalyticsData/src/V1beta/Gapic/BetaAnalyticsDataGapicClient.php
+++ /dev/null
@@ -1,1591 +0,0 @@
-batchRunPivotReports();
- * } finally {
- * $betaAnalyticsDataClient->close();
- * }
- * ```
- *
- * Many parameters require resource names to be formatted in a particular way. To
- * assist with these names, this class includes a format method for each type of
- * name, and additionally a parseName method to extract the individual identifiers
- * contained within formatted names that are returned by the API.
- *
- * @experimental
- *
- * @deprecated Please use the new service client {@see \Google\Analytics\Data\V1beta\Client\BetaAnalyticsDataClient}.
- */
-class BetaAnalyticsDataGapicClient
-{
- use GapicClientTrait;
-
- /** The name of the service. */
- const SERVICE_NAME = 'google.analytics.data.v1beta.BetaAnalyticsData';
-
- /**
- * The default address of the service.
- *
- * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead.
- */
- const SERVICE_ADDRESS = 'analyticsdata.googleapis.com';
-
- /** The address template of the service. */
- private const SERVICE_ADDRESS_TEMPLATE = 'analyticsdata.UNIVERSE_DOMAIN';
-
- /** The default port of the service. */
- const DEFAULT_SERVICE_PORT = 443;
-
- /** The name of the code generator, to be included in the agent header. */
- const CODEGEN_NAME = 'gapic';
-
- /** The default scopes required by the service. */
- public static $serviceScopes = [
- 'https://www.googleapis.com/auth/analytics',
- 'https://www.googleapis.com/auth/analytics.readonly',
- ];
-
- private static $audienceExportNameTemplate;
-
- private static $metadataNameTemplate;
-
- private static $propertyNameTemplate;
-
- private static $pathTemplateMap;
-
- private $operationsClient;
-
- private static function getClientDefaults()
- {
- return [
- 'serviceName' => self::SERVICE_NAME,
- 'apiEndpoint' =>
- self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT,
- 'clientConfig' =>
- __DIR__ .
- '/../resources/beta_analytics_data_client_config.json',
- 'descriptorsConfigPath' =>
- __DIR__ .
- '/../resources/beta_analytics_data_descriptor_config.php',
- 'gcpApiConfigPath' =>
- __DIR__ . '/../resources/beta_analytics_data_grpc_config.json',
- 'credentialsConfig' => [
- 'defaultScopes' => self::$serviceScopes,
- ],
- 'transportConfig' => [
- 'rest' => [
- 'restClientConfigPath' =>
- __DIR__ .
- '/../resources/beta_analytics_data_rest_client_config.php',
- ],
- ],
- ];
- }
-
- private static function getAudienceExportNameTemplate()
- {
- if (self::$audienceExportNameTemplate == null) {
- self::$audienceExportNameTemplate = new PathTemplate(
- 'properties/{property}/audienceExports/{audience_export}'
- );
- }
-
- return self::$audienceExportNameTemplate;
- }
-
- private static function getMetadataNameTemplate()
- {
- if (self::$metadataNameTemplate == null) {
- self::$metadataNameTemplate = new PathTemplate(
- 'properties/{property}/metadata'
- );
- }
-
- return self::$metadataNameTemplate;
- }
-
- private static function getPropertyNameTemplate()
- {
- if (self::$propertyNameTemplate == null) {
- self::$propertyNameTemplate = new PathTemplate(
- 'properties/{property}'
- );
- }
-
- return self::$propertyNameTemplate;
- }
-
- private static function getPathTemplateMap()
- {
- if (self::$pathTemplateMap == null) {
- self::$pathTemplateMap = [
- 'audienceExport' => self::getAudienceExportNameTemplate(),
- 'metadata' => self::getMetadataNameTemplate(),
- 'property' => self::getPropertyNameTemplate(),
- ];
- }
-
- return self::$pathTemplateMap;
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a
- * audience_export resource.
- *
- * @param string $property
- * @param string $audienceExport
- *
- * @return string The formatted audience_export resource.
- *
- * @experimental
- */
- public static function audienceExportName($property, $audienceExport)
- {
- return self::getAudienceExportNameTemplate()->render([
- 'property' => $property,
- 'audience_export' => $audienceExport,
- ]);
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a metadata
- * resource.
- *
- * @param string $property
- *
- * @return string The formatted metadata resource.
- *
- * @experimental
- */
- public static function metadataName($property)
- {
- return self::getMetadataNameTemplate()->render([
- 'property' => $property,
- ]);
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a property
- * resource.
- *
- * @param string $property
- *
- * @return string The formatted property resource.
- *
- * @experimental
- */
- public static function propertyName($property)
- {
- return self::getPropertyNameTemplate()->render([
- 'property' => $property,
- ]);
- }
-
- /**
- * Parses a formatted name string and returns an associative array of the components in the name.
- * The following name formats are supported:
- * Template: Pattern
- * - audienceExport: properties/{property}/audienceExports/{audience_export}
- * - metadata: properties/{property}/metadata
- * - property: properties/{property}
- *
- * The optional $template argument can be supplied to specify a particular pattern,
- * and must match one of the templates listed above. If no $template argument is
- * provided, or if the $template argument does not match one of the templates
- * listed, then parseName will check each of the supported templates, and return
- * the first match.
- *
- * @param string $formattedName The formatted name string
- * @param string $template Optional name of template to match
- *
- * @return array An associative array from name component IDs to component values.
- *
- * @throws ValidationException If $formattedName could not be matched.
- *
- * @experimental
- */
- public static function parseName($formattedName, $template = null)
- {
- $templateMap = self::getPathTemplateMap();
- if ($template) {
- if (!isset($templateMap[$template])) {
- throw new ValidationException(
- "Template name $template does not exist"
- );
- }
-
- return $templateMap[$template]->match($formattedName);
- }
-
- foreach ($templateMap as $templateName => $pathTemplate) {
- try {
- return $pathTemplate->match($formattedName);
- } catch (ValidationException $ex) {
- // Swallow the exception to continue trying other path templates
- }
- }
-
- throw new ValidationException(
- "Input did not match any known format. Input: $formattedName"
- );
- }
-
- /**
- * Return an OperationsClient object with the same endpoint as $this.
- *
- * @return OperationsClient
- *
- * @experimental
- */
- public function getOperationsClient()
- {
- return $this->operationsClient;
- }
-
- /**
- * Resume an existing long running operation that was previously started by a long
- * running API method. If $methodName is not provided, or does not match a long
- * running API method, then the operation can still be resumed, but the
- * OperationResponse object will not deserialize the final response.
- *
- * @param string $operationName The name of the long running operation
- * @param string $methodName The name of the method used to start the operation
- *
- * @return OperationResponse
- *
- * @experimental
- */
- public function resumeOperation($operationName, $methodName = null)
- {
- $options = isset($this->descriptors[$methodName]['longRunning'])
- ? $this->descriptors[$methodName]['longRunning']
- : [];
- $operation = new OperationResponse(
- $operationName,
- $this->getOperationsClient(),
- $options
- );
- $operation->reload();
- return $operation;
- }
-
- /**
- * Constructor.
- *
- * @param array $options {
- * Optional. Options for configuring the service API wrapper.
- *
- * @type string $apiEndpoint
- * The address of the API remote host. May optionally include the port, formatted
- * as ":". Default 'analyticsdata.googleapis.com:443'.
- * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials
- * The credentials to be used by the client to authorize API calls. This option
- * accepts either a path to a credentials file, or a decoded credentials file as a
- * PHP array.
- * *Advanced usage*: In addition, this option can also accept a pre-constructed
- * {@see \Google\Auth\FetchAuthTokenInterface} object or
- * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these
- * objects are provided, any settings in $credentialsConfig will be ignored.
- * @type array $credentialsConfig
- * Options used to configure credentials, including auth token caching, for the
- * client. For a full list of supporting configuration options, see
- * {@see \Google\ApiCore\CredentialsWrapper::build()} .
- * @type bool $disableRetries
- * Determines whether or not retries defined by the client configuration should be
- * disabled. Defaults to `false`.
- * @type string|array $clientConfig
- * Client method configuration, including retry settings. This option can be either
- * a path to a JSON file, or a PHP array containing the decoded JSON data. By
- * default this settings points to the default client config file, which is
- * provided in the resources folder.
- * @type string|TransportInterface $transport
- * The transport used for executing network requests. May be either the string
- * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system.
- * *Advanced usage*: Additionally, it is possible to pass in an already
- * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note
- * that when this object is provided, any settings in $transportConfig, and any
- * $apiEndpoint setting, will be ignored.
- * @type array $transportConfig
- * Configuration options that will be used to construct the transport. Options for
- * each supported transport type should be passed in a key for that transport. For
- * example:
- * $transportConfig = [
- * 'grpc' => [...],
- * 'rest' => [...],
- * ];
- * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and
- * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the
- * supported options.
- * @type callable $clientCertSource
- * A callable which returns the client cert as a string. This can be used to
- * provide a certificate and private key to the transport layer for mTLS.
- * }
- *
- * @throws ValidationException
- *
- * @experimental
- */
- public function __construct(array $options = [])
- {
- $clientOptions = $this->buildClientOptions($options);
- $this->setClientOptions($clientOptions);
- $this->operationsClient = $this->createOperationsClient($clientOptions);
- }
-
- /**
- * Returns multiple pivot reports in a batch. All reports must be for the same
- * Google Analytics property.
- *
- * Sample code:
- * ```
- * $betaAnalyticsDataClient = new BetaAnalyticsDataClient();
- * try {
- * $response = $betaAnalyticsDataClient->batchRunPivotReports();
- * } finally {
- * $betaAnalyticsDataClient->close();
- * }
- * ```
- *
- * @param array $optionalArgs {
- * Optional.
- *
- * @type string $property
- * A Google Analytics property identifier whose events are tracked.
- * Specified in the URL path and not the body. To learn more, see [where to
- * find your Property
- * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
- * This property must be specified for the batch. The property within
- * RunPivotReportRequest may either be unspecified or consistent with this
- * property.
- *
- * Example: properties/1234
- * @type RunPivotReportRequest[] $requests
- * Individual requests. Each request has a separate pivot report response.
- * Each batch request is allowed up to 5 requests.
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\Analytics\Data\V1beta\BatchRunPivotReportsResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function batchRunPivotReports(array $optionalArgs = [])
- {
- $request = new BatchRunPivotReportsRequest();
- $requestParamHeaders = [];
- if (isset($optionalArgs['property'])) {
- $request->setProperty($optionalArgs['property']);
- $requestParamHeaders['property'] = $optionalArgs['property'];
- }
-
- if (isset($optionalArgs['requests'])) {
- $request->setRequests($optionalArgs['requests']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor(
- $requestParamHeaders
- );
- $optionalArgs['headers'] = isset($optionalArgs['headers'])
- ? array_merge($requestParams->getHeader(), $optionalArgs['headers'])
- : $requestParams->getHeader();
- return $this->startCall(
- 'BatchRunPivotReports',
- BatchRunPivotReportsResponse::class,
- $optionalArgs,
- $request
- )->wait();
- }
-
- /**
- * Returns multiple reports in a batch. All reports must be for the same
- * Google Analytics property.
- *
- * Sample code:
- * ```
- * $betaAnalyticsDataClient = new BetaAnalyticsDataClient();
- * try {
- * $response = $betaAnalyticsDataClient->batchRunReports();
- * } finally {
- * $betaAnalyticsDataClient->close();
- * }
- * ```
- *
- * @param array $optionalArgs {
- * Optional.
- *
- * @type string $property
- * A Google Analytics property identifier whose events are tracked.
- * Specified in the URL path and not the body. To learn more, see [where to
- * find your Property
- * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
- * This property must be specified for the batch. The property within
- * RunReportRequest may either be unspecified or consistent with this
- * property.
- *
- * Example: properties/1234
- * @type RunReportRequest[] $requests
- * Individual requests. Each request has a separate report response. Each
- * batch request is allowed up to 5 requests.
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\Analytics\Data\V1beta\BatchRunReportsResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function batchRunReports(array $optionalArgs = [])
- {
- $request = new BatchRunReportsRequest();
- $requestParamHeaders = [];
- if (isset($optionalArgs['property'])) {
- $request->setProperty($optionalArgs['property']);
- $requestParamHeaders['property'] = $optionalArgs['property'];
- }
-
- if (isset($optionalArgs['requests'])) {
- $request->setRequests($optionalArgs['requests']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor(
- $requestParamHeaders
- );
- $optionalArgs['headers'] = isset($optionalArgs['headers'])
- ? array_merge($requestParams->getHeader(), $optionalArgs['headers'])
- : $requestParams->getHeader();
- return $this->startCall(
- 'BatchRunReports',
- BatchRunReportsResponse::class,
- $optionalArgs,
- $request
- )->wait();
- }
-
- /**
- * This compatibility method lists dimensions and metrics that can be added to
- * a report request and maintain compatibility. This method fails if the
- * request's dimensions and metrics are incompatible.
- *
- * In Google Analytics, reports fail if they request incompatible dimensions
- * and/or metrics; in that case, you will need to remove dimensions and/or
- * metrics from the incompatible report until the report is compatible.
- *
- * The Realtime and Core reports have different compatibility rules. This
- * method checks compatibility for Core reports.
- *
- * Sample code:
- * ```
- * $betaAnalyticsDataClient = new BetaAnalyticsDataClient();
- * try {
- * $response = $betaAnalyticsDataClient->checkCompatibility();
- * } finally {
- * $betaAnalyticsDataClient->close();
- * }
- * ```
- *
- * @param array $optionalArgs {
- * Optional.
- *
- * @type string $property
- * A Google Analytics property identifier whose events are tracked. To
- * learn more, see [where to find your Property
- * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
- * `property` should be the same value as in your `runReport` request.
- *
- * Example: properties/1234
- * @type Dimension[] $dimensions
- * The dimensions in this report. `dimensions` should be the same value as in
- * your `runReport` request.
- * @type Metric[] $metrics
- * The metrics in this report. `metrics` should be the same value as in your
- * `runReport` request.
- * @type FilterExpression $dimensionFilter
- * The filter clause of dimensions. `dimensionFilter` should be the same value
- * as in your `runReport` request.
- * @type FilterExpression $metricFilter
- * The filter clause of metrics. `metricFilter` should be the same value as in
- * your `runReport` request
- * @type int $compatibilityFilter
- * Filters the dimensions and metrics in the response to just this
- * compatibility. Commonly used as `”compatibilityFilter”: “COMPATIBLE”`
- * to only return compatible dimensions & metrics.
- * For allowed values, use constants defined on {@see \Google\Analytics\Data\V1beta\Compatibility}
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\Analytics\Data\V1beta\CheckCompatibilityResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function checkCompatibility(array $optionalArgs = [])
- {
- $request = new CheckCompatibilityRequest();
- $requestParamHeaders = [];
- if (isset($optionalArgs['property'])) {
- $request->setProperty($optionalArgs['property']);
- $requestParamHeaders['property'] = $optionalArgs['property'];
- }
-
- if (isset($optionalArgs['dimensions'])) {
- $request->setDimensions($optionalArgs['dimensions']);
- }
-
- if (isset($optionalArgs['metrics'])) {
- $request->setMetrics($optionalArgs['metrics']);
- }
-
- if (isset($optionalArgs['dimensionFilter'])) {
- $request->setDimensionFilter($optionalArgs['dimensionFilter']);
- }
-
- if (isset($optionalArgs['metricFilter'])) {
- $request->setMetricFilter($optionalArgs['metricFilter']);
- }
-
- if (isset($optionalArgs['compatibilityFilter'])) {
- $request->setCompatibilityFilter(
- $optionalArgs['compatibilityFilter']
- );
- }
-
- $requestParams = new RequestParamsHeaderDescriptor(
- $requestParamHeaders
- );
- $optionalArgs['headers'] = isset($optionalArgs['headers'])
- ? array_merge($requestParams->getHeader(), $optionalArgs['headers'])
- : $requestParams->getHeader();
- return $this->startCall(
- 'CheckCompatibility',
- CheckCompatibilityResponse::class,
- $optionalArgs,
- $request
- )->wait();
- }
-
- /**
- * Creates an audience export for later retrieval. This method quickly returns
- * the audience export's resource name and initiates a long running
- * asynchronous request to form an audience export. To export the users in an
- * audience export, first create the audience export through this method and
- * then send the audience resource name to the `QueryAudienceExport` method.
- *
- * See [Creating an Audience
- * Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics)
- * for an introduction to Audience Exports with examples.
- *
- * An audience export is a snapshot of the users currently in the audience at
- * the time of audience export creation. Creating audience exports for one
- * audience on different days will return different results as users enter and
- * exit the audience.
- *
- * Audiences in Google Analytics 4 allow you to segment your users in the ways
- * that are important to your business. To learn more, see
- * https://support.google.com/analytics/answer/9267572. Audience exports
- * contain the users in each audience.
- *
- * Audience Export APIs have some methods at alpha and other methods at beta
- * stability. The intention is to advance methods to beta stability after some
- * feedback and adoption. To give your feedback on this API, complete the
- * [Google Analytics Audience Export API
- * Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.
- *
- * Sample code:
- * ```
- * $betaAnalyticsDataClient = new BetaAnalyticsDataClient();
- * try {
- * $formattedParent = $betaAnalyticsDataClient->propertyName('[PROPERTY]');
- * $audienceExport = new AudienceExport();
- * $operationResponse = $betaAnalyticsDataClient->createAudienceExport($formattedParent, $audienceExport);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * $result = $operationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $betaAnalyticsDataClient->createAudienceExport($formattedParent, $audienceExport);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $betaAnalyticsDataClient->resumeOperation($operationName, 'createAudienceExport');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * $result = $newOperationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $betaAnalyticsDataClient->close();
- * }
- * ```
- *
- * @param string $parent Required. The parent resource where this audience export will be created.
- * Format: `properties/{property}`
- * @param AudienceExport $audienceExport Required. The audience export to create.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\ApiCore\OperationResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function createAudienceExport(
- $parent,
- $audienceExport,
- array $optionalArgs = []
- ) {
- $request = new CreateAudienceExportRequest();
- $requestParamHeaders = [];
- $request->setParent($parent);
- $request->setAudienceExport($audienceExport);
- $requestParamHeaders['parent'] = $parent;
- $requestParams = new RequestParamsHeaderDescriptor(
- $requestParamHeaders
- );
- $optionalArgs['headers'] = isset($optionalArgs['headers'])
- ? array_merge($requestParams->getHeader(), $optionalArgs['headers'])
- : $requestParams->getHeader();
- return $this->startOperationsCall(
- 'CreateAudienceExport',
- $optionalArgs,
- $request,
- $this->getOperationsClient()
- )->wait();
- }
-
- /**
- * Gets configuration metadata about a specific audience export. This method
- * can be used to understand an audience export after it has been created.
- *
- * See [Creating an Audience
- * Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics)
- * for an introduction to Audience Exports with examples.
- *
- * Audience Export APIs have some methods at alpha and other methods at beta
- * stability. The intention is to advance methods to beta stability after some
- * feedback and adoption. To give your feedback on this API, complete the
- * [Google Analytics Audience Export API
- * Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.
- *
- * Sample code:
- * ```
- * $betaAnalyticsDataClient = new BetaAnalyticsDataClient();
- * try {
- * $formattedName = $betaAnalyticsDataClient->audienceExportName('[PROPERTY]', '[AUDIENCE_EXPORT]');
- * $response = $betaAnalyticsDataClient->getAudienceExport($formattedName);
- * } finally {
- * $betaAnalyticsDataClient->close();
- * }
- * ```
- *
- * @param string $name Required. The audience export resource name.
- * Format: `properties/{property}/audienceExports/{audience_export}`
- * @param array $optionalArgs {
- * Optional.
- *
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\Analytics\Data\V1beta\AudienceExport
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function getAudienceExport($name, array $optionalArgs = [])
- {
- $request = new GetAudienceExportRequest();
- $requestParamHeaders = [];
- $request->setName($name);
- $requestParamHeaders['name'] = $name;
- $requestParams = new RequestParamsHeaderDescriptor(
- $requestParamHeaders
- );
- $optionalArgs['headers'] = isset($optionalArgs['headers'])
- ? array_merge($requestParams->getHeader(), $optionalArgs['headers'])
- : $requestParams->getHeader();
- return $this->startCall(
- 'GetAudienceExport',
- AudienceExport::class,
- $optionalArgs,
- $request
- )->wait();
- }
-
- /**
- * Returns metadata for dimensions and metrics available in reporting methods.
- * Used to explore the dimensions and metrics. In this method, a Google
- * Analytics property identifier is specified in the request, and
- * the metadata response includes Custom dimensions and metrics as well as
- * Universal metadata.
- *
- * For example if a custom metric with parameter name `levels_unlocked` is
- * registered to a property, the Metadata response will contain
- * `customEvent:levels_unlocked`. Universal metadata are dimensions and
- * metrics applicable to any property such as `country` and `totalUsers`.
- *
- * Sample code:
- * ```
- * $betaAnalyticsDataClient = new BetaAnalyticsDataClient();
- * try {
- * $formattedName = $betaAnalyticsDataClient->metadataName('[PROPERTY]');
- * $response = $betaAnalyticsDataClient->getMetadata($formattedName);
- * } finally {
- * $betaAnalyticsDataClient->close();
- * }
- * ```
- *
- * @param string $name Required. The resource name of the metadata to retrieve. This name field is
- * specified in the URL path and not URL parameters. Property is a numeric
- * Google Analytics property identifier. To learn more, see [where to find
- * your Property
- * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
- *
- * Example: properties/1234/metadata
- *
- * Set the Property ID to 0 for dimensions and metrics common to all
- * properties. In this special mode, this method will not return custom
- * dimensions and metrics.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\Analytics\Data\V1beta\Metadata
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function getMetadata($name, array $optionalArgs = [])
- {
- $request = new GetMetadataRequest();
- $requestParamHeaders = [];
- $request->setName($name);
- $requestParamHeaders['name'] = $name;
- $requestParams = new RequestParamsHeaderDescriptor(
- $requestParamHeaders
- );
- $optionalArgs['headers'] = isset($optionalArgs['headers'])
- ? array_merge($requestParams->getHeader(), $optionalArgs['headers'])
- : $requestParams->getHeader();
- return $this->startCall(
- 'GetMetadata',
- Metadata::class,
- $optionalArgs,
- $request
- )->wait();
- }
-
- /**
- * Lists all audience exports for a property. This method can be used for you
- * to find and reuse existing audience exports rather than creating
- * unnecessary new audience exports. The same audience can have multiple
- * audience exports that represent the export of users that were in an
- * audience on different days.
- *
- * See [Creating an Audience
- * Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics)
- * for an introduction to Audience Exports with examples.
- *
- * Audience Export APIs have some methods at alpha and other methods at beta
- * stability. The intention is to advance methods to beta stability after some
- * feedback and adoption. To give your feedback on this API, complete the
- * [Google Analytics Audience Export API
- * Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.
- *
- * Sample code:
- * ```
- * $betaAnalyticsDataClient = new BetaAnalyticsDataClient();
- * try {
- * $formattedParent = $betaAnalyticsDataClient->propertyName('[PROPERTY]');
- * // Iterate over pages of elements
- * $pagedResponse = $betaAnalyticsDataClient->listAudienceExports($formattedParent);
- * foreach ($pagedResponse->iteratePages() as $page) {
- * foreach ($page as $element) {
- * // doSomethingWith($element);
- * }
- * }
- * // Alternatively:
- * // Iterate through all elements
- * $pagedResponse = $betaAnalyticsDataClient->listAudienceExports($formattedParent);
- * foreach ($pagedResponse->iterateAllElements() as $element) {
- * // doSomethingWith($element);
- * }
- * } finally {
- * $betaAnalyticsDataClient->close();
- * }
- * ```
- *
- * @param string $parent Required. All audience exports for this property will be listed in the
- * response. Format: `properties/{property}`
- * @param array $optionalArgs {
- * Optional.
- *
- * @type int $pageSize
- * The maximum number of resources contained in the underlying API
- * response. The API may return fewer values in a page, even if
- * there are additional values to be retrieved.
- * @type string $pageToken
- * A page token is used to specify a page of values to be returned.
- * If no page token is specified (the default), the first page
- * of values will be returned. Any page token used here must have
- * been generated by a previous call to the API.
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\ApiCore\PagedListResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function listAudienceExports($parent, array $optionalArgs = [])
- {
- $request = new ListAudienceExportsRequest();
- $requestParamHeaders = [];
- $request->setParent($parent);
- $requestParamHeaders['parent'] = $parent;
- if (isset($optionalArgs['pageSize'])) {
- $request->setPageSize($optionalArgs['pageSize']);
- }
-
- if (isset($optionalArgs['pageToken'])) {
- $request->setPageToken($optionalArgs['pageToken']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor(
- $requestParamHeaders
- );
- $optionalArgs['headers'] = isset($optionalArgs['headers'])
- ? array_merge($requestParams->getHeader(), $optionalArgs['headers'])
- : $requestParams->getHeader();
- return $this->getPagedListResponse(
- 'ListAudienceExports',
- $optionalArgs,
- ListAudienceExportsResponse::class,
- $request
- );
- }
-
- /**
- * Retrieves an audience export of users. After creating an audience, the
- * users are not immediately available for exporting. First, a request to
- * `CreateAudienceExport` is necessary to create an audience export of users,
- * and then second, this method is used to retrieve the users in the audience
- * export.
- *
- * See [Creating an Audience
- * Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics)
- * for an introduction to Audience Exports with examples.
- *
- * Audiences in Google Analytics 4 allow you to segment your users in the ways
- * that are important to your business. To learn more, see
- * https://support.google.com/analytics/answer/9267572.
- *
- * Audience Export APIs have some methods at alpha and other methods at beta
- * stability. The intention is to advance methods to beta stability after some
- * feedback and adoption. To give your feedback on this API, complete the
- * [Google Analytics Audience Export API
- * Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.
- *
- * Sample code:
- * ```
- * $betaAnalyticsDataClient = new BetaAnalyticsDataClient();
- * try {
- * $name = 'name';
- * $response = $betaAnalyticsDataClient->queryAudienceExport($name);
- * } finally {
- * $betaAnalyticsDataClient->close();
- * }
- * ```
- *
- * @param string $name Required. The name of the audience export to retrieve users from.
- * Format: `properties/{property}/audienceExports/{audience_export}`
- * @param array $optionalArgs {
- * Optional.
- *
- * @type int $offset
- * Optional. The row count of the start row. The first row is counted as row
- * 0.
- *
- * When paging, the first request does not specify offset; or equivalently,
- * sets offset to 0; the first request returns the first `limit` of rows. The
- * second request sets offset to the `limit` of the first request; the second
- * request returns the second `limit` of rows.
- *
- * To learn more about this pagination parameter, see
- * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
- * @type int $limit
- * Optional. The number of rows to return. If unspecified, 10,000 rows are
- * returned. The API returns a maximum of 250,000 rows per request, no matter
- * how many you ask for. `limit` must be positive.
- *
- * The API can also return fewer rows than the requested `limit`, if there
- * aren't as many dimension values as the `limit`.
- *
- * To learn more about this pagination parameter, see
- * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\Analytics\Data\V1beta\QueryAudienceExportResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function queryAudienceExport($name, array $optionalArgs = [])
- {
- $request = new QueryAudienceExportRequest();
- $requestParamHeaders = [];
- $request->setName($name);
- $requestParamHeaders['name'] = $name;
- if (isset($optionalArgs['offset'])) {
- $request->setOffset($optionalArgs['offset']);
- }
-
- if (isset($optionalArgs['limit'])) {
- $request->setLimit($optionalArgs['limit']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor(
- $requestParamHeaders
- );
- $optionalArgs['headers'] = isset($optionalArgs['headers'])
- ? array_merge($requestParams->getHeader(), $optionalArgs['headers'])
- : $requestParams->getHeader();
- return $this->startCall(
- 'QueryAudienceExport',
- QueryAudienceExportResponse::class,
- $optionalArgs,
- $request
- )->wait();
- }
-
- /**
- * Returns a customized pivot report of your Google Analytics event data.
- * Pivot reports are more advanced and expressive formats than regular
- * reports. In a pivot report, dimensions are only visible if they are
- * included in a pivot. Multiple pivots can be specified to further dissect
- * your data.
- *
- * Sample code:
- * ```
- * $betaAnalyticsDataClient = new BetaAnalyticsDataClient();
- * try {
- * $response = $betaAnalyticsDataClient->runPivotReport();
- * } finally {
- * $betaAnalyticsDataClient->close();
- * }
- * ```
- *
- * @param array $optionalArgs {
- * Optional.
- *
- * @type string $property
- * A Google Analytics property identifier whose events are tracked.
- * Specified in the URL path and not the body. To learn more, see [where to
- * find your Property
- * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
- * Within a batch request, this property should either be unspecified or
- * consistent with the batch-level property.
- *
- * Example: properties/1234
- * @type Dimension[] $dimensions
- * The dimensions requested. All defined dimensions must be used by one of the
- * following: dimension_expression, dimension_filter, pivots, order_bys.
- * @type Metric[] $metrics
- * The metrics requested, at least one metric needs to be specified. All
- * defined metrics must be used by one of the following: metric_expression,
- * metric_filter, order_bys.
- * @type DateRange[] $dateRanges
- * The date range to retrieve event data for the report. If multiple date
- * ranges are specified, event data from each date range is used in the
- * report. A special dimension with field name "dateRange" can be included in
- * a Pivot's field names; if included, the report compares between date
- * ranges. In a cohort request, this `dateRanges` must be unspecified.
- * @type Pivot[] $pivots
- * Describes the visual format of the report's dimensions in columns or rows.
- * The union of the fieldNames (dimension names) in all pivots must be a
- * subset of dimension names defined in Dimensions. No two pivots can share a
- * dimension. A dimension is only visible if it appears in a pivot.
- * @type FilterExpression $dimensionFilter
- * The filter clause of dimensions. Dimensions must be requested to be used in
- * this filter. Metrics cannot be used in this filter.
- * @type FilterExpression $metricFilter
- * The filter clause of metrics. Applied at post aggregation phase, similar to
- * SQL having-clause. Metrics must be requested to be used in this filter.
- * Dimensions cannot be used in this filter.
- * @type string $currencyCode
- * A currency code in ISO4217 format, such as "AED", "USD", "JPY".
- * If the field is empty, the report uses the property's default currency.
- * @type CohortSpec $cohortSpec
- * Cohort group associated with this request. If there is a cohort group
- * in the request the 'cohort' dimension must be present.
- * @type bool $keepEmptyRows
- * If false or unspecified, each row with all metrics equal to 0 will not be
- * returned. If true, these rows will be returned if they are not separately
- * removed by a filter.
- *
- * Regardless of this `keep_empty_rows` setting, only data recorded by the
- * Google Analytics property can be displayed in a report.
- *
- * For example if a property never logs a `purchase` event, then a query for
- * the `eventName` dimension and `eventCount` metric will not have a row
- * eventName: "purchase" and eventCount: 0.
- * @type bool $returnPropertyQuota
- * Toggles whether to return the current state of this Google Analytics
- * property's quota. Quota is returned in [PropertyQuota](#PropertyQuota).
- * @type Comparison[] $comparisons
- * Optional. The configuration of comparisons requested and displayed. The
- * request requires both a comparisons field and a comparisons dimension to
- * receive a comparison column in the response.
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\Analytics\Data\V1beta\RunPivotReportResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function runPivotReport(array $optionalArgs = [])
- {
- $request = new RunPivotReportRequest();
- $requestParamHeaders = [];
- if (isset($optionalArgs['property'])) {
- $request->setProperty($optionalArgs['property']);
- $requestParamHeaders['property'] = $optionalArgs['property'];
- }
-
- if (isset($optionalArgs['dimensions'])) {
- $request->setDimensions($optionalArgs['dimensions']);
- }
-
- if (isset($optionalArgs['metrics'])) {
- $request->setMetrics($optionalArgs['metrics']);
- }
-
- if (isset($optionalArgs['dateRanges'])) {
- $request->setDateRanges($optionalArgs['dateRanges']);
- }
-
- if (isset($optionalArgs['pivots'])) {
- $request->setPivots($optionalArgs['pivots']);
- }
-
- if (isset($optionalArgs['dimensionFilter'])) {
- $request->setDimensionFilter($optionalArgs['dimensionFilter']);
- }
-
- if (isset($optionalArgs['metricFilter'])) {
- $request->setMetricFilter($optionalArgs['metricFilter']);
- }
-
- if (isset($optionalArgs['currencyCode'])) {
- $request->setCurrencyCode($optionalArgs['currencyCode']);
- }
-
- if (isset($optionalArgs['cohortSpec'])) {
- $request->setCohortSpec($optionalArgs['cohortSpec']);
- }
-
- if (isset($optionalArgs['keepEmptyRows'])) {
- $request->setKeepEmptyRows($optionalArgs['keepEmptyRows']);
- }
-
- if (isset($optionalArgs['returnPropertyQuota'])) {
- $request->setReturnPropertyQuota(
- $optionalArgs['returnPropertyQuota']
- );
- }
-
- if (isset($optionalArgs['comparisons'])) {
- $request->setComparisons($optionalArgs['comparisons']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor(
- $requestParamHeaders
- );
- $optionalArgs['headers'] = isset($optionalArgs['headers'])
- ? array_merge($requestParams->getHeader(), $optionalArgs['headers'])
- : $requestParams->getHeader();
- return $this->startCall(
- 'RunPivotReport',
- RunPivotReportResponse::class,
- $optionalArgs,
- $request
- )->wait();
- }
-
- /**
- * Returns a customized report of realtime event data for your property.
- * Events appear in realtime reports seconds after they have been sent to
- * the Google Analytics. Realtime reports show events and usage data for the
- * periods of time ranging from the present moment to 30 minutes ago (up to
- * 60 minutes for Google Analytics 360 properties).
- *
- * For a guide to constructing realtime requests & understanding responses,
- * see [Creating a Realtime
- * Report](https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-basics).
- *
- * Sample code:
- * ```
- * $betaAnalyticsDataClient = new BetaAnalyticsDataClient();
- * try {
- * $response = $betaAnalyticsDataClient->runRealtimeReport();
- * } finally {
- * $betaAnalyticsDataClient->close();
- * }
- * ```
- *
- * @param array $optionalArgs {
- * Optional.
- *
- * @type string $property
- * A Google Analytics property identifier whose events are tracked.
- * Specified in the URL path and not the body. To learn more, see [where to
- * find your Property
- * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
- *
- * Example: properties/1234
- * @type Dimension[] $dimensions
- * The dimensions requested and displayed.
- * @type Metric[] $metrics
- * The metrics requested and displayed.
- * @type FilterExpression $dimensionFilter
- * The filter clause of dimensions. Metrics cannot be used in this filter.
- * @type FilterExpression $metricFilter
- * The filter clause of metrics. Applied at post aggregation phase, similar to
- * SQL having-clause. Dimensions cannot be used in this filter.
- * @type int $limit
- * The number of rows to return. If unspecified, 10,000 rows are returned. The
- * API returns a maximum of 250,000 rows per request, no matter how many you
- * ask for. `limit` must be positive.
- *
- * The API can also return fewer rows than the requested `limit`, if there
- * aren't as many dimension values as the `limit`. For instance, there are
- * fewer than 300 possible values for the dimension `country`, so when
- * reporting on only `country`, you can't get more than 300 rows, even if you
- * set `limit` to a higher value.
- * @type int[] $metricAggregations
- * Aggregation of metrics. Aggregated metric values will be shown in rows
- * where the dimension_values are set to "RESERVED_(MetricAggregation)".
- * For allowed values, use constants defined on {@see \Google\Analytics\Data\V1beta\MetricAggregation}
- * @type OrderBy[] $orderBys
- * Specifies how rows are ordered in the response.
- * @type bool $returnPropertyQuota
- * Toggles whether to return the current state of this Google Analytics
- * property's Realtime quota. Quota is returned in
- * [PropertyQuota](#PropertyQuota).
- * @type MinuteRange[] $minuteRanges
- * The minute ranges of event data to read. If unspecified, one minute range
- * for the last 30 minutes will be used. If multiple minute ranges are
- * requested, each response row will contain a zero based minute range index.
- * If two minute ranges overlap, the event data for the overlapping minutes is
- * included in the response rows for both minute ranges.
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\Analytics\Data\V1beta\RunRealtimeReportResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function runRealtimeReport(array $optionalArgs = [])
- {
- $request = new RunRealtimeReportRequest();
- $requestParamHeaders = [];
- if (isset($optionalArgs['property'])) {
- $request->setProperty($optionalArgs['property']);
- $requestParamHeaders['property'] = $optionalArgs['property'];
- }
-
- if (isset($optionalArgs['dimensions'])) {
- $request->setDimensions($optionalArgs['dimensions']);
- }
-
- if (isset($optionalArgs['metrics'])) {
- $request->setMetrics($optionalArgs['metrics']);
- }
-
- if (isset($optionalArgs['dimensionFilter'])) {
- $request->setDimensionFilter($optionalArgs['dimensionFilter']);
- }
-
- if (isset($optionalArgs['metricFilter'])) {
- $request->setMetricFilter($optionalArgs['metricFilter']);
- }
-
- if (isset($optionalArgs['limit'])) {
- $request->setLimit($optionalArgs['limit']);
- }
-
- if (isset($optionalArgs['metricAggregations'])) {
- $request->setMetricAggregations(
- $optionalArgs['metricAggregations']
- );
- }
-
- if (isset($optionalArgs['orderBys'])) {
- $request->setOrderBys($optionalArgs['orderBys']);
- }
-
- if (isset($optionalArgs['returnPropertyQuota'])) {
- $request->setReturnPropertyQuota(
- $optionalArgs['returnPropertyQuota']
- );
- }
-
- if (isset($optionalArgs['minuteRanges'])) {
- $request->setMinuteRanges($optionalArgs['minuteRanges']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor(
- $requestParamHeaders
- );
- $optionalArgs['headers'] = isset($optionalArgs['headers'])
- ? array_merge($requestParams->getHeader(), $optionalArgs['headers'])
- : $requestParams->getHeader();
- return $this->startCall(
- 'RunRealtimeReport',
- RunRealtimeReportResponse::class,
- $optionalArgs,
- $request
- )->wait();
- }
-
- /**
- * Returns a customized report of your Google Analytics event data. Reports
- * contain statistics derived from data collected by the Google Analytics
- * tracking code. The data returned from the API is as a table with columns
- * for the requested dimensions and metrics. Metrics are individual
- * measurements of user activity on your property, such as active users or
- * event count. Dimensions break down metrics across some common criteria,
- * such as country or event name.
- *
- * For a guide to constructing requests & understanding responses, see
- * [Creating a
- * Report](https://developers.google.com/analytics/devguides/reporting/data/v1/basics).
- *
- * Sample code:
- * ```
- * $betaAnalyticsDataClient = new BetaAnalyticsDataClient();
- * try {
- * $response = $betaAnalyticsDataClient->runReport();
- * } finally {
- * $betaAnalyticsDataClient->close();
- * }
- * ```
- *
- * @param array $optionalArgs {
- * Optional.
- *
- * @type string $property
- * A Google Analytics property identifier whose events are tracked.
- * Specified in the URL path and not the body. To learn more, see [where to
- * find your Property
- * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
- * Within a batch request, this property should either be unspecified or
- * consistent with the batch-level property.
- *
- * Example: properties/1234
- * @type Dimension[] $dimensions
- * The dimensions requested and displayed.
- * @type Metric[] $metrics
- * The metrics requested and displayed.
- * @type DateRange[] $dateRanges
- * Date ranges of data to read. If multiple date ranges are requested, each
- * response row will contain a zero based date range index. If two date
- * ranges overlap, the event data for the overlapping days is included in the
- * response rows for both date ranges. In a cohort request, this `dateRanges`
- * must be unspecified.
- * @type FilterExpression $dimensionFilter
- * Dimension filters let you ask for only specific dimension values in
- * the report. To learn more, see [Fundamentals of Dimension
- * Filters](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters)
- * for examples. Metrics cannot be used in this filter.
- * @type FilterExpression $metricFilter
- * The filter clause of metrics. Applied after aggregating the report's rows,
- * similar to SQL having-clause. Dimensions cannot be used in this filter.
- * @type int $offset
- * The row count of the start row. The first row is counted as row 0.
- *
- * When paging, the first request does not specify offset; or equivalently,
- * sets offset to 0; the first request returns the first `limit` of rows. The
- * second request sets offset to the `limit` of the first request; the second
- * request returns the second `limit` of rows.
- *
- * To learn more about this pagination parameter, see
- * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
- * @type int $limit
- * The number of rows to return. If unspecified, 10,000 rows are returned. The
- * API returns a maximum of 250,000 rows per request, no matter how many you
- * ask for. `limit` must be positive.
- *
- * The API can also return fewer rows than the requested `limit`, if there
- * aren't as many dimension values as the `limit`. For instance, there are
- * fewer than 300 possible values for the dimension `country`, so when
- * reporting on only `country`, you can't get more than 300 rows, even if you
- * set `limit` to a higher value.
- *
- * To learn more about this pagination parameter, see
- * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
- * @type int[] $metricAggregations
- * Aggregation of metrics. Aggregated metric values will be shown in rows
- * where the dimension_values are set to "RESERVED_(MetricAggregation)".
- * Aggregates including both comparisons and multiple date ranges will
- * be aggregated based on the date ranges.
- * For allowed values, use constants defined on {@see \Google\Analytics\Data\V1beta\MetricAggregation}
- * @type OrderBy[] $orderBys
- * Specifies how rows are ordered in the response.
- * Requests including both comparisons and multiple date ranges will
- * have order bys applied on the comparisons.
- * @type string $currencyCode
- * A currency code in ISO4217 format, such as "AED", "USD", "JPY".
- * If the field is empty, the report uses the property's default currency.
- * @type CohortSpec $cohortSpec
- * Cohort group associated with this request. If there is a cohort group
- * in the request the 'cohort' dimension must be present.
- * @type bool $keepEmptyRows
- * If false or unspecified, each row with all metrics equal to 0 will not be
- * returned. If true, these rows will be returned if they are not separately
- * removed by a filter.
- *
- * Regardless of this `keep_empty_rows` setting, only data recorded by the
- * Google Analytics property can be displayed in a report.
- *
- * For example if a property never logs a `purchase` event, then a query for
- * the `eventName` dimension and `eventCount` metric will not have a row
- * eventName: "purchase" and eventCount: 0.
- * @type bool $returnPropertyQuota
- * Toggles whether to return the current state of this Google Analytics
- * property's quota. Quota is returned in [PropertyQuota](#PropertyQuota).
- * @type Comparison[] $comparisons
- * Optional. The configuration of comparisons requested and displayed. The
- * request only requires a comparisons field in order to receive a comparison
- * column in the response.
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\Analytics\Data\V1beta\RunReportResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function runReport(array $optionalArgs = [])
- {
- $request = new RunReportRequest();
- $requestParamHeaders = [];
- if (isset($optionalArgs['property'])) {
- $request->setProperty($optionalArgs['property']);
- $requestParamHeaders['property'] = $optionalArgs['property'];
- }
-
- if (isset($optionalArgs['dimensions'])) {
- $request->setDimensions($optionalArgs['dimensions']);
- }
-
- if (isset($optionalArgs['metrics'])) {
- $request->setMetrics($optionalArgs['metrics']);
- }
-
- if (isset($optionalArgs['dateRanges'])) {
- $request->setDateRanges($optionalArgs['dateRanges']);
- }
-
- if (isset($optionalArgs['dimensionFilter'])) {
- $request->setDimensionFilter($optionalArgs['dimensionFilter']);
- }
-
- if (isset($optionalArgs['metricFilter'])) {
- $request->setMetricFilter($optionalArgs['metricFilter']);
- }
-
- if (isset($optionalArgs['offset'])) {
- $request->setOffset($optionalArgs['offset']);
- }
-
- if (isset($optionalArgs['limit'])) {
- $request->setLimit($optionalArgs['limit']);
- }
-
- if (isset($optionalArgs['metricAggregations'])) {
- $request->setMetricAggregations(
- $optionalArgs['metricAggregations']
- );
- }
-
- if (isset($optionalArgs['orderBys'])) {
- $request->setOrderBys($optionalArgs['orderBys']);
- }
-
- if (isset($optionalArgs['currencyCode'])) {
- $request->setCurrencyCode($optionalArgs['currencyCode']);
- }
-
- if (isset($optionalArgs['cohortSpec'])) {
- $request->setCohortSpec($optionalArgs['cohortSpec']);
- }
-
- if (isset($optionalArgs['keepEmptyRows'])) {
- $request->setKeepEmptyRows($optionalArgs['keepEmptyRows']);
- }
-
- if (isset($optionalArgs['returnPropertyQuota'])) {
- $request->setReturnPropertyQuota(
- $optionalArgs['returnPropertyQuota']
- );
- }
-
- if (isset($optionalArgs['comparisons'])) {
- $request->setComparisons($optionalArgs['comparisons']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor(
- $requestParamHeaders
- );
- $optionalArgs['headers'] = isset($optionalArgs['headers'])
- ? array_merge($requestParams->getHeader(), $optionalArgs['headers'])
- : $requestParams->getHeader();
- return $this->startCall(
- 'RunReport',
- RunReportResponse::class,
- $optionalArgs,
- $request
- )->wait();
- }
-}
diff --git a/AnalyticsData/src/V1beta/GetAudienceExportRequest.php b/AnalyticsData/src/V1beta/GetAudienceExportRequest.php
index d34638069b72..766f05b4bf69 100644
--- a/AnalyticsData/src/V1beta/GetAudienceExportRequest.php
+++ b/AnalyticsData/src/V1beta/GetAudienceExportRequest.php
@@ -22,7 +22,7 @@ class GetAudienceExportRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
*/
- private $name = '';
+ protected $name = '';
/**
* @param string $name Required. The audience export resource name.
diff --git a/AnalyticsData/src/V1beta/GetMetadataRequest.php b/AnalyticsData/src/V1beta/GetMetadataRequest.php
index 346ac52e5e82..88b81e6c2e74 100644
--- a/AnalyticsData/src/V1beta/GetMetadataRequest.php
+++ b/AnalyticsData/src/V1beta/GetMetadataRequest.php
@@ -28,7 +28,7 @@ class GetMetadataRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
*/
- private $name = '';
+ protected $name = '';
/**
* @param string $name Required. The resource name of the metadata to retrieve. This name field is
diff --git a/AnalyticsData/src/V1beta/ListAudienceExportsRequest.php b/AnalyticsData/src/V1beta/ListAudienceExportsRequest.php
index 3821e3980f3a..33ef56808673 100644
--- a/AnalyticsData/src/V1beta/ListAudienceExportsRequest.php
+++ b/AnalyticsData/src/V1beta/ListAudienceExportsRequest.php
@@ -21,7 +21,7 @@ class ListAudienceExportsRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
*/
- private $parent = '';
+ protected $parent = '';
/**
* Optional. The maximum number of audience exports to return. The service may
* return fewer than this value. If unspecified, at most 200 audience exports
@@ -30,7 +30,7 @@ class ListAudienceExportsRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $page_size = 0;
+ protected $page_size = 0;
/**
* Optional. A page token, received from a previous `ListAudienceExports`
* call. Provide this to retrieve the subsequent page.
@@ -39,7 +39,7 @@ class ListAudienceExportsRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $page_token = '';
+ protected $page_token = '';
/**
* @param string $parent Required. All audience exports for this property will be listed in the
diff --git a/AnalyticsData/src/V1beta/ListAudienceExportsResponse.php b/AnalyticsData/src/V1beta/ListAudienceExportsResponse.php
index 074c47b95ccf..36ed768b89fe 100644
--- a/AnalyticsData/src/V1beta/ListAudienceExportsResponse.php
+++ b/AnalyticsData/src/V1beta/ListAudienceExportsResponse.php
@@ -27,7 +27,7 @@ class ListAudienceExportsResponse extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field optional string next_page_token = 2;
*/
- private $next_page_token = null;
+ protected $next_page_token = null;
/**
* Constructor.
diff --git a/AnalyticsData/src/V1beta/Metadata.php b/AnalyticsData/src/V1beta/Metadata.php
index 4ca9afbc080f..9c2bd68ba1aa 100644
--- a/AnalyticsData/src/V1beta/Metadata.php
+++ b/AnalyticsData/src/V1beta/Metadata.php
@@ -21,7 +21,7 @@ class Metadata extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 3;
*/
- private $name = '';
+ protected $name = '';
/**
* The dimension descriptions.
*
diff --git a/AnalyticsData/src/V1beta/Metric.php b/AnalyticsData/src/V1beta/Metric.php
index b8e4cf1cdb6b..d58fd9f004d7 100644
--- a/AnalyticsData/src/V1beta/Metric.php
+++ b/AnalyticsData/src/V1beta/Metric.php
@@ -40,14 +40,14 @@ class Metric extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1;
*/
- private $name = '';
+ protected $name = '';
/**
* A mathematical expression for derived metrics. For example, the metric
* Event count per user is `eventCount/totalUsers`.
*
* Generated from protobuf field string expression = 2;
*/
- private $expression = '';
+ protected $expression = '';
/**
* Indicates if a metric is invisible in the report response. If a metric is
* invisible, the metric will not produce a column in the response, but can be
@@ -55,7 +55,7 @@ class Metric extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field bool invisible = 3;
*/
- private $invisible = false;
+ protected $invisible = false;
/**
* Constructor.
diff --git a/AnalyticsData/src/V1beta/MetricCompatibility.php b/AnalyticsData/src/V1beta/MetricCompatibility.php
index 6c4b7640faef..f76bff556315 100644
--- a/AnalyticsData/src/V1beta/MetricCompatibility.php
+++ b/AnalyticsData/src/V1beta/MetricCompatibility.php
@@ -22,14 +22,14 @@ class MetricCompatibility extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field optional .google.analytics.data.v1beta.MetricMetadata metric_metadata = 1;
*/
- private $metric_metadata = null;
+ protected $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 optional .google.analytics.data.v1beta.Compatibility compatibility = 2;
*/
- private $compatibility = null;
+ protected $compatibility = null;
/**
* Constructor.
diff --git a/AnalyticsData/src/V1beta/MetricHeader.php b/AnalyticsData/src/V1beta/MetricHeader.php
index fc22c16936d4..db125c0ae60b 100644
--- a/AnalyticsData/src/V1beta/MetricHeader.php
+++ b/AnalyticsData/src/V1beta/MetricHeader.php
@@ -23,13 +23,13 @@ class MetricHeader extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1;
*/
- private $name = '';
+ protected $name = '';
/**
* The metric's data type.
*
* Generated from protobuf field .google.analytics.data.v1beta.MetricType type = 2;
*/
- private $type = 0;
+ protected $type = 0;
/**
* Constructor.
diff --git a/AnalyticsData/src/V1beta/MetricMetadata.php b/AnalyticsData/src/V1beta/MetricMetadata.php
index 78fe16ff51bf..9ef96ff2bc10 100644
--- a/AnalyticsData/src/V1beta/MetricMetadata.php
+++ b/AnalyticsData/src/V1beta/MetricMetadata.php
@@ -21,20 +21,20 @@ class MetricMetadata extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string api_name = 1;
*/
- private $api_name = '';
+ protected $api_name = '';
/**
* This metric's name within the Google Analytics user interface. For example,
* `Event count`.
*
* Generated from protobuf field string ui_name = 2;
*/
- private $ui_name = '';
+ protected $ui_name = '';
/**
* Description of how this metric is used and calculated.
*
* Generated from protobuf field string description = 3;
*/
- private $description = '';
+ protected $description = '';
/**
* Still usable but deprecated names for this metric. If populated, this
* metric is available by either `apiName` or one of `deprecatedApiNames`
@@ -49,7 +49,7 @@ class MetricMetadata extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.analytics.data.v1beta.MetricType type = 5;
*/
- private $type = 0;
+ protected $type = 0;
/**
* The mathematical expression for this derived metric. Can be used in
* [Metric](#Metric)'s `expression` field for equivalent reports. Most metrics
@@ -57,13 +57,13 @@ class MetricMetadata extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string expression = 6;
*/
- private $expression = '';
+ protected $expression = '';
/**
* True if the metric is a custom metric for this property.
*
* Generated from protobuf field bool custom_definition = 7;
*/
- private $custom_definition = false;
+ protected $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
@@ -82,7 +82,7 @@ class MetricMetadata extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string category = 10;
*/
- private $category = '';
+ protected $category = '';
/**
* Constructor.
diff --git a/AnalyticsData/src/V1beta/MinuteRange.php b/AnalyticsData/src/V1beta/MinuteRange.php
index cf5895b025cb..d71a5cdffb4d 100644
--- a/AnalyticsData/src/V1beta/MinuteRange.php
+++ b/AnalyticsData/src/V1beta/MinuteRange.php
@@ -27,7 +27,7 @@ class MinuteRange extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field optional int32 start_minutes_ago = 1;
*/
- private $start_minutes_ago = null;
+ protected $start_minutes_ago = null;
/**
* The inclusive end minute for the query as a number of minutes before now.
* Cannot be before `startMinutesAgo`. For example, `"endMinutesAgo": 15`
@@ -40,7 +40,7 @@ class MinuteRange extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field optional int32 end_minutes_ago = 2;
*/
- private $end_minutes_ago = null;
+ protected $end_minutes_ago = null;
/**
* Assigns a name to this minute range. The dimension `dateRange` is valued to
* this name in a report response. If set, cannot begin with `date_range_` or
@@ -49,7 +49,7 @@ class MinuteRange extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 3;
*/
- private $name = '';
+ protected $name = '';
/**
* Constructor.
diff --git a/AnalyticsData/src/V1beta/OrderBy.php b/AnalyticsData/src/V1beta/OrderBy.php
index cc093cbfc73e..bf52aa38f37b 100644
--- a/AnalyticsData/src/V1beta/OrderBy.php
+++ b/AnalyticsData/src/V1beta/OrderBy.php
@@ -22,7 +22,7 @@ class OrderBy extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field bool desc = 4;
*/
- private $desc = false;
+ protected $desc = false;
protected $one_order_by;
/**
diff --git a/AnalyticsData/src/V1beta/OrderBy/DimensionOrderBy.php b/AnalyticsData/src/V1beta/OrderBy/DimensionOrderBy.php
index cad3b59598bb..8506dd32c647 100644
--- a/AnalyticsData/src/V1beta/OrderBy/DimensionOrderBy.php
+++ b/AnalyticsData/src/V1beta/OrderBy/DimensionOrderBy.php
@@ -20,13 +20,13 @@ class DimensionOrderBy extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string dimension_name = 1;
*/
- private $dimension_name = '';
+ protected $dimension_name = '';
/**
* Controls the rule for dimension value ordering.
*
* Generated from protobuf field .google.analytics.data.v1beta.OrderBy.DimensionOrderBy.OrderType order_type = 2;
*/
- private $order_type = 0;
+ protected $order_type = 0;
/**
* Constructor.
diff --git a/AnalyticsData/src/V1beta/OrderBy/MetricOrderBy.php b/AnalyticsData/src/V1beta/OrderBy/MetricOrderBy.php
index b3c5025e0255..57e95284ea01 100644
--- a/AnalyticsData/src/V1beta/OrderBy/MetricOrderBy.php
+++ b/AnalyticsData/src/V1beta/OrderBy/MetricOrderBy.php
@@ -20,7 +20,7 @@ class MetricOrderBy extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string metric_name = 1;
*/
- private $metric_name = '';
+ protected $metric_name = '';
/**
* Constructor.
diff --git a/AnalyticsData/src/V1beta/OrderBy/PivotOrderBy.php b/AnalyticsData/src/V1beta/OrderBy/PivotOrderBy.php
index 65de6acbdd29..f0dc0bbccfb0 100644
--- a/AnalyticsData/src/V1beta/OrderBy/PivotOrderBy.php
+++ b/AnalyticsData/src/V1beta/OrderBy/PivotOrderBy.php
@@ -21,7 +21,7 @@ class PivotOrderBy extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string metric_name = 1;
*/
- private $metric_name = '';
+ protected $metric_name = '';
/**
* Used to select a dimension name and value pivot. If multiple pivot
* selections are given, the sort occurs on rows where all pivot selection
diff --git a/AnalyticsData/src/V1beta/OrderBy/PivotOrderBy/PivotSelection.php b/AnalyticsData/src/V1beta/OrderBy/PivotOrderBy/PivotSelection.php
index ad61389eb1fe..3ede84aa4e88 100644
--- a/AnalyticsData/src/V1beta/OrderBy/PivotOrderBy/PivotSelection.php
+++ b/AnalyticsData/src/V1beta/OrderBy/PivotOrderBy/PivotSelection.php
@@ -33,13 +33,13 @@ class PivotSelection extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string dimension_name = 1;
*/
- private $dimension_name = '';
+ protected $dimension_name = '';
/**
* Order by only when the named dimension is this value.
*
* Generated from protobuf field string dimension_value = 2;
*/
- private $dimension_value = '';
+ protected $dimension_value = '';
/**
* Constructor.
diff --git a/AnalyticsData/src/V1beta/Pivot.php b/AnalyticsData/src/V1beta/Pivot.php
index ecbd81cb5b01..1569a761e9b6 100644
--- a/AnalyticsData/src/V1beta/Pivot.php
+++ b/AnalyticsData/src/V1beta/Pivot.php
@@ -39,7 +39,7 @@ class Pivot extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field int64 offset = 3;
*/
- private $offset = 0;
+ protected $offset = 0;
/**
* The number of unique combinations of dimension values to return in this
* pivot. The `limit` parameter is required. A `limit` of 10,000 is common for
@@ -50,7 +50,7 @@ class Pivot extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field int64 limit = 4;
*/
- private $limit = 0;
+ protected $limit = 0;
/**
* Aggregate the metrics by dimensions in this pivot using the specified
* metric_aggregations.
diff --git a/AnalyticsData/src/V1beta/PivotHeader.php b/AnalyticsData/src/V1beta/PivotHeader.php
index 1aff504e2697..e53d39b9c1f3 100644
--- a/AnalyticsData/src/V1beta/PivotHeader.php
+++ b/AnalyticsData/src/V1beta/PivotHeader.php
@@ -29,7 +29,7 @@ class PivotHeader extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field int32 row_count = 2;
*/
- private $row_count = 0;
+ protected $row_count = 0;
/**
* Constructor.
diff --git a/AnalyticsData/src/V1beta/PropertyQuota.php b/AnalyticsData/src/V1beta/PropertyQuota.php
index 068a2effcbcd..689ca28e00d4 100644
--- a/AnalyticsData/src/V1beta/PropertyQuota.php
+++ b/AnalyticsData/src/V1beta/PropertyQuota.php
@@ -24,7 +24,7 @@ class PropertyQuota extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.analytics.data.v1beta.QuotaStatus tokens_per_day = 1;
*/
- private $tokens_per_day = null;
+ protected $tokens_per_day = null;
/**
* Standard Analytics Properties can use up to 40,000 tokens per hour;
* Analytics 360 Properties can use 400,000 tokens per hour. An API request
@@ -33,14 +33,14 @@ class PropertyQuota extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.analytics.data.v1beta.QuotaStatus tokens_per_hour = 2;
*/
- private $tokens_per_hour = null;
+ protected $tokens_per_hour = null;
/**
* Standard Analytics Properties can send up to 10 concurrent requests;
* Analytics 360 Properties can use up to 50 concurrent requests.
*
* Generated from protobuf field .google.analytics.data.v1beta.QuotaStatus concurrent_requests = 3;
*/
- private $concurrent_requests = null;
+ protected $concurrent_requests = null;
/**
* Standard Analytics Properties and cloud project pairs can have up to 10
* server errors per hour; Analytics 360 Properties and cloud project pairs
@@ -48,7 +48,7 @@ class PropertyQuota extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.analytics.data.v1beta.QuotaStatus server_errors_per_project_per_hour = 4;
*/
- private $server_errors_per_project_per_hour = null;
+ protected $server_errors_per_project_per_hour = null;
/**
* Analytics Properties can send up to 120 requests with potentially
* thresholded dimensions per hour. In a batch request, each report request
@@ -57,7 +57,7 @@ class PropertyQuota extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.analytics.data.v1beta.QuotaStatus potentially_thresholded_requests_per_hour = 5;
*/
- private $potentially_thresholded_requests_per_hour = null;
+ protected $potentially_thresholded_requests_per_hour = null;
/**
* Analytics Properties can use up to 35% of their tokens per project per
* hour. This amounts to standard Analytics Properties can use up to 14,000
@@ -68,7 +68,7 @@ class PropertyQuota extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.analytics.data.v1beta.QuotaStatus tokens_per_project_per_hour = 6;
*/
- private $tokens_per_project_per_hour = null;
+ protected $tokens_per_project_per_hour = null;
/**
* Constructor.
diff --git a/AnalyticsData/src/V1beta/QueryAudienceExportRequest.php b/AnalyticsData/src/V1beta/QueryAudienceExportRequest.php
index f8941656fba5..2c72532b7d9f 100644
--- a/AnalyticsData/src/V1beta/QueryAudienceExportRequest.php
+++ b/AnalyticsData/src/V1beta/QueryAudienceExportRequest.php
@@ -21,7 +21,7 @@ class QueryAudienceExportRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
*/
- private $name = '';
+ protected $name = '';
/**
* Optional. The row count of the start row. The first row is counted as row
* 0.
@@ -34,7 +34,7 @@ class QueryAudienceExportRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field int64 offset = 2 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $offset = 0;
+ protected $offset = 0;
/**
* Optional. The number of rows to return. If unspecified, 10,000 rows are
* returned. The API returns a maximum of 250,000 rows per request, no matter
@@ -46,7 +46,7 @@ class QueryAudienceExportRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field int64 limit = 3 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $limit = 0;
+ protected $limit = 0;
/**
* @param string $name Required. The name of the audience export to retrieve users from.
diff --git a/AnalyticsData/src/V1beta/QueryAudienceExportResponse.php b/AnalyticsData/src/V1beta/QueryAudienceExportResponse.php
index ad0134882d1f..71591a688970 100644
--- a/AnalyticsData/src/V1beta/QueryAudienceExportResponse.php
+++ b/AnalyticsData/src/V1beta/QueryAudienceExportResponse.php
@@ -22,7 +22,7 @@ class QueryAudienceExportResponse extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field optional .google.analytics.data.v1beta.AudienceExport audience_export = 1;
*/
- private $audience_export = null;
+ protected $audience_export = null;
/**
* Rows for each user in an audience export. The number of rows in this
* response will be less than or equal to request's page size.
@@ -41,7 +41,7 @@ class QueryAudienceExportResponse extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field optional int32 row_count = 3;
*/
- private $row_count = null;
+ protected $row_count = null;
/**
* Constructor.
diff --git a/AnalyticsData/src/V1beta/QuotaStatus.php b/AnalyticsData/src/V1beta/QuotaStatus.php
index f55350a753cf..77a8b488f2ec 100644
--- a/AnalyticsData/src/V1beta/QuotaStatus.php
+++ b/AnalyticsData/src/V1beta/QuotaStatus.php
@@ -20,13 +20,13 @@ class QuotaStatus extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field optional int32 consumed = 1;
*/
- private $consumed = null;
+ protected $consumed = null;
/**
* Quota remaining after this request.
*
* Generated from protobuf field optional int32 remaining = 2;
*/
- private $remaining = null;
+ protected $remaining = null;
/**
* Constructor.
diff --git a/AnalyticsData/src/V1beta/README.md b/AnalyticsData/src/V1beta/README.md
deleted file mode 100644
index 5ecdda756eb9..000000000000
--- a/AnalyticsData/src/V1beta/README.md
+++ /dev/null
@@ -1,21 +0,0 @@
-# Google Analytics Data V1beta generated client for PHP
-
-### Sample
-
-```php
-require 'vendor/autoload.php';
-
-use Google\Analytics\Data\V1beta\BetaAnalyticsDataClient;
-
-$client = new BetaAnalyticsDataClient();
-
-$response = $client->runReport([
- 'property' => '[YOUR_PROPERTY_ID]'
-]);
-
-foreach ($response->getRows() as $row) {
- foreach ($row->getDimensionValues() as $dimensionValue) {
- print 'Dimension Value: ' . $dimensionValue->getValue() . PHP_EOL;
- }
-}
-```
diff --git a/AnalyticsData/src/V1beta/ResponseMetaData.php b/AnalyticsData/src/V1beta/ResponseMetaData.php
index 11328a0bbf9d..a2642b63961b 100644
--- a/AnalyticsData/src/V1beta/ResponseMetaData.php
+++ b/AnalyticsData/src/V1beta/ResponseMetaData.php
@@ -30,7 +30,7 @@ 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;
+ protected $data_loss_from_other_row = false;
/**
* Describes the schema restrictions actively enforced in creating this
* report. To learn more, see [Access and data-restriction
@@ -38,7 +38,7 @@ class ResponseMetaData extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field optional .google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse schema_restriction_response = 4;
*/
- private $schema_restriction_response = null;
+ protected $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
@@ -52,7 +52,7 @@ class ResponseMetaData extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field optional string currency_code = 5;
*/
- private $currency_code = null;
+ protected $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
@@ -61,13 +61,13 @@ class ResponseMetaData extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field optional string time_zone = 6;
*/
- private $time_zone = null;
+ protected $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;
+ protected $empty_reason = null;
/**
* If `subjectToThresholding` is true, this report is subject to thresholding
* and only returns data that meets the minimum aggregation thresholds. It is
@@ -78,7 +78,7 @@ class ResponseMetaData extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field optional bool subject_to_thresholding = 8;
*/
- private $subject_to_thresholding = null;
+ protected $subject_to_thresholding = null;
/**
* If this report results is
* [sampled](https://support.google.com/analytics/answer/13331292), this
diff --git a/AnalyticsData/src/V1beta/ResponseMetaData/SchemaRestrictionResponse/ActiveMetricRestriction.php b/AnalyticsData/src/V1beta/ResponseMetaData/SchemaRestrictionResponse/ActiveMetricRestriction.php
index 8d36df665edb..0241f8070918 100644
--- a/AnalyticsData/src/V1beta/ResponseMetaData/SchemaRestrictionResponse/ActiveMetricRestriction.php
+++ b/AnalyticsData/src/V1beta/ResponseMetaData/SchemaRestrictionResponse/ActiveMetricRestriction.php
@@ -20,7 +20,7 @@ class ActiveMetricRestriction extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field optional string metric_name = 1;
*/
- private $metric_name = null;
+ protected $metric_name = null;
/**
* The reason for this metric's restriction.
*
diff --git a/AnalyticsData/src/V1beta/RunPivotReportRequest.php b/AnalyticsData/src/V1beta/RunPivotReportRequest.php
index 2379ea7c3827..fa4e51e7f432 100644
--- a/AnalyticsData/src/V1beta/RunPivotReportRequest.php
+++ b/AnalyticsData/src/V1beta/RunPivotReportRequest.php
@@ -26,7 +26,7 @@ class RunPivotReportRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string property = 1;
*/
- private $property = '';
+ protected $property = '';
/**
* The dimensions requested. All defined dimensions must be used by one of the
* following: dimension_expression, dimension_filter, pivots, order_bys.
@@ -67,7 +67,7 @@ class RunPivotReportRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.analytics.data.v1beta.FilterExpression dimension_filter = 6;
*/
- private $dimension_filter = null;
+ protected $dimension_filter = null;
/**
* The filter clause of metrics. Applied at post aggregation phase, similar to
* SQL having-clause. Metrics must be requested to be used in this filter.
@@ -75,21 +75,21 @@ class RunPivotReportRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.analytics.data.v1beta.FilterExpression metric_filter = 7;
*/
- private $metric_filter = null;
+ protected $metric_filter = null;
/**
* A currency code in ISO4217 format, such as "AED", "USD", "JPY".
* If the field is empty, the report uses the property's default currency.
*
* Generated from protobuf field string currency_code = 8;
*/
- private $currency_code = '';
+ protected $currency_code = '';
/**
* Cohort group associated with this request. If there is a cohort group
* in the request the 'cohort' dimension must be present.
*
* Generated from protobuf field .google.analytics.data.v1beta.CohortSpec cohort_spec = 9;
*/
- private $cohort_spec = null;
+ protected $cohort_spec = null;
/**
* If false or unspecified, each row with all metrics equal to 0 will not be
* returned. If true, these rows will be returned if they are not separately
@@ -102,14 +102,14 @@ class RunPivotReportRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field bool keep_empty_rows = 10;
*/
- private $keep_empty_rows = false;
+ protected $keep_empty_rows = false;
/**
* Toggles whether to return the current state of this Google Analytics
* property's quota. Quota is returned in [PropertyQuota](#PropertyQuota).
*
* Generated from protobuf field bool return_property_quota = 11;
*/
- private $return_property_quota = false;
+ protected $return_property_quota = false;
/**
* Optional. The configuration of comparisons requested and displayed. The
* request requires both a comparisons field and a comparisons dimension to
diff --git a/AnalyticsData/src/V1beta/RunPivotReportResponse.php b/AnalyticsData/src/V1beta/RunPivotReportResponse.php
index c9fd6f99a253..f254345fba39 100644
--- a/AnalyticsData/src/V1beta/RunPivotReportResponse.php
+++ b/AnalyticsData/src/V1beta/RunPivotReportResponse.php
@@ -87,13 +87,13 @@ class RunPivotReportResponse extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.analytics.data.v1beta.ResponseMetaData metadata = 6;
*/
- private $metadata = null;
+ protected $metadata = null;
/**
* This Google Analytics property's quota state including this request.
*
* Generated from protobuf field .google.analytics.data.v1beta.PropertyQuota property_quota = 7;
*/
- private $property_quota = null;
+ protected $property_quota = null;
/**
* Identifies what kind of resource this message is. This `kind` is always the
* fixed string "analyticsData#runPivotReport". Useful to distinguish between
@@ -101,7 +101,7 @@ class RunPivotReportResponse extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string kind = 8;
*/
- private $kind = '';
+ protected $kind = '';
/**
* Constructor.
diff --git a/AnalyticsData/src/V1beta/RunRealtimeReportRequest.php b/AnalyticsData/src/V1beta/RunRealtimeReportRequest.php
index 32e448bfe59c..6e96dd8eb409 100644
--- a/AnalyticsData/src/V1beta/RunRealtimeReportRequest.php
+++ b/AnalyticsData/src/V1beta/RunRealtimeReportRequest.php
@@ -24,7 +24,7 @@ class RunRealtimeReportRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string property = 1;
*/
- private $property = '';
+ protected $property = '';
/**
* The dimensions requested and displayed.
*
@@ -42,14 +42,14 @@ class RunRealtimeReportRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.analytics.data.v1beta.FilterExpression dimension_filter = 4;
*/
- private $dimension_filter = null;
+ protected $dimension_filter = null;
/**
* The filter clause of metrics. Applied at post aggregation phase, similar to
* SQL having-clause. Dimensions cannot be used in this filter.
*
* Generated from protobuf field .google.analytics.data.v1beta.FilterExpression metric_filter = 5;
*/
- private $metric_filter = null;
+ protected $metric_filter = null;
/**
* The number of rows to return. If unspecified, 10,000 rows are returned. The
* API returns a maximum of 250,000 rows per request, no matter how many you
@@ -62,7 +62,7 @@ class RunRealtimeReportRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field int64 limit = 6;
*/
- private $limit = 0;
+ protected $limit = 0;
/**
* Aggregation of metrics. Aggregated metric values will be shown in rows
* where the dimension_values are set to "RESERVED_(MetricAggregation)".
@@ -83,7 +83,7 @@ class RunRealtimeReportRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field bool return_property_quota = 9;
*/
- private $return_property_quota = false;
+ protected $return_property_quota = false;
/**
* The minute ranges of event data to read. If unspecified, one minute range
* for the last 30 minutes will be used. If multiple minute ranges are
diff --git a/AnalyticsData/src/V1beta/RunRealtimeReportResponse.php b/AnalyticsData/src/V1beta/RunRealtimeReportResponse.php
index 7d6e395716f5..0b64a0691259 100644
--- a/AnalyticsData/src/V1beta/RunRealtimeReportResponse.php
+++ b/AnalyticsData/src/V1beta/RunRealtimeReportResponse.php
@@ -62,14 +62,14 @@ class RunRealtimeReportResponse extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field int32 row_count = 7;
*/
- private $row_count = 0;
+ protected $row_count = 0;
/**
* This Google Analytics property's Realtime quota state including this
* request.
*
* Generated from protobuf field .google.analytics.data.v1beta.PropertyQuota property_quota = 8;
*/
- private $property_quota = null;
+ protected $property_quota = null;
/**
* Identifies what kind of resource this message is. This `kind` is always the
* fixed string "analyticsData#runRealtimeReport". Useful to distinguish
@@ -77,7 +77,7 @@ class RunRealtimeReportResponse extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string kind = 9;
*/
- private $kind = '';
+ protected $kind = '';
/**
* Constructor.
diff --git a/AnalyticsData/src/V1beta/RunReportRequest.php b/AnalyticsData/src/V1beta/RunReportRequest.php
index 7a9bbd7ba98b..dca05e84114b 100644
--- a/AnalyticsData/src/V1beta/RunReportRequest.php
+++ b/AnalyticsData/src/V1beta/RunReportRequest.php
@@ -26,7 +26,7 @@ class RunReportRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string property = 1;
*/
- private $property = '';
+ protected $property = '';
/**
* The dimensions requested and displayed.
*
@@ -57,14 +57,14 @@ class RunReportRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.analytics.data.v1beta.FilterExpression dimension_filter = 5;
*/
- private $dimension_filter = null;
+ protected $dimension_filter = null;
/**
* The filter clause of metrics. Applied after aggregating the report's rows,
* similar to SQL having-clause. Dimensions cannot be used in this filter.
*
* Generated from protobuf field .google.analytics.data.v1beta.FilterExpression metric_filter = 6;
*/
- private $metric_filter = null;
+ protected $metric_filter = null;
/**
* The row count of the start row. The first row is counted as row 0.
* When paging, the first request does not specify offset; or equivalently,
@@ -76,7 +76,7 @@ class RunReportRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field int64 offset = 7;
*/
- private $offset = 0;
+ protected $offset = 0;
/**
* The number of rows to return. If unspecified, 10,000 rows are returned. The
* API returns a maximum of 250,000 rows per request, no matter how many you
@@ -91,7 +91,7 @@ class RunReportRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field int64 limit = 8;
*/
- private $limit = 0;
+ protected $limit = 0;
/**
* Aggregation of metrics. Aggregated metric values will be shown in rows
* where the dimension_values are set to "RESERVED_(MetricAggregation)".
@@ -115,14 +115,14 @@ class RunReportRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string currency_code = 11;
*/
- private $currency_code = '';
+ protected $currency_code = '';
/**
* Cohort group associated with this request. If there is a cohort group
* in the request the 'cohort' dimension must be present.
*
* Generated from protobuf field .google.analytics.data.v1beta.CohortSpec cohort_spec = 12;
*/
- private $cohort_spec = null;
+ protected $cohort_spec = null;
/**
* If false or unspecified, each row with all metrics equal to 0 will not be
* returned. If true, these rows will be returned if they are not separately
@@ -135,14 +135,14 @@ class RunReportRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field bool keep_empty_rows = 13;
*/
- private $keep_empty_rows = false;
+ protected $keep_empty_rows = false;
/**
* Toggles whether to return the current state of this Google Analytics
* property's quota. Quota is returned in [PropertyQuota](#PropertyQuota).
*
* Generated from protobuf field bool return_property_quota = 14;
*/
- private $return_property_quota = false;
+ protected $return_property_quota = false;
/**
* Optional. The configuration of comparisons requested and displayed. The
* request only requires a comparisons field in order to receive a comparison
diff --git a/AnalyticsData/src/V1beta/RunReportResponse.php b/AnalyticsData/src/V1beta/RunReportResponse.php
index 0ccc5d0ff7e2..be3397343abf 100644
--- a/AnalyticsData/src/V1beta/RunReportResponse.php
+++ b/AnalyticsData/src/V1beta/RunReportResponse.php
@@ -64,19 +64,19 @@ class RunReportResponse extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field int32 row_count = 7;
*/
- private $row_count = 0;
+ protected $row_count = 0;
/**
* Metadata for the report.
*
* Generated from protobuf field .google.analytics.data.v1beta.ResponseMetaData metadata = 8;
*/
- private $metadata = null;
+ protected $metadata = null;
/**
* This Google Analytics property's quota state including this request.
*
* Generated from protobuf field .google.analytics.data.v1beta.PropertyQuota property_quota = 9;
*/
- private $property_quota = null;
+ protected $property_quota = null;
/**
* Identifies what kind of resource this message is. This `kind` is always the
* fixed string "analyticsData#runReport". Useful to distinguish between
@@ -84,7 +84,7 @@ class RunReportResponse extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string kind = 10;
*/
- private $kind = '';
+ protected $kind = '';
/**
* Constructor.
diff --git a/AnalyticsData/src/V1beta/SamplingMetadata.php b/AnalyticsData/src/V1beta/SamplingMetadata.php
index 3218df50170d..c85383ee02e9 100644
--- a/AnalyticsData/src/V1beta/SamplingMetadata.php
+++ b/AnalyticsData/src/V1beta/SamplingMetadata.php
@@ -26,7 +26,7 @@ class SamplingMetadata extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field int64 samples_read_count = 1;
*/
- private $samples_read_count = 0;
+ protected $samples_read_count = 0;
/**
* The total number of events present in this property's data that could
* have been analyzed in this report for a date range. Sampling
@@ -37,7 +37,7 @@ class SamplingMetadata extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field int64 sampling_space_size = 2;
*/
- private $sampling_space_size = 0;
+ protected $sampling_space_size = 0;
/**
* Constructor.
diff --git a/AnalyticsData/tests/Unit/V1alpha/AlphaAnalyticsDataClientTest.php b/AnalyticsData/tests/Unit/V1alpha/AlphaAnalyticsDataClientTest.php
deleted file mode 100644
index 13f666dd6ea3..000000000000
--- a/AnalyticsData/tests/Unit/V1alpha/AlphaAnalyticsDataClientTest.php
+++ /dev/null
@@ -1,1123 +0,0 @@
-getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock();
- }
-
- /** @return AlphaAnalyticsDataClient */
- private function createClient(array $options = [])
- {
- $options += [
- 'credentials' => $this->createCredentials(),
- ];
- return new AlphaAnalyticsDataClient($options);
- }
-
- /** @test */
- public function createAudienceListTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/createAudienceListTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $name = 'name3373707';
- $audience = 'audience975628804';
- $audienceDisplayName = 'audienceDisplayName406858307';
- $creationQuotaTokensCharged = 1232901266;
- $rowCount = 1340416618;
- $errorMessage = 'errorMessage-1938755376';
- $percentageCompleted = -1.29204764E8;
- $recurringAudienceList = 'recurringAudienceList2056789015';
- $expectedResponse = new AudienceList();
- $expectedResponse->setName($name);
- $expectedResponse->setAudience($audience);
- $expectedResponse->setAudienceDisplayName($audienceDisplayName);
- $expectedResponse->setCreationQuotaTokensCharged($creationQuotaTokensCharged);
- $expectedResponse->setRowCount($rowCount);
- $expectedResponse->setErrorMessage($errorMessage);
- $expectedResponse->setPercentageCompleted($percentageCompleted);
- $expectedResponse->setRecurringAudienceList($recurringAudienceList);
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/createAudienceListTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $formattedParent = $gapicClient->propertyName('[PROPERTY]');
- $audienceList = new AudienceList();
- $audienceListAudience = 'audienceListAudience867162342';
- $audienceList->setAudience($audienceListAudience);
- $audienceListDimensions = [];
- $audienceList->setDimensions($audienceListDimensions);
- $response = $gapicClient->createAudienceList($formattedParent, $audienceList);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.analytics.data.v1alpha.AlphaAnalyticsData/CreateAudienceList', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getParent();
- $this->assertProtobufEquals($formattedParent, $actualValue);
- $actualValue = $actualApiRequestObject->getAudienceList();
- $this->assertProtobufEquals($audienceList, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/createAudienceListTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function createAudienceListExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/createAudienceListTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $formattedParent = $gapicClient->propertyName('[PROPERTY]');
- $audienceList = new AudienceList();
- $audienceListAudience = 'audienceListAudience867162342';
- $audienceList->setAudience($audienceListAudience);
- $audienceListDimensions = [];
- $audienceList->setDimensions($audienceListDimensions);
- $response = $gapicClient->createAudienceList($formattedParent, $audienceList);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/createAudienceListTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function createRecurringAudienceListTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name = 'name3373707';
- $audience = 'audience975628804';
- $audienceDisplayName = 'audienceDisplayName406858307';
- $activeDaysRemaining = 1427137945;
- $expectedResponse = new RecurringAudienceList();
- $expectedResponse->setName($name);
- $expectedResponse->setAudience($audience);
- $expectedResponse->setAudienceDisplayName($audienceDisplayName);
- $expectedResponse->setActiveDaysRemaining($activeDaysRemaining);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedParent = $gapicClient->propertyName('[PROPERTY]');
- $recurringAudienceList = new RecurringAudienceList();
- $recurringAudienceListAudience = 'recurringAudienceListAudience230288227';
- $recurringAudienceList->setAudience($recurringAudienceListAudience);
- $recurringAudienceListDimensions = [];
- $recurringAudienceList->setDimensions($recurringAudienceListDimensions);
- $response = $gapicClient->createRecurringAudienceList($formattedParent, $recurringAudienceList);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.analytics.data.v1alpha.AlphaAnalyticsData/CreateRecurringAudienceList', $actualFuncCall);
- $actualValue = $actualRequestObject->getParent();
- $this->assertProtobufEquals($formattedParent, $actualValue);
- $actualValue = $actualRequestObject->getRecurringAudienceList();
- $this->assertProtobufEquals($recurringAudienceList, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function createRecurringAudienceListExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- // Mock request
- $formattedParent = $gapicClient->propertyName('[PROPERTY]');
- $recurringAudienceList = new RecurringAudienceList();
- $recurringAudienceListAudience = 'recurringAudienceListAudience230288227';
- $recurringAudienceList->setAudience($recurringAudienceListAudience);
- $recurringAudienceListDimensions = [];
- $recurringAudienceList->setDimensions($recurringAudienceListDimensions);
- try {
- $gapicClient->createRecurringAudienceList($formattedParent, $recurringAudienceList);
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function createReportTaskTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/createReportTaskTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $name = 'name3373707';
- $expectedResponse = new ReportTask();
- $expectedResponse->setName($name);
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/createReportTaskTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $formattedParent = $gapicClient->propertyName('[PROPERTY]');
- $reportTask = new ReportTask();
- $response = $gapicClient->createReportTask($formattedParent, $reportTask);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.analytics.data.v1alpha.AlphaAnalyticsData/CreateReportTask', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getParent();
- $this->assertProtobufEquals($formattedParent, $actualValue);
- $actualValue = $actualApiRequestObject->getReportTask();
- $this->assertProtobufEquals($reportTask, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/createReportTaskTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function createReportTaskExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/createReportTaskTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $formattedParent = $gapicClient->propertyName('[PROPERTY]');
- $reportTask = new ReportTask();
- $response = $gapicClient->createReportTask($formattedParent, $reportTask);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/createReportTaskTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function getAudienceListTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name2 = 'name2-1052831874';
- $audience = 'audience975628804';
- $audienceDisplayName = 'audienceDisplayName406858307';
- $creationQuotaTokensCharged = 1232901266;
- $rowCount = 1340416618;
- $errorMessage = 'errorMessage-1938755376';
- $percentageCompleted = -1.29204764E8;
- $recurringAudienceList = 'recurringAudienceList2056789015';
- $expectedResponse = new AudienceList();
- $expectedResponse->setName($name2);
- $expectedResponse->setAudience($audience);
- $expectedResponse->setAudienceDisplayName($audienceDisplayName);
- $expectedResponse->setCreationQuotaTokensCharged($creationQuotaTokensCharged);
- $expectedResponse->setRowCount($rowCount);
- $expectedResponse->setErrorMessage($errorMessage);
- $expectedResponse->setPercentageCompleted($percentageCompleted);
- $expectedResponse->setRecurringAudienceList($recurringAudienceList);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedName = $gapicClient->audienceListName('[PROPERTY]', '[AUDIENCE_LIST]');
- $response = $gapicClient->getAudienceList($formattedName);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.analytics.data.v1alpha.AlphaAnalyticsData/GetAudienceList', $actualFuncCall);
- $actualValue = $actualRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getAudienceListExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- // Mock request
- $formattedName = $gapicClient->audienceListName('[PROPERTY]', '[AUDIENCE_LIST]');
- try {
- $gapicClient->getAudienceList($formattedName);
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getPropertyQuotasSnapshotTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name2 = 'name2-1052831874';
- $expectedResponse = new PropertyQuotasSnapshot();
- $expectedResponse->setName($name2);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedName = $gapicClient->propertyQuotasSnapshotName('[PROPERTY]');
- $response = $gapicClient->getPropertyQuotasSnapshot($formattedName);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.analytics.data.v1alpha.AlphaAnalyticsData/GetPropertyQuotasSnapshot', $actualFuncCall);
- $actualValue = $actualRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getPropertyQuotasSnapshotExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- // Mock request
- $formattedName = $gapicClient->propertyQuotasSnapshotName('[PROPERTY]');
- try {
- $gapicClient->getPropertyQuotasSnapshot($formattedName);
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getRecurringAudienceListTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name2 = 'name2-1052831874';
- $audience = 'audience975628804';
- $audienceDisplayName = 'audienceDisplayName406858307';
- $activeDaysRemaining = 1427137945;
- $expectedResponse = new RecurringAudienceList();
- $expectedResponse->setName($name2);
- $expectedResponse->setAudience($audience);
- $expectedResponse->setAudienceDisplayName($audienceDisplayName);
- $expectedResponse->setActiveDaysRemaining($activeDaysRemaining);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedName = $gapicClient->recurringAudienceListName('[PROPERTY]', '[RECURRING_AUDIENCE_LIST]');
- $response = $gapicClient->getRecurringAudienceList($formattedName);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.analytics.data.v1alpha.AlphaAnalyticsData/GetRecurringAudienceList', $actualFuncCall);
- $actualValue = $actualRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getRecurringAudienceListExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- // Mock request
- $formattedName = $gapicClient->recurringAudienceListName('[PROPERTY]', '[RECURRING_AUDIENCE_LIST]');
- try {
- $gapicClient->getRecurringAudienceList($formattedName);
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getReportTaskTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name2 = 'name2-1052831874';
- $expectedResponse = new ReportTask();
- $expectedResponse->setName($name2);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedName = $gapicClient->reportTaskName('[PROPERTY]', '[REPORT_TASK]');
- $response = $gapicClient->getReportTask($formattedName);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.analytics.data.v1alpha.AlphaAnalyticsData/GetReportTask', $actualFuncCall);
- $actualValue = $actualRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getReportTaskExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- // Mock request
- $formattedName = $gapicClient->reportTaskName('[PROPERTY]', '[REPORT_TASK]');
- try {
- $gapicClient->getReportTask($formattedName);
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function listAudienceListsTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $nextPageToken = '';
- $audienceListsElement = new AudienceList();
- $audienceLists = [
- $audienceListsElement,
- ];
- $expectedResponse = new ListAudienceListsResponse();
- $expectedResponse->setNextPageToken($nextPageToken);
- $expectedResponse->setAudienceLists($audienceLists);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedParent = $gapicClient->propertyName('[PROPERTY]');
- $response = $gapicClient->listAudienceLists($formattedParent);
- $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
- $resources = iterator_to_array($response->iterateAllElements());
- $this->assertSame(1, count($resources));
- $this->assertEquals($expectedResponse->getAudienceLists()[0], $resources[0]);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.analytics.data.v1alpha.AlphaAnalyticsData/ListAudienceLists', $actualFuncCall);
- $actualValue = $actualRequestObject->getParent();
- $this->assertProtobufEquals($formattedParent, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function listAudienceListsExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- // Mock request
- $formattedParent = $gapicClient->propertyName('[PROPERTY]');
- try {
- $gapicClient->listAudienceLists($formattedParent);
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function listRecurringAudienceListsTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $nextPageToken = '';
- $recurringAudienceListsElement = new RecurringAudienceList();
- $recurringAudienceLists = [
- $recurringAudienceListsElement,
- ];
- $expectedResponse = new ListRecurringAudienceListsResponse();
- $expectedResponse->setNextPageToken($nextPageToken);
- $expectedResponse->setRecurringAudienceLists($recurringAudienceLists);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedParent = $gapicClient->propertyName('[PROPERTY]');
- $response = $gapicClient->listRecurringAudienceLists($formattedParent);
- $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
- $resources = iterator_to_array($response->iterateAllElements());
- $this->assertSame(1, count($resources));
- $this->assertEquals($expectedResponse->getRecurringAudienceLists()[0], $resources[0]);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.analytics.data.v1alpha.AlphaAnalyticsData/ListRecurringAudienceLists', $actualFuncCall);
- $actualValue = $actualRequestObject->getParent();
- $this->assertProtobufEquals($formattedParent, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function listRecurringAudienceListsExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- // Mock request
- $formattedParent = $gapicClient->propertyName('[PROPERTY]');
- try {
- $gapicClient->listRecurringAudienceLists($formattedParent);
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function listReportTasksTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $nextPageToken = '';
- $reportTasksElement = new ReportTask();
- $reportTasks = [
- $reportTasksElement,
- ];
- $expectedResponse = new ListReportTasksResponse();
- $expectedResponse->setNextPageToken($nextPageToken);
- $expectedResponse->setReportTasks($reportTasks);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedParent = $gapicClient->propertyName('[PROPERTY]');
- $response = $gapicClient->listReportTasks($formattedParent);
- $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
- $resources = iterator_to_array($response->iterateAllElements());
- $this->assertSame(1, count($resources));
- $this->assertEquals($expectedResponse->getReportTasks()[0], $resources[0]);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.analytics.data.v1alpha.AlphaAnalyticsData/ListReportTasks', $actualFuncCall);
- $actualValue = $actualRequestObject->getParent();
- $this->assertProtobufEquals($formattedParent, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function listReportTasksExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- // Mock request
- $formattedParent = $gapicClient->propertyName('[PROPERTY]');
- try {
- $gapicClient->listReportTasks($formattedParent);
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function queryAudienceListTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $rowCount = 1340416618;
- $expectedResponse = new QueryAudienceListResponse();
- $expectedResponse->setRowCount($rowCount);
- $transport->addResponse($expectedResponse);
- // Mock request
- $name = 'name3373707';
- $response = $gapicClient->queryAudienceList($name);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.analytics.data.v1alpha.AlphaAnalyticsData/QueryAudienceList', $actualFuncCall);
- $actualValue = $actualRequestObject->getName();
- $this->assertProtobufEquals($name, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function queryAudienceListExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- // Mock request
- $name = 'name3373707';
- try {
- $gapicClient->queryAudienceList($name);
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function queryReportTaskTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $rowCount = 1340416618;
- $expectedResponse = new QueryReportTaskResponse();
- $expectedResponse->setRowCount($rowCount);
- $transport->addResponse($expectedResponse);
- // Mock request
- $name = 'name3373707';
- $response = $gapicClient->queryReportTask($name);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.analytics.data.v1alpha.AlphaAnalyticsData/QueryReportTask', $actualFuncCall);
- $actualValue = $actualRequestObject->getName();
- $this->assertProtobufEquals($name, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function queryReportTaskExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- // Mock request
- $name = 'name3373707';
- try {
- $gapicClient->queryReportTask($name);
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function runFunnelReportTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $kind = 'kind3292052';
- $expectedResponse = new RunFunnelReportResponse();
- $expectedResponse->setKind($kind);
- $transport->addResponse($expectedResponse);
- $response = $gapicClient->runFunnelReport();
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.analytics.data.v1alpha.AlphaAnalyticsData/RunFunnelReport', $actualFuncCall);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function runFunnelReportExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- try {
- $gapicClient->runFunnelReport();
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function sheetExportAudienceListTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $spreadsheetUri = 'spreadsheetUri-1521055111';
- $spreadsheetId = 'spreadsheetId1336406638';
- $rowCount = 1340416618;
- $expectedResponse = new SheetExportAudienceListResponse();
- $expectedResponse->setSpreadsheetUri($spreadsheetUri);
- $expectedResponse->setSpreadsheetId($spreadsheetId);
- $expectedResponse->setRowCount($rowCount);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedName = $gapicClient->audienceListName('[PROPERTY]', '[AUDIENCE_LIST]');
- $response = $gapicClient->sheetExportAudienceList($formattedName);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.analytics.data.v1alpha.AlphaAnalyticsData/SheetExportAudienceList', $actualFuncCall);
- $actualValue = $actualRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function sheetExportAudienceListExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- // Mock request
- $formattedName = $gapicClient->audienceListName('[PROPERTY]', '[AUDIENCE_LIST]');
- try {
- $gapicClient->sheetExportAudienceList($formattedName);
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-}
diff --git a/AnalyticsData/tests/Unit/V1alpha/Client/AlphaAnalyticsDataClientTest.php b/AnalyticsData/tests/Unit/V1alpha/Client/AlphaAnalyticsDataClientTest.php
index 073c77ef5975..90a6887f0580 100644
--- a/AnalyticsData/tests/Unit/V1alpha/Client/AlphaAnalyticsDataClientTest.php
+++ b/AnalyticsData/tests/Unit/V1alpha/Client/AlphaAnalyticsDataClientTest.php
@@ -50,9 +50,9 @@
use Google\Analytics\Data\V1alpha\SheetExportAudienceListResponse;
use Google\ApiCore\ApiException;
use Google\ApiCore\CredentialsWrapper;
-use Google\ApiCore\LongRunning\OperationsClient;
use Google\ApiCore\Testing\GeneratedTest;
use Google\ApiCore\Testing\MockTransport;
+use Google\LongRunning\Client\OperationsClient;
use Google\LongRunning\GetOperationRequest;
use Google\LongRunning\Operation;
use Google\Protobuf\Any;
@@ -75,7 +75,9 @@ private function createTransport($deserialize = null)
/** @return CredentialsWrapper */
private function createCredentials()
{
- return $this->getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock();
+ return $this->getMockBuilder(CredentialsWrapper::class)
+ ->disableOriginalConstructor()
+ ->getMock();
}
/** @return AlphaAnalyticsDataClient */
@@ -114,7 +116,7 @@ public function createAudienceListTest()
$creationQuotaTokensCharged = 1232901266;
$rowCount = 1340416618;
$errorMessage = 'errorMessage-1938755376';
- $percentageCompleted = -1.29204764E8;
+ $percentageCompleted = -1.29204764e8;
$recurringAudienceList = 'recurringAudienceList2056789015';
$expectedResponse = new AudienceList();
$expectedResponse->setName($name);
@@ -139,9 +141,7 @@ public function createAudienceListTest()
$audienceList->setAudience($audienceListAudience);
$audienceListDimensions = [];
$audienceList->setDimensions($audienceListDimensions);
- $request = (new CreateAudienceListRequest())
- ->setParent($formattedParent)
- ->setAudienceList($audienceList);
+ $request = (new CreateAudienceListRequest())->setParent($formattedParent)->setAudienceList($audienceList);
$response = $gapicClient->createAudienceList($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -199,12 +199,15 @@ public function createAudienceListExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$operationsTransport->addResponse(null, $status);
// Mock request
$formattedParent = $gapicClient->propertyName('[PROPERTY]');
@@ -213,9 +216,7 @@ public function createAudienceListExceptionTest()
$audienceList->setAudience($audienceListAudience);
$audienceListDimensions = [];
$audienceList->setDimensions($audienceListDimensions);
- $request = (new CreateAudienceListRequest())
- ->setParent($formattedParent)
- ->setAudienceList($audienceList);
+ $request = (new CreateAudienceListRequest())->setParent($formattedParent)->setAudienceList($audienceList);
$response = $gapicClient->createAudienceList($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -273,7 +274,10 @@ public function createRecurringAudienceListTest()
$this->assertSame(1, count($actualRequests));
$actualFuncCall = $actualRequests[0]->getFuncCall();
$actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.analytics.data.v1alpha.AlphaAnalyticsData/CreateRecurringAudienceList', $actualFuncCall);
+ $this->assertSame(
+ '/google.analytics.data.v1alpha.AlphaAnalyticsData/CreateRecurringAudienceList',
+ $actualFuncCall
+ );
$actualValue = $actualRequestObject->getParent();
$this->assertProtobufEquals($formattedParent, $actualValue);
$actualValue = $actualRequestObject->getRecurringAudienceList();
@@ -292,12 +296,15 @@ public function createRecurringAudienceListExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$transport->addResponse(null, $status);
// Mock request
$formattedParent = $gapicClient->propertyName('[PROPERTY]');
@@ -356,9 +363,7 @@ public function createReportTaskTest()
// Mock request
$formattedParent = $gapicClient->propertyName('[PROPERTY]');
$reportTask = new ReportTask();
- $request = (new CreateReportTaskRequest())
- ->setParent($formattedParent)
- ->setReportTask($reportTask);
+ $request = (new CreateReportTaskRequest())->setParent($formattedParent)->setReportTask($reportTask);
$response = $gapicClient->createReportTask($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -416,19 +421,20 @@ public function createReportTaskExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$operationsTransport->addResponse(null, $status);
// Mock request
$formattedParent = $gapicClient->propertyName('[PROPERTY]');
$reportTask = new ReportTask();
- $request = (new CreateReportTaskRequest())
- ->setParent($formattedParent)
- ->setReportTask($reportTask);
+ $request = (new CreateReportTaskRequest())->setParent($formattedParent)->setReportTask($reportTask);
$response = $gapicClient->createReportTask($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -466,7 +472,7 @@ public function getAudienceListTest()
$creationQuotaTokensCharged = 1232901266;
$rowCount = 1340416618;
$errorMessage = 'errorMessage-1938755376';
- $percentageCompleted = -1.29204764E8;
+ $percentageCompleted = -1.29204764e8;
$recurringAudienceList = 'recurringAudienceList2056789015';
$expectedResponse = new AudienceList();
$expectedResponse->setName($name2);
@@ -480,8 +486,7 @@ public function getAudienceListTest()
$transport->addResponse($expectedResponse);
// Mock request
$formattedName = $gapicClient->audienceListName('[PROPERTY]', '[AUDIENCE_LIST]');
- $request = (new GetAudienceListRequest())
- ->setName($formattedName);
+ $request = (new GetAudienceListRequest())->setName($formattedName);
$response = $gapicClient->getAudienceList($request);
$this->assertEquals($expectedResponse, $response);
$actualRequests = $transport->popReceivedCalls();
@@ -505,17 +510,19 @@ public function getAudienceListExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$transport->addResponse(null, $status);
// Mock request
$formattedName = $gapicClient->audienceListName('[PROPERTY]', '[AUDIENCE_LIST]');
- $request = (new GetAudienceListRequest())
- ->setName($formattedName);
+ $request = (new GetAudienceListRequest())->setName($formattedName);
try {
$gapicClient->getAudienceList($request);
// If the $gapicClient method call did not throw, fail the test
@@ -544,15 +551,17 @@ public function getPropertyQuotasSnapshotTest()
$transport->addResponse($expectedResponse);
// Mock request
$formattedName = $gapicClient->propertyQuotasSnapshotName('[PROPERTY]');
- $request = (new GetPropertyQuotasSnapshotRequest())
- ->setName($formattedName);
+ $request = (new GetPropertyQuotasSnapshotRequest())->setName($formattedName);
$response = $gapicClient->getPropertyQuotasSnapshot($request);
$this->assertEquals($expectedResponse, $response);
$actualRequests = $transport->popReceivedCalls();
$this->assertSame(1, count($actualRequests));
$actualFuncCall = $actualRequests[0]->getFuncCall();
$actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.analytics.data.v1alpha.AlphaAnalyticsData/GetPropertyQuotasSnapshot', $actualFuncCall);
+ $this->assertSame(
+ '/google.analytics.data.v1alpha.AlphaAnalyticsData/GetPropertyQuotasSnapshot',
+ $actualFuncCall
+ );
$actualValue = $actualRequestObject->getName();
$this->assertProtobufEquals($formattedName, $actualValue);
$this->assertTrue($transport->isExhausted());
@@ -569,17 +578,19 @@ public function getPropertyQuotasSnapshotExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$transport->addResponse(null, $status);
// Mock request
$formattedName = $gapicClient->propertyQuotasSnapshotName('[PROPERTY]');
- $request = (new GetPropertyQuotasSnapshotRequest())
- ->setName($formattedName);
+ $request = (new GetPropertyQuotasSnapshotRequest())->setName($formattedName);
try {
$gapicClient->getPropertyQuotasSnapshot($request);
// If the $gapicClient method call did not throw, fail the test
@@ -614,15 +625,17 @@ public function getRecurringAudienceListTest()
$transport->addResponse($expectedResponse);
// Mock request
$formattedName = $gapicClient->recurringAudienceListName('[PROPERTY]', '[RECURRING_AUDIENCE_LIST]');
- $request = (new GetRecurringAudienceListRequest())
- ->setName($formattedName);
+ $request = (new GetRecurringAudienceListRequest())->setName($formattedName);
$response = $gapicClient->getRecurringAudienceList($request);
$this->assertEquals($expectedResponse, $response);
$actualRequests = $transport->popReceivedCalls();
$this->assertSame(1, count($actualRequests));
$actualFuncCall = $actualRequests[0]->getFuncCall();
$actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.analytics.data.v1alpha.AlphaAnalyticsData/GetRecurringAudienceList', $actualFuncCall);
+ $this->assertSame(
+ '/google.analytics.data.v1alpha.AlphaAnalyticsData/GetRecurringAudienceList',
+ $actualFuncCall
+ );
$actualValue = $actualRequestObject->getName();
$this->assertProtobufEquals($formattedName, $actualValue);
$this->assertTrue($transport->isExhausted());
@@ -639,17 +652,19 @@ public function getRecurringAudienceListExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$transport->addResponse(null, $status);
// Mock request
$formattedName = $gapicClient->recurringAudienceListName('[PROPERTY]', '[RECURRING_AUDIENCE_LIST]');
- $request = (new GetRecurringAudienceListRequest())
- ->setName($formattedName);
+ $request = (new GetRecurringAudienceListRequest())->setName($formattedName);
try {
$gapicClient->getRecurringAudienceList($request);
// If the $gapicClient method call did not throw, fail the test
@@ -678,8 +693,7 @@ public function getReportTaskTest()
$transport->addResponse($expectedResponse);
// Mock request
$formattedName = $gapicClient->reportTaskName('[PROPERTY]', '[REPORT_TASK]');
- $request = (new GetReportTaskRequest())
- ->setName($formattedName);
+ $request = (new GetReportTaskRequest())->setName($formattedName);
$response = $gapicClient->getReportTask($request);
$this->assertEquals($expectedResponse, $response);
$actualRequests = $transport->popReceivedCalls();
@@ -703,17 +717,19 @@ public function getReportTaskExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$transport->addResponse(null, $status);
// Mock request
$formattedName = $gapicClient->reportTaskName('[PROPERTY]', '[REPORT_TASK]');
- $request = (new GetReportTaskRequest())
- ->setName($formattedName);
+ $request = (new GetReportTaskRequest())->setName($formattedName);
try {
$gapicClient->getReportTask($request);
// If the $gapicClient method call did not throw, fail the test
@@ -738,17 +754,14 @@ public function listAudienceListsTest()
// Mock response
$nextPageToken = '';
$audienceListsElement = new AudienceList();
- $audienceLists = [
- $audienceListsElement,
- ];
+ $audienceLists = [$audienceListsElement];
$expectedResponse = new ListAudienceListsResponse();
$expectedResponse->setNextPageToken($nextPageToken);
$expectedResponse->setAudienceLists($audienceLists);
$transport->addResponse($expectedResponse);
// Mock request
$formattedParent = $gapicClient->propertyName('[PROPERTY]');
- $request = (new ListAudienceListsRequest())
- ->setParent($formattedParent);
+ $request = (new ListAudienceListsRequest())->setParent($formattedParent);
$response = $gapicClient->listAudienceLists($request);
$this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
$resources = iterator_to_array($response->iterateAllElements());
@@ -775,17 +788,19 @@ public function listAudienceListsExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$transport->addResponse(null, $status);
// Mock request
$formattedParent = $gapicClient->propertyName('[PROPERTY]');
- $request = (new ListAudienceListsRequest())
- ->setParent($formattedParent);
+ $request = (new ListAudienceListsRequest())->setParent($formattedParent);
try {
$gapicClient->listAudienceLists($request);
// If the $gapicClient method call did not throw, fail the test
@@ -810,17 +825,14 @@ public function listRecurringAudienceListsTest()
// Mock response
$nextPageToken = '';
$recurringAudienceListsElement = new RecurringAudienceList();
- $recurringAudienceLists = [
- $recurringAudienceListsElement,
- ];
+ $recurringAudienceLists = [$recurringAudienceListsElement];
$expectedResponse = new ListRecurringAudienceListsResponse();
$expectedResponse->setNextPageToken($nextPageToken);
$expectedResponse->setRecurringAudienceLists($recurringAudienceLists);
$transport->addResponse($expectedResponse);
// Mock request
$formattedParent = $gapicClient->propertyName('[PROPERTY]');
- $request = (new ListRecurringAudienceListsRequest())
- ->setParent($formattedParent);
+ $request = (new ListRecurringAudienceListsRequest())->setParent($formattedParent);
$response = $gapicClient->listRecurringAudienceLists($request);
$this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
$resources = iterator_to_array($response->iterateAllElements());
@@ -830,7 +842,10 @@ public function listRecurringAudienceListsTest()
$this->assertSame(1, count($actualRequests));
$actualFuncCall = $actualRequests[0]->getFuncCall();
$actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.analytics.data.v1alpha.AlphaAnalyticsData/ListRecurringAudienceLists', $actualFuncCall);
+ $this->assertSame(
+ '/google.analytics.data.v1alpha.AlphaAnalyticsData/ListRecurringAudienceLists',
+ $actualFuncCall
+ );
$actualValue = $actualRequestObject->getParent();
$this->assertProtobufEquals($formattedParent, $actualValue);
$this->assertTrue($transport->isExhausted());
@@ -847,17 +862,19 @@ public function listRecurringAudienceListsExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$transport->addResponse(null, $status);
// Mock request
$formattedParent = $gapicClient->propertyName('[PROPERTY]');
- $request = (new ListRecurringAudienceListsRequest())
- ->setParent($formattedParent);
+ $request = (new ListRecurringAudienceListsRequest())->setParent($formattedParent);
try {
$gapicClient->listRecurringAudienceLists($request);
// If the $gapicClient method call did not throw, fail the test
@@ -882,17 +899,14 @@ public function listReportTasksTest()
// Mock response
$nextPageToken = '';
$reportTasksElement = new ReportTask();
- $reportTasks = [
- $reportTasksElement,
- ];
+ $reportTasks = [$reportTasksElement];
$expectedResponse = new ListReportTasksResponse();
$expectedResponse->setNextPageToken($nextPageToken);
$expectedResponse->setReportTasks($reportTasks);
$transport->addResponse($expectedResponse);
// Mock request
$formattedParent = $gapicClient->propertyName('[PROPERTY]');
- $request = (new ListReportTasksRequest())
- ->setParent($formattedParent);
+ $request = (new ListReportTasksRequest())->setParent($formattedParent);
$response = $gapicClient->listReportTasks($request);
$this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
$resources = iterator_to_array($response->iterateAllElements());
@@ -919,17 +933,19 @@ public function listReportTasksExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$transport->addResponse(null, $status);
// Mock request
$formattedParent = $gapicClient->propertyName('[PROPERTY]');
- $request = (new ListReportTasksRequest())
- ->setParent($formattedParent);
+ $request = (new ListReportTasksRequest())->setParent($formattedParent);
try {
$gapicClient->listReportTasks($request);
// If the $gapicClient method call did not throw, fail the test
@@ -958,8 +974,7 @@ public function queryAudienceListTest()
$transport->addResponse($expectedResponse);
// Mock request
$name = 'name3373707';
- $request = (new QueryAudienceListRequest())
- ->setName($name);
+ $request = (new QueryAudienceListRequest())->setName($name);
$response = $gapicClient->queryAudienceList($request);
$this->assertEquals($expectedResponse, $response);
$actualRequests = $transport->popReceivedCalls();
@@ -983,17 +998,19 @@ public function queryAudienceListExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$transport->addResponse(null, $status);
// Mock request
$name = 'name3373707';
- $request = (new QueryAudienceListRequest())
- ->setName($name);
+ $request = (new QueryAudienceListRequest())->setName($name);
try {
$gapicClient->queryAudienceList($request);
// If the $gapicClient method call did not throw, fail the test
@@ -1022,8 +1039,7 @@ public function queryReportTaskTest()
$transport->addResponse($expectedResponse);
// Mock request
$name = 'name3373707';
- $request = (new QueryReportTaskRequest())
- ->setName($name);
+ $request = (new QueryReportTaskRequest())->setName($name);
$response = $gapicClient->queryReportTask($request);
$this->assertEquals($expectedResponse, $response);
$actualRequests = $transport->popReceivedCalls();
@@ -1047,17 +1063,19 @@ public function queryReportTaskExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$transport->addResponse(null, $status);
// Mock request
$name = 'name3373707';
- $request = (new QueryReportTaskRequest())
- ->setName($name);
+ $request = (new QueryReportTaskRequest())->setName($name);
try {
$gapicClient->queryReportTask($request);
// If the $gapicClient method call did not throw, fail the test
@@ -1106,12 +1124,15 @@ public function runFunnelReportExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$transport->addResponse(null, $status);
$request = new RunFunnelReportRequest();
try {
@@ -1146,8 +1167,7 @@ public function sheetExportAudienceListTest()
$transport->addResponse($expectedResponse);
// Mock request
$formattedName = $gapicClient->audienceListName('[PROPERTY]', '[AUDIENCE_LIST]');
- $request = (new SheetExportAudienceListRequest())
- ->setName($formattedName);
+ $request = (new SheetExportAudienceListRequest())->setName($formattedName);
$response = $gapicClient->sheetExportAudienceList($request);
$this->assertEquals($expectedResponse, $response);
$actualRequests = $transport->popReceivedCalls();
@@ -1171,17 +1191,19 @@ public function sheetExportAudienceListExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$transport->addResponse(null, $status);
// Mock request
$formattedName = $gapicClient->audienceListName('[PROPERTY]', '[AUDIENCE_LIST]');
- $request = (new SheetExportAudienceListRequest())
- ->setName($formattedName);
+ $request = (new SheetExportAudienceListRequest())->setName($formattedName);
try {
$gapicClient->sheetExportAudienceList($request);
// If the $gapicClient method call did not throw, fail the test
@@ -1222,7 +1244,7 @@ public function createAudienceListAsyncTest()
$creationQuotaTokensCharged = 1232901266;
$rowCount = 1340416618;
$errorMessage = 'errorMessage-1938755376';
- $percentageCompleted = -1.29204764E8;
+ $percentageCompleted = -1.29204764e8;
$recurringAudienceList = 'recurringAudienceList2056789015';
$expectedResponse = new AudienceList();
$expectedResponse->setName($name);
@@ -1247,9 +1269,7 @@ public function createAudienceListAsyncTest()
$audienceList->setAudience($audienceListAudience);
$audienceListDimensions = [];
$audienceList->setDimensions($audienceListDimensions);
- $request = (new CreateAudienceListRequest())
- ->setParent($formattedParent)
- ->setAudienceList($audienceList);
+ $request = (new CreateAudienceListRequest())->setParent($formattedParent)->setAudienceList($audienceList);
$response = $gapicClient->createAudienceListAsync($request)->wait();
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
diff --git a/AnalyticsData/tests/Unit/V1beta/BetaAnalyticsDataClientTest.php b/AnalyticsData/tests/Unit/V1beta/BetaAnalyticsDataClientTest.php
deleted file mode 100644
index 9e12996c23ee..000000000000
--- a/AnalyticsData/tests/Unit/V1beta/BetaAnalyticsDataClientTest.php
+++ /dev/null
@@ -1,803 +0,0 @@
-getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock();
- }
-
- /** @return BetaAnalyticsDataClient */
- private function createClient(array $options = [])
- {
- $options += [
- 'credentials' => $this->createCredentials(),
- ];
- return new BetaAnalyticsDataClient($options);
- }
-
- /** @test */
- public function batchRunPivotReportsTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $kind = 'kind3292052';
- $expectedResponse = new BatchRunPivotReportsResponse();
- $expectedResponse->setKind($kind);
- $transport->addResponse($expectedResponse);
- $response = $gapicClient->batchRunPivotReports();
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.analytics.data.v1beta.BetaAnalyticsData/BatchRunPivotReports', $actualFuncCall);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function batchRunPivotReportsExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- try {
- $gapicClient->batchRunPivotReports();
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function batchRunReportsTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $kind = 'kind3292052';
- $expectedResponse = new BatchRunReportsResponse();
- $expectedResponse->setKind($kind);
- $transport->addResponse($expectedResponse);
- $response = $gapicClient->batchRunReports();
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.analytics.data.v1beta.BetaAnalyticsData/BatchRunReports', $actualFuncCall);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function batchRunReportsExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- try {
- $gapicClient->batchRunReports();
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function checkCompatibilityTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $expectedResponse = new CheckCompatibilityResponse();
- $transport->addResponse($expectedResponse);
- $response = $gapicClient->checkCompatibility();
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.analytics.data.v1beta.BetaAnalyticsData/CheckCompatibility', $actualFuncCall);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function checkCompatibilityExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- try {
- $gapicClient->checkCompatibility();
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function createAudienceExportTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/createAudienceExportTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $name = 'name3373707';
- $audience = 'audience975628804';
- $audienceDisplayName = 'audienceDisplayName406858307';
- $creationQuotaTokensCharged = 1232901266;
- $rowCount = 1340416618;
- $errorMessage = 'errorMessage-1938755376';
- $percentageCompleted = -1.29204764E8;
- $expectedResponse = new AudienceExport();
- $expectedResponse->setName($name);
- $expectedResponse->setAudience($audience);
- $expectedResponse->setAudienceDisplayName($audienceDisplayName);
- $expectedResponse->setCreationQuotaTokensCharged($creationQuotaTokensCharged);
- $expectedResponse->setRowCount($rowCount);
- $expectedResponse->setErrorMessage($errorMessage);
- $expectedResponse->setPercentageCompleted($percentageCompleted);
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/createAudienceExportTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $formattedParent = $gapicClient->propertyName('[PROPERTY]');
- $audienceExport = new AudienceExport();
- $audienceExportAudience = 'audienceExportAudience1191136508';
- $audienceExport->setAudience($audienceExportAudience);
- $audienceExportDimensions = [];
- $audienceExport->setDimensions($audienceExportDimensions);
- $response = $gapicClient->createAudienceExport($formattedParent, $audienceExport);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.analytics.data.v1beta.BetaAnalyticsData/CreateAudienceExport', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getParent();
- $this->assertProtobufEquals($formattedParent, $actualValue);
- $actualValue = $actualApiRequestObject->getAudienceExport();
- $this->assertProtobufEquals($audienceExport, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/createAudienceExportTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function createAudienceExportExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/createAudienceExportTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $formattedParent = $gapicClient->propertyName('[PROPERTY]');
- $audienceExport = new AudienceExport();
- $audienceExportAudience = 'audienceExportAudience1191136508';
- $audienceExport->setAudience($audienceExportAudience);
- $audienceExportDimensions = [];
- $audienceExport->setDimensions($audienceExportDimensions);
- $response = $gapicClient->createAudienceExport($formattedParent, $audienceExport);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/createAudienceExportTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function getAudienceExportTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name2 = 'name2-1052831874';
- $audience = 'audience975628804';
- $audienceDisplayName = 'audienceDisplayName406858307';
- $creationQuotaTokensCharged = 1232901266;
- $rowCount = 1340416618;
- $errorMessage = 'errorMessage-1938755376';
- $percentageCompleted = -1.29204764E8;
- $expectedResponse = new AudienceExport();
- $expectedResponse->setName($name2);
- $expectedResponse->setAudience($audience);
- $expectedResponse->setAudienceDisplayName($audienceDisplayName);
- $expectedResponse->setCreationQuotaTokensCharged($creationQuotaTokensCharged);
- $expectedResponse->setRowCount($rowCount);
- $expectedResponse->setErrorMessage($errorMessage);
- $expectedResponse->setPercentageCompleted($percentageCompleted);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedName = $gapicClient->audienceExportName('[PROPERTY]', '[AUDIENCE_EXPORT]');
- $response = $gapicClient->getAudienceExport($formattedName);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.analytics.data.v1beta.BetaAnalyticsData/GetAudienceExport', $actualFuncCall);
- $actualValue = $actualRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getAudienceExportExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- // Mock request
- $formattedName = $gapicClient->audienceExportName('[PROPERTY]', '[AUDIENCE_EXPORT]');
- try {
- $gapicClient->getAudienceExport($formattedName);
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getMetadataTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name2 = 'name2-1052831874';
- $expectedResponse = new Metadata();
- $expectedResponse->setName($name2);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedName = $gapicClient->metadataName('[PROPERTY]');
- $response = $gapicClient->getMetadata($formattedName);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.analytics.data.v1beta.BetaAnalyticsData/GetMetadata', $actualFuncCall);
- $actualValue = $actualRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getMetadataExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- // Mock request
- $formattedName = $gapicClient->metadataName('[PROPERTY]');
- try {
- $gapicClient->getMetadata($formattedName);
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function listAudienceExportsTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $nextPageToken = '';
- $audienceExportsElement = new AudienceExport();
- $audienceExports = [
- $audienceExportsElement,
- ];
- $expectedResponse = new ListAudienceExportsResponse();
- $expectedResponse->setNextPageToken($nextPageToken);
- $expectedResponse->setAudienceExports($audienceExports);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedParent = $gapicClient->propertyName('[PROPERTY]');
- $response = $gapicClient->listAudienceExports($formattedParent);
- $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
- $resources = iterator_to_array($response->iterateAllElements());
- $this->assertSame(1, count($resources));
- $this->assertEquals($expectedResponse->getAudienceExports()[0], $resources[0]);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.analytics.data.v1beta.BetaAnalyticsData/ListAudienceExports', $actualFuncCall);
- $actualValue = $actualRequestObject->getParent();
- $this->assertProtobufEquals($formattedParent, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function listAudienceExportsExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- // Mock request
- $formattedParent = $gapicClient->propertyName('[PROPERTY]');
- try {
- $gapicClient->listAudienceExports($formattedParent);
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function queryAudienceExportTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $rowCount = 1340416618;
- $expectedResponse = new QueryAudienceExportResponse();
- $expectedResponse->setRowCount($rowCount);
- $transport->addResponse($expectedResponse);
- // Mock request
- $name = 'name3373707';
- $response = $gapicClient->queryAudienceExport($name);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.analytics.data.v1beta.BetaAnalyticsData/QueryAudienceExport', $actualFuncCall);
- $actualValue = $actualRequestObject->getName();
- $this->assertProtobufEquals($name, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function queryAudienceExportExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- // Mock request
- $name = 'name3373707';
- try {
- $gapicClient->queryAudienceExport($name);
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function runPivotReportTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $kind = 'kind3292052';
- $expectedResponse = new RunPivotReportResponse();
- $expectedResponse->setKind($kind);
- $transport->addResponse($expectedResponse);
- $response = $gapicClient->runPivotReport();
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.analytics.data.v1beta.BetaAnalyticsData/RunPivotReport', $actualFuncCall);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function runPivotReportExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- try {
- $gapicClient->runPivotReport();
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function runRealtimeReportTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $rowCount = 1340416618;
- $kind = 'kind3292052';
- $expectedResponse = new RunRealtimeReportResponse();
- $expectedResponse->setRowCount($rowCount);
- $expectedResponse->setKind($kind);
- $transport->addResponse($expectedResponse);
- $response = $gapicClient->runRealtimeReport();
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.analytics.data.v1beta.BetaAnalyticsData/RunRealtimeReport', $actualFuncCall);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function runRealtimeReportExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- try {
- $gapicClient->runRealtimeReport();
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function runReportTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $rowCount = 1340416618;
- $kind = 'kind3292052';
- $expectedResponse = new RunReportResponse();
- $expectedResponse->setRowCount($rowCount);
- $expectedResponse->setKind($kind);
- $transport->addResponse($expectedResponse);
- $response = $gapicClient->runReport();
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.analytics.data.v1beta.BetaAnalyticsData/RunReport', $actualFuncCall);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function runReportExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- try {
- $gapicClient->runReport();
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-}
diff --git a/AnalyticsData/tests/Unit/V1beta/Client/BetaAnalyticsDataClientTest.php b/AnalyticsData/tests/Unit/V1beta/Client/BetaAnalyticsDataClientTest.php
index c7db604571ca..1facafa948da 100644
--- a/AnalyticsData/tests/Unit/V1beta/Client/BetaAnalyticsDataClientTest.php
+++ b/AnalyticsData/tests/Unit/V1beta/Client/BetaAnalyticsDataClientTest.php
@@ -1,6 +1,6 @@
getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock();
+ return $this->getMockBuilder(CredentialsWrapper::class)
+ ->disableOriginalConstructor()
+ ->getMock();
}
/** @return BetaAnalyticsDataClient */
@@ -118,12 +120,15 @@ public function batchRunPivotReportsExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$transport->addResponse(null, $status);
$request = new BatchRunPivotReportsRequest();
try {
@@ -174,12 +179,15 @@ public function batchRunReportsExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$transport->addResponse(null, $status);
$request = new BatchRunReportsRequest();
try {
@@ -228,12 +236,15 @@ public function checkCompatibilityExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$transport->addResponse(null, $status);
$request = new CheckCompatibilityRequest();
try {
@@ -276,7 +287,7 @@ public function createAudienceExportTest()
$creationQuotaTokensCharged = 1232901266;
$rowCount = 1340416618;
$errorMessage = 'errorMessage-1938755376';
- $percentageCompleted = -1.29204764E8;
+ $percentageCompleted = -1.29204764e8;
$expectedResponse = new AudienceExport();
$expectedResponse->setName($name);
$expectedResponse->setAudience($audience);
@@ -299,9 +310,7 @@ public function createAudienceExportTest()
$audienceExport->setAudience($audienceExportAudience);
$audienceExportDimensions = [];
$audienceExport->setDimensions($audienceExportDimensions);
- $request = (new CreateAudienceExportRequest())
- ->setParent($formattedParent)
- ->setAudienceExport($audienceExport);
+ $request = (new CreateAudienceExportRequest())->setParent($formattedParent)->setAudienceExport($audienceExport);
$response = $gapicClient->createAudienceExport($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -359,12 +368,15 @@ public function createAudienceExportExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$operationsTransport->addResponse(null, $status);
// Mock request
$formattedParent = $gapicClient->propertyName('[PROPERTY]');
@@ -373,9 +385,7 @@ public function createAudienceExportExceptionTest()
$audienceExport->setAudience($audienceExportAudience);
$audienceExportDimensions = [];
$audienceExport->setDimensions($audienceExportDimensions);
- $request = (new CreateAudienceExportRequest())
- ->setParent($formattedParent)
- ->setAudienceExport($audienceExport);
+ $request = (new CreateAudienceExportRequest())->setParent($formattedParent)->setAudienceExport($audienceExport);
$response = $gapicClient->createAudienceExport($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -413,7 +423,7 @@ public function getAudienceExportTest()
$creationQuotaTokensCharged = 1232901266;
$rowCount = 1340416618;
$errorMessage = 'errorMessage-1938755376';
- $percentageCompleted = -1.29204764E8;
+ $percentageCompleted = -1.29204764e8;
$expectedResponse = new AudienceExport();
$expectedResponse->setName($name2);
$expectedResponse->setAudience($audience);
@@ -425,8 +435,7 @@ public function getAudienceExportTest()
$transport->addResponse($expectedResponse);
// Mock request
$formattedName = $gapicClient->audienceExportName('[PROPERTY]', '[AUDIENCE_EXPORT]');
- $request = (new GetAudienceExportRequest())
- ->setName($formattedName);
+ $request = (new GetAudienceExportRequest())->setName($formattedName);
$response = $gapicClient->getAudienceExport($request);
$this->assertEquals($expectedResponse, $response);
$actualRequests = $transport->popReceivedCalls();
@@ -450,17 +459,19 @@ public function getAudienceExportExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$transport->addResponse(null, $status);
// Mock request
$formattedName = $gapicClient->audienceExportName('[PROPERTY]', '[AUDIENCE_EXPORT]');
- $request = (new GetAudienceExportRequest())
- ->setName($formattedName);
+ $request = (new GetAudienceExportRequest())->setName($formattedName);
try {
$gapicClient->getAudienceExport($request);
// If the $gapicClient method call did not throw, fail the test
@@ -489,8 +500,7 @@ public function getMetadataTest()
$transport->addResponse($expectedResponse);
// Mock request
$formattedName = $gapicClient->metadataName('[PROPERTY]');
- $request = (new GetMetadataRequest())
- ->setName($formattedName);
+ $request = (new GetMetadataRequest())->setName($formattedName);
$response = $gapicClient->getMetadata($request);
$this->assertEquals($expectedResponse, $response);
$actualRequests = $transport->popReceivedCalls();
@@ -514,17 +524,19 @@ public function getMetadataExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$transport->addResponse(null, $status);
// Mock request
$formattedName = $gapicClient->metadataName('[PROPERTY]');
- $request = (new GetMetadataRequest())
- ->setName($formattedName);
+ $request = (new GetMetadataRequest())->setName($formattedName);
try {
$gapicClient->getMetadata($request);
// If the $gapicClient method call did not throw, fail the test
@@ -549,17 +561,14 @@ public function listAudienceExportsTest()
// Mock response
$nextPageToken = '';
$audienceExportsElement = new AudienceExport();
- $audienceExports = [
- $audienceExportsElement,
- ];
+ $audienceExports = [$audienceExportsElement];
$expectedResponse = new ListAudienceExportsResponse();
$expectedResponse->setNextPageToken($nextPageToken);
$expectedResponse->setAudienceExports($audienceExports);
$transport->addResponse($expectedResponse);
// Mock request
$formattedParent = $gapicClient->propertyName('[PROPERTY]');
- $request = (new ListAudienceExportsRequest())
- ->setParent($formattedParent);
+ $request = (new ListAudienceExportsRequest())->setParent($formattedParent);
$response = $gapicClient->listAudienceExports($request);
$this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
$resources = iterator_to_array($response->iterateAllElements());
@@ -586,17 +595,19 @@ public function listAudienceExportsExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$transport->addResponse(null, $status);
// Mock request
$formattedParent = $gapicClient->propertyName('[PROPERTY]');
- $request = (new ListAudienceExportsRequest())
- ->setParent($formattedParent);
+ $request = (new ListAudienceExportsRequest())->setParent($formattedParent);
try {
$gapicClient->listAudienceExports($request);
// If the $gapicClient method call did not throw, fail the test
@@ -625,8 +636,7 @@ public function queryAudienceExportTest()
$transport->addResponse($expectedResponse);
// Mock request
$name = 'name3373707';
- $request = (new QueryAudienceExportRequest())
- ->setName($name);
+ $request = (new QueryAudienceExportRequest())->setName($name);
$response = $gapicClient->queryAudienceExport($request);
$this->assertEquals($expectedResponse, $response);
$actualRequests = $transport->popReceivedCalls();
@@ -650,17 +660,19 @@ public function queryAudienceExportExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$transport->addResponse(null, $status);
// Mock request
$name = 'name3373707';
- $request = (new QueryAudienceExportRequest())
- ->setName($name);
+ $request = (new QueryAudienceExportRequest())->setName($name);
try {
$gapicClient->queryAudienceExport($request);
// If the $gapicClient method call did not throw, fail the test
@@ -709,12 +721,15 @@ public function runPivotReportExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$transport->addResponse(null, $status);
$request = new RunPivotReportRequest();
try {
@@ -767,12 +782,15 @@ public function runRealtimeReportExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$transport->addResponse(null, $status);
$request = new RunRealtimeReportRequest();
try {
@@ -825,12 +843,15 @@ public function runReportExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$transport->addResponse(null, $status);
$request = new RunReportRequest();
try {