Fetches the requested labels and returns an iterator.
Specifies the ordering of the resulting entities.
Specifies the ordering of the resulting entities.
orderBy
parameter can have one of the following forms:
orderBy("Name")
- orders results by Name, in ascending order.orderBy("CampaignsCount ASC")
- orders results by the number of Campaigns this label is applied to, in ascending order.orderBy("AdGroupsCount DESC")
- orders results by the number of Ad Groups this label is applied to, in descending order.See LabelSelector.withCondition(String) for enumeration of columns that can be used.
orderBy()
may be called multiple times. Consider the following example:
selector = selector.orderBy("CampaignsCount DESC").orderBy("Name");
The results will be ordered by CampaignsCount in descending order. Results with equal CampaignsCount value will be ordered by Name in ascending order.
Specifies limit for the selector to use.
Specifies limit for the selector to use. For instance,
withLimit(50)
returns only the first 50 entities.
Fetches labels. Supports filtering and sorting.
Typical usage: