PageRenderTime 26ms CodeModel.GetById 15ms RepoModel.GetById 1ms app.codeStats 0ms

/wp-content/plugins/google-sitemap-plugin/google_api/Service/SiteVerification.php

https://bitbucket.org/joelkriteman/argento
PHP | 404 lines | 272 code | 35 blank | 97 comment | 0 complexity | c43b3da5088bae4e5051a245ed8f8978 MD5 | raw file
  1. <?php
  2. /*
  3. * Copyright 2010 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. /**
  18. * Service definition for SiteVerification (v1).
  19. *
  20. * <p>
  21. * Lets you programatically verify ownership of websites or domains with Google.</p>
  22. *
  23. * <p>
  24. * For more information about this service, see the API
  25. * <a href="https://developers.google.com/site-verification/" target="_blank">Documentation</a>
  26. * </p>
  27. *
  28. * @author Google, Inc.
  29. */
  30. class Google_Service_SiteVerification extends Google_Service
  31. {
  32. /** Manage the list of sites and domains you control. */
  33. const SITEVERIFICATION =
  34. "https://www.googleapis.com/auth/siteverification";
  35. /** Manage your new site verifications with Google. */
  36. const SITEVERIFICATION_VERIFY_ONLY =
  37. "https://www.googleapis.com/auth/siteverification.verify_only";
  38. public $webResource;
  39. /**
  40. * Constructs the internal representation of the SiteVerification service.
  41. *
  42. * @param Google_Client $client
  43. */
  44. public function __construct(Google_Client $client)
  45. {
  46. parent::__construct($client);
  47. $this->servicePath = 'siteVerification/v1/';
  48. $this->version = 'v1';
  49. $this->serviceName = 'siteVerification';
  50. $this->webResource = new Google_Service_SiteVerification_WebResource_Resource(
  51. $this,
  52. $this->serviceName,
  53. 'webResource',
  54. array(
  55. 'methods' => array(
  56. 'delete' => array(
  57. 'path' => 'webResource/{id}',
  58. 'httpMethod' => 'DELETE',
  59. 'parameters' => array(
  60. 'id' => array(
  61. 'location' => 'path',
  62. 'type' => 'string',
  63. 'required' => true,
  64. ),
  65. ),
  66. ),'get' => array(
  67. 'path' => 'webResource/{id}',
  68. 'httpMethod' => 'GET',
  69. 'parameters' => array(
  70. 'id' => array(
  71. 'location' => 'path',
  72. 'type' => 'string',
  73. 'required' => true,
  74. ),
  75. ),
  76. ),'getToken' => array(
  77. 'path' => 'token',
  78. 'httpMethod' => 'POST',
  79. 'parameters' => array(),
  80. ),'insert' => array(
  81. 'path' => 'webResource',
  82. 'httpMethod' => 'POST',
  83. 'parameters' => array(
  84. 'verificationMethod' => array(
  85. 'location' => 'query',
  86. 'type' => 'string',
  87. 'required' => true,
  88. ),
  89. ),
  90. ),'list' => array(
  91. 'path' => 'webResource',
  92. 'httpMethod' => 'GET',
  93. 'parameters' => array(),
  94. ),'patch' => array(
  95. 'path' => 'webResource/{id}',
  96. 'httpMethod' => 'PATCH',
  97. 'parameters' => array(
  98. 'id' => array(
  99. 'location' => 'path',
  100. 'type' => 'string',
  101. 'required' => true,
  102. ),
  103. ),
  104. ),'update' => array(
  105. 'path' => 'webResource/{id}',
  106. 'httpMethod' => 'PUT',
  107. 'parameters' => array(
  108. 'id' => array(
  109. 'location' => 'path',
  110. 'type' => 'string',
  111. 'required' => true,
  112. ),
  113. ),
  114. ),
  115. )
  116. )
  117. );
  118. }
  119. }
  120. /**
  121. * The "webResource" collection of methods.
  122. * Typical usage is:
  123. * <code>
  124. * $siteVerificationService = new Google_Service_SiteVerification(...);
  125. * $webResource = $siteVerificationService->webResource;
  126. * </code>
  127. */
  128. class Google_Service_SiteVerification_WebResource_Resource extends Google_Service_Resource
  129. {
  130. /**
  131. * Relinquish ownership of a website or domain. (webResource.delete)
  132. *
  133. * @param string $id The id of a verified site or domain.
  134. * @param array $optParams Optional parameters.
  135. */
  136. public function delete($id, $optParams = array())
  137. {
  138. $params = array('id' => $id);
  139. $params = array_merge($params, $optParams);
  140. return $this->call('delete', array($params));
  141. }
  142. /**
  143. * Get the most current data for a website or domain. (webResource.get)
  144. *
  145. * @param string $id The id of a verified site or domain.
  146. * @param array $optParams Optional parameters.
  147. * @return Google_Service_SiteVerification_SiteVerificationWebResourceResource
  148. */
  149. public function get($id, $optParams = array())
  150. {
  151. $params = array('id' => $id);
  152. $params = array_merge($params, $optParams);
  153. return $this->call('get', array($params), "Google_Service_SiteVerification_SiteVerificationWebResourceResource");
  154. }
  155. /**
  156. * Get a verification token for placing on a website or domain.
  157. * (webResource.getToken)
  158. *
  159. * @param Google_SiteVerificationWebResourceGettokenRequest $postBody
  160. * @param array $optParams Optional parameters.
  161. * @return Google_Service_SiteVerification_SiteVerificationWebResourceGettokenResponse
  162. */
  163. public function getToken(Google_Service_SiteVerification_SiteVerificationWebResourceGettokenRequest $postBody, $optParams = array())
  164. {
  165. $params = array('postBody' => $postBody);
  166. $params = array_merge($params, $optParams);
  167. return $this->call('getToken', array($params), "Google_Service_SiteVerification_SiteVerificationWebResourceGettokenResponse");
  168. }
  169. /**
  170. * Attempt verification of a website or domain. (webResource.insert)
  171. *
  172. * @param string $verificationMethod The method to use for verifying a site or
  173. * domain.
  174. * @param Google_SiteVerificationWebResourceResource $postBody
  175. * @param array $optParams Optional parameters.
  176. * @return Google_Service_SiteVerification_SiteVerificationWebResourceResource
  177. */
  178. public function insert($verificationMethod, Google_Service_SiteVerification_SiteVerificationWebResourceResource $postBody, $optParams = array())
  179. {
  180. $params = array('verificationMethod' => $verificationMethod, 'postBody' => $postBody);
  181. $params = array_merge($params, $optParams);
  182. return $this->call('insert', array($params), "Google_Service_SiteVerification_SiteVerificationWebResourceResource");
  183. }
  184. /**
  185. * Get the list of your verified websites and domains.
  186. * (webResource.listWebResource)
  187. *
  188. * @param array $optParams Optional parameters.
  189. * @return Google_Service_SiteVerification_SiteVerificationWebResourceListResponse
  190. */
  191. public function listWebResource($optParams = array())
  192. {
  193. $params = array();
  194. $params = array_merge($params, $optParams);
  195. return $this->call('list', array($params), "Google_Service_SiteVerification_SiteVerificationWebResourceListResponse");
  196. }
  197. /**
  198. * Modify the list of owners for your website or domain. This method supports
  199. * patch semantics. (webResource.patch)
  200. *
  201. * @param string $id The id of a verified site or domain.
  202. * @param Google_SiteVerificationWebResourceResource $postBody
  203. * @param array $optParams Optional parameters.
  204. * @return Google_Service_SiteVerification_SiteVerificationWebResourceResource
  205. */
  206. public function patch($id, Google_Service_SiteVerification_SiteVerificationWebResourceResource $postBody, $optParams = array())
  207. {
  208. $params = array('id' => $id, 'postBody' => $postBody);
  209. $params = array_merge($params, $optParams);
  210. return $this->call('patch', array($params), "Google_Service_SiteVerification_SiteVerificationWebResourceResource");
  211. }
  212. /**
  213. * Modify the list of owners for your website or domain. (webResource.update)
  214. *
  215. * @param string $id The id of a verified site or domain.
  216. * @param Google_SiteVerificationWebResourceResource $postBody
  217. * @param array $optParams Optional parameters.
  218. * @return Google_Service_SiteVerification_SiteVerificationWebResourceResource
  219. */
  220. public function update($id, Google_Service_SiteVerification_SiteVerificationWebResourceResource $postBody, $optParams = array())
  221. {
  222. $params = array('id' => $id, 'postBody' => $postBody);
  223. $params = array_merge($params, $optParams);
  224. return $this->call('update', array($params), "Google_Service_SiteVerification_SiteVerificationWebResourceResource");
  225. }
  226. }
  227. class Google_Service_SiteVerification_SiteVerificationWebResourceGettokenRequest extends Google_Model
  228. {
  229. protected $internal_gapi_mappings = array(
  230. );
  231. protected $siteType = 'Google_Service_SiteVerification_SiteVerificationWebResourceGettokenRequestSite';
  232. protected $siteDataType = '';
  233. public $verificationMethod;
  234. public function setSite(Google_Service_SiteVerification_SiteVerificationWebResourceGettokenRequestSite $site)
  235. {
  236. $this->site = $site;
  237. }
  238. public function getSite()
  239. {
  240. return $this->site;
  241. }
  242. public function setVerificationMethod($verificationMethod)
  243. {
  244. $this->verificationMethod = $verificationMethod;
  245. }
  246. public function getVerificationMethod()
  247. {
  248. return $this->verificationMethod;
  249. }
  250. }
  251. class Google_Service_SiteVerification_SiteVerificationWebResourceGettokenRequestSite extends Google_Model
  252. {
  253. protected $internal_gapi_mappings = array(
  254. );
  255. public $identifier;
  256. public $type;
  257. public function setIdentifier($identifier)
  258. {
  259. $this->identifier = $identifier;
  260. }
  261. public function getIdentifier()
  262. {
  263. return $this->identifier;
  264. }
  265. public function setType($type)
  266. {
  267. $this->type = $type;
  268. }
  269. public function getType()
  270. {
  271. return $this->type;
  272. }
  273. }
  274. class Google_Service_SiteVerification_SiteVerificationWebResourceGettokenResponse extends Google_Model
  275. {
  276. protected $internal_gapi_mappings = array(
  277. );
  278. public $method;
  279. public $token;
  280. public function setMethod($method)
  281. {
  282. $this->method = $method;
  283. }
  284. public function getMethod()
  285. {
  286. return $this->method;
  287. }
  288. public function setToken($token)
  289. {
  290. $this->token = $token;
  291. }
  292. public function getToken()
  293. {
  294. return $this->token;
  295. }
  296. }
  297. class Google_Service_SiteVerification_SiteVerificationWebResourceListResponse extends Google_Collection
  298. {
  299. protected $collection_key = 'items';
  300. protected $internal_gapi_mappings = array(
  301. );
  302. protected $itemsType = 'Google_Service_SiteVerification_SiteVerificationWebResourceResource';
  303. protected $itemsDataType = 'array';
  304. public function setItems($items)
  305. {
  306. $this->items = $items;
  307. }
  308. public function getItems()
  309. {
  310. return $this->items;
  311. }
  312. }
  313. class Google_Service_SiteVerification_SiteVerificationWebResourceResource extends Google_Collection
  314. {
  315. protected $collection_key = 'owners';
  316. protected $internal_gapi_mappings = array(
  317. );
  318. public $id;
  319. public $owners;
  320. protected $siteType = 'Google_Service_SiteVerification_SiteVerificationWebResourceResourceSite';
  321. protected $siteDataType = '';
  322. public function setId($id)
  323. {
  324. $this->id = $id;
  325. }
  326. public function getId()
  327. {
  328. return $this->id;
  329. }
  330. public function setOwners($owners)
  331. {
  332. $this->owners = $owners;
  333. }
  334. public function getOwners()
  335. {
  336. return $this->owners;
  337. }
  338. public function setSite(Google_Service_SiteVerification_SiteVerificationWebResourceResourceSite $site)
  339. {
  340. $this->site = $site;
  341. }
  342. public function getSite()
  343. {
  344. return $this->site;
  345. }
  346. }
  347. class Google_Service_SiteVerification_SiteVerificationWebResourceResourceSite extends Google_Model
  348. {
  349. protected $internal_gapi_mappings = array(
  350. );
  351. public $identifier;
  352. public $type;
  353. public function setIdentifier($identifier)
  354. {
  355. $this->identifier = $identifier;
  356. }
  357. public function getIdentifier()
  358. {
  359. return $this->identifier;
  360. }
  361. public function setType($type)
  362. {
  363. $this->type = $type;
  364. }
  365. public function getType()
  366. {
  367. return $this->type;
  368. }
  369. }