source: vendor/google/apiclient-services/src/DisplayVideo/Resource/AdvertisersNegativeKeywordLists.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: 5.8 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\DisplayvideoEmpty;
21use Google\Service\DisplayVideo\ListNegativeKeywordListsResponse;
22use Google\Service\DisplayVideo\NegativeKeywordList;
23
24/**
25 * The "negativeKeywordLists" collection of methods.
26 * Typical usage is:
27 * <code>
28 * $displayvideoService = new Google\Service\DisplayVideo(...);
29 * $negativeKeywordLists = $displayvideoService->advertisers_negativeKeywordLists;
30 * </code>
31 */
32class AdvertisersNegativeKeywordLists extends \Google\Service\Resource
33{
34 /**
35 * Creates a new negative keyword list. Returns the newly created negative
36 * keyword list if successful. (negativeKeywordLists.create)
37 *
38 * @param string $advertiserId Required. The ID of the DV360 advertiser to which
39 * the negative keyword list will belong.
40 * @param NegativeKeywordList $postBody
41 * @param array $optParams Optional parameters.
42 * @return NegativeKeywordList
43 * @throws \Google\Service\Exception
44 */
45 public function create($advertiserId, NegativeKeywordList $postBody, $optParams = [])
46 {
47 $params = ['advertiserId' => $advertiserId, 'postBody' => $postBody];
48 $params = array_merge($params, $optParams);
49 return $this->call('create', [$params], NegativeKeywordList::class);
50 }
51 /**
52 * Deletes a negative keyword list given an advertiser ID and a negative keyword
53 * list ID. (negativeKeywordLists.delete)
54 *
55 * @param string $advertiserId Required. The ID of the DV360 advertiser to which
56 * the negative keyword list belongs.
57 * @param string $negativeKeywordListId Required. The ID of the negative keyword
58 * list to delete.
59 * @param array $optParams Optional parameters.
60 * @return DisplayvideoEmpty
61 * @throws \Google\Service\Exception
62 */
63 public function delete($advertiserId, $negativeKeywordListId, $optParams = [])
64 {
65 $params = ['advertiserId' => $advertiserId, 'negativeKeywordListId' => $negativeKeywordListId];
66 $params = array_merge($params, $optParams);
67 return $this->call('delete', [$params], DisplayvideoEmpty::class);
68 }
69 /**
70 * Gets a negative keyword list given an advertiser ID and a negative keyword
71 * list ID. (negativeKeywordLists.get)
72 *
73 * @param string $advertiserId Required. The ID of the DV360 advertiser to which
74 * the fetched negative keyword list belongs.
75 * @param string $negativeKeywordListId Required. The ID of the negative keyword
76 * list to fetch.
77 * @param array $optParams Optional parameters.
78 * @return NegativeKeywordList
79 * @throws \Google\Service\Exception
80 */
81 public function get($advertiserId, $negativeKeywordListId, $optParams = [])
82 {
83 $params = ['advertiserId' => $advertiserId, 'negativeKeywordListId' => $negativeKeywordListId];
84 $params = array_merge($params, $optParams);
85 return $this->call('get', [$params], NegativeKeywordList::class);
86 }
87 /**
88 * Lists negative keyword lists based on a given advertiser id.
89 * (negativeKeywordLists.listAdvertisersNegativeKeywordLists)
90 *
91 * @param string $advertiserId Required. The ID of the DV360 advertiser to which
92 * the fetched negative keyword lists belong.
93 * @param array $optParams Optional parameters.
94 *
95 * @opt_param int pageSize Requested page size. Must be between `1` and `200`.
96 * Defaults to `100` if not set. Returns error code `INVALID_ARGUMENT` if an
97 * invalid value is specified.
98 * @opt_param string pageToken A token identifying a page of results the server
99 * should return. Typically, this is the value of next_page_token returned from
100 * the previous call to `ListNegativeKeywordLists` method. If not specified, the
101 * first page of results will be returned.
102 * @return ListNegativeKeywordListsResponse
103 * @throws \Google\Service\Exception
104 */
105 public function listAdvertisersNegativeKeywordLists($advertiserId, $optParams = [])
106 {
107 $params = ['advertiserId' => $advertiserId];
108 $params = array_merge($params, $optParams);
109 return $this->call('list', [$params], ListNegativeKeywordListsResponse::class);
110 }
111 /**
112 * Updates a negative keyword list. Returns the updated negative keyword list if
113 * successful. (negativeKeywordLists.patch)
114 *
115 * @param string $advertiserId Required. The ID of the DV360 advertiser to which
116 * the negative keyword list belongs.
117 * @param string $negativeKeywordListId Output only. The unique ID of the
118 * negative keyword list. Assigned by the system.
119 * @param NegativeKeywordList $postBody
120 * @param array $optParams Optional parameters.
121 *
122 * @opt_param string updateMask Required. The mask to control which fields to
123 * update.
124 * @return NegativeKeywordList
125 * @throws \Google\Service\Exception
126 */
127 public function patch($advertiserId, $negativeKeywordListId, NegativeKeywordList $postBody, $optParams = [])
128 {
129 $params = ['advertiserId' => $advertiserId, 'negativeKeywordListId' => $negativeKeywordListId, 'postBody' => $postBody];
130 $params = array_merge($params, $optParams);
131 return $this->call('patch', [$params], NegativeKeywordList::class);
132 }
133}
134
135// Adding a class alias for backwards compatibility with the previous class name.
136class_alias(AdvertisersNegativeKeywordLists::class, 'Google_Service_DisplayVideo_Resource_AdvertisersNegativeKeywordLists');
Note: See TracBrowser for help on using the repository browser.