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