[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\ListCreativesResponse;
|
---|
| 21 | use Google\Service\RealTimeBidding\WatchCreativesRequest;
|
---|
| 22 | use Google\Service\RealTimeBidding\WatchCreativesResponse;
|
---|
| 23 |
|
---|
| 24 | /**
|
---|
| 25 | * The "creatives" collection of methods.
|
---|
| 26 | * Typical usage is:
|
---|
| 27 | * <code>
|
---|
| 28 | * $realtimebiddingService = new Google\Service\RealTimeBidding(...);
|
---|
| 29 | * $creatives = $realtimebiddingService->bidders_creatives;
|
---|
| 30 | * </code>
|
---|
| 31 | */
|
---|
| 32 | class BiddersCreatives extends \Google\Service\Resource
|
---|
| 33 | {
|
---|
| 34 | /**
|
---|
| 35 | * Lists creatives as they are at the time of the initial request. This call may
|
---|
| 36 | * take multiple hours to complete. For large, paginated requests, this method
|
---|
| 37 | * returns a snapshot of creatives at the time of request for the first page.
|
---|
| 38 | * `lastStatusUpdate` and `creativeServingDecision` may be outdated for
|
---|
| 39 | * creatives on sequential pages. We recommend [Google Cloud
|
---|
| 40 | * Pub/Sub](//cloud.google.com/pubsub/docs/overview) to view the latest status.
|
---|
| 41 | * (creatives.listBiddersCreatives)
|
---|
| 42 | *
|
---|
| 43 | * @param string $parent Required. Name of the parent buyer that owns the
|
---|
| 44 | * creatives. The pattern for this resource is either `buyers/{buyerAccountId}`
|
---|
| 45 | * or `bidders/{bidderAccountId}`. For `buyers/{buyerAccountId}`, the
|
---|
| 46 | * `buyerAccountId` can be one of the following: 1. The ID of the buyer that is
|
---|
| 47 | * accessing their own creatives. 2. The ID of the child seat buyer under a
|
---|
| 48 | * bidder account. So for listing creatives pertaining to the child seat buyer
|
---|
| 49 | * (`456`) under bidder account (`123`), you would use the pattern:
|
---|
| 50 | * `buyers/456`. 3. The ID of the bidder itself. So for listing creatives
|
---|
| 51 | * pertaining to bidder (`123`), you would use `buyers/123`. If you want to
|
---|
| 52 | * access all creatives pertaining to both the bidder and all of its child seat
|
---|
| 53 | * accounts, you would use `bidders/{bidderAccountId}`, for example, for all
|
---|
| 54 | * creatives pertaining to bidder (`123`), use `bidders/123`.
|
---|
| 55 | * @param array $optParams Optional parameters.
|
---|
| 56 | *
|
---|
| 57 | * @opt_param string filter Query string to filter creatives. If no filter is
|
---|
| 58 | * specified, all active creatives will be returned. Example: 'accountId=12345
|
---|
| 59 | * AND (dealsStatus:DISAPPROVED AND disapprovalReason:UNACCEPTABLE_CONTENT) OR
|
---|
| 60 | * declaredAttributes:IS_COOKIE_TARGETED'
|
---|
| 61 | * @opt_param int pageSize Requested page size. The server may return fewer
|
---|
| 62 | * creatives than requested (due to timeout constraint) even if more are
|
---|
| 63 | * available through another call. If unspecified, server will pick an
|
---|
| 64 | * appropriate default. Acceptable values are 1 to 1000, inclusive.
|
---|
| 65 | * @opt_param string pageToken A token identifying a page of results the server
|
---|
| 66 | * should return. Typically, this is the value of
|
---|
| 67 | * ListCreativesResponse.nextPageToken returned from the previous call to the
|
---|
| 68 | * 'ListCreatives' method. Page tokens for continued pages are valid for up to
|
---|
| 69 | * five hours, counting from the call to 'ListCreatives' for the first page.
|
---|
| 70 | * @opt_param string view Controls the amount of information included in the
|
---|
| 71 | * response. By default only creativeServingDecision is included. To retrieve
|
---|
| 72 | * the entire creative resource (including the declared fields and the creative
|
---|
| 73 | * content) specify the view as "FULL".
|
---|
| 74 | * @return ListCreativesResponse
|
---|
| 75 | * @throws \Google\Service\Exception
|
---|
| 76 | */
|
---|
| 77 | public function listBiddersCreatives($parent, $optParams = [])
|
---|
| 78 | {
|
---|
| 79 | $params = ['parent' => $parent];
|
---|
| 80 | $params = array_merge($params, $optParams);
|
---|
| 81 | return $this->call('list', [$params], ListCreativesResponse::class);
|
---|
| 82 | }
|
---|
| 83 | /**
|
---|
| 84 | * Watches all creatives pertaining to a bidder. It is sufficient to invoke this
|
---|
| 85 | * endpoint once per bidder. A Pub/Sub topic will be created and notifications
|
---|
| 86 | * will be pushed to the topic when any of the bidder's creatives change status.
|
---|
| 87 | * All of the bidder's service accounts will have access to read from the topic.
|
---|
| 88 | * Subsequent invocations of this method will return the existing Pub/Sub
|
---|
| 89 | * configuration. (creatives.watch)
|
---|
| 90 | *
|
---|
| 91 | * @param string $parent Required. To watch all creatives pertaining to the
|
---|
| 92 | * bidder and all its child seat accounts, the bidder must follow the pattern
|
---|
| 93 | * `bidders/{bidderAccountId}`.
|
---|
| 94 | * @param WatchCreativesRequest $postBody
|
---|
| 95 | * @param array $optParams Optional parameters.
|
---|
| 96 | * @return WatchCreativesResponse
|
---|
| 97 | * @throws \Google\Service\Exception
|
---|
| 98 | */
|
---|
| 99 | public function watch($parent, WatchCreativesRequest $postBody, $optParams = [])
|
---|
| 100 | {
|
---|
| 101 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
| 102 | $params = array_merge($params, $optParams);
|
---|
| 103 | return $this->call('watch', [$params], WatchCreativesResponse::class);
|
---|
| 104 | }
|
---|
| 105 | }
|
---|
| 106 |
|
---|
| 107 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 108 | class_alias(BiddersCreatives::class, 'Google_Service_RealTimeBidding_Resource_BiddersCreatives');
|
---|