PluginProbe
ManageWP Worker / 3.9.28
ManageWP Worker v3.9.28
4.9.38 4.9.37 4.9.36 4.9.35 4.9.34 3.8.7 3.8.8 3.9.0 3.9.1 3.9.10 3.9.11 3.9.12 3.9.13 3.9.14 3.9.15 3.9.16 3.9.17 3.9.18 3.9.19 3.9.2 3.9.20 3.9.21 3.9.22 3.9.23 3.9.24 All 73 releases
worker / lib / google-api-client / contrib / Google_SiteVerificationService.php

Google_SiteVerificationService.php in ManageWP Worker 3.9.28, at lib/google-api-client/contrib/Google_SiteVerificationService.php

288 lines 12.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /*
3 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
4 * use this file except in compliance with the License. You may obtain a copy of
5 * the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12 * License for the specific language governing permissions and limitations under
13 * the License.
14 */
15
16
17 /**
18 * The "webResource" collection of methods.
19 * Typical usage is:
20 * <code>
21 * $siteVerificationService = new Google_SiteVerificationService(...);
22 * $webResource = $siteVerificationService->webResource;
23 * </code>
24 */
25 class Google_WebResourceServiceResource extends Google_ServiceResource {
26
27
28 /**
29 * Attempt verification of a website or domain. (webResource.insert)
30 *
31 * @param string $verificationMethod The method to use for verifying a site or domain.
32 * @param Google_SiteVerificationWebResourceResource $postBody
33 * @param array $optParams Optional parameters.
34 * @return Google_SiteVerificationWebResourceResource
35 */
36 public function insert($verificationMethod, Google_SiteVerificationWebResourceResource $postBody, $optParams = array()) {
37 $params = array('verificationMethod' => $verificationMethod, 'postBody' => $postBody);
38 $params = array_merge($params, $optParams);
39 $data = $this->__call('insert', array($params));
40 if ($this->useObjects()) {
41 return new Google_SiteVerificationWebResourceResource($data);
42 } else {
43 return $data;
44 }
45 }
46 /**
47 * Get the most current data for a website or domain. (webResource.get)
48 *
49 * @param string $id The id of a verified site or domain.
50 * @param array $optParams Optional parameters.
51 * @return Google_SiteVerificationWebResourceResource
52 */
53 public function get($id, $optParams = array()) {
54 $params = array('id' => $id);
55 $params = array_merge($params, $optParams);
56 $data = $this->__call('get', array($params));
57 if ($this->useObjects()) {
58 return new Google_SiteVerificationWebResourceResource($data);
59 } else {
60 return $data;
61 }
62 }
63 /**
64 * Get the list of your verified websites and domains. (webResource.list)
65 *
66 * @param array $optParams Optional parameters.
67 * @return Google_SiteVerificationWebResourceListResponse
68 */
69 public function listWebResource($optParams = array()) {
70 $params = array();
71 $params = array_merge($params, $optParams);
72 $data = $this->__call('list', array($params));
73 if ($this->useObjects()) {
74 return new Google_SiteVerificationWebResourceListResponse($data);
75 } else {
76 return $data;
77 }
78 }
79 /**
80 * Modify the list of owners for your website or domain. (webResource.update)
81 *
82 * @param string $id The id of a verified site or domain.
83 * @param Google_SiteVerificationWebResourceResource $postBody
84 * @param array $optParams Optional parameters.
85 * @return Google_SiteVerificationWebResourceResource
86 */
87 public function update($id, Google_SiteVerificationWebResourceResource $postBody, $optParams = array()) {
88 $params = array('id' => $id, 'postBody' => $postBody);
89 $params = array_merge($params, $optParams);
90 $data = $this->__call('update', array($params));
91 if ($this->useObjects()) {
92 return new Google_SiteVerificationWebResourceResource($data);
93 } else {
94 return $data;
95 }
96 }
97 /**
98 * Modify the list of owners for your website or domain. This method supports patch semantics.
99 * (webResource.patch)
100 *
101 * @param string $id The id of a verified site or domain.
102 * @param Google_SiteVerificationWebResourceResource $postBody
103 * @param array $optParams Optional parameters.
104 * @return Google_SiteVerificationWebResourceResource
105 */
106 public function patch($id, Google_SiteVerificationWebResourceResource $postBody, $optParams = array()) {
107 $params = array('id' => $id, 'postBody' => $postBody);
108 $params = array_merge($params, $optParams);
109 $data = $this->__call('patch', array($params));
110 if ($this->useObjects()) {
111 return new Google_SiteVerificationWebResourceResource($data);
112 } else {
113 return $data;
114 }
115 }
116 /**
117 * Get a verification token for placing on a website or domain. (webResource.getToken)
118 *
119 * @param Google_SiteVerificationWebResourceGettokenRequest $postBody
120 * @param array $optParams Optional parameters.
121 * @return Google_SiteVerificationWebResourceGettokenResponse
122 */
123 public function getToken(Google_SiteVerificationWebResourceGettokenRequest $postBody, $optParams = array()) {
124 $params = array('postBody' => $postBody);
125 $params = array_merge($params, $optParams);
126 $data = $this->__call('getToken', array($params));
127 if ($this->useObjects()) {
128 return new Google_SiteVerificationWebResourceGettokenResponse($data);
129 } else {
130 return $data;
131 }
132 }
133 /**
134 * Relinquish ownership of a website or domain. (webResource.delete)
135 *
136 * @param string $id The id of a verified site or domain.
137 * @param array $optParams Optional parameters.
138 */
139 public function delete($id, $optParams = array()) {
140 $params = array('id' => $id);
141 $params = array_merge($params, $optParams);
142 $data = $this->__call('delete', array($params));
143 return $data;
144 }
145 }
146
147 /**
148 * Service definition for Google_SiteVerification (v1).
149 *
150 * <p>
151 * Lets you programatically verify ownership of websites or domains with Google.
152 * </p>
153 *
154 * <p>
155 * For more information about this service, see the
156 * <a href="http://code.google.com/apis/siteverification/" target="_blank">API Documentation</a>
157 * </p>
158 *
159 * @author Google, Inc.
160 */
161 class Google_SiteVerificationService extends Google_Service {
162 public $webResource;
163 /**
164 * Constructs the internal representation of the SiteVerification service.
165 *
166 * @param Google_Client $client
167 */
168 public function __construct(Google_Client $client) {
169 $this->servicePath = 'siteVerification/v1/';
170 $this->version = 'v1';
171 $this->serviceName = 'siteVerification';
172
173 $client->addService($this->serviceName, $this->version);
174 $this->webResource = new Google_WebResourceServiceResource($this, $this->serviceName, 'webResource', json_decode('{"methods": {"insert": {"scopes": ["https://www.googleapis.com/auth/siteverification", "https://www.googleapis.com/auth/siteverification.verify_only"], "parameters": {"verificationMethod": {"required": true, "type": "string", "location": "query"}}, "request": {"$ref": "SiteVerificationWebResourceResource"}, "response": {"$ref": "SiteVerificationWebResourceResource"}, "httpMethod": "POST", "path": "webResource", "id": "siteVerification.webResource.insert"}, "get": {"scopes": ["https://www.googleapis.com/auth/siteverification"], "parameters": {"id": {"required": true, "type": "string", "location": "path"}}, "id": "siteVerification.webResource.get", "httpMethod": "GET", "path": "webResource/{id}", "response": {"$ref": "SiteVerificationWebResourceResource"}}, "list": {"scopes": ["https://www.googleapis.com/auth/siteverification"], "path": "webResource", "response": {"$ref": "SiteVerificationWebResourceListResponse"}, "id": "siteVerification.webResource.list", "httpMethod": "GET"}, "update": {"scopes": ["https://www.googleapis.com/auth/siteverification"], "parameters": {"id": {"required": true, "type": "string", "location": "path"}}, "request": {"$ref": "SiteVerificationWebResourceResource"}, "response": {"$ref": "SiteVerificationWebResourceResource"}, "httpMethod": "PUT", "path": "webResource/{id}", "id": "siteVerification.webResource.update"}, "patch": {"scopes": ["https://www.googleapis.com/auth/siteverification"], "parameters": {"id": {"required": true, "type": "string", "location": "path"}}, "request": {"$ref": "SiteVerificationWebResourceResource"}, "response": {"$ref": "SiteVerificationWebResourceResource"}, "httpMethod": "PATCH", "path": "webResource/{id}", "id": "siteVerification.webResource.patch"}, "getToken": {"scopes": ["https://www.googleapis.com/auth/siteverification", "https://www.googleapis.com/auth/siteverification.verify_only"], "request": {"$ref": "SiteVerificationWebResourceGettokenRequest"}, "response": {"$ref": "SiteVerificationWebResourceGettokenResponse"}, "httpMethod": "POST", "path": "token", "id": "siteVerification.webResource.getToken"}, "delete": {"scopes": ["https://www.googleapis.com/auth/siteverification"], "path": "webResource/{id}", "id": "siteVerification.webResource.delete", "parameters": {"id": {"required": true, "type": "string", "location": "path"}}, "httpMethod": "DELETE"}}}', true));
175
176 }
177 }
178
179 class Google_SiteVerificationWebResourceGettokenRequest extends Google_Model {
180 public $verificationMethod;
181 protected $__siteType = 'Google_SiteVerificationWebResourceGettokenRequestSite';
182 protected $__siteDataType = '';
183 public $site;
184 public function setVerificationMethod($verificationMethod) {
185 $this->verificationMethod = $verificationMethod;
186 }
187 public function getVerificationMethod() {
188 return $this->verificationMethod;
189 }
190 public function setSite(Google_SiteVerificationWebResourceGettokenRequestSite $site) {
191 $this->site = $site;
192 }
193 public function getSite() {
194 return $this->site;
195 }
196 }
197
198 class Google_SiteVerificationWebResourceGettokenRequestSite extends Google_Model {
199 public $identifier;
200 public $type;
201 public function setIdentifier($identifier) {
202 $this->identifier = $identifier;
203 }
204 public function getIdentifier() {
205 return $this->identifier;
206 }
207 public function setType($type) {
208 $this->type = $type;
209 }
210 public function getType() {
211 return $this->type;
212 }
213 }
214
215 class Google_SiteVerificationWebResourceGettokenResponse extends Google_Model {
216 public $token;
217 public $method;
218 public function setToken($token) {
219 $this->token = $token;
220 }
221 public function getToken() {
222 return $this->token;
223 }
224 public function setMethod($method) {
225 $this->method = $method;
226 }
227 public function getMethod() {
228 return $this->method;
229 }
230 }
231
232 class Google_SiteVerificationWebResourceListResponse extends Google_Model {
233 protected $__itemsType = 'Google_SiteVerificationWebResourceResource';
234 protected $__itemsDataType = 'array';
235 public $items;
236 public function setItems(/* array(Google_SiteVerificationWebResourceResource) */ $items) {
237 $this->assertIsArray($items, 'Google_SiteVerificationWebResourceResource', __METHOD__);
238 $this->items = $items;
239 }
240 public function getItems() {
241 return $this->items;
242 }
243 }
244
245 class Google_SiteVerificationWebResourceResource extends Google_Model {
246 public $owners;
247 public $id;
248 protected $__siteType = 'Google_SiteVerificationWebResourceResourceSite';
249 protected $__siteDataType = '';
250 public $site;
251 public function setOwners(/* array(Google_string) */ $owners) {
252 $this->assertIsArray($owners, 'Google_string', __METHOD__);
253 $this->owners = $owners;
254 }
255 public function getOwners() {
256 return $this->owners;
257 }
258 public function setId($id) {
259 $this->id = $id;
260 }
261 public function getId() {
262 return $this->id;
263 }
264 public function setSite(Google_SiteVerificationWebResourceResourceSite $site) {
265 $this->site = $site;
266 }
267 public function getSite() {
268 return $this->site;
269 }
270 }
271
272 class Google_SiteVerificationWebResourceResourceSite extends Google_Model {
273 public $identifier;
274 public $type;
275 public function setIdentifier($identifier) {
276 $this->identifier = $identifier;
277 }
278 public function getIdentifier() {
279 return $this->identifier;
280 }
281 public function setType($type) {
282 $this->type = $type;
283 }
284 public function getType() {
285 return $this->type;
286 }
287 }
288