Class: Google::Apis::AnalyticsreportingV4::MetricFilter

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/analyticsreporting_v4/classes.rb,
generated/google/apis/analyticsreporting_v4/representations.rb,
generated/google/apis/analyticsreporting_v4/representations.rb

Overview

MetricFilter specifies the filter on a metric.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ MetricFilter

Returns a new instance of MetricFilter.



1335
1336
1337
# File 'generated/google/apis/analyticsreporting_v4/classes.rb', line 1335

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#comparison_valueString

The value to compare against. Corresponds to the JSON property comparisonValue

Returns:

  • (String)


1326
1327
1328
# File 'generated/google/apis/analyticsreporting_v4/classes.rb', line 1326

def comparison_value
  @comparison_value
end

#metric_nameString

The metric that will be filtered on. A metricFilter must contain a metric name. A metric name can be an alias earlier defined as a metric or it can also be a metric expression. Corresponds to the JSON property metricName

Returns:

  • (String)


1313
1314
1315
# File 'generated/google/apis/analyticsreporting_v4/classes.rb', line 1313

def metric_name
  @metric_name
end

#notBoolean Also known as: not?

Logical NOT operator. If this boolean is set to true, then the matching metric values will be excluded in the report. The default is false. Corresponds to the JSON property not

Returns:

  • (Boolean)


1332
1333
1334
# File 'generated/google/apis/analyticsreporting_v4/classes.rb', line 1332

def not
  @not
end

#operatorString

Is the metric EQUAL, LESS_THAN or GREATER_THAN the comparisonValue, the default is EQUAL. If the operator is IS_MISSING, checks if the metric is missing and would ignore the comparisonValue. Corresponds to the JSON property operator

Returns:

  • (String)


1321
1322
1323
# File 'generated/google/apis/analyticsreporting_v4/classes.rb', line 1321

def operator
  @operator
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1340
1341
1342
1343
1344
1345
# File 'generated/google/apis/analyticsreporting_v4/classes.rb', line 1340

def update!(**args)
  @metric_name = args[:metric_name] if args.key?(:metric_name)
  @operator = args[:operator] if args.key?(:operator)
  @comparison_value = args[:comparison_value] if args.key?(:comparison_value)
  @not = args[:not] if args.key?(:not)
end