Class: Google::Apis::AnalyticsadminV1beta::GoogleAnalyticsAdminV1betaCustomMetric

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/analyticsadmin_v1beta/classes.rb,
lib/google/apis/analyticsadmin_v1beta/representations.rb,
lib/google/apis/analyticsadmin_v1beta/representations.rb

Overview

A definition for a custom metric.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleAnalyticsAdminV1betaCustomMetric

Returns a new instance of GoogleAnalyticsAdminV1betaCustomMetric.



1055
1056
1057
# File 'lib/google/apis/analyticsadmin_v1beta/classes.rb', line 1055

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)


1014
1015
1016
# File 'lib/google/apis/analyticsadmin_v1beta/classes.rb', line 1014

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)


1022
1023
1024
# File 'lib/google/apis/analyticsadmin_v1beta/classes.rb', line 1022

def display_name
  @display_name
end

#measurement_unitString

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

Returns:

  • (String)


1027
1028
1029
# File 'lib/google/apis/analyticsadmin_v1beta/classes.rb', line 1027

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)


1033
1034
1035
# File 'lib/google/apis/analyticsadmin_v1beta/classes.rb', line 1033

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)


1041
1042
1043
# File 'lib/google/apis/analyticsadmin_v1beta/classes.rb', line 1041

def parameter_name
  @parameter_name
end

#restricted_metric_typeArray<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

Returns:

  • (Array<String>)


1048
1049
1050
# File 'lib/google/apis/analyticsadmin_v1beta/classes.rb', line 1048

def restricted_metric_type
  @restricted_metric_type
end

#scopeString

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

Returns:

  • (String)


1053
1054
1055
# File 'lib/google/apis/analyticsadmin_v1beta/classes.rb', line 1053

def scope
  @scope
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1060
1061
1062
1063
1064
1065
1066
1067
1068
# File 'lib/google/apis/analyticsadmin_v1beta/classes.rb', line 1060

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