Class: Google::Apis::AnalyticsdataV1alpha::MetricMetadata
- Inherits:
-
Object
- Object
- Google::Apis::AnalyticsdataV1alpha::MetricMetadata
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/analyticsdata_v1alpha/classes.rb,
generated/google/apis/analyticsdata_v1alpha/representations.rb,
generated/google/apis/analyticsdata_v1alpha/representations.rb
Overview
Explains a metric.
Instance Attribute Summary collapse
-
#api_name ⇒ String
A metric name.
-
#custom_definition ⇒ Boolean
(also: #custom_definition?)
True if the metric is a custom metric for this property.
-
#deprecated_api_names ⇒ Array<String>
Still usable but deprecated names for this metric.
-
#description ⇒ String
Description of how this metric is used and calculated.
-
#expression ⇒ String
The mathematical expression for this derived metric.
-
#type ⇒ String
The type of this metric.
-
#ui_name ⇒ String
This metric's name within the Google Analytics user interface.
Instance Method Summary collapse
-
#initialize(**args) ⇒ MetricMetadata
constructor
A new instance of MetricMetadata.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ MetricMetadata
Returns a new instance of MetricMetadata.
872 873 874 |
# File 'generated/google/apis/analyticsdata_v1alpha/classes.rb', line 872 def initialize(**args) update!(**args) end |
Instance Attribute Details
#api_name ⇒ String
A metric name. Useable in Metric's name
. For example, eventCount
.
Corresponds to the JSON property apiName
833 834 835 |
# File 'generated/google/apis/analyticsdata_v1alpha/classes.rb', line 833 def api_name @api_name end |
#custom_definition ⇒ Boolean Also known as: custom_definition?
True if the metric is a custom metric for this property.
Corresponds to the JSON property customDefinition
838 839 840 |
# File 'generated/google/apis/analyticsdata_v1alpha/classes.rb', line 838 def custom_definition @custom_definition end |
#deprecated_api_names ⇒ Array<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
847 848 849 |
# File 'generated/google/apis/analyticsdata_v1alpha/classes.rb', line 847 def deprecated_api_names @deprecated_api_names end |
#description ⇒ String
Description of how this metric is used and calculated.
Corresponds to the JSON property description
852 853 854 |
# File 'generated/google/apis/analyticsdata_v1alpha/classes.rb', line 852 def description @description end |
#expression ⇒ String
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
859 860 861 |
# File 'generated/google/apis/analyticsdata_v1alpha/classes.rb', line 859 def expression @expression end |
#type ⇒ String
The type of this metric.
Corresponds to the JSON property type
864 865 866 |
# File 'generated/google/apis/analyticsdata_v1alpha/classes.rb', line 864 def type @type end |
#ui_name ⇒ String
This metric's name within the Google Analytics user interface. For example,
Event count
.
Corresponds to the JSON property uiName
870 871 872 |
# File 'generated/google/apis/analyticsdata_v1alpha/classes.rb', line 870 def ui_name @ui_name end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
877 878 879 880 881 882 883 884 885 |
# File 'generated/google/apis/analyticsdata_v1alpha/classes.rb', line 877 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 |