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 |
|
---|
18 | namespace Google\Service\DisplayVideo\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\DisplayVideo\AdGroupAd;
|
---|
21 | use Google\Service\DisplayVideo\ListAdGroupAdsResponse;
|
---|
22 |
|
---|
23 | /**
|
---|
24 | * The "adGroupAds" collection of methods.
|
---|
25 | * Typical usage is:
|
---|
26 | * <code>
|
---|
27 | * $displayvideoService = new Google\Service\DisplayVideo(...);
|
---|
28 | * $adGroupAds = $displayvideoService->advertisers_adGroupAds;
|
---|
29 | * </code>
|
---|
30 | */
|
---|
31 | class AdvertisersAdGroupAds extends \Google\Service\Resource
|
---|
32 | {
|
---|
33 | /**
|
---|
34 | * Gets an ad group ad. (adGroupAds.get)
|
---|
35 | *
|
---|
36 | * @param string $advertiserId Required. The ID of the advertiser this ad group
|
---|
37 | * ad belongs to.
|
---|
38 | * @param string $adGroupAdId Required. The ID of the ad group ad to fetch.
|
---|
39 | * @param array $optParams Optional parameters.
|
---|
40 | * @return AdGroupAd
|
---|
41 | * @throws \Google\Service\Exception
|
---|
42 | */
|
---|
43 | public function get($advertiserId, $adGroupAdId, $optParams = [])
|
---|
44 | {
|
---|
45 | $params = ['advertiserId' => $advertiserId, 'adGroupAdId' => $adGroupAdId];
|
---|
46 | $params = array_merge($params, $optParams);
|
---|
47 | return $this->call('get', [$params], AdGroupAd::class);
|
---|
48 | }
|
---|
49 | /**
|
---|
50 | * Lists ad group ads. (adGroupAds.listAdvertisersAdGroupAds)
|
---|
51 | *
|
---|
52 | * @param string $advertiserId Required. The ID of the advertiser the ad groups
|
---|
53 | * belongs to.
|
---|
54 | * @param array $optParams Optional parameters.
|
---|
55 | *
|
---|
56 | * @opt_param string filter Optional. Allows filtering by custom ad group ad
|
---|
57 | * fields. Supported syntax: * Filter expressions are made up of one or more
|
---|
58 | * restrictions. * Restrictions can be combined by `AND` and `OR`. A sequence of
|
---|
59 | * restrictions implicitly uses `AND`. * A restriction has the form of `{field}
|
---|
60 | * {operator} {value}`. * All fields must use the `EQUALS (=)` operator.
|
---|
61 | * Supported fields: * `adGroupId` * `displayName` * `entityStatus` *
|
---|
62 | * `adGroupAdId` Examples: * All ad group ads under an ad group:
|
---|
63 | * `adGroupId="1234"` * All ad group ads under an ad group with an entityStatus
|
---|
64 | * of `ENTITY_STATUS_ACTIVE` or `ENTITY_STATUS_PAUSED`:
|
---|
65 | * `(entityStatus="ENTITY_STATUS_ACTIVE" OR entityStatus="ENTITY_STATUS_PAUSED")
|
---|
66 | * AND adGroupId="12345"` The length of this field should be no more than 500
|
---|
67 | * characters. Reference our [filter `LIST` requests](/display-
|
---|
68 | * video/api/guides/how-tos/filters) guide for more information.
|
---|
69 | * @opt_param string orderBy Optional. Field by which to sort the list.
|
---|
70 | * Acceptable values are: * `displayName` (default) * `entityStatus` The default
|
---|
71 | * sorting order is ascending. To specify descending order for a field, a suffix
|
---|
72 | * "desc" should be added to the field name. Example: `displayName desc`.
|
---|
73 | * @opt_param int pageSize Optional. Requested page size. Must be between `1`
|
---|
74 | * and `100`. If unspecified will default to `100`. Returns error code
|
---|
75 | * `INVALID_ARGUMENT` if an invalid value is specified.
|
---|
76 | * @opt_param string pageToken Optional. A token identifying a page of results
|
---|
77 | * the server should return. Typically, this is the value of next_page_token
|
---|
78 | * returned from the previous call to `ListAdGroupAds` method. If not specified,
|
---|
79 | * the first page of results will be returned.
|
---|
80 | * @return ListAdGroupAdsResponse
|
---|
81 | * @throws \Google\Service\Exception
|
---|
82 | */
|
---|
83 | public function listAdvertisersAdGroupAds($advertiserId, $optParams = [])
|
---|
84 | {
|
---|
85 | $params = ['advertiserId' => $advertiserId];
|
---|
86 | $params = array_merge($params, $optParams);
|
---|
87 | return $this->call('list', [$params], ListAdGroupAdsResponse::class);
|
---|
88 | }
|
---|
89 | }
|
---|
90 |
|
---|
91 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
92 | class_alias(AdvertisersAdGroupAds::class, 'Google_Service_DisplayVideo_Resource_AdvertisersAdGroupAds');
|
---|