class Google::Apis::AnalyticsdataV1alpha::MetricMetadata

Explains a metric.

Attributes

api_name[RW]

A metric name. Useable in [Metric](#Metric)'s `name`. For example, `eventCount` . Corresponds to the JSON property `apiName` @return [String]

custom_definition[RW]

True if the metric is a custom metric for this property. Corresponds to the JSON property `customDefinition` @return [Boolean]

custom_definition?[RW]

True if the metric is a custom metric for this property. Corresponds to the JSON property `customDefinition` @return [Boolean]

deprecated_api_names[RW]

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` @return [Array<String>]

description[RW]

Description of how this metric is used and calculated. Corresponds to the JSON property `description` @return [String]

expression[RW]

The mathematical expression for this derived metric. Can be used in [Metric](# 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` @return [String]

type[RW]

The type of this metric. Corresponds to the JSON property `type` @return [String]

ui_name[RW]

This metric's name within the Google Analytics user interface. For example, ` Event count`. Corresponds to the JSON property `uiName` @return [String]

Public Class Methods

new(**args) click to toggle source
# File lib/google/apis/analyticsdata_v1alpha/classes.rb, line 879
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File lib/google/apis/analyticsdata_v1alpha/classes.rb, line 884
def update!(**args)
  @api_name = args[:api_name] if args.key?(:api_name)
  @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