source: vendor/google/apiclient-services/src/DisplayVideo/Resource/AdvertisersManualTriggers.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.7 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\ActivateManualTriggerRequest;
21use Google\Service\DisplayVideo\DeactivateManualTriggerRequest;
22use Google\Service\DisplayVideo\ListManualTriggersResponse;
23use Google\Service\DisplayVideo\ManualTrigger;
24
25/**
26 * The "manualTriggers" collection of methods.
27 * Typical usage is:
28 * <code>
29 * $displayvideoService = new Google\Service\DisplayVideo(...);
30 * $manualTriggers = $displayvideoService->advertisers_manualTriggers;
31 * </code>
32 */
33class AdvertisersManualTriggers extends \Google\Service\Resource
34{
35 /**
36 * Activates a manual trigger. Each activation of the manual trigger must be at
37 * least 5 minutes apart, otherwise an error will be returned. **Warning:** Line
38 * Items using manual triggers no longer serve in Display & Video 360. This
39 * method will sunset on August 1, 2023. Read our [feature deprecation
40 * announcement](/display-video/api/deprecations#features.manual_triggers) for
41 * more information. (manualTriggers.activate)
42 *
43 * @param string $advertiserId Required. The ID of the advertiser that the
44 * manual trigger belongs.
45 * @param string $triggerId Required. The ID of the manual trigger to activate.
46 * @param ActivateManualTriggerRequest $postBody
47 * @param array $optParams Optional parameters.
48 * @return ManualTrigger
49 */
50 public function activate($advertiserId, $triggerId, ActivateManualTriggerRequest $postBody, $optParams = [])
51 {
52 $params = ['advertiserId' => $advertiserId, 'triggerId' => $triggerId, 'postBody' => $postBody];
53 $params = array_merge($params, $optParams);
54 return $this->call('activate', [$params], ManualTrigger::class);
55 }
56 /**
57 * Creates a new manual trigger. Returns the newly created manual trigger if
58 * successful. **Warning:** Line Items using manual triggers no longer serve in
59 * Display & Video 360. This method will sunset on August 1, 2023. Read our
60 * [feature deprecation announcement](/display-
61 * video/api/deprecations#features.manual_triggers) for more information.
62 * (manualTriggers.create)
63 *
64 * @param string $advertiserId Required. Immutable. The unique ID of the
65 * advertiser that the manual trigger belongs to.
66 * @param ManualTrigger $postBody
67 * @param array $optParams Optional parameters.
68 * @return ManualTrigger
69 */
70 public function create($advertiserId, ManualTrigger $postBody, $optParams = [])
71 {
72 $params = ['advertiserId' => $advertiserId, 'postBody' => $postBody];
73 $params = array_merge($params, $optParams);
74 return $this->call('create', [$params], ManualTrigger::class);
75 }
76 /**
77 * Deactivates a manual trigger. **Warning:** Line Items using manual triggers
78 * no longer serve in Display & Video 360. This method will sunset on August 1,
79 * 2023. Read our [feature deprecation announcement](/display-
80 * video/api/deprecations#features.manual_triggers) for more information.
81 * (manualTriggers.deactivate)
82 *
83 * @param string $advertiserId Required. The ID of the advertiser that the
84 * manual trigger belongs.
85 * @param string $triggerId Required. The ID of the manual trigger to
86 * deactivate.
87 * @param DeactivateManualTriggerRequest $postBody
88 * @param array $optParams Optional parameters.
89 * @return ManualTrigger
90 */
91 public function deactivate($advertiserId, $triggerId, DeactivateManualTriggerRequest $postBody, $optParams = [])
92 {
93 $params = ['advertiserId' => $advertiserId, 'triggerId' => $triggerId, 'postBody' => $postBody];
94 $params = array_merge($params, $optParams);
95 return $this->call('deactivate', [$params], ManualTrigger::class);
96 }
97 /**
98 * Gets a manual trigger. **Warning:** Line Items using manual triggers no
99 * longer serve in Display & Video 360. This method will sunset on August 1,
100 * 2023. Read our [feature deprecation announcement](/display-
101 * video/api/deprecations#features.manual_triggers) for more information.
102 * (manualTriggers.get)
103 *
104 * @param string $advertiserId Required. The ID of the advertiser this manual
105 * trigger belongs to.
106 * @param string $triggerId Required. The ID of the manual trigger to fetch.
107 * @param array $optParams Optional parameters.
108 * @return ManualTrigger
109 */
110 public function get($advertiserId, $triggerId, $optParams = [])
111 {
112 $params = ['advertiserId' => $advertiserId, 'triggerId' => $triggerId];
113 $params = array_merge($params, $optParams);
114 return $this->call('get', [$params], ManualTrigger::class);
115 }
116 /**
117 * Lists manual triggers that are accessible to the current user for a given
118 * advertiser ID. The order is defined by the order_by parameter. A single
119 * advertiser_id is required. **Warning:** Line Items using manual triggers no
120 * longer serve in Display & Video 360. This method will sunset on August 1,
121 * 2023. Read our [feature deprecation announcement](/display-
122 * video/api/deprecations#features.manual_triggers) for more information.
123 * (manualTriggers.listAdvertisersManualTriggers)
124 *
125 * @param string $advertiserId Required. The ID of the advertiser that the
126 * fetched manual triggers belong to.
127 * @param array $optParams Optional parameters.
128 *
129 * @opt_param string filter Allows filtering by manual trigger fields. Supported
130 * syntax: * Filter expressions are made up of one or more restrictions. *
131 * Restrictions can be combined by `AND` or `OR` logical operators. A sequence
132 * of restrictions implicitly uses `AND`. * A restriction has the form of
133 * `{field} {operator} {value}`. * All fields must use the `EQUALS (=)`
134 * operator. Supported fields: * `displayName` * `state` Examples: * All active
135 * manual triggers under an advertiser: `state="ACTIVE"` The length of this
136 * field should be no more than 500 characters. Reference our [filter `LIST`
137 * requests](/display-video/api/guides/how-tos/filters) guide for more
138 * information.
139 * @opt_param string orderBy Field by which to sort the list. Acceptable values
140 * are: * `displayName` (default) * `state` The default sorting order is
141 * ascending. To specify descending order for a field, a suffix "desc" should be
142 * added to the field name. For example, `displayName desc`.
143 * @opt_param int pageSize Requested page size. Must be between `1` and `200`.
144 * If unspecified will default to `100`.
145 * @opt_param string pageToken A token identifying a page of results the server
146 * should return. Typically, this is the value of next_page_token returned from
147 * the previous call to `ListManualTriggers` method. If not specified, the first
148 * page of results will be returned.
149 * @return ListManualTriggersResponse
150 */
151 public function listAdvertisersManualTriggers($advertiserId, $optParams = [])
152 {
153 $params = ['advertiserId' => $advertiserId];
154 $params = array_merge($params, $optParams);
155 return $this->call('list', [$params], ListManualTriggersResponse::class);
156 }
157 /**
158 * Updates a manual trigger. Returns the updated manual trigger if successful.
159 * **Warning:** Line Items using manual triggers no longer serve in Display &
160 * Video 360. This method will sunset on August 1, 2023. Read our [feature
161 * deprecation announcement](/display-
162 * video/api/deprecations#features.manual_triggers) for more information.
163 * (manualTriggers.patch)
164 *
165 * @param string $advertiserId Required. Immutable. The unique ID of the
166 * advertiser that the manual trigger belongs to.
167 * @param string $triggerId Output only. The unique ID of the manual trigger.
168 * @param ManualTrigger $postBody
169 * @param array $optParams Optional parameters.
170 *
171 * @opt_param string updateMask Required. The mask to control which fields to
172 * update.
173 * @return ManualTrigger
174 */
175 public function patch($advertiserId, $triggerId, ManualTrigger $postBody, $optParams = [])
176 {
177 $params = ['advertiserId' => $advertiserId, 'triggerId' => $triggerId, 'postBody' => $postBody];
178 $params = array_merge($params, $optParams);
179 return $this->call('patch', [$params], ManualTrigger::class);
180 }
181}
182
183// Adding a class alias for backwards compatibility with the previous class name.
184class_alias(AdvertisersManualTriggers::class, 'Google_Service_DisplayVideo_Resource_AdvertisersManualTriggers');
Note: See TracBrowser for help on using the repository browser.