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.



675
676
677
# File 'lib/google/apis/gmailpostmastertools_v2/classes.rb', line 675

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



662
663
664
# File 'lib/google/apis/gmailpostmastertools_v2/classes.rb', line 662

def base_metric
  @base_metric
end

#filterString

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

Returns:

  • (String)


667
668
669
# File 'lib/google/apis/gmailpostmastertools_v2/classes.rb', line 667

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)


673
674
675
# File 'lib/google/apis/gmailpostmastertools_v2/classes.rb', line 673

def name
  @name
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



680
681
682
683
684
# File 'lib/google/apis/gmailpostmastertools_v2/classes.rb', line 680

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