Class: Google::Apis::GmailpostmastertoolsV2::MetricDefinition
- Inherits:
-
Object
- Object
- Google::Apis::GmailpostmastertoolsV2::MetricDefinition
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/gmailpostmastertools_v2/classes.rb,
lib/google/apis/gmailpostmastertools_v2/representations.rb,
lib/google/apis/gmailpostmastertools_v2/representations.rb
Overview
Defines a specific metric to query, including a user-defined name, the base metric type, and optional filters.
Instance Attribute Summary collapse
-
#base_metric ⇒ Google::Apis::GmailpostmastertoolsV2::BaseMetric
Specifies the base metric to query, which can be a predefined standard metric or a user-defined custom metric (if supported in the future).
-
#filter ⇒ String
Optional.
-
#name ⇒ String
Required.
Instance Method Summary collapse
-
#initialize(**args) ⇒ MetricDefinition
constructor
A new instance of MetricDefinition.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ MetricDefinition
Returns a new instance of MetricDefinition.
519 520 521 |
# File 'lib/google/apis/gmailpostmastertools_v2/classes.rb', line 519 def initialize(**args) update!(**args) end |
Instance Attribute Details
#base_metric ⇒ Google::Apis::GmailpostmastertoolsV2::BaseMetric
Specifies the base metric to query, which can be a predefined standard metric
or a user-defined custom metric (if supported in the future).
Corresponds to the JSON property baseMetric
506 507 508 |
# File 'lib/google/apis/gmailpostmastertools_v2/classes.rb', line 506 def base_metric @base_metric end |
#filter ⇒ String
Optional. Optional filters to apply to the metric.
Corresponds to the JSON property filter
511 512 513 |
# File 'lib/google/apis/gmailpostmastertools_v2/classes.rb', line 511 def filter @filter end |
#name ⇒ String
Required. The user-defined name for this metric. This name will be used as the
key for this metric's value in the response.
Corresponds to the JSON property name
517 518 519 |
# File 'lib/google/apis/gmailpostmastertools_v2/classes.rb', line 517 def name @name end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
524 525 526 527 528 |
# File 'lib/google/apis/gmailpostmastertools_v2/classes.rb', line 524 def update!(**args) @base_metric = args[:base_metric] if args.key?(:base_metric) @filter = args[:filter] if args.key?(:filter) @name = args[:name] if args.key?(:name) end |