PageRenderTime 61ms CodeModel.GetById 28ms RepoModel.GetById 0ms app.codeStats 0ms

/src/Google/Service/SiteVerification.php

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