source: vendor/google/apiclient-services/src/DisplayVideo/Resource/AdvertisersLocationLists.php

Last change on this file was e3d4e0a, checked in by Vlado 222039 <vlado.popovski@…>, 10 days ago

Upload project files

  • Property mode set to 100644
File size: 5.6 KB
Line 
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\ListLocationListsResponse;
21use Google\Service\DisplayVideo\LocationList;
22
23/**
24 * The "locationLists" collection of methods.
25 * Typical usage is:
26 * <code>
27 * $displayvideoService = new Google\Service\DisplayVideo(...);
28 * $locationLists = $displayvideoService->advertisers_locationLists;
29 * </code>
30 */
31class AdvertisersLocationLists extends \Google\Service\Resource
32{
33 /**
34 * Creates a new location list. Returns the newly created location list if
35 * successful. (locationLists.create)
36 *
37 * @param string $advertiserId Required. The ID of the DV360 advertiser to which
38 * the location list belongs.
39 * @param LocationList $postBody
40 * @param array $optParams Optional parameters.
41 * @return LocationList
42 * @throws \Google\Service\Exception
43 */
44 public function create($advertiserId, LocationList $postBody, $optParams = [])
45 {
46 $params = ['advertiserId' => $advertiserId, 'postBody' => $postBody];
47 $params = array_merge($params, $optParams);
48 return $this->call('create', [$params], LocationList::class);
49 }
50 /**
51 * Gets a location list. (locationLists.get)
52 *
53 * @param string $advertiserId Required. The ID of the DV360 advertiser to which
54 * the fetched location list belongs.
55 * @param string $locationListId Required. The ID of the location list to fetch.
56 * @param array $optParams Optional parameters.
57 * @return LocationList
58 * @throws \Google\Service\Exception
59 */
60 public function get($advertiserId, $locationListId, $optParams = [])
61 {
62 $params = ['advertiserId' => $advertiserId, 'locationListId' => $locationListId];
63 $params = array_merge($params, $optParams);
64 return $this->call('get', [$params], LocationList::class);
65 }
66 /**
67 * Lists location lists based on a given advertiser id.
68 * (locationLists.listAdvertisersLocationLists)
69 *
70 * @param string $advertiserId Required. The ID of the DV360 advertiser to which
71 * the fetched location lists belong.
72 * @param array $optParams Optional parameters.
73 *
74 * @opt_param string filter Allows filtering by location list fields. Supported
75 * syntax: * Filter expressions are made up of one or more restrictions. *
76 * Restrictions can be combined by `AND` or `OR` logical operators. A sequence
77 * of restrictions implicitly uses `AND`. * A restriction has the form of
78 * `{field} {operator} {value}`. * All fields must use the `EQUALS (=)`
79 * operator. Supported fields: * `locationType` Examples: * All regional
80 * location list: `locationType="TARGETING_LOCATION_TYPE_REGIONAL"` * All
81 * proximity location list: `locationType="TARGETING_LOCATION_TYPE_PROXIMITY"`
82 * The length of this field should be no more than 500 characters. Reference our
83 * [filter `LIST` requests](/display-video/api/guides/how-tos/filters) guide for
84 * more information.
85 * @opt_param string orderBy Field by which to sort the list. Acceptable values
86 * are: * `locationListId` (default) * `displayName` The default sorting order
87 * is ascending. To specify descending order for a field, a suffix "desc" should
88 * be added to the field name. Example: `displayName desc`.
89 * @opt_param int pageSize Requested page size. Must be between `1` and `200`.
90 * Defaults to `100` if not set. Returns error code `INVALID_ARGUMENT` if an
91 * invalid value is specified.
92 * @opt_param string pageToken A token identifying a page of results the server
93 * should return. Typically, this is the value of next_page_token returned from
94 * the previous call to `ListLocationLists` method. If not specified, the first
95 * page of results will be returned.
96 * @return ListLocationListsResponse
97 * @throws \Google\Service\Exception
98 */
99 public function listAdvertisersLocationLists($advertiserId, $optParams = [])
100 {
101 $params = ['advertiserId' => $advertiserId];
102 $params = array_merge($params, $optParams);
103 return $this->call('list', [$params], ListLocationListsResponse::class);
104 }
105 /**
106 * Updates a location list. Returns the updated location list if successful.
107 * (locationLists.patch)
108 *
109 * @param string $advertiserId Required. The ID of the DV360 advertiser to which
110 * the location lists belongs.
111 * @param string $locationListId Output only. The unique ID of the location
112 * list. Assigned by the system.
113 * @param LocationList $postBody
114 * @param array $optParams Optional parameters.
115 *
116 * @opt_param string updateMask Required. The mask to control which fields to
117 * update.
118 * @return LocationList
119 * @throws \Google\Service\Exception
120 */
121 public function patch($advertiserId, $locationListId, LocationList $postBody, $optParams = [])
122 {
123 $params = ['advertiserId' => $advertiserId, 'locationListId' => $locationListId, 'postBody' => $postBody];
124 $params = array_merge($params, $optParams);
125 return $this->call('patch', [$params], LocationList::class);
126 }
127}
128
129// Adding a class alias for backwards compatibility with the previous class name.
130class_alias(AdvertisersLocationLists::class, 'Google_Service_DisplayVideo_Resource_AdvertisersLocationLists');
Note: See TracBrowser for help on using the repository browser.