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