Class: Google::Apis::AnalyticsadminV1alpha::GoogleAnalyticsAdminV1alphaCustomMetric
- Inherits:
-
Object
- Object
- Google::Apis::AnalyticsadminV1alpha::GoogleAnalyticsAdminV1alphaCustomMetric
- 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 custom metric.
Instance Attribute Summary collapse
-
#description ⇒ String
Optional.
-
#display_name ⇒ String
Required.
-
#measurement_unit ⇒ String
Required.
-
#name ⇒ String
Output only.
-
#parameter_name ⇒ String
Required.
-
#restricted_metric_type ⇒ Array<String>
Optional.
-
#scope ⇒ String
Required.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleAnalyticsAdminV1alphaCustomMetric
constructor
A new instance of GoogleAnalyticsAdminV1alphaCustomMetric.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleAnalyticsAdminV1alphaCustomMetric
Returns a new instance of GoogleAnalyticsAdminV1alphaCustomMetric.
2645 2646 2647 |
# File 'lib/google/apis/analyticsadmin_v1alpha/classes.rb', line 2645 def initialize(**args) update!(**args) end |
Instance Attribute Details
#description ⇒ String
Optional. Description for this custom dimension. Max length of 150 characters.
Corresponds to the JSON property description
2604 2605 2606 |
# File 'lib/google/apis/analyticsadmin_v1alpha/classes.rb', line 2604 def description @description end |
#display_name ⇒ String
Required. Display name for this custom metric as shown in the Analytics UI.
Max length of 82 characters, alphanumeric plus space and underscore starting
with a letter. Legacy system-generated display names may contain square
brackets, but updates to this field will never permit square brackets.
Corresponds to the JSON property displayName
2612 2613 2614 |
# File 'lib/google/apis/analyticsadmin_v1alpha/classes.rb', line 2612 def display_name @display_name end |
#measurement_unit ⇒ String
Required. The type for the custom metric's value.
Corresponds to the JSON property measurementUnit
2617 2618 2619 |
# File 'lib/google/apis/analyticsadmin_v1alpha/classes.rb', line 2617 def measurement_unit @measurement_unit end |
#name ⇒ String
Output only. Resource name for this CustomMetric resource. Format: properties/
property
/customMetrics/customMetric
Corresponds to the JSON property name
2623 2624 2625 |
# File 'lib/google/apis/analyticsadmin_v1alpha/classes.rb', line 2623 def name @name end |
#parameter_name ⇒ String
Required. Immutable. Tagging name for this custom metric. If this is an event-
scoped metric, then this is the event parameter name. May only contain
alphanumeric and underscore charactes, starting with a letter. Max length of
40 characters for event-scoped metrics.
Corresponds to the JSON property parameterName
2631 2632 2633 |
# File 'lib/google/apis/analyticsadmin_v1alpha/classes.rb', line 2631 def parameter_name @parameter_name end |
#restricted_metric_type ⇒ Array<String>
Optional. Types of restricted data that this metric may contain. Required for
metrics with CURRENCY measurement unit. Must be empty for metrics with a non-
CURRENCY measurement unit.
Corresponds to the JSON property restrictedMetricType
2638 2639 2640 |
# File 'lib/google/apis/analyticsadmin_v1alpha/classes.rb', line 2638 def restricted_metric_type @restricted_metric_type end |
#scope ⇒ String
Required. Immutable. The scope of this custom metric.
Corresponds to the JSON property scope
2643 2644 2645 |
# File 'lib/google/apis/analyticsadmin_v1alpha/classes.rb', line 2643 def scope @scope end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2650 2651 2652 2653 2654 2655 2656 2657 2658 |
# File 'lib/google/apis/analyticsadmin_v1alpha/classes.rb', line 2650 def update!(**args) @description = args[:description] if args.key?(:description) @display_name = args[:display_name] if args.key?(:display_name) @measurement_unit = args[:measurement_unit] if args.key?(:measurement_unit) @name = args[:name] if args.key?(:name) @parameter_name = args[:parameter_name] if args.key?(:parameter_name) @restricted_metric_type = args[:restricted_metric_type] if args.key?(:restricted_metric_type) @scope = args[:scope] if args.key?(:scope) end |