source: vendor/google/apiclient-services/src/DisplayVideo/Resource/CustomBiddingAlgorithmsScripts.php

Last change on this file was e3d4e0a, checked in by Vlado 222039 <vlado.popovski@…>, 9 days ago

Upload project files

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