1<?php
2/*
3 * Copyright 2014 Google Inc.
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6 * use this file except in compliance with the License. You may obtain a copy of
7 * the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14 * License for the specific language governing permissions and limitations under
15 * the License.
16 */
17
18namespace Google\Service\DisplayVideo\Resource;
19
20use Google\Service\DisplayVideo\CombinedAudience;
21use Google\Service\DisplayVideo\ListCombinedAudiencesResponse;
22
23/**
24 * The "combinedAudiences" collection of methods.
25 * Typical usage is:
26 *  <code>
27 *   $displayvideoService = new Google\Service\DisplayVideo(...);
28 *   $combinedAudiences = $displayvideoService->combinedAudiences;
29 *  </code>
30 */
31class CombinedAudiences extends \Google\Service\Resource
32{
33  /**
34   * Gets a combined audience. (combinedAudiences.get)
35   *
36   * @param string $combinedAudienceId Required. The ID of the combined audience
37   * to fetch.
38   * @param array $optParams Optional parameters.
39   *
40   * @opt_param string advertiserId The ID of the advertiser that has access to
41   * the fetched combined audience.
42   * @opt_param string partnerId The ID of the partner that has access to the
43   * fetched combined audience.
44   * @return CombinedAudience
45   */
46  public function get($combinedAudienceId, $optParams = [])
47  {
48    $params = ['combinedAudienceId' => $combinedAudienceId];
49    $params = array_merge($params, $optParams);
50    return $this->call('get', [$params], CombinedAudience::class);
51  }
52  /**
53   * Lists combined audiences. The order is defined by the order_by parameter.
54   * (combinedAudiences.listCombinedAudiences)
55   *
56   * @param array $optParams Optional parameters.
57   *
58   * @opt_param string advertiserId The ID of the advertiser that has access to
59   * the fetched combined audiences.
60   * @opt_param string filter Allows filtering by combined audience fields.
61   * Supported syntax: * Filter expressions for combined audiences currently can
62   * only contain at most one restriction. * A restriction has the form of
63   * `{field} {operator} {value}`. * The operator must be `CONTAINS (:)`. *
64   * Supported fields: - `displayName` Examples: * All combined audiences for
65   * which the display name contains "Google": `displayName : "Google"`. The
66   * length of this field should be no more than 500 characters.
67   * @opt_param string orderBy Field by which to sort the list. Acceptable values
68   * are: * `combinedAudienceId` (default) * `displayName` The default sorting
69   * order is ascending. To specify descending order for a field, a suffix "desc"
70   * should be added to the field name. Example: `displayName desc`.
71   * @opt_param int pageSize Requested page size. Must be between `1` and `100`.
72   * If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT`
73   * if an invalid value is specified.
74   * @opt_param string pageToken A token identifying a page of results the server
75   * should return. Typically, this is the value of next_page_token returned from
76   * the previous call to `ListCombinedAudiences` method. If not specified, the
77   * first page of results will be returned.
78   * @opt_param string partnerId The ID of the partner that has access to the
79   * fetched combined audiences.
80   * @return ListCombinedAudiencesResponse
81   */
82  public function listCombinedAudiences($optParams = [])
83  {
84    $params = [];
85    $params = array_merge($params, $optParams);
86    return $this->call('list', [$params], ListCombinedAudiencesResponse::class);
87  }
88}
89
90// Adding a class alias for backwards compatibility with the previous class name.
91class_alias(CombinedAudiences::class, 'Google_Service_DisplayVideo_Resource_CombinedAudiences');
92