Class: Google::Apis::AnalyticsadminV1alpha::GoogleAnalyticsAdminV1alphaCalculatedMetric
- Inherits:
-
Object
- Object
- Google::Apis::AnalyticsadminV1alpha::GoogleAnalyticsAdminV1alphaCalculatedMetric
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/analyticsadmin_v1alpha/classes.rb,
lib/google/apis/analyticsadmin_v1alpha/representations.rb,
lib/google/apis/analyticsadmin_v1alpha/representations.rb
Overview
A definition for a calculated metric.
Instance Attribute Summary collapse
-
#calculated_metric_id ⇒ String
Output only.
-
#description ⇒ String
Optional.
-
#display_name ⇒ String
Required.
-
#formula ⇒ String
Required.
-
#invalid_metric_reference ⇒ Boolean
(also: #invalid_metric_reference?)
Output only.
-
#metric_unit ⇒ String
Required.
-
#name ⇒ String
Output only.
-
#restricted_metric_type ⇒ Array<String>
Output only.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleAnalyticsAdminV1alphaCalculatedMetric
constructor
A new instance of GoogleAnalyticsAdminV1alphaCalculatedMetric.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleAnalyticsAdminV1alphaCalculatedMetric
Returns a new instance of GoogleAnalyticsAdminV1alphaCalculatedMetric.
1698 1699 1700 |
# File 'lib/google/apis/analyticsadmin_v1alpha/classes.rb', line 1698 def initialize(**args) update!(**args) end |
Instance Attribute Details
#calculated_metric_id ⇒ String
Output only. The ID to use for the calculated metric. In the UI, this is
referred to as the "API name." The calculated_metric_id is used when
referencing this calculated metric from external APIs. For example, "
calcMetric:calculated_metric_id
".
Corresponds to the JSON property calculatedMetricId
1650 1651 1652 |
# File 'lib/google/apis/analyticsadmin_v1alpha/classes.rb', line 1650 def calculated_metric_id @calculated_metric_id end |
#description ⇒ String
Optional. Description for this calculated metric. Max length of 4096
characters.
Corresponds to the JSON property description
1656 1657 1658 |
# File 'lib/google/apis/analyticsadmin_v1alpha/classes.rb', line 1656 def description @description end |
#display_name ⇒ String
Required. Display name for this calculated metric as shown in the Google
Analytics UI. Max length 82 characters.
Corresponds to the JSON property displayName
1662 1663 1664 |
# File 'lib/google/apis/analyticsadmin_v1alpha/classes.rb', line 1662 def display_name @display_name end |
#formula ⇒ String
Required. The calculated metric's definition. Maximum number of unique
referenced custom metrics is 5. Formulas supports the following operations: + (
addition), - (subtraction), - (negative), * (multiplication), / (division), ()
(parenthesis). Any valid real numbers are acceptable that fit in a Long (64bit
integer) or a Double (64 bit floating point number). Example formula: "(
customEvent:parameter_name + cartPurchaseQuantity ) / 2.0"
Corresponds to the JSON property formula
1672 1673 1674 |
# File 'lib/google/apis/analyticsadmin_v1alpha/classes.rb', line 1672 def formula @formula end |
#invalid_metric_reference ⇒ Boolean Also known as: invalid_metric_reference?
Output only. If true, this calculated metric has a invalid metric reference.
Anything using a calculated metric with invalid_metric_reference set to true
may fail, produce warnings, or produce unexpected results.
Corresponds to the JSON property invalidMetricReference
1679 1680 1681 |
# File 'lib/google/apis/analyticsadmin_v1alpha/classes.rb', line 1679 def invalid_metric_reference @invalid_metric_reference end |
#metric_unit ⇒ String
Required. The type for the calculated metric's value.
Corresponds to the JSON property metricUnit
1685 1686 1687 |
# File 'lib/google/apis/analyticsadmin_v1alpha/classes.rb', line 1685 def metric_unit @metric_unit end |
#name ⇒ String
Output only. Resource name for this CalculatedMetric. Format: 'properties/
property_id
/calculatedMetrics/calculated_metric_id
'
Corresponds to the JSON property name
1691 1692 1693 |
# File 'lib/google/apis/analyticsadmin_v1alpha/classes.rb', line 1691 def name @name end |
#restricted_metric_type ⇒ Array<String>
Output only. Types of restricted data that this metric contains.
Corresponds to the JSON property restrictedMetricType
1696 1697 1698 |
# File 'lib/google/apis/analyticsadmin_v1alpha/classes.rb', line 1696 def restricted_metric_type @restricted_metric_type end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 |
# File 'lib/google/apis/analyticsadmin_v1alpha/classes.rb', line 1703 def update!(**args) @calculated_metric_id = args[:calculated_metric_id] if args.key?(:calculated_metric_id) @description = args[:description] if args.key?(:description) @display_name = args[:display_name] if args.key?(:display_name) @formula = args[:formula] if args.key?(:formula) @invalid_metric_reference = args[:invalid_metric_reference] if args.key?(:invalid_metric_reference) @metric_unit = args[:metric_unit] if args.key?(:metric_unit) @name = args[:name] if args.key?(:name) @restricted_metric_type = args[:restricted_metric_type] if args.key?(:restricted_metric_type) end |