source: vendor/google/apiclient-services/src/DisplayVideo/Resource/AdvertisersChannelsSites.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: 7.2 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\BulkEditSitesRequest;
21use Google\Service\DisplayVideo\BulkEditSitesResponse;
22use Google\Service\DisplayVideo\DisplayvideoEmpty;
23use Google\Service\DisplayVideo\ListSitesResponse;
24use Google\Service\DisplayVideo\ReplaceSitesRequest;
25use Google\Service\DisplayVideo\ReplaceSitesResponse;
26use Google\Service\DisplayVideo\Site;
27
28/**
29 * The "sites" collection of methods.
30 * Typical usage is:
31 * <code>
32 * $displayvideoService = new Google\Service\DisplayVideo(...);
33 * $sites = $displayvideoService->advertisers_channels_sites;
34 * </code>
35 */
36class AdvertisersChannelsSites extends \Google\Service\Resource
37{
38 /**
39 * Bulk edits sites under a single channel. The operation will delete the sites
40 * provided in BulkEditSitesRequest.deleted_sites and then create the sites
41 * provided in BulkEditSitesRequest.created_sites. (sites.bulkEdit)
42 *
43 * @param string $advertiserId The ID of the advertiser that owns the parent
44 * channel.
45 * @param string $channelId Required. The ID of the parent channel to which the
46 * sites belong.
47 * @param BulkEditSitesRequest $postBody
48 * @param array $optParams Optional parameters.
49 * @return BulkEditSitesResponse
50 * @throws \Google\Service\Exception
51 */
52 public function bulkEdit($advertiserId, $channelId, BulkEditSitesRequest $postBody, $optParams = [])
53 {
54 $params = ['advertiserId' => $advertiserId, 'channelId' => $channelId, 'postBody' => $postBody];
55 $params = array_merge($params, $optParams);
56 return $this->call('bulkEdit', [$params], BulkEditSitesResponse::class);
57 }
58 /**
59 * Creates a site in a channel. (sites.create)
60 *
61 * @param string $advertiserId The ID of the advertiser that owns the parent
62 * channel.
63 * @param string $channelId Required. The ID of the parent channel in which the
64 * site will be created.
65 * @param Site $postBody
66 * @param array $optParams Optional parameters.
67 *
68 * @opt_param string partnerId The ID of the partner that owns the parent
69 * channel.
70 * @return Site
71 * @throws \Google\Service\Exception
72 */
73 public function create($advertiserId, $channelId, Site $postBody, $optParams = [])
74 {
75 $params = ['advertiserId' => $advertiserId, 'channelId' => $channelId, 'postBody' => $postBody];
76 $params = array_merge($params, $optParams);
77 return $this->call('create', [$params], Site::class);
78 }
79 /**
80 * Deletes a site from a channel. (sites.delete)
81 *
82 * @param string $advertiserId The ID of the advertiser that owns the parent
83 * channel.
84 * @param string $channelId Required. The ID of the parent channel to which the
85 * site belongs.
86 * @param string $urlOrAppId Required. The URL or app ID of the site to delete.
87 * @param array $optParams Optional parameters.
88 *
89 * @opt_param string partnerId The ID of the partner that owns the parent
90 * channel.
91 * @return DisplayvideoEmpty
92 * @throws \Google\Service\Exception
93 */
94 public function delete($advertiserId, $channelId, $urlOrAppId, $optParams = [])
95 {
96 $params = ['advertiserId' => $advertiserId, 'channelId' => $channelId, 'urlOrAppId' => $urlOrAppId];
97 $params = array_merge($params, $optParams);
98 return $this->call('delete', [$params], DisplayvideoEmpty::class);
99 }
100 /**
101 * Lists sites in a channel. (sites.listAdvertisersChannelsSites)
102 *
103 * @param string $advertiserId The ID of the advertiser that owns the parent
104 * channel.
105 * @param string $channelId Required. The ID of the parent channel to which the
106 * requested sites belong.
107 * @param array $optParams Optional parameters.
108 *
109 * @opt_param string filter Allows filtering by site fields. Supported syntax: *
110 * Filter expressions for site retrieval can only contain at most one
111 * restriction. * A restriction has the form of `{field} {operator} {value}`. *
112 * All fields must use the `HAS (:)` operator. Supported fields: * `urlOrAppId`
113 * Examples: * All sites for which the URL or app ID contains "google":
114 * `urlOrAppId : "google"` The length of this field should be no more than 500
115 * characters. Reference our [filter `LIST` requests](/display-
116 * video/api/guides/how-tos/filters) guide for more information.
117 * @opt_param string orderBy Field by which to sort the list. Acceptable values
118 * are: * `urlOrAppId` (default) The default sorting order is ascending. To
119 * specify descending order for a field, a suffix " desc" should be added to the
120 * field name. Example: `urlOrAppId desc`.
121 * @opt_param int pageSize Requested page size. Must be between `1` and `10000`.
122 * If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT`
123 * if an invalid value is specified.
124 * @opt_param string pageToken A token identifying a page of results the server
125 * should return. Typically, this is the value of next_page_token returned from
126 * the previous call to `ListSites` method. If not specified, the first page of
127 * results will be returned.
128 * @opt_param string partnerId The ID of the partner that owns the parent
129 * channel.
130 * @return ListSitesResponse
131 * @throws \Google\Service\Exception
132 */
133 public function listAdvertisersChannelsSites($advertiserId, $channelId, $optParams = [])
134 {
135 $params = ['advertiserId' => $advertiserId, 'channelId' => $channelId];
136 $params = array_merge($params, $optParams);
137 return $this->call('list', [$params], ListSitesResponse::class);
138 }
139 /**
140 * Replaces all of the sites under a single channel. The operation will replace
141 * the sites under a channel with the sites provided in
142 * ReplaceSitesRequest.new_sites. **This method regularly experiences high
143 * latency.** We recommend [increasing your default timeout](/display-
144 * video/api/guides/best-practices/timeouts#client_library_timeout) to avoid
145 * errors. (sites.replace)
146 *
147 * @param string $advertiserId The ID of the advertiser that owns the parent
148 * channel.
149 * @param string $channelId Required. The ID of the parent channel whose sites
150 * will be replaced.
151 * @param ReplaceSitesRequest $postBody
152 * @param array $optParams Optional parameters.
153 * @return ReplaceSitesResponse
154 * @throws \Google\Service\Exception
155 */
156 public function replace($advertiserId, $channelId, ReplaceSitesRequest $postBody, $optParams = [])
157 {
158 $params = ['advertiserId' => $advertiserId, 'channelId' => $channelId, 'postBody' => $postBody];
159 $params = array_merge($params, $optParams);
160 return $this->call('replace', [$params], ReplaceSitesResponse::class);
161 }
162}
163
164// Adding a class alias for backwards compatibility with the previous class name.
165class_alias(AdvertisersChannelsSites::class, 'Google_Service_DisplayVideo_Resource_AdvertisersChannelsSites');
Note: See TracBrowser for help on using the repository browser.