Class: Google::Apis::AnalyticsdataV1beta::MetricMetadata

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

Overview

Explains a metric.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ MetricMetadata

Returns a new instance of MetricMetadata.



1167
1168
1169
# File 'lib/google/apis/analyticsdata_v1beta/classes.rb', line 1167

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

Instance Attribute Details

#api_nameString

A metric name. Useable in Metric's name. For example, eventCount . Corresponds to the JSON property apiName

Returns:

  • (String)


1112
1113
1114
# File 'lib/google/apis/analyticsdata_v1beta/classes.rb', line 1112

def api_name
  @api_name
end

#blocked_reasonsArray<String>

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. Corresponds to the JSON property blockedReasons

Returns:

  • (Array<String>)


1122
1123
1124
# File 'lib/google/apis/analyticsdata_v1beta/classes.rb', line 1122

def blocked_reasons
  @blocked_reasons
end

#categoryString

The display name of the category that this metrics belongs to. Similar dimensions and metrics are categorized together. Corresponds to the JSON property category

Returns:

  • (String)


1128
1129
1130
# File 'lib/google/apis/analyticsdata_v1beta/classes.rb', line 1128

def category
  @category
end

#custom_definitionBoolean Also known as: custom_definition?

True if the metric is a custom metric for this property. Corresponds to the JSON property customDefinition

Returns:

  • (Boolean)


1133
1134
1135
# File 'lib/google/apis/analyticsdata_v1beta/classes.rb', line 1133

def custom_definition
  @custom_definition
end

#deprecated_api_namesArray<String>

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. Corresponds to the JSON property deprecatedApiNames

Returns:

  • (Array<String>)


1142
1143
1144
# File 'lib/google/apis/analyticsdata_v1beta/classes.rb', line 1142

def deprecated_api_names
  @deprecated_api_names
end

#descriptionString

Description of how this metric is used and calculated. Corresponds to the JSON property description

Returns:

  • (String)


1147
1148
1149
# File 'lib/google/apis/analyticsdata_v1beta/classes.rb', line 1147

def description
  @description
end

#expressionString

The mathematical expression for this derived metric. Can be used in Metric's expression field for equivalent reports. Most metrics are not expressions, and for non-expressions, this field is empty. Corresponds to the JSON property expression

Returns:

  • (String)


1154
1155
1156
# File 'lib/google/apis/analyticsdata_v1beta/classes.rb', line 1154

def expression
  @expression
end

#typeString

The type of this metric. Corresponds to the JSON property type

Returns:

  • (String)


1159
1160
1161
# File 'lib/google/apis/analyticsdata_v1beta/classes.rb', line 1159

def type
  @type
end

#ui_nameString

This metric's name within the Google Analytics user interface. For example, Event count. Corresponds to the JSON property uiName

Returns:

  • (String)


1165
1166
1167
# File 'lib/google/apis/analyticsdata_v1beta/classes.rb', line 1165

def ui_name
  @ui_name
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
# File 'lib/google/apis/analyticsdata_v1beta/classes.rb', line 1172

def update!(**args)
  @api_name = args[:api_name] if args.key?(:api_name)
  @blocked_reasons = args[:blocked_reasons] if args.key?(:blocked_reasons)
  @category = args[:category] if args.key?(:category)
  @custom_definition = args[:custom_definition] if args.key?(:custom_definition)
  @deprecated_api_names = args[:deprecated_api_names] if args.key?(:deprecated_api_names)
  @description = args[:description] if args.key?(:description)
  @expression = args[:expression] if args.key?(:expression)
  @type = args[:type] if args.key?(:type)
  @ui_name = args[:ui_name] if args.key?(:ui_name)
end