apiName = $apiName; } /** * @return string */ public function getApiName() { return $this->apiName; } /** * If reasons are specified, your access is blocked to this metric for this * property. API requests from you to this property for this metric will * succeed; however, the report will contain only zeros for this metric. API * requests with metric filters on blocked metrics will fail. If reasons are * empty, you have access to this metric. To learn more, see [Access and data- * restriction * management](https://support.google.com/analytics/answer/10851388). * * @param string[] $blockedReasons */ public function setBlockedReasons($blockedReasons) { $this->blockedReasons = $blockedReasons; } /** * @return string[] */ public function getBlockedReasons() { return $this->blockedReasons; } /** * The display name of the category that this metrics belongs to. Similar * dimensions and metrics are categorized together. * * @param string $category */ public function setCategory($category) { $this->category = $category; } /** * @return string */ public function getCategory() { return $this->category; } /** * True if the metric is a custom metric for this property. * * @param bool $customDefinition */ public function setCustomDefinition($customDefinition) { $this->customDefinition = $customDefinition; } /** * @return bool */ public function getCustomDefinition() { return $this->customDefinition; } /** * 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`. * * @param string[] $deprecatedApiNames */ public function setDeprecatedApiNames($deprecatedApiNames) { $this->deprecatedApiNames = $deprecatedApiNames; } /** * @return string[] */ public function getDeprecatedApiNames() { return $this->deprecatedApiNames; } /** * Description of how this metric is used and calculated. * * @param string $description */ public function setDescription($description) { $this->description = $description; } /** * @return string */ public function getDescription() { return $this->description; } /** * 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. * * @param string $expression */ public function setExpression($expression) { $this->expression = $expression; } /** * @return string */ public function getExpression() { return $this->expression; } /** * The type of this metric. * * Accepted values: METRIC_TYPE_UNSPECIFIED, TYPE_INTEGER, TYPE_FLOAT, * TYPE_SECONDS, TYPE_MILLISECONDS, TYPE_MINUTES, TYPE_HOURS, TYPE_STANDARD, * TYPE_CURRENCY, TYPE_FEET, TYPE_MILES, TYPE_METERS, TYPE_KILOMETERS * * @param self::TYPE_* $type */ public function setType($type) { $this->type = $type; } /** * @return self::TYPE_* */ public function getType() { return $this->type; } /** * This metric's name within the Google Analytics user interface. For example, * `Event count`. * * @param string $uiName */ public function setUiName($uiName) { $this->uiName = $uiName; } /** * @return string */ public function getUiName() { return $this->uiName; } } // Adding a class alias for backwards compatibility with the previous class name. class_alias(MetricMetadata::class, 'Google_Service_AnalyticsData_MetricMetadata');