# Google Analytics Data V1alpha API - Class Google::Analytics::Data::V1alpha::RunPivotReportRequest (v0.8.3)

Reference documentation and code samples for the Google Analytics Data V1alpha API class Google::Analytics::Data::V1alpha::RunPivotReportRequest.

The request to generate a pivot report.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #cohort_spec

    def cohort_spec() -> ::Google::Analytics::Data::V1alpha::CohortSpec

**Returns**

- ([::Google::Analytics::Data::V1alpha::CohortSpec](https://docs.cloud.google.com/ruby/docs/reference/google-analytics-data-v1alpha/latest/Google-Analytics-Data-V1alpha-CohortSpec)) --- Cohort group associated with this request. If there is a cohort group in the request the 'cohort' dimension must be present.

### #cohort_spec=

    def cohort_spec=(value) -> ::Google::Analytics::Data::V1alpha::CohortSpec

**Parameter**

- **value** ([::Google::Analytics::Data::V1alpha::CohortSpec](https://docs.cloud.google.com/ruby/docs/reference/google-analytics-data-v1alpha/latest/Google-Analytics-Data-V1alpha-CohortSpec)) --- Cohort group associated with this request. If there is a cohort group in the request the 'cohort' dimension must be present.
**Returns**

- ([::Google::Analytics::Data::V1alpha::CohortSpec](https://docs.cloud.google.com/ruby/docs/reference/google-analytics-data-v1alpha/latest/Google-Analytics-Data-V1alpha-CohortSpec)) --- Cohort group associated with this request. If there is a cohort group in the request the 'cohort' dimension must be present.

### #currency_code

    def currency_code() -> ::String

**Returns**

- (::String) --- A currency code in ISO4217 format, such as "AED", "USD", "JPY". If the field is empty, the report uses the entity's default currency.

### #currency_code=

    def currency_code=(value) -> ::String

**Parameter**

- **value** (::String) --- A currency code in ISO4217 format, such as "AED", "USD", "JPY". If the field is empty, the report uses the entity's default currency.
**Returns**

- (::String) --- A currency code in ISO4217 format, such as "AED", "USD", "JPY". If the field is empty, the report uses the entity's default currency.

### #date_ranges

    def date_ranges() -> ::Array<::Google::Analytics::Data::V1alpha::DateRange>

**Returns**

- (::Array\<[::Google::Analytics::Data::V1alpha::DateRange](https://docs.cloud.google.com/ruby/docs/reference/google-analytics-data-v1alpha/latest/Google-Analytics-Data-V1alpha-DateRange)\>) --- The date range to retrieve event data for the report. If multiple date ranges are specified, event data from each date range is used in the report. A special dimension with field name "dateRange" can be included in a Pivot's field names; if included, the report compares between date ranges. In a cohort request, this `dateRanges` must be unspecified.

### #date_ranges=

    def date_ranges=(value) -> ::Array<::Google::Analytics::Data::V1alpha::DateRange>

**Parameter**

- **value** (::Array\<[::Google::Analytics::Data::V1alpha::DateRange](https://docs.cloud.google.com/ruby/docs/reference/google-analytics-data-v1alpha/latest/Google-Analytics-Data-V1alpha-DateRange)\>) --- The date range to retrieve event data for the report. If multiple date ranges are specified, event data from each date range is used in the report. A special dimension with field name "dateRange" can be included in a Pivot's field names; if included, the report compares between date ranges. In a cohort request, this `dateRanges` must be unspecified.
**Returns**

- (::Array\<[::Google::Analytics::Data::V1alpha::DateRange](https://docs.cloud.google.com/ruby/docs/reference/google-analytics-data-v1alpha/latest/Google-Analytics-Data-V1alpha-DateRange)\>) --- The date range to retrieve event data for the report. If multiple date ranges are specified, event data from each date range is used in the report. A special dimension with field name "dateRange" can be included in a Pivot's field names; if included, the report compares between date ranges. In a cohort request, this `dateRanges` must be unspecified.

### #dimension_filter

    def dimension_filter() -> ::Google::Analytics::Data::V1alpha::FilterExpression

**Returns**

- ([::Google::Analytics::Data::V1alpha::FilterExpression](https://docs.cloud.google.com/ruby/docs/reference/google-analytics-data-v1alpha/latest/Google-Analytics-Data-V1alpha-FilterExpression)) --- The filter clause of dimensions. Dimensions must be requested to be used in this filter. Metrics cannot be used in this filter.

### #dimension_filter=

    def dimension_filter=(value) -> ::Google::Analytics::Data::V1alpha::FilterExpression

**Parameter**

- **value** ([::Google::Analytics::Data::V1alpha::FilterExpression](https://docs.cloud.google.com/ruby/docs/reference/google-analytics-data-v1alpha/latest/Google-Analytics-Data-V1alpha-FilterExpression)) --- The filter clause of dimensions. Dimensions must be requested to be used in this filter. Metrics cannot be used in this filter.
**Returns**

- ([::Google::Analytics::Data::V1alpha::FilterExpression](https://docs.cloud.google.com/ruby/docs/reference/google-analytics-data-v1alpha/latest/Google-Analytics-Data-V1alpha-FilterExpression)) --- The filter clause of dimensions. Dimensions must be requested to be used in this filter. Metrics cannot be used in this filter.

### #dimensions

    def dimensions() -> ::Array<::Google::Analytics::Data::V1alpha::Dimension>

**Returns**

- (::Array\<[::Google::Analytics::Data::V1alpha::Dimension](https://docs.cloud.google.com/ruby/docs/reference/google-analytics-data-v1alpha/latest/Google-Analytics-Data-V1alpha-Dimension)\>) --- The dimensions requested. All defined dimensions must be used by one of the following: dimension_expression, dimension_filter, pivots, order_bys.

### #dimensions=

    def dimensions=(value) -> ::Array<::Google::Analytics::Data::V1alpha::Dimension>

**Parameter**

- **value** (::Array\<[::Google::Analytics::Data::V1alpha::Dimension](https://docs.cloud.google.com/ruby/docs/reference/google-analytics-data-v1alpha/latest/Google-Analytics-Data-V1alpha-Dimension)\>) --- The dimensions requested. All defined dimensions must be used by one of the following: dimension_expression, dimension_filter, pivots, order_bys.
**Returns**

- (::Array\<[::Google::Analytics::Data::V1alpha::Dimension](https://docs.cloud.google.com/ruby/docs/reference/google-analytics-data-v1alpha/latest/Google-Analytics-Data-V1alpha-Dimension)\>) --- The dimensions requested. All defined dimensions must be used by one of the following: dimension_expression, dimension_filter, pivots, order_bys.

### #entity

    def entity() -> ::Google::Analytics::Data::V1alpha::Entity

**Returns**

- ([::Google::Analytics::Data::V1alpha::Entity](https://docs.cloud.google.com/ruby/docs/reference/google-analytics-data-v1alpha/latest/Google-Analytics-Data-V1alpha-Entity)) --- A property whose events are tracked. Within a batch request, this entity should either be unspecified or consistent with the batch-level entity.

### #entity=

    def entity=(value) -> ::Google::Analytics::Data::V1alpha::Entity

**Parameter**

- **value** ([::Google::Analytics::Data::V1alpha::Entity](https://docs.cloud.google.com/ruby/docs/reference/google-analytics-data-v1alpha/latest/Google-Analytics-Data-V1alpha-Entity)) --- A property whose events are tracked. Within a batch request, this entity should either be unspecified or consistent with the batch-level entity.
**Returns**

- ([::Google::Analytics::Data::V1alpha::Entity](https://docs.cloud.google.com/ruby/docs/reference/google-analytics-data-v1alpha/latest/Google-Analytics-Data-V1alpha-Entity)) --- A property whose events are tracked. Within a batch request, this entity should either be unspecified or consistent with the batch-level entity.

### #keep_empty_rows

    def keep_empty_rows() -> ::Boolean

**Returns**

- (::Boolean) --- If false or unspecified, each row with all metrics equal to 0 will not be returned. If true, these rows will be returned if they are not separately removed by a filter.

### #keep_empty_rows=

    def keep_empty_rows=(value) -> ::Boolean

**Parameter**

- **value** (::Boolean) --- If false or unspecified, each row with all metrics equal to 0 will not be returned. If true, these rows will be returned if they are not separately removed by a filter.
**Returns**

- (::Boolean) --- If false or unspecified, each row with all metrics equal to 0 will not be returned. If true, these rows will be returned if they are not separately removed by a filter.

### #metric_filter

    def metric_filter() -> ::Google::Analytics::Data::V1alpha::FilterExpression

**Returns**

- ([::Google::Analytics::Data::V1alpha::FilterExpression](https://docs.cloud.google.com/ruby/docs/reference/google-analytics-data-v1alpha/latest/Google-Analytics-Data-V1alpha-FilterExpression)) --- The filter clause of metrics. Applied at post aggregation phase, similar to SQL having-clause. Metrics must be requested to be used in this filter. Dimensions cannot be used in this filter.

### #metric_filter=

    def metric_filter=(value) -> ::Google::Analytics::Data::V1alpha::FilterExpression

**Parameter**

- **value** ([::Google::Analytics::Data::V1alpha::FilterExpression](https://docs.cloud.google.com/ruby/docs/reference/google-analytics-data-v1alpha/latest/Google-Analytics-Data-V1alpha-FilterExpression)) --- The filter clause of metrics. Applied at post aggregation phase, similar to SQL having-clause. Metrics must be requested to be used in this filter. Dimensions cannot be used in this filter.
**Returns**

- ([::Google::Analytics::Data::V1alpha::FilterExpression](https://docs.cloud.google.com/ruby/docs/reference/google-analytics-data-v1alpha/latest/Google-Analytics-Data-V1alpha-FilterExpression)) --- The filter clause of metrics. Applied at post aggregation phase, similar to SQL having-clause. Metrics must be requested to be used in this filter. Dimensions cannot be used in this filter.

### #metrics

    def metrics() -> ::Array<::Google::Analytics::Data::V1alpha::Metric>

**Returns**

- (::Array\<[::Google::Analytics::Data::V1alpha::Metric](https://docs.cloud.google.com/ruby/docs/reference/google-analytics-data-v1alpha/latest/Google-Analytics-Data-V1alpha-Metric)\>) --- The metrics requested, at least one metric needs to be specified. All defined metrics must be used by one of the following: metric_expression, metric_filter, order_bys.

### #metrics=

    def metrics=(value) -> ::Array<::Google::Analytics::Data::V1alpha::Metric>

**Parameter**

- **value** (::Array\<[::Google::Analytics::Data::V1alpha::Metric](https://docs.cloud.google.com/ruby/docs/reference/google-analytics-data-v1alpha/latest/Google-Analytics-Data-V1alpha-Metric)\>) --- The metrics requested, at least one metric needs to be specified. All defined metrics must be used by one of the following: metric_expression, metric_filter, order_bys.
**Returns**

- (::Array\<[::Google::Analytics::Data::V1alpha::Metric](https://docs.cloud.google.com/ruby/docs/reference/google-analytics-data-v1alpha/latest/Google-Analytics-Data-V1alpha-Metric)\>) --- The metrics requested, at least one metric needs to be specified. All defined metrics must be used by one of the following: metric_expression, metric_filter, order_bys.

### #pivots

    def pivots() -> ::Array<::Google::Analytics::Data::V1alpha::Pivot>

**Returns**

- (::Array\<[::Google::Analytics::Data::V1alpha::Pivot](https://docs.cloud.google.com/ruby/docs/reference/google-analytics-data-v1alpha/latest/Google-Analytics-Data-V1alpha-Pivot)\>) --- Describes the visual format of the report's dimensions in columns or rows. The union of the fieldNames (dimension names) in all pivots must be a subset of dimension names defined in Dimensions. No two pivots can share a dimension. A dimension is only visible if it appears in a pivot.

### #pivots=

    def pivots=(value) -> ::Array<::Google::Analytics::Data::V1alpha::Pivot>

**Parameter**

- **value** (::Array\<[::Google::Analytics::Data::V1alpha::Pivot](https://docs.cloud.google.com/ruby/docs/reference/google-analytics-data-v1alpha/latest/Google-Analytics-Data-V1alpha-Pivot)\>) --- Describes the visual format of the report's dimensions in columns or rows. The union of the fieldNames (dimension names) in all pivots must be a subset of dimension names defined in Dimensions. No two pivots can share a dimension. A dimension is only visible if it appears in a pivot.
**Returns**

- (::Array\<[::Google::Analytics::Data::V1alpha::Pivot](https://docs.cloud.google.com/ruby/docs/reference/google-analytics-data-v1alpha/latest/Google-Analytics-Data-V1alpha-Pivot)\>) --- Describes the visual format of the report's dimensions in columns or rows. The union of the fieldNames (dimension names) in all pivots must be a subset of dimension names defined in Dimensions. No two pivots can share a dimension. A dimension is only visible if it appears in a pivot.

### #return_property_quota

    def return_property_quota() -> ::Boolean

**Returns**

- (::Boolean) --- Toggles whether to return the current state of this Analytics Property's quota. Quota is returned in [PropertyQuota](https://docs.cloud.google.com/ruby/docs/reference/google-analytics-data-v1alpha/latest/Google-Analytics-Data-V1alpha-RunPivotReportRequest#PropertyQuota).

### #return_property_quota=

    def return_property_quota=(value) -> ::Boolean

**Parameter**

- **value** (::Boolean) --- Toggles whether to return the current state of this Analytics Property's quota. Quota is returned in [PropertyQuota](https://docs.cloud.google.com/ruby/docs/reference/google-analytics-data-v1alpha/latest/Google-Analytics-Data-V1alpha-RunPivotReportRequest#PropertyQuota).
**Returns**

- (::Boolean) --- Toggles whether to return the current state of this Analytics Property's quota. Quota is returned in [PropertyQuota](https://docs.cloud.google.com/ruby/docs/reference/google-analytics-data-v1alpha/latest/Google-Analytics-Data-V1alpha-RunPivotReportRequest#PropertyQuota).