wp-database-backup
/
includes
/
admin
/
Destination
/
Google
/
google-api-php-client
/
src
/
contrib
/
Google_SiteVerificationService.php
Google_SiteVerificationService.php in WP Database Backup – Unlimited Database & Files Backup by Backup for WP 6.11, at includes/admin/Destination/Google/google-api-php-client/src/contrib/Google_SiteVerificationService.php
| 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 | * Relinquish ownership of a website or domain. (webResource.delete) |
| 29 | * |
| 30 | * @param string $id The id of a verified site or domain. |
| 31 | * @param array $optParams Optional parameters. |
| 32 | */ |
| 33 | public function delete($id, $optParams = array()) { |
| 34 | $params = array('id' => $id); |
| 35 | $params = array_merge($params, $optParams); |
| 36 | $data = $this->__call('delete', array($params)); |
| 37 | return $data; |
| 38 | } |
| 39 | /** |
| 40 | * Get the most current data for a website or domain. (webResource.get) |
| 41 | * |
| 42 | * @param string $id The id of a verified site or domain. |
| 43 | * @param array $optParams Optional parameters. |
| 44 | * @return Google_SiteVerificationWebResourceResource |
| 45 | */ |
| 46 | public function get($id, $optParams = array()) { |
| 47 | $params = array('id' => $id); |
| 48 | $params = array_merge($params, $optParams); |
| 49 | $data = $this->__call('get', array($params)); |
| 50 | if ($this->useObjects()) { |
| 51 | return new Google_SiteVerificationWebResourceResource($data); |
| 52 | } else { |
| 53 | return $data; |
| 54 | } |
| 55 | } |
| 56 | /** |
| 57 | * Get a verification token for placing on a website or domain. (webResource.getToken) |
| 58 | * |
| 59 | * @param Google_SiteVerificationWebResourceGettokenRequest $postBody |
| 60 | * @param array $optParams Optional parameters. |
| 61 | * @return Google_SiteVerificationWebResourceGettokenResponse |
| 62 | */ |
| 63 | public function getToken(Google_SiteVerificationWebResourceGettokenRequest $postBody, $optParams = array()) { |
| 64 | $params = array('postBody' => $postBody); |
| 65 | $params = array_merge($params, $optParams); |
| 66 | $data = $this->__call('getToken', array($params)); |
| 67 | if ($this->useObjects()) { |
| 68 | return new Google_SiteVerificationWebResourceGettokenResponse($data); |
| 69 | } else { |
| 70 | return $data; |
| 71 | } |
| 72 | } |
| 73 | /** |
| 74 | * Attempt verification of a website or domain. (webResource.insert) |
| 75 | * |
| 76 | * @param string $verificationMethod The method to use for verifying a site or domain. |
| 77 | * @param Google_SiteVerificationWebResourceResource $postBody |
| 78 | * @param array $optParams Optional parameters. |
| 79 | * @return Google_SiteVerificationWebResourceResource |
| 80 | */ |
| 81 | public function insert($verificationMethod, Google_SiteVerificationWebResourceResource $postBody, $optParams = array()) { |
| 82 | $params = array('verificationMethod' => $verificationMethod, 'postBody' => $postBody); |
| 83 | $params = array_merge($params, $optParams); |
| 84 | $data = $this->__call('insert', array($params)); |
| 85 | if ($this->useObjects()) { |
| 86 | return new Google_SiteVerificationWebResourceResource($data); |
| 87 | } else { |
| 88 | return $data; |
| 89 | } |
| 90 | } |
| 91 | /** |
| 92 | * Get the list of your verified websites and domains. (webResource.list) |
| 93 | * |
| 94 | * @param array $optParams Optional parameters. |
| 95 | * @return Google_SiteVerificationWebResourceListResponse |
| 96 | */ |
| 97 | public function listWebResource($optParams = array()) { |
| 98 | $params = array(); |
| 99 | $params = array_merge($params, $optParams); |
| 100 | $data = $this->__call('list', array($params)); |
| 101 | if ($this->useObjects()) { |
| 102 | return new Google_SiteVerificationWebResourceListResponse($data); |
| 103 | } else { |
| 104 | return $data; |
| 105 | } |
| 106 | } |
| 107 | /** |
| 108 | * Modify the list of owners for your website or domain. This method supports patch semantics. |
| 109 | * (webResource.patch) |
| 110 | * |
| 111 | * @param string $id The id of a verified site or domain. |
| 112 | * @param Google_SiteVerificationWebResourceResource $postBody |
| 113 | * @param array $optParams Optional parameters. |
| 114 | * @return Google_SiteVerificationWebResourceResource |
| 115 | */ |
| 116 | public function patch($id, Google_SiteVerificationWebResourceResource $postBody, $optParams = array()) { |
| 117 | $params = array('id' => $id, 'postBody' => $postBody); |
| 118 | $params = array_merge($params, $optParams); |
| 119 | $data = $this->__call('patch', array($params)); |
| 120 | if ($this->useObjects()) { |
| 121 | return new Google_SiteVerificationWebResourceResource($data); |
| 122 | } else { |
| 123 | return $data; |
| 124 | } |
| 125 | } |
| 126 | /** |
| 127 | * Modify the list of owners for your website or domain. (webResource.update) |
| 128 | * |
| 129 | * @param string $id The id of a verified site or domain. |
| 130 | * @param Google_SiteVerificationWebResourceResource $postBody |
| 131 | * @param array $optParams Optional parameters. |
| 132 | * @return Google_SiteVerificationWebResourceResource |
| 133 | */ |
| 134 | public function update($id, Google_SiteVerificationWebResourceResource $postBody, $optParams = array()) { |
| 135 | $params = array('id' => $id, 'postBody' => $postBody); |
| 136 | $params = array_merge($params, $optParams); |
| 137 | $data = $this->__call('update', array($params)); |
| 138 | if ($this->useObjects()) { |
| 139 | return new Google_SiteVerificationWebResourceResource($data); |
| 140 | } else { |
| 141 | return $data; |
| 142 | } |
| 143 | } |
| 144 | } |
| 145 | |
| 146 | /** |
| 147 | * Service definition for Google_SiteVerification (v1). |
| 148 | * |
| 149 | * <p> |
| 150 | * Lets you programatically verify ownership of websites or domains with Google. |
| 151 | * </p> |
| 152 | * |
| 153 | * <p> |
| 154 | * For more information about this service, see the |
| 155 | * <a href="https://developers.google.com/site-verification/" target="_blank">API Documentation</a> |
| 156 | * </p> |
| 157 | * |
| 158 | * @author Google, Inc. |
| 159 | */ |
| 160 | class Google_SiteVerificationService extends Google_Service { |
| 161 | public $webResource; |
| 162 | /** |
| 163 | * Constructs the internal representation of the SiteVerification service. |
| 164 | * |
| 165 | * @param Google_Client $client |
| 166 | */ |
| 167 | public function __construct(Google_Client $client) { |
| 168 | $this->servicePath = 'siteVerification/v1/'; |
| 169 | $this->version = 'v1'; |
| 170 | $this->serviceName = 'siteVerification'; |
| 171 | |
| 172 | $client->addService($this->serviceName, $this->version); |
| 173 | $this->webResource = new Google_WebResourceServiceResource($this, $this->serviceName, 'webResource', json_decode('{"methods": {"delete": {"id": "siteVerification.webResource.delete", "path": "webResource/{id}", "httpMethod": "DELETE", "parameters": {"id": {"type": "string", "required": true, "location": "path"}}, "scopes": ["https://www.googleapis.com/auth/siteverification"]}, "get": {"id": "siteVerification.webResource.get", "path": "webResource/{id}", "httpMethod": "GET", "parameters": {"id": {"type": "string", "required": true, "location": "path"}}, "response": {"$ref": "SiteVerificationWebResourceResource"}, "scopes": ["https://www.googleapis.com/auth/siteverification"]}, "getToken": {"id": "siteVerification.webResource.getToken", "path": "token", "httpMethod": "POST", "request": {"$ref": "SiteVerificationWebResourceGettokenRequest"}, "response": {"$ref": "SiteVerificationWebResourceGettokenResponse"}, "scopes": ["https://www.googleapis.com/auth/siteverification", "https://www.googleapis.com/auth/siteverification.verify_only"]}, "insert": {"id": "siteVerification.webResource.insert", "path": "webResource", "httpMethod": "POST", "parameters": {"verificationMethod": {"type": "string", "required": true, "location": "query"}}, "request": {"$ref": "SiteVerificationWebResourceResource"}, "response": {"$ref": "SiteVerificationWebResourceResource"}, "scopes": ["https://www.googleapis.com/auth/siteverification", "https://www.googleapis.com/auth/siteverification.verify_only"]}, "list": {"id": "siteVerification.webResource.list", "path": "webResource", "httpMethod": "GET", "response": {"$ref": "SiteVerificationWebResourceListResponse"}, "scopes": ["https://www.googleapis.com/auth/siteverification"]}, "patch": {"id": "siteVerification.webResource.patch", "path": "webResource/{id}", "httpMethod": "PATCH", "parameters": {"id": {"type": "string", "required": true, "location": "path"}}, "request": {"$ref": "SiteVerificationWebResourceResource"}, "response": {"$ref": "SiteVerificationWebResourceResource"}, "scopes": ["https://www.googleapis.com/auth/siteverification"]}, "update": {"id": "siteVerification.webResource.update", "path": "webResource/{id}", "httpMethod": "PUT", "parameters": {"id": {"type": "string", "required": true, "location": "path"}}, "request": {"$ref": "SiteVerificationWebResourceResource"}, "response": {"$ref": "SiteVerificationWebResourceResource"}, "scopes": ["https://www.googleapis.com/auth/siteverification"]}}}', true)); |
| 174 | |
| 175 | } |
| 176 | } |
| 177 | |
| 178 | |
| 179 | |
| 180 | class Google_SiteVerificationWebResourceGettokenRequest extends Google_Model { |
| 181 | protected $__siteType = 'Google_SiteVerificationWebResourceGettokenRequestSite'; |
| 182 | protected $__siteDataType = ''; |
| 183 | public $site; |
| 184 | public $verificationMethod; |
| 185 | public function setSite(Google_SiteVerificationWebResourceGettokenRequestSite $site) { |
| 186 | $this->site = $site; |
| 187 | } |
| 188 | public function getSite() { |
| 189 | return $this->site; |
| 190 | } |
| 191 | public function setVerificationMethod( $verificationMethod) { |
| 192 | $this->verificationMethod = $verificationMethod; |
| 193 | } |
| 194 | public function getVerificationMethod() { |
| 195 | return $this->verificationMethod; |
| 196 | } |
| 197 | } |
| 198 | |
| 199 | class Google_SiteVerificationWebResourceGettokenRequestSite extends Google_Model { |
| 200 | public $identifier; |
| 201 | public $type; |
| 202 | public function setIdentifier( $identifier) { |
| 203 | $this->identifier = $identifier; |
| 204 | } |
| 205 | public function getIdentifier() { |
| 206 | return $this->identifier; |
| 207 | } |
| 208 | public function setType( $type) { |
| 209 | $this->type = $type; |
| 210 | } |
| 211 | public function getType() { |
| 212 | return $this->type; |
| 213 | } |
| 214 | } |
| 215 | |
| 216 | class Google_SiteVerificationWebResourceGettokenResponse extends Google_Model { |
| 217 | public $method; |
| 218 | public $token; |
| 219 | public function setMethod( $method) { |
| 220 | $this->method = $method; |
| 221 | } |
| 222 | public function getMethod() { |
| 223 | return $this->method; |
| 224 | } |
| 225 | public function setToken( $token) { |
| 226 | $this->token = $token; |
| 227 | } |
| 228 | public function getToken() { |
| 229 | return $this->token; |
| 230 | } |
| 231 | } |
| 232 | |
| 233 | class Google_SiteVerificationWebResourceListResponse extends Google_Model { |
| 234 | protected $__itemsType = 'Google_SiteVerificationWebResourceResource'; |
| 235 | protected $__itemsDataType = 'array'; |
| 236 | public $items; |
| 237 | public function setItems(/* array(Google_SiteVerificationWebResourceResource) */ $items) { |
| 238 | $this->assertIsArray($items, 'Google_SiteVerificationWebResourceResource', __METHOD__); |
| 239 | $this->items = $items; |
| 240 | } |
| 241 | public function getItems() { |
| 242 | return $this->items; |
| 243 | } |
| 244 | } |
| 245 | |
| 246 | class Google_SiteVerificationWebResourceResource extends Google_Model { |
| 247 | public $id; |
| 248 | public $owners; |
| 249 | protected $__siteType = 'Google_SiteVerificationWebResourceResourceSite'; |
| 250 | protected $__siteDataType = ''; |
| 251 | public $site; |
| 252 | public function setId( $id) { |
| 253 | $this->id = $id; |
| 254 | } |
| 255 | public function getId() { |
| 256 | return $this->id; |
| 257 | } |
| 258 | public function setOwners(/* array(Google_string) */ $owners) { |
| 259 | $this->assertIsArray($owners, 'Google_string', __METHOD__); |
| 260 | $this->owners = $owners; |
| 261 | } |
| 262 | public function getOwners() { |
| 263 | return $this->owners; |
| 264 | } |
| 265 | public function setSite(Google_SiteVerificationWebResourceResourceSite $site) { |
| 266 | $this->site = $site; |
| 267 | } |
| 268 | public function getSite() { |
| 269 | return $this->site; |
| 270 | } |
| 271 | } |
| 272 | |
| 273 | class Google_SiteVerificationWebResourceResourceSite extends Google_Model { |
| 274 | public $identifier; |
| 275 | public $type; |
| 276 | public function setIdentifier( $identifier) { |
| 277 | $this->identifier = $identifier; |
| 278 | } |
| 279 | public function getIdentifier() { |
| 280 | return $this->identifier; |
| 281 | } |
| 282 | public function setType( $type) { |
| 283 | $this->type = $type; |
| 284 | } |
| 285 | public function getType() { |
| 286 | return $this->type; |
| 287 | } |
| 288 | } |
| 289 |