[e3d4e0a] | 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\ActivatePretargetingConfigRequest;
|
---|
| 21 | use Google\Service\RealTimeBidding\AddTargetedAppsRequest;
|
---|
| 22 | use Google\Service\RealTimeBidding\AddTargetedPublishersRequest;
|
---|
| 23 | use Google\Service\RealTimeBidding\AddTargetedSitesRequest;
|
---|
| 24 | use Google\Service\RealTimeBidding\ListPretargetingConfigsResponse;
|
---|
| 25 | use Google\Service\RealTimeBidding\PretargetingConfig;
|
---|
| 26 | use Google\Service\RealTimeBidding\RealtimebiddingEmpty;
|
---|
| 27 | use Google\Service\RealTimeBidding\RemoveTargetedAppsRequest;
|
---|
| 28 | use Google\Service\RealTimeBidding\RemoveTargetedPublishersRequest;
|
---|
| 29 | use Google\Service\RealTimeBidding\RemoveTargetedSitesRequest;
|
---|
| 30 | use Google\Service\RealTimeBidding\SuspendPretargetingConfigRequest;
|
---|
| 31 |
|
---|
| 32 | /**
|
---|
| 33 | * The "pretargetingConfigs" collection of methods.
|
---|
| 34 | * Typical usage is:
|
---|
| 35 | * <code>
|
---|
| 36 | * $realtimebiddingService = new Google\Service\RealTimeBidding(...);
|
---|
| 37 | * $pretargetingConfigs = $realtimebiddingService->bidders_pretargetingConfigs;
|
---|
| 38 | * </code>
|
---|
| 39 | */
|
---|
| 40 | class BiddersPretargetingConfigs extends \Google\Service\Resource
|
---|
| 41 | {
|
---|
| 42 | /**
|
---|
| 43 | * Activates a pretargeting configuration. (pretargetingConfigs.activate)
|
---|
| 44 | *
|
---|
| 45 | * @param string $name Required. The name of the pretargeting configuration.
|
---|
| 46 | * Format: bidders/{bidderAccountId}/pretargetingConfig/{configId}
|
---|
| 47 | * @param ActivatePretargetingConfigRequest $postBody
|
---|
| 48 | * @param array $optParams Optional parameters.
|
---|
| 49 | * @return PretargetingConfig
|
---|
| 50 | * @throws \Google\Service\Exception
|
---|
| 51 | */
|
---|
| 52 | public function activate($name, ActivatePretargetingConfigRequest $postBody, $optParams = [])
|
---|
| 53 | {
|
---|
| 54 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
| 55 | $params = array_merge($params, $optParams);
|
---|
| 56 | return $this->call('activate', [$params], PretargetingConfig::class);
|
---|
| 57 | }
|
---|
| 58 | /**
|
---|
| 59 | * Adds targeted apps to the pretargeting configuration.
|
---|
| 60 | * (pretargetingConfigs.addTargetedApps)
|
---|
| 61 | *
|
---|
| 62 | * @param string $pretargetingConfig Required. The name of the pretargeting
|
---|
| 63 | * configuration. Format:
|
---|
| 64 | * bidders/{bidderAccountId}/pretargetingConfig/{configId}
|
---|
| 65 | * @param AddTargetedAppsRequest $postBody
|
---|
| 66 | * @param array $optParams Optional parameters.
|
---|
| 67 | * @return PretargetingConfig
|
---|
| 68 | * @throws \Google\Service\Exception
|
---|
| 69 | */
|
---|
| 70 | public function addTargetedApps($pretargetingConfig, AddTargetedAppsRequest $postBody, $optParams = [])
|
---|
| 71 | {
|
---|
| 72 | $params = ['pretargetingConfig' => $pretargetingConfig, 'postBody' => $postBody];
|
---|
| 73 | $params = array_merge($params, $optParams);
|
---|
| 74 | return $this->call('addTargetedApps', [$params], PretargetingConfig::class);
|
---|
| 75 | }
|
---|
| 76 | /**
|
---|
| 77 | * Adds targeted publishers to the pretargeting config.
|
---|
| 78 | * (pretargetingConfigs.addTargetedPublishers)
|
---|
| 79 | *
|
---|
| 80 | * @param string $pretargetingConfig Required. The name of the pretargeting
|
---|
| 81 | * configuration. Format:
|
---|
| 82 | * bidders/{bidderAccountId}/pretargetingConfig/{configId}
|
---|
| 83 | * @param AddTargetedPublishersRequest $postBody
|
---|
| 84 | * @param array $optParams Optional parameters.
|
---|
| 85 | * @return PretargetingConfig
|
---|
| 86 | * @throws \Google\Service\Exception
|
---|
| 87 | */
|
---|
| 88 | public function addTargetedPublishers($pretargetingConfig, AddTargetedPublishersRequest $postBody, $optParams = [])
|
---|
| 89 | {
|
---|
| 90 | $params = ['pretargetingConfig' => $pretargetingConfig, 'postBody' => $postBody];
|
---|
| 91 | $params = array_merge($params, $optParams);
|
---|
| 92 | return $this->call('addTargetedPublishers', [$params], PretargetingConfig::class);
|
---|
| 93 | }
|
---|
| 94 | /**
|
---|
| 95 | * Adds targeted sites to the pretargeting configuration.
|
---|
| 96 | * (pretargetingConfigs.addTargetedSites)
|
---|
| 97 | *
|
---|
| 98 | * @param string $pretargetingConfig Required. The name of the pretargeting
|
---|
| 99 | * configuration. Format:
|
---|
| 100 | * bidders/{bidderAccountId}/pretargetingConfig/{configId}
|
---|
| 101 | * @param AddTargetedSitesRequest $postBody
|
---|
| 102 | * @param array $optParams Optional parameters.
|
---|
| 103 | * @return PretargetingConfig
|
---|
| 104 | * @throws \Google\Service\Exception
|
---|
| 105 | */
|
---|
| 106 | public function addTargetedSites($pretargetingConfig, AddTargetedSitesRequest $postBody, $optParams = [])
|
---|
| 107 | {
|
---|
| 108 | $params = ['pretargetingConfig' => $pretargetingConfig, 'postBody' => $postBody];
|
---|
| 109 | $params = array_merge($params, $optParams);
|
---|
| 110 | return $this->call('addTargetedSites', [$params], PretargetingConfig::class);
|
---|
| 111 | }
|
---|
| 112 | /**
|
---|
| 113 | * Creates a pretargeting configuration. A pretargeting configuration's state
|
---|
| 114 | * (PretargetingConfig.state) is active upon creation, and it will start to
|
---|
| 115 | * affect traffic shortly after. A bidder may create a maximum of 10
|
---|
| 116 | * pretargeting configurations. Attempts to exceed this maximum results in a 400
|
---|
| 117 | * bad request error. (pretargetingConfigs.create)
|
---|
| 118 | *
|
---|
| 119 | * @param string $parent Required. Name of the bidder to create the pretargeting
|
---|
| 120 | * configuration for. Format: bidders/{bidderAccountId}
|
---|
| 121 | * @param PretargetingConfig $postBody
|
---|
| 122 | * @param array $optParams Optional parameters.
|
---|
| 123 | * @return PretargetingConfig
|
---|
| 124 | * @throws \Google\Service\Exception
|
---|
| 125 | */
|
---|
| 126 | public function create($parent, PretargetingConfig $postBody, $optParams = [])
|
---|
| 127 | {
|
---|
| 128 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
| 129 | $params = array_merge($params, $optParams);
|
---|
| 130 | return $this->call('create', [$params], PretargetingConfig::class);
|
---|
| 131 | }
|
---|
| 132 | /**
|
---|
| 133 | * Deletes a pretargeting configuration. (pretargetingConfigs.delete)
|
---|
| 134 | *
|
---|
| 135 | * @param string $name Required. The name of the pretargeting configuration to
|
---|
| 136 | * delete. Format: bidders/{bidderAccountId}/pretargetingConfig/{configId}
|
---|
| 137 | * @param array $optParams Optional parameters.
|
---|
| 138 | * @return RealtimebiddingEmpty
|
---|
| 139 | * @throws \Google\Service\Exception
|
---|
| 140 | */
|
---|
| 141 | public function delete($name, $optParams = [])
|
---|
| 142 | {
|
---|
| 143 | $params = ['name' => $name];
|
---|
| 144 | $params = array_merge($params, $optParams);
|
---|
| 145 | return $this->call('delete', [$params], RealtimebiddingEmpty::class);
|
---|
| 146 | }
|
---|
| 147 | /**
|
---|
| 148 | * Gets a pretargeting configuration. (pretargetingConfigs.get)
|
---|
| 149 | *
|
---|
| 150 | * @param string $name Required. Name of the pretargeting configuration to get.
|
---|
| 151 | * Format: bidders/{bidderAccountId}/pretargetingConfig/{configId}
|
---|
| 152 | * @param array $optParams Optional parameters.
|
---|
| 153 | * @return PretargetingConfig
|
---|
| 154 | * @throws \Google\Service\Exception
|
---|
| 155 | */
|
---|
| 156 | public function get($name, $optParams = [])
|
---|
| 157 | {
|
---|
| 158 | $params = ['name' => $name];
|
---|
| 159 | $params = array_merge($params, $optParams);
|
---|
| 160 | return $this->call('get', [$params], PretargetingConfig::class);
|
---|
| 161 | }
|
---|
| 162 | /**
|
---|
| 163 | * Lists all pretargeting configurations for a single bidder.
|
---|
| 164 | * (pretargetingConfigs.listBiddersPretargetingConfigs)
|
---|
| 165 | *
|
---|
| 166 | * @param string $parent Required. Name of the bidder whose pretargeting
|
---|
| 167 | * configurations will be listed. Format: bidders/{bidderAccountId}
|
---|
| 168 | * @param array $optParams Optional parameters.
|
---|
| 169 | *
|
---|
| 170 | * @opt_param int pageSize The maximum number of pretargeting configurations to
|
---|
| 171 | * return. If unspecified, at most 10 pretargeting configurations will be
|
---|
| 172 | * returned. The maximum value is 100; values above 100 will be coerced to 100.
|
---|
| 173 | * @opt_param string pageToken A token identifying a page of results the server
|
---|
| 174 | * should return. This value is received from a previous
|
---|
| 175 | * `ListPretargetingConfigs` call in
|
---|
| 176 | * ListPretargetingConfigsResponse.nextPageToken.
|
---|
| 177 | * @return ListPretargetingConfigsResponse
|
---|
| 178 | * @throws \Google\Service\Exception
|
---|
| 179 | */
|
---|
| 180 | public function listBiddersPretargetingConfigs($parent, $optParams = [])
|
---|
| 181 | {
|
---|
| 182 | $params = ['parent' => $parent];
|
---|
| 183 | $params = array_merge($params, $optParams);
|
---|
| 184 | return $this->call('list', [$params], ListPretargetingConfigsResponse::class);
|
---|
| 185 | }
|
---|
| 186 | /**
|
---|
| 187 | * Updates a pretargeting configuration. (pretargetingConfigs.patch)
|
---|
| 188 | *
|
---|
| 189 | * @param string $name Output only. Name of the pretargeting configuration that
|
---|
| 190 | * must follow the pattern
|
---|
| 191 | * `bidders/{bidder_account_id}/pretargetingConfigs/{config_id}`
|
---|
| 192 | * @param PretargetingConfig $postBody
|
---|
| 193 | * @param array $optParams Optional parameters.
|
---|
| 194 | *
|
---|
| 195 | * @opt_param string updateMask Field mask to use for partial in-place updates.
|
---|
| 196 | * @return PretargetingConfig
|
---|
| 197 | * @throws \Google\Service\Exception
|
---|
| 198 | */
|
---|
| 199 | public function patch($name, PretargetingConfig $postBody, $optParams = [])
|
---|
| 200 | {
|
---|
| 201 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
| 202 | $params = array_merge($params, $optParams);
|
---|
| 203 | return $this->call('patch', [$params], PretargetingConfig::class);
|
---|
| 204 | }
|
---|
| 205 | /**
|
---|
| 206 | * Removes targeted apps from the pretargeting configuration.
|
---|
| 207 | * (pretargetingConfigs.removeTargetedApps)
|
---|
| 208 | *
|
---|
| 209 | * @param string $pretargetingConfig Required. The name of the pretargeting
|
---|
| 210 | * configuration. Format:
|
---|
| 211 | * bidders/{bidderAccountId}/pretargetingConfig/{configId}
|
---|
| 212 | * @param RemoveTargetedAppsRequest $postBody
|
---|
| 213 | * @param array $optParams Optional parameters.
|
---|
| 214 | * @return PretargetingConfig
|
---|
| 215 | * @throws \Google\Service\Exception
|
---|
| 216 | */
|
---|
| 217 | public function removeTargetedApps($pretargetingConfig, RemoveTargetedAppsRequest $postBody, $optParams = [])
|
---|
| 218 | {
|
---|
| 219 | $params = ['pretargetingConfig' => $pretargetingConfig, 'postBody' => $postBody];
|
---|
| 220 | $params = array_merge($params, $optParams);
|
---|
| 221 | return $this->call('removeTargetedApps', [$params], PretargetingConfig::class);
|
---|
| 222 | }
|
---|
| 223 | /**
|
---|
| 224 | * Removes targeted publishers from the pretargeting config.
|
---|
| 225 | * (pretargetingConfigs.removeTargetedPublishers)
|
---|
| 226 | *
|
---|
| 227 | * @param string $pretargetingConfig Required. The name of the pretargeting
|
---|
| 228 | * configuration. Format:
|
---|
| 229 | * bidders/{bidderAccountId}/pretargetingConfig/{configId}
|
---|
| 230 | * @param RemoveTargetedPublishersRequest $postBody
|
---|
| 231 | * @param array $optParams Optional parameters.
|
---|
| 232 | * @return PretargetingConfig
|
---|
| 233 | * @throws \Google\Service\Exception
|
---|
| 234 | */
|
---|
| 235 | public function removeTargetedPublishers($pretargetingConfig, RemoveTargetedPublishersRequest $postBody, $optParams = [])
|
---|
| 236 | {
|
---|
| 237 | $params = ['pretargetingConfig' => $pretargetingConfig, 'postBody' => $postBody];
|
---|
| 238 | $params = array_merge($params, $optParams);
|
---|
| 239 | return $this->call('removeTargetedPublishers', [$params], PretargetingConfig::class);
|
---|
| 240 | }
|
---|
| 241 | /**
|
---|
| 242 | * Removes targeted sites from the pretargeting configuration.
|
---|
| 243 | * (pretargetingConfigs.removeTargetedSites)
|
---|
| 244 | *
|
---|
| 245 | * @param string $pretargetingConfig Required. The name of the pretargeting
|
---|
| 246 | * configuration. Format:
|
---|
| 247 | * bidders/{bidderAccountId}/pretargetingConfig/{configId}
|
---|
| 248 | * @param RemoveTargetedSitesRequest $postBody
|
---|
| 249 | * @param array $optParams Optional parameters.
|
---|
| 250 | * @return PretargetingConfig
|
---|
| 251 | * @throws \Google\Service\Exception
|
---|
| 252 | */
|
---|
| 253 | public function removeTargetedSites($pretargetingConfig, RemoveTargetedSitesRequest $postBody, $optParams = [])
|
---|
| 254 | {
|
---|
| 255 | $params = ['pretargetingConfig' => $pretargetingConfig, 'postBody' => $postBody];
|
---|
| 256 | $params = array_merge($params, $optParams);
|
---|
| 257 | return $this->call('removeTargetedSites', [$params], PretargetingConfig::class);
|
---|
| 258 | }
|
---|
| 259 | /**
|
---|
| 260 | * Suspends a pretargeting configuration. (pretargetingConfigs.suspend)
|
---|
| 261 | *
|
---|
| 262 | * @param string $name Required. The name of the pretargeting configuration.
|
---|
| 263 | * Format: bidders/{bidderAccountId}/pretargetingConfig/{configId}
|
---|
| 264 | * @param SuspendPretargetingConfigRequest $postBody
|
---|
| 265 | * @param array $optParams Optional parameters.
|
---|
| 266 | * @return PretargetingConfig
|
---|
| 267 | * @throws \Google\Service\Exception
|
---|
| 268 | */
|
---|
| 269 | public function suspend($name, SuspendPretargetingConfigRequest $postBody, $optParams = [])
|
---|
| 270 | {
|
---|
| 271 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
| 272 | $params = array_merge($params, $optParams);
|
---|
| 273 | return $this->call('suspend', [$params], PretargetingConfig::class);
|
---|
| 274 | }
|
---|
| 275 | }
|
---|
| 276 |
|
---|
| 277 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 278 | class_alias(BiddersPretargetingConfigs::class, 'Google_Service_RealTimeBidding_Resource_BiddersPretargetingConfigs');
|
---|