# Google Analytics Data V1beta Client - Class RunPivotReportResponse (0.24.0)

0.24.0 (latest) 0.23.3 0.22.3 0.21.1 0.20.1 0.19.0 0.18.0 0.17.1 0.16.4 0.14.0 0.13.0 0.12.0 0.11.2 0.10.1 0.9.5

> [!WARNING]
> **Beta**
>
>
> This library is covered by the [Pre-GA Offerings Terms](https://docs.cloud.google.com/terms/service-terms#1)
> of the Terms of Service. Pre-GA libraries might have limited support,
> and changes to pre-GA libraries might not be compatible with other pre-GA versions.
> For more information, see the
> [launch stage descriptions](https://docs.cloud.google.com/products#product-launch-stages).

Reference documentation and code samples for the Google Analytics Data V1beta Client class RunPivotReportResponse.

The response pivot report table corresponding to a pivot request.

Generated from protobuf message `google.analytics.data.v1beta.RunPivotReportResponse`

## Namespace

Google \\ Analytics \\ Data \\ V1beta

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ pivot_headers` | `array<https://docs.cloud.google.com/php/docs/reference/analytics-data/latest/V1beta.PivotHeader>` Summarizes the columns and rows created by a pivot. Each pivot in the request produces one header in the response. If we have a request like this: "pivots": \[{ "fieldNames": \["country", "city"\] }, { "fieldNames": "eventName" }\] We will have the following `pivotHeaders` in the response: "pivotHeaders" : \[{ "dimensionHeaders": \[{ "dimensionValues": \[ { "value": "United Kingdom" }, { "value": "London" } \] }, { "dimensionValues": \[ { "value": "Japan" }, { "value": "Osaka" } \] }\] }, { "dimensionHeaders": \[{ "dimensionValues": \[{ "value": "session_start" }\] }, { "dimensionValues": \[{ "value": "scroll" }\] }\] }\] |
| `↳ dimension_headers` | `array<https://docs.cloud.google.com/php/docs/reference/analytics-data/latest/V1beta.DimensionHeader>` Describes dimension columns. The number of DimensionHeaders and ordering of DimensionHeaders matches the dimensions present in rows. |
| `↳ metric_headers` | `array<https://docs.cloud.google.com/php/docs/reference/analytics-data/latest/V1beta.MetricHeader>` Describes metric columns. The number of MetricHeaders and ordering of MetricHeaders matches the metrics present in rows. |
| `↳ rows` | `array<https://docs.cloud.google.com/php/docs/reference/analytics-data/latest/V1beta.Row>` Rows of dimension value combinations and metric values in the report. |
| `↳ aggregates` | `array<https://docs.cloud.google.com/php/docs/reference/analytics-data/latest/V1beta.Row>` Aggregation of metric values. Can be totals, minimums, or maximums. The returned aggregations are controlled by the metric_aggregations in the pivot. The type of aggregation returned in each row is shown by the dimension_values which are set to "RESERVED_ |
| `↳ metadata` | `https://docs.cloud.google.com/php/docs/reference/analytics-data/latest/V1beta.ResponseMetaData` Metadata for the report. |
| `↳ property_quota` | `https://docs.cloud.google.com/php/docs/reference/analytics-data/latest/V1beta.PropertyQuota` This Google Analytics property's quota state including this request. |
| `↳ kind` | `string` Identifies what kind of resource this message is. This `kind` is always the fixed string "analyticsData#runPivotReport". Useful to distinguish between response types in JSON. |

### getPivotHeaders

Summarizes the columns and rows created by a pivot. Each pivot in the
request produces one header in the response. If we have a request like
this:
"pivots": \[{
"fieldNames": \["country",
"city"\]
},
{
"fieldNames": "eventName"
}\]
We will have the following `pivotHeaders` in the response:
"pivotHeaders" : \[{
"dimensionHeaders": \[{
"dimensionValues": \[
{ "value": "United Kingdom" },
{ "value": "London" }
\]
},
{
"dimensionValues": \[
{ "value": "Japan" },
{ "value": "Osaka" }
\]
}\]
},
{
"dimensionHeaders": \[{
"dimensionValues": \[{ "value": "session_start" }\]
},
{
"dimensionValues": \[{ "value": "scroll" }\]
}\]
}\]

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/analytics-data/latest/V1beta.PivotHeader>` |   |

### setPivotHeaders

Summarizes the columns and rows created by a pivot. Each pivot in the
request produces one header in the response. If we have a request like
this:
"pivots": \[{
"fieldNames": \["country",
"city"\]
},
{
"fieldNames": "eventName"
}\]
We will have the following `pivotHeaders` in the response:
"pivotHeaders" : \[{
"dimensionHeaders": \[{
"dimensionValues": \[
{ "value": "United Kingdom" },
{ "value": "London" }
\]
},
{
"dimensionValues": \[
{ "value": "Japan" },
{ "value": "Osaka" }
\]
}\]
},
{
"dimensionHeaders": \[{
"dimensionValues": \[{ "value": "session_start" }\]
},
{
"dimensionValues": \[{ "value": "scroll" }\]
}\]
}\]

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/analytics-data/latest/V1beta.PivotHeader>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getDimensionHeaders

Describes dimension columns. The number of DimensionHeaders and ordering of
DimensionHeaders matches the dimensions present in rows.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/analytics-data/latest/V1beta.DimensionHeader>` |   |

### setDimensionHeaders

Describes dimension columns. The number of DimensionHeaders and ordering of
DimensionHeaders matches the dimensions present in rows.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/analytics-data/latest/V1beta.DimensionHeader>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getMetricHeaders

Describes metric columns. The number of MetricHeaders and ordering of
MetricHeaders matches the metrics present in rows.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/analytics-data/latest/V1beta.MetricHeader>` |   |

### setMetricHeaders

Describes metric columns. The number of MetricHeaders and ordering of
MetricHeaders matches the metrics present in rows.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/analytics-data/latest/V1beta.MetricHeader>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getRows

Rows of dimension value combinations and metric values in the report.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/analytics-data/latest/V1beta.Row>` |   |

### setRows

Rows of dimension value combinations and metric values in the report.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/analytics-data/latest/V1beta.Row>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getAggregates

Aggregation of metric values. Can be totals, minimums, or maximums. The
returned aggregations are controlled by the metric_aggregations in the
pivot. The type of aggregation returned in each row is shown by the
dimension_values which are set to "RESERVED_


| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/analytics-data/latest/V1beta.Row>` |   |

### setAggregates

Aggregation of metric values. Can be totals, minimums, or maximums. The
returned aggregations are controlled by the metric_aggregations in the
pivot. The type of aggregation returned in each row is shown by the
dimension_values which are set to "RESERVED_


| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/analytics-data/latest/V1beta.Row>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getMetadata

Metadata for the report.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/analytics-data/latest/V1beta.ResponseMetaData|null` |   |

### hasMetadata

### clearMetadata

### setMetadata

Metadata for the report.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/analytics-data/latest/V1beta.ResponseMetaData` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getPropertyQuota

This Google Analytics property's quota state including this request.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/analytics-data/latest/V1beta.PropertyQuota|null` |   |

### hasPropertyQuota

### clearPropertyQuota

### setPropertyQuota

This Google Analytics property's quota state including this request.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/analytics-data/latest/V1beta.PropertyQuota` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getKind

Identifies what kind of resource this message is. This `kind` is always the
fixed string "analyticsData#runPivotReport". Useful to distinguish between
response types in JSON.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setKind

Identifies what kind of resource this message is. This `kind` is always the
fixed string "analyticsData#runPivotReport". Useful to distinguish between
response types in JSON.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |