source: vendor/google/apiclient-services/src/DisplayVideo/Resource/CustomBiddingAlgorithms.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: 8.4 KB
RevLine 
[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
18namespace Google\Service\DisplayVideo\Resource;
19
20use Google\Service\DisplayVideo\CustomBiddingAlgorithm;
21use Google\Service\DisplayVideo\CustomBiddingAlgorithmRulesRef;
22use Google\Service\DisplayVideo\CustomBiddingScriptRef;
23use Google\Service\DisplayVideo\ListCustomBiddingAlgorithmsResponse;
24
25/**
26 * The "customBiddingAlgorithms" collection of methods.
27 * Typical usage is:
28 * <code>
29 * $displayvideoService = new Google\Service\DisplayVideo(...);
30 * $customBiddingAlgorithms = $displayvideoService->customBiddingAlgorithms;
31 * </code>
32 */
33class CustomBiddingAlgorithms extends \Google\Service\Resource
34{
35 /**
36 * Creates a new custom bidding algorithm. Returns the newly created custom
37 * bidding algorithm if successful. (customBiddingAlgorithms.create)
38 *
39 * @param CustomBiddingAlgorithm $postBody
40 * @param array $optParams Optional parameters.
41 * @return CustomBiddingAlgorithm
42 * @throws \Google\Service\Exception
43 */
44 public function create(CustomBiddingAlgorithm $postBody, $optParams = [])
45 {
46 $params = ['postBody' => $postBody];
47 $params = array_merge($params, $optParams);
48 return $this->call('create', [$params], CustomBiddingAlgorithm::class);
49 }
50 /**
51 * Gets a custom bidding algorithm. (customBiddingAlgorithms.get)
52 *
53 * @param string $customBiddingAlgorithmId Required. The ID of the custom
54 * bidding algorithm to fetch.
55 * @param array $optParams Optional parameters.
56 *
57 * @opt_param string advertiserId The ID of the DV360 partner that has access to
58 * the custom bidding algorithm.
59 * @opt_param string partnerId The ID of the DV360 partner that has access to
60 * the custom bidding algorithm.
61 * @return CustomBiddingAlgorithm
62 * @throws \Google\Service\Exception
63 */
64 public function get($customBiddingAlgorithmId, $optParams = [])
65 {
66 $params = ['customBiddingAlgorithmId' => $customBiddingAlgorithmId];
67 $params = array_merge($params, $optParams);
68 return $this->call('get', [$params], CustomBiddingAlgorithm::class);
69 }
70 /**
71 * Lists custom bidding algorithms that are accessible to the current user and
72 * can be used in bidding stratgies. The order is defined by the order_by
73 * parameter. (customBiddingAlgorithms.listCustomBiddingAlgorithms)
74 *
75 * @param array $optParams Optional parameters.
76 *
77 * @opt_param string advertiserId The ID of the DV360 advertiser that has access
78 * to the custom bidding algorithm.
79 * @opt_param string filter Allows filtering by custom bidding algorithm fields.
80 * Supported syntax: * Filter expressions are made up of one or more
81 * restrictions. * Restrictions can be combined by `AND`. A sequence of
82 * restrictions implicitly uses `AND`. * A restriction has the form of `{field}
83 * {operator} {value}`. * The `customBiddingAlgorithmType` field must use the
84 * `EQUALS (=)` operator. * The `displayName` field must use the `HAS (:)`
85 * operator. Supported fields: * `customBiddingAlgorithmType` * `displayName`
86 * Examples: * All custom bidding algorithms for which the display name contains
87 * "politics": `displayName:"politics"`. * All custom bidding algorithms for
88 * which the type is "SCRIPT_BASED": `customBiddingAlgorithmType=SCRIPT_BASED`
89 * The length of this field should be no more than 500 characters. Reference our
90 * [filter `LIST` requests](/display-video/api/guides/how-tos/filters) guide for
91 * more information.
92 * @opt_param string orderBy Field by which to sort the list. Acceptable values
93 * are: * `displayName` (default) The default sorting order is ascending. To
94 * specify descending order for a field, a suffix "desc" should be added to the
95 * field name. Example: `displayName desc`.
96 * @opt_param int pageSize Requested page size. Must be between `1` and `200`.
97 * If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT`
98 * if an invalid value is specified.
99 * @opt_param string pageToken A token identifying a page of results the server
100 * should return. Typically, this is the value of next_page_token returned from
101 * the previous call to `ListCustomBiddingAlgorithms` method. If not specified,
102 * the first page of results will be returned.
103 * @opt_param string partnerId The ID of the DV360 partner that has access to
104 * the custom bidding algorithm.
105 * @return ListCustomBiddingAlgorithmsResponse
106 * @throws \Google\Service\Exception
107 */
108 public function listCustomBiddingAlgorithms($optParams = [])
109 {
110 $params = [];
111 $params = array_merge($params, $optParams);
112 return $this->call('list', [$params], ListCustomBiddingAlgorithmsResponse::class);
113 }
114 /**
115 * Updates an existing custom bidding algorithm. Returns the updated custom
116 * bidding algorithm if successful. (customBiddingAlgorithms.patch)
117 *
118 * @param string $customBiddingAlgorithmId Output only. The unique ID of the
119 * custom bidding algorithm. Assigned by the system.
120 * @param CustomBiddingAlgorithm $postBody
121 * @param array $optParams Optional parameters.
122 *
123 * @opt_param string updateMask Required. The mask to control which fields to
124 * update.
125 * @return CustomBiddingAlgorithm
126 * @throws \Google\Service\Exception
127 */
128 public function patch($customBiddingAlgorithmId, CustomBiddingAlgorithm $postBody, $optParams = [])
129 {
130 $params = ['customBiddingAlgorithmId' => $customBiddingAlgorithmId, 'postBody' => $postBody];
131 $params = array_merge($params, $optParams);
132 return $this->call('patch', [$params], CustomBiddingAlgorithm::class);
133 }
134 /**
135 * Creates a rules reference object for an AlgorithmRules file. The resulting
136 * reference object provides a resource path where the AlgorithmRules file
137 * should be uploaded. This reference object should be included when creating a
138 * new CustomBiddingAlgorithmRules resource.
139 * (customBiddingAlgorithms.uploadRules)
140 *
141 * @param string $customBiddingAlgorithmId Required. The ID of the custom
142 * bidding algorithm that owns the rules resource.
143 * @param array $optParams Optional parameters.
144 *
145 * @opt_param string advertiserId The ID of the advertiser that owns the parent
146 * custom bidding algorithm.
147 * @opt_param string partnerId The ID of the partner that owns the parent custom
148 * bidding algorithm.
149 * @return CustomBiddingAlgorithmRulesRef
150 * @throws \Google\Service\Exception
151 */
152 public function uploadRules($customBiddingAlgorithmId, $optParams = [])
153 {
154 $params = ['customBiddingAlgorithmId' => $customBiddingAlgorithmId];
155 $params = array_merge($params, $optParams);
156 return $this->call('uploadRules', [$params], CustomBiddingAlgorithmRulesRef::class);
157 }
158 /**
159 * Creates a custom bidding script reference object for a script file. The
160 * resulting reference object provides a resource path to which the script file
161 * should be uploaded. This reference object should be included in when creating
162 * a new custom bidding script object. (customBiddingAlgorithms.uploadScript)
163 *
164 * @param string $customBiddingAlgorithmId Required. The ID of the custom
165 * bidding algorithm owns the script.
166 * @param array $optParams Optional parameters.
167 *
168 * @opt_param string advertiserId The ID of the advertiser that owns the parent
169 * custom bidding algorithm.
170 * @opt_param string partnerId The ID of the partner that owns the parent custom
171 * bidding algorithm. Only this partner will have write access to this custom
172 * bidding script.
173 * @return CustomBiddingScriptRef
174 * @throws \Google\Service\Exception
175 */
176 public function uploadScript($customBiddingAlgorithmId, $optParams = [])
177 {
178 $params = ['customBiddingAlgorithmId' => $customBiddingAlgorithmId];
179 $params = array_merge($params, $optParams);
180 return $this->call('uploadScript', [$params], CustomBiddingScriptRef::class);
181 }
182}
183
184// Adding a class alias for backwards compatibility with the previous class name.
185class_alias(CustomBiddingAlgorithms::class, 'Google_Service_DisplayVideo_Resource_CustomBiddingAlgorithms');
Note: See TracBrowser for help on using the repository browser.