0.15.1 (latest) 0.15.0 0.14.1 0.8.0 0.7.0 0.6.2 0.5.0 0.4.1 0.3.1 0.2.0 0.1.3 Reference documentation and code samples for the Google Ads Ad Manager V1 Client class Sort.

Represents a sorting in a report.

Generated from protobuf message `google.ads.admanager.v1.Report.Sort`

## Namespace

Google \\ Ads \\ AdManager \\ V1 \\ Report

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ field` | `https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.Report.Field` Required. A field (dimension or metric) to sort by. |
| `↳ descending` | `bool` Optional. The sort order. If true the sort will be descending. |
| `↳ slice` | `https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.Report.Slice` Optional. Use to sort on a specific slice of data. |
| `↳ time_period_index` | `int` Optional. When using time period columns, use this to sort on a specific column. |
| `↳ metric_value_type` | `int` Optional. Use to specify which metric value type to sort on. Defaults to PRIMARY. |

### getField

Required. A field (dimension or metric) to sort by.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.Report.Field|null` |   |

### hasField

### clearField

### setField

Required. A field (dimension or metric) to sort by.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.Report.Field` |

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

### getDescending

Optional. The sort order. If true the sort will be descending.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setDescending

Optional. The sort order. If true the sort will be descending.

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

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

### getSlice

Optional. Use to sort on a specific slice of data.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.Report.Slice|null` |   |

### hasSlice

### clearSlice

### setSlice

Optional. Use to sort on a specific slice of data.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.Report.Slice` |

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

### getTimePeriodIndex

Optional. When using time period columns, use this to sort on a specific
column.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### hasTimePeriodIndex

### clearTimePeriodIndex

### setTimePeriodIndex

Optional. When using time period columns, use this to sort on a specific
column.

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

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

### getMetricValueType

Optional. Use to specify which metric value type to sort on. Defaults to
PRIMARY.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### hasMetricValueType

### clearMetricValueType

### setMetricValueType

Optional. Use to specify which metric value type to sort on. Defaults to
PRIMARY.

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

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