Class: Google::Apis::AnalyticsadminV1alpha::GoogleAnalyticsAdminV1alphaCustomMetric

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleAnalyticsAdminV1alphaCustomMetric

Returns a new instance of GoogleAnalyticsAdminV1alphaCustomMetric.



772
773
774
# File 'lib/google/apis/analyticsadmin_v1alpha/classes.rb', line 772

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#descriptionString

Optional. Description for this custom dimension. Max length of 150 characters. Corresponds to the JSON property description

Returns:

  • (String)


738
739
740
# File 'lib/google/apis/analyticsadmin_v1alpha/classes.rb', line 738

def description
  @description
end

#display_nameString

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

Returns:

  • (String)


746
747
748
# File 'lib/google/apis/analyticsadmin_v1alpha/classes.rb', line 746

def display_name
  @display_name
end

#measurement_unitString

Required. Immutable. The type for the custom metric's value. Corresponds to the JSON property measurementUnit

Returns:

  • (String)


751
752
753
# File 'lib/google/apis/analyticsadmin_v1alpha/classes.rb', line 751

def measurement_unit
  @measurement_unit
end

#nameString

Output only. Resource name for this CustomMetric resource. Format: properties/ property/customMetrics/customMetric Corresponds to the JSON property name

Returns:

  • (String)


757
758
759
# File 'lib/google/apis/analyticsadmin_v1alpha/classes.rb', line 757

def name
  @name
end

#parameter_nameString

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

Returns:

  • (String)


765
766
767
# File 'lib/google/apis/analyticsadmin_v1alpha/classes.rb', line 765

def parameter_name
  @parameter_name
end

#scopeString

Required. Immutable. The scope of this custom metric. Corresponds to the JSON property scope

Returns:

  • (String)


770
771
772
# File 'lib/google/apis/analyticsadmin_v1alpha/classes.rb', line 770

def scope
  @scope
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



777
778
779
780
781
782
783
784
# File 'lib/google/apis/analyticsadmin_v1alpha/classes.rb', line 777

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)
  @scope = args[:scope] if args.key?(:scope)
end