Class: Google::Apis::AnalyticsreportingV4::SegmentMetricFilter

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

Metric filter to be used in a segment filter clause.

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) ⇒ SegmentMetricFilter

Returns a new instance of SegmentMetricFilter



1328
1329
1330
# File 'generated/google/apis/analyticsreporting_v4/classes.rb', line 1328

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

Instance Attribute Details

#comparison_valueString

The value to compare against. If the operator is BETWEEN, this value is treated as minimum comparison value. Corresponds to the JSON property comparisonValue

Returns:

  • (String)


1301
1302
1303
# File 'generated/google/apis/analyticsreporting_v4/classes.rb', line 1301

def comparison_value
  @comparison_value
end

#max_comparison_valueString

Max comparison value is only used for BETWEEN operator. Corresponds to the JSON property maxComparisonValue

Returns:

  • (String)


1306
1307
1308
# File 'generated/google/apis/analyticsreporting_v4/classes.rb', line 1306

def max_comparison_value
  @max_comparison_value
end

#metric_nameString

The metric that will be filtered on. A metricFilter must contain a metric name. Corresponds to the JSON property metricName

Returns:

  • (String)


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

def metric_name
  @metric_name
end

#operatorString

Specifies is the operation to perform to compare the metric. The default is EQUAL. Corresponds to the JSON property operator

Returns:

  • (String)


1318
1319
1320
# File 'generated/google/apis/analyticsreporting_v4/classes.rb', line 1318

def operator
  @operator
end

#scopeString

Scope for a metric defines the level at which that metric is defined. The specified metric scope must be equal to or greater than its primary scope as defined in the data model. The primary scope is defined by if the segment is selecting users or sessions. Corresponds to the JSON property scope

Returns:

  • (String)


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

def scope
  @scope
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



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

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