Class: Google::Apis::AnalyticsdataV1beta::PivotSelection

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

Overview

A pair of dimension names and values. Rows with this dimension pivot pair are ordered by the metric's value. For example if pivots = "browser", "Chrome" and metric_name = "Sessions", then the rows will be sorted based on Sessions in Chrome. ---------|----------|----------------|----------|---------------- | Chrome | Chrome | Safari | Safari ---------|----------|----------------|------- ---|---------------- Country | Sessions | Pages/Sessions | Sessions | Pages/ Sessions ---------|----------|----------------|----------|---------------- US | 2 | 2 | 3 | 1 ---------|----------|----------------|----------|---------------

- Canada | 3 | 1 | 4 | 1 ---------|----------|----------------|----------|-----

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ PivotSelection

Returns a new instance of PivotSelection.



1653
1654
1655
# File 'lib/google/apis/analyticsdata_v1beta/classes.rb', line 1653

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

Instance Attribute Details

#dimension_nameString

Must be a dimension name from the request. Corresponds to the JSON property dimensionName

Returns:

  • (String)


1646
1647
1648
# File 'lib/google/apis/analyticsdata_v1beta/classes.rb', line 1646

def dimension_name
  @dimension_name
end

#dimension_valueString

Order by only when the named dimension is this value. Corresponds to the JSON property dimensionValue

Returns:

  • (String)


1651
1652
1653
# File 'lib/google/apis/analyticsdata_v1beta/classes.rb', line 1651

def dimension_value
  @dimension_value
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1658
1659
1660
1661
# File 'lib/google/apis/analyticsdata_v1beta/classes.rb', line 1658

def update!(**args)
  @dimension_name = args[:dimension_name] if args.key?(:dimension_name)
  @dimension_value = args[:dimension_value] if args.key?(:dimension_value)
end