Class: Google::Apis::GmailpostmastertoolsV2::MetricDefinition

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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_metricGoogle::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

#filterString

Optional. Optional filters to apply to the metric. Corresponds to the JSON property filter

Returns:

  • (String)


511
512
513
# File 'lib/google/apis/gmailpostmastertools_v2/classes.rb', line 511

def filter
  @filter
end

#nameString

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

Returns:

  • (String)


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