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.ReportDefinition.Sort
Namespace
Google \ Ads \ AdManager \ V1 \ ReportDefinitionMethods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ field |
Field
Required. A field (dimension or metric) to sort by. |
↳ descending |
bool
Optional. The sort order. If true the sort will be descending. |
↳ slice |
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 |
Field|null |
|
hasField
clearField
setField
Required. A field (dimension or metric) to sort by.
| Parameter | |
|---|---|
| Name | Description |
var |
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 |
Slice|null |
|
hasSlice
clearSlice
setSlice
Optional. Use to sort on a specific slice of data.
| Parameter | |
|---|---|
| Name | Description |
var |
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 |
|