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\RealTimeBidding\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\RealTimeBidding\CloseUserListRequest;
|
---|
21 | use Google\Service\RealTimeBidding\GetRemarketingTagResponse;
|
---|
22 | use Google\Service\RealTimeBidding\ListUserListsResponse;
|
---|
23 | use Google\Service\RealTimeBidding\OpenUserListRequest;
|
---|
24 | use Google\Service\RealTimeBidding\UserList;
|
---|
25 |
|
---|
26 | /**
|
---|
27 | * The "userLists" collection of methods.
|
---|
28 | * Typical usage is:
|
---|
29 | * <code>
|
---|
30 | * $realtimebiddingService = new Google\Service\RealTimeBidding(...);
|
---|
31 | * $userLists = $realtimebiddingService->buyers_userLists;
|
---|
32 | * </code>
|
---|
33 | */
|
---|
34 | class BuyersUserLists extends \Google\Service\Resource
|
---|
35 | {
|
---|
36 | /**
|
---|
37 | * Changes the status of a user list to CLOSED. This prevents new users from
|
---|
38 | * being added to the user list. (userLists.close)
|
---|
39 | *
|
---|
40 | * @param string $name Required. The name of the user list to close. See
|
---|
41 | * UserList.name
|
---|
42 | * @param CloseUserListRequest $postBody
|
---|
43 | * @param array $optParams Optional parameters.
|
---|
44 | * @return UserList
|
---|
45 | * @throws \Google\Service\Exception
|
---|
46 | */
|
---|
47 | public function close($name, CloseUserListRequest $postBody, $optParams = [])
|
---|
48 | {
|
---|
49 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
50 | $params = array_merge($params, $optParams);
|
---|
51 | return $this->call('close', [$params], UserList::class);
|
---|
52 | }
|
---|
53 | /**
|
---|
54 | * Creates a new user list. (userLists.create)
|
---|
55 | *
|
---|
56 | * @param string $parent Required. The name of the parent buyer of the user list
|
---|
57 | * to be retrieved, which must follow the pattern `buyers/{buyerAccountId}`,
|
---|
58 | * where `{buyerAccountId}` represents the account ID of the buyer who owns the
|
---|
59 | * user list. For a bidder accessing user lists on behalf of a child seat buyer,
|
---|
60 | * `{buyerAccountId}` should represent the account ID of the child seat buyer.
|
---|
61 | * @param UserList $postBody
|
---|
62 | * @param array $optParams Optional parameters.
|
---|
63 | * @return UserList
|
---|
64 | * @throws \Google\Service\Exception
|
---|
65 | */
|
---|
66 | public function create($parent, UserList $postBody, $optParams = [])
|
---|
67 | {
|
---|
68 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
69 | $params = array_merge($params, $optParams);
|
---|
70 | return $this->call('create', [$params], UserList::class);
|
---|
71 | }
|
---|
72 | /**
|
---|
73 | * Gets a user list by its name. (userLists.get)
|
---|
74 | *
|
---|
75 | * @param string $name Required. The name of the user list to be retrieved. See
|
---|
76 | * UserList.name.
|
---|
77 | * @param array $optParams Optional parameters.
|
---|
78 | * @return UserList
|
---|
79 | * @throws \Google\Service\Exception
|
---|
80 | */
|
---|
81 | public function get($name, $optParams = [])
|
---|
82 | {
|
---|
83 | $params = ['name' => $name];
|
---|
84 | $params = array_merge($params, $optParams);
|
---|
85 | return $this->call('get', [$params], UserList::class);
|
---|
86 | }
|
---|
87 | /**
|
---|
88 | * This has been sunset as of October 2023, and will return an error response if
|
---|
89 | * called. For more information, see the release notes:
|
---|
90 | * https://developers.google.com/authorized-buyers/apis/relnotes#real-time-
|
---|
91 | * bidding-api Gets remarketing tag for a buyer. A remarketing tag is a piece of
|
---|
92 | * JavaScript code that can be placed on a web page. When a user visits a page
|
---|
93 | * containing a remarketing tag, Google adds the user to a user list.
|
---|
94 | * (userLists.getRemarketingTag)
|
---|
95 | *
|
---|
96 | * @param string $name Required. To fetch the remarketing tag for an account,
|
---|
97 | * the name must follow the pattern `buyers/{accountId}`, where `{accountId}`
|
---|
98 | * represents the ID of the buyer that owns the remarketing tag. For a bidder
|
---|
99 | * accessing the remarketing tag on behalf of a child seat buyer, `{accountId}`
|
---|
100 | * should represent the ID of the child seat buyer. To fetch the remarketing tag
|
---|
101 | * for a specific user list, the name must follow the pattern
|
---|
102 | * `buyers/{accountId}/userLists/{userListId}`. See UserList.name.
|
---|
103 | * @param array $optParams Optional parameters.
|
---|
104 | * @return GetRemarketingTagResponse
|
---|
105 | * @throws \Google\Service\Exception
|
---|
106 | */
|
---|
107 | public function getRemarketingTag($name, $optParams = [])
|
---|
108 | {
|
---|
109 | $params = ['name' => $name];
|
---|
110 | $params = array_merge($params, $optParams);
|
---|
111 | return $this->call('getRemarketingTag', [$params], GetRemarketingTagResponse::class);
|
---|
112 | }
|
---|
113 | /**
|
---|
114 | * Lists the user lists visible to the current user.
|
---|
115 | * (userLists.listBuyersUserLists)
|
---|
116 | *
|
---|
117 | * @param string $parent Required. The name of the parent buyer for the user
|
---|
118 | * lists to be returned that must follow the pattern `buyers/{buyerAccountId}`,
|
---|
119 | * where `{buyerAccountId}` represents the account ID of the buyer who owns user
|
---|
120 | * lists. For a bidder accessing user lists on behalf of a child seat buyer ,
|
---|
121 | * `{buyerAccountId}` should represent the account ID of the child seat buyer.
|
---|
122 | * @param array $optParams Optional parameters.
|
---|
123 | *
|
---|
124 | * @opt_param int pageSize The number of results to return per page.
|
---|
125 | * @opt_param string pageToken Continuation page token as received from a
|
---|
126 | * previous response.
|
---|
127 | * @return ListUserListsResponse
|
---|
128 | * @throws \Google\Service\Exception
|
---|
129 | */
|
---|
130 | public function listBuyersUserLists($parent, $optParams = [])
|
---|
131 | {
|
---|
132 | $params = ['parent' => $parent];
|
---|
133 | $params = array_merge($params, $optParams);
|
---|
134 | return $this->call('list', [$params], ListUserListsResponse::class);
|
---|
135 | }
|
---|
136 | /**
|
---|
137 | * Changes the status of a user list to OPEN. This allows new users to be added
|
---|
138 | * to the user list. (userLists.open)
|
---|
139 | *
|
---|
140 | * @param string $name Required. The name of the user list to open. See
|
---|
141 | * UserList.name
|
---|
142 | * @param OpenUserListRequest $postBody
|
---|
143 | * @param array $optParams Optional parameters.
|
---|
144 | * @return UserList
|
---|
145 | * @throws \Google\Service\Exception
|
---|
146 | */
|
---|
147 | public function open($name, OpenUserListRequest $postBody, $optParams = [])
|
---|
148 | {
|
---|
149 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
150 | $params = array_merge($params, $optParams);
|
---|
151 | return $this->call('open', [$params], UserList::class);
|
---|
152 | }
|
---|
153 | /**
|
---|
154 | * Updates the given user list. Only user lists with URLRestrictions can be
|
---|
155 | * updated. (userLists.update)
|
---|
156 | *
|
---|
157 | * @param string $name Output only. Name of the user list that must follow the
|
---|
158 | * pattern `buyers/{buyer}/userLists/{user_list}`, where `{buyer}` represents
|
---|
159 | * the account ID of the buyer who owns the user list. For a bidder accessing
|
---|
160 | * user lists on behalf of a child seat buyer, `{buyer}` represents the account
|
---|
161 | * ID of the child seat buyer. `{user_list}` is an int64 identifier assigned by
|
---|
162 | * Google to uniquely identify a user list.
|
---|
163 | * @param UserList $postBody
|
---|
164 | * @param array $optParams Optional parameters.
|
---|
165 | * @return UserList
|
---|
166 | * @throws \Google\Service\Exception
|
---|
167 | */
|
---|
168 | public function update($name, UserList $postBody, $optParams = [])
|
---|
169 | {
|
---|
170 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
171 | $params = array_merge($params, $optParams);
|
---|
172 | return $this->call('update', [$params], UserList::class);
|
---|
173 | }
|
---|
174 | }
|
---|
175 |
|
---|
176 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
177 | class_alias(BuyersUserLists::class, 'Google_Service_RealTimeBidding_Resource_BuyersUserLists');
|
---|