[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\DisplayVideo\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\DisplayVideo\CustomBiddingAlgorithmRules;
|
---|
| 21 | use Google\Service\DisplayVideo\ListCustomBiddingAlgorithmRulesResponse;
|
---|
| 22 |
|
---|
| 23 | /**
|
---|
| 24 | * The "rules" collection of methods.
|
---|
| 25 | * Typical usage is:
|
---|
| 26 | * <code>
|
---|
| 27 | * $displayvideoService = new Google\Service\DisplayVideo(...);
|
---|
| 28 | * $rules = $displayvideoService->customBiddingAlgorithms_rules;
|
---|
| 29 | * </code>
|
---|
| 30 | */
|
---|
| 31 | class CustomBiddingAlgorithmsRules extends \Google\Service\Resource
|
---|
| 32 | {
|
---|
| 33 | /**
|
---|
| 34 | * Creates a new rules resource. Returns the newly created rules resource if
|
---|
| 35 | * successful. (rules.create)
|
---|
| 36 | *
|
---|
| 37 | * @param string $customBiddingAlgorithmId Required. The ID of the custom
|
---|
| 38 | * bidding algorithm that owns the rules resource.
|
---|
| 39 | * @param CustomBiddingAlgorithmRules $postBody
|
---|
| 40 | * @param array $optParams Optional parameters.
|
---|
| 41 | *
|
---|
| 42 | * @opt_param string advertiserId The ID of the advertiser that owns the parent
|
---|
| 43 | * custom bidding algorithm.
|
---|
| 44 | * @opt_param string partnerId The ID of the partner that owns the parent custom
|
---|
| 45 | * bidding algorithm. Only this partner will have write access to this rules
|
---|
| 46 | * resource.
|
---|
| 47 | * @return CustomBiddingAlgorithmRules
|
---|
| 48 | * @throws \Google\Service\Exception
|
---|
| 49 | */
|
---|
| 50 | public function create($customBiddingAlgorithmId, CustomBiddingAlgorithmRules $postBody, $optParams = [])
|
---|
| 51 | {
|
---|
| 52 | $params = ['customBiddingAlgorithmId' => $customBiddingAlgorithmId, 'postBody' => $postBody];
|
---|
| 53 | $params = array_merge($params, $optParams);
|
---|
| 54 | return $this->call('create', [$params], CustomBiddingAlgorithmRules::class);
|
---|
| 55 | }
|
---|
| 56 | /**
|
---|
| 57 | * Retrieves a rules resource. (rules.get)
|
---|
| 58 | *
|
---|
| 59 | * @param string $customBiddingAlgorithmId Required. The ID of the custom
|
---|
| 60 | * bidding algorithm that owns the rules resource.
|
---|
| 61 | * @param string $customBiddingAlgorithmRulesId Required. The ID of the rules
|
---|
| 62 | * resource to fetch.
|
---|
| 63 | * @param array $optParams Optional parameters.
|
---|
| 64 | *
|
---|
| 65 | * @opt_param string advertiserId The ID of the advertiser that owns the parent
|
---|
| 66 | * custom bidding algorithm.
|
---|
| 67 | * @opt_param string partnerId The ID of the partner that owns the parent custom
|
---|
| 68 | * bidding algorithm.
|
---|
| 69 | * @return CustomBiddingAlgorithmRules
|
---|
| 70 | * @throws \Google\Service\Exception
|
---|
| 71 | */
|
---|
| 72 | public function get($customBiddingAlgorithmId, $customBiddingAlgorithmRulesId, $optParams = [])
|
---|
| 73 | {
|
---|
| 74 | $params = ['customBiddingAlgorithmId' => $customBiddingAlgorithmId, 'customBiddingAlgorithmRulesId' => $customBiddingAlgorithmRulesId];
|
---|
| 75 | $params = array_merge($params, $optParams);
|
---|
| 76 | return $this->call('get', [$params], CustomBiddingAlgorithmRules::class);
|
---|
| 77 | }
|
---|
| 78 | /**
|
---|
| 79 | * Lists rules resources that belong to the given algorithm. The order is
|
---|
| 80 | * defined by the order_by parameter. (rules.listCustomBiddingAlgorithmsRules)
|
---|
| 81 | *
|
---|
| 82 | * @param string $customBiddingAlgorithmId Required. The ID of the custom
|
---|
| 83 | * bidding algorithm that owns the rules resource.
|
---|
| 84 | * @param array $optParams Optional parameters.
|
---|
| 85 | *
|
---|
| 86 | * @opt_param string advertiserId The ID of the advertiser that owns the parent
|
---|
| 87 | * custom bidding algorithm.
|
---|
| 88 | * @opt_param string orderBy Field by which to sort the list. Acceptable values
|
---|
| 89 | * are: * `createTime desc` (default) The default sorting order is descending.
|
---|
| 90 | * To specify ascending order for a field, the suffix "desc" should be removed.
|
---|
| 91 | * Example: `createTime`.
|
---|
| 92 | * @opt_param int pageSize Requested page size. Must be between `1` and `200`.
|
---|
| 93 | * If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT`
|
---|
| 94 | * if an invalid value is specified.
|
---|
| 95 | * @opt_param string pageToken A token identifying a page of results the server
|
---|
| 96 | * should return. Typically, this is the value of next_page_token returned from
|
---|
| 97 | * the previous call to `ListCustomBiddingAlgorithmRules` method. If not
|
---|
| 98 | * specified, the first page of results will be returned.
|
---|
| 99 | * @opt_param string partnerId The ID of the partner that owns the parent custom
|
---|
| 100 | * bidding algorithm.
|
---|
| 101 | * @return ListCustomBiddingAlgorithmRulesResponse
|
---|
| 102 | * @throws \Google\Service\Exception
|
---|
| 103 | */
|
---|
| 104 | public function listCustomBiddingAlgorithmsRules($customBiddingAlgorithmId, $optParams = [])
|
---|
| 105 | {
|
---|
| 106 | $params = ['customBiddingAlgorithmId' => $customBiddingAlgorithmId];
|
---|
| 107 | $params = array_merge($params, $optParams);
|
---|
| 108 | return $this->call('list', [$params], ListCustomBiddingAlgorithmRulesResponse::class);
|
---|
| 109 | }
|
---|
| 110 | }
|
---|
| 111 |
|
---|
| 112 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 113 | class_alias(CustomBiddingAlgorithmsRules::class, 'Google_Service_DisplayVideo_Resource_CustomBiddingAlgorithmsRules');
|
---|