Brak opisu

Gmail.php 37KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136
  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. /**
  18. * Service definition for Gmail (v1).
  19. *
  20. * <p>
  21. * Access Gmail mailboxes including sending user email.</p>
  22. *
  23. * <p>
  24. * For more information about this service, see the API
  25. * <a href="https://developers.google.com/gmail/api/" target="_blank">Documentation</a>
  26. * </p>
  27. *
  28. * @author Google, Inc.
  29. */
  30. class Google_Service_Gmail extends Google_Service
  31. {
  32. /** Read, send, delete, and manage your email. */
  33. const MAIL_GOOGLE_COM =
  34. "https://mail.google.com/";
  35. /** Manage drafts and send emails. */
  36. const GMAIL_COMPOSE =
  37. "https://www.googleapis.com/auth/gmail.compose";
  38. /** Insert mail into your mailbox. */
  39. const GMAIL_INSERT =
  40. "https://www.googleapis.com/auth/gmail.insert";
  41. /** Manage mailbox labels. */
  42. const GMAIL_LABELS =
  43. "https://www.googleapis.com/auth/gmail.labels";
  44. /** View your email message metadata such as labels and headers, but not the email body. */
  45. const GMAIL_METADATA =
  46. "https://www.googleapis.com/auth/gmail.metadata";
  47. /** View and modify but not delete your email. */
  48. const GMAIL_MODIFY =
  49. "https://www.googleapis.com/auth/gmail.modify";
  50. /** View your email messages and settings. */
  51. const GMAIL_READONLY =
  52. "https://www.googleapis.com/auth/gmail.readonly";
  53. /** Send email on your behalf. */
  54. const GMAIL_SEND =
  55. "https://www.googleapis.com/auth/gmail.send";
  56. /** Manage your basic mail settings. */
  57. const GMAIL_SETTINGS_BASIC =
  58. "https://www.googleapis.com/auth/gmail.settings.basic";
  59. /** Manage your sensitive mail settings, including who can manage your mail. */
  60. const GMAIL_SETTINGS_SHARING =
  61. "https://www.googleapis.com/auth/gmail.settings.sharing";
  62. public $users;
  63. public $users_drafts;
  64. public $users_history;
  65. public $users_labels;
  66. public $users_messages;
  67. public $users_messages_attachments;
  68. public $users_settings;
  69. public $users_settings_filters;
  70. public $users_settings_forwardingAddresses;
  71. public $users_settings_sendAs;
  72. public $users_settings_sendAs_smimeInfo;
  73. public $users_threads;
  74. /**
  75. * Constructs the internal representation of the Gmail service.
  76. *
  77. * @param Google_Client $client
  78. */
  79. public function __construct(Google_Client $client)
  80. {
  81. parent::__construct($client);
  82. $this->rootUrl = 'https://www.googleapis.com/';
  83. $this->servicePath = 'gmail/v1/users/';
  84. $this->version = 'v1';
  85. $this->serviceName = 'gmail';
  86. $this->users = new Google_Service_Gmail_Resource_Users(
  87. $this,
  88. $this->serviceName,
  89. 'users',
  90. array(
  91. 'methods' => array(
  92. 'getProfile' => array(
  93. 'path' => '{userId}/profile',
  94. 'httpMethod' => 'GET',
  95. 'parameters' => array(
  96. 'userId' => array(
  97. 'location' => 'path',
  98. 'type' => 'string',
  99. 'required' => true,
  100. ),
  101. ),
  102. ),'stop' => array(
  103. 'path' => '{userId}/stop',
  104. 'httpMethod' => 'POST',
  105. 'parameters' => array(
  106. 'userId' => array(
  107. 'location' => 'path',
  108. 'type' => 'string',
  109. 'required' => true,
  110. ),
  111. ),
  112. ),'watch' => array(
  113. 'path' => '{userId}/watch',
  114. 'httpMethod' => 'POST',
  115. 'parameters' => array(
  116. 'userId' => array(
  117. 'location' => 'path',
  118. 'type' => 'string',
  119. 'required' => true,
  120. ),
  121. ),
  122. ),
  123. )
  124. )
  125. );
  126. $this->users_drafts = new Google_Service_Gmail_Resource_UsersDrafts(
  127. $this,
  128. $this->serviceName,
  129. 'drafts',
  130. array(
  131. 'methods' => array(
  132. 'create' => array(
  133. 'path' => '{userId}/drafts',
  134. 'httpMethod' => 'POST',
  135. 'parameters' => array(
  136. 'userId' => array(
  137. 'location' => 'path',
  138. 'type' => 'string',
  139. 'required' => true,
  140. ),
  141. ),
  142. ),'delete' => array(
  143. 'path' => '{userId}/drafts/{id}',
  144. 'httpMethod' => 'DELETE',
  145. 'parameters' => array(
  146. 'userId' => array(
  147. 'location' => 'path',
  148. 'type' => 'string',
  149. 'required' => true,
  150. ),
  151. 'id' => array(
  152. 'location' => 'path',
  153. 'type' => 'string',
  154. 'required' => true,
  155. ),
  156. ),
  157. ),'get' => array(
  158. 'path' => '{userId}/drafts/{id}',
  159. 'httpMethod' => 'GET',
  160. 'parameters' => array(
  161. 'userId' => array(
  162. 'location' => 'path',
  163. 'type' => 'string',
  164. 'required' => true,
  165. ),
  166. 'id' => array(
  167. 'location' => 'path',
  168. 'type' => 'string',
  169. 'required' => true,
  170. ),
  171. 'format' => array(
  172. 'location' => 'query',
  173. 'type' => 'string',
  174. ),
  175. ),
  176. ),'list' => array(
  177. 'path' => '{userId}/drafts',
  178. 'httpMethod' => 'GET',
  179. 'parameters' => array(
  180. 'userId' => array(
  181. 'location' => 'path',
  182. 'type' => 'string',
  183. 'required' => true,
  184. ),
  185. 'includeSpamTrash' => array(
  186. 'location' => 'query',
  187. 'type' => 'boolean',
  188. ),
  189. 'maxResults' => array(
  190. 'location' => 'query',
  191. 'type' => 'integer',
  192. ),
  193. 'pageToken' => array(
  194. 'location' => 'query',
  195. 'type' => 'string',
  196. ),
  197. 'q' => array(
  198. 'location' => 'query',
  199. 'type' => 'string',
  200. ),
  201. ),
  202. ),'send' => array(
  203. 'path' => '{userId}/drafts/send',
  204. 'httpMethod' => 'POST',
  205. 'parameters' => array(
  206. 'userId' => array(
  207. 'location' => 'path',
  208. 'type' => 'string',
  209. 'required' => true,
  210. ),
  211. ),
  212. ),'update' => array(
  213. 'path' => '{userId}/drafts/{id}',
  214. 'httpMethod' => 'PUT',
  215. 'parameters' => array(
  216. 'userId' => array(
  217. 'location' => 'path',
  218. 'type' => 'string',
  219. 'required' => true,
  220. ),
  221. 'id' => array(
  222. 'location' => 'path',
  223. 'type' => 'string',
  224. 'required' => true,
  225. ),
  226. ),
  227. ),
  228. )
  229. )
  230. );
  231. $this->users_history = new Google_Service_Gmail_Resource_UsersHistory(
  232. $this,
  233. $this->serviceName,
  234. 'history',
  235. array(
  236. 'methods' => array(
  237. 'list' => array(
  238. 'path' => '{userId}/history',
  239. 'httpMethod' => 'GET',
  240. 'parameters' => array(
  241. 'userId' => array(
  242. 'location' => 'path',
  243. 'type' => 'string',
  244. 'required' => true,
  245. ),
  246. 'historyTypes' => array(
  247. 'location' => 'query',
  248. 'type' => 'string',
  249. 'repeated' => true,
  250. ),
  251. 'labelId' => array(
  252. 'location' => 'query',
  253. 'type' => 'string',
  254. ),
  255. 'maxResults' => array(
  256. 'location' => 'query',
  257. 'type' => 'integer',
  258. ),
  259. 'pageToken' => array(
  260. 'location' => 'query',
  261. 'type' => 'string',
  262. ),
  263. 'startHistoryId' => array(
  264. 'location' => 'query',
  265. 'type' => 'string',
  266. ),
  267. ),
  268. ),
  269. )
  270. )
  271. );
  272. $this->users_labels = new Google_Service_Gmail_Resource_UsersLabels(
  273. $this,
  274. $this->serviceName,
  275. 'labels',
  276. array(
  277. 'methods' => array(
  278. 'create' => array(
  279. 'path' => '{userId}/labels',
  280. 'httpMethod' => 'POST',
  281. 'parameters' => array(
  282. 'userId' => array(
  283. 'location' => 'path',
  284. 'type' => 'string',
  285. 'required' => true,
  286. ),
  287. ),
  288. ),'delete' => array(
  289. 'path' => '{userId}/labels/{id}',
  290. 'httpMethod' => 'DELETE',
  291. 'parameters' => array(
  292. 'userId' => array(
  293. 'location' => 'path',
  294. 'type' => 'string',
  295. 'required' => true,
  296. ),
  297. 'id' => array(
  298. 'location' => 'path',
  299. 'type' => 'string',
  300. 'required' => true,
  301. ),
  302. ),
  303. ),'get' => array(
  304. 'path' => '{userId}/labels/{id}',
  305. 'httpMethod' => 'GET',
  306. 'parameters' => array(
  307. 'userId' => array(
  308. 'location' => 'path',
  309. 'type' => 'string',
  310. 'required' => true,
  311. ),
  312. 'id' => array(
  313. 'location' => 'path',
  314. 'type' => 'string',
  315. 'required' => true,
  316. ),
  317. ),
  318. ),'list' => array(
  319. 'path' => '{userId}/labels',
  320. 'httpMethod' => 'GET',
  321. 'parameters' => array(
  322. 'userId' => array(
  323. 'location' => 'path',
  324. 'type' => 'string',
  325. 'required' => true,
  326. ),
  327. ),
  328. ),'patch' => array(
  329. 'path' => '{userId}/labels/{id}',
  330. 'httpMethod' => 'PATCH',
  331. 'parameters' => array(
  332. 'userId' => array(
  333. 'location' => 'path',
  334. 'type' => 'string',
  335. 'required' => true,
  336. ),
  337. 'id' => array(
  338. 'location' => 'path',
  339. 'type' => 'string',
  340. 'required' => true,
  341. ),
  342. ),
  343. ),'update' => array(
  344. 'path' => '{userId}/labels/{id}',
  345. 'httpMethod' => 'PUT',
  346. 'parameters' => array(
  347. 'userId' => array(
  348. 'location' => 'path',
  349. 'type' => 'string',
  350. 'required' => true,
  351. ),
  352. 'id' => array(
  353. 'location' => 'path',
  354. 'type' => 'string',
  355. 'required' => true,
  356. ),
  357. ),
  358. ),
  359. )
  360. )
  361. );
  362. $this->users_messages = new Google_Service_Gmail_Resource_UsersMessages(
  363. $this,
  364. $this->serviceName,
  365. 'messages',
  366. array(
  367. 'methods' => array(
  368. 'batchDelete' => array(
  369. 'path' => '{userId}/messages/batchDelete',
  370. 'httpMethod' => 'POST',
  371. 'parameters' => array(
  372. 'userId' => array(
  373. 'location' => 'path',
  374. 'type' => 'string',
  375. 'required' => true,
  376. ),
  377. ),
  378. ),'batchModify' => array(
  379. 'path' => '{userId}/messages/batchModify',
  380. 'httpMethod' => 'POST',
  381. 'parameters' => array(
  382. 'userId' => array(
  383. 'location' => 'path',
  384. 'type' => 'string',
  385. 'required' => true,
  386. ),
  387. ),
  388. ),'delete' => array(
  389. 'path' => '{userId}/messages/{id}',
  390. 'httpMethod' => 'DELETE',
  391. 'parameters' => array(
  392. 'userId' => array(
  393. 'location' => 'path',
  394. 'type' => 'string',
  395. 'required' => true,
  396. ),
  397. 'id' => array(
  398. 'location' => 'path',
  399. 'type' => 'string',
  400. 'required' => true,
  401. ),
  402. ),
  403. ),'get' => array(
  404. 'path' => '{userId}/messages/{id}',
  405. 'httpMethod' => 'GET',
  406. 'parameters' => array(
  407. 'userId' => array(
  408. 'location' => 'path',
  409. 'type' => 'string',
  410. 'required' => true,
  411. ),
  412. 'id' => array(
  413. 'location' => 'path',
  414. 'type' => 'string',
  415. 'required' => true,
  416. ),
  417. 'format' => array(
  418. 'location' => 'query',
  419. 'type' => 'string',
  420. ),
  421. 'metadataHeaders' => array(
  422. 'location' => 'query',
  423. 'type' => 'string',
  424. 'repeated' => true,
  425. ),
  426. ),
  427. ),'import' => array(
  428. 'path' => '{userId}/messages/import',
  429. 'httpMethod' => 'POST',
  430. 'parameters' => array(
  431. 'userId' => array(
  432. 'location' => 'path',
  433. 'type' => 'string',
  434. 'required' => true,
  435. ),
  436. 'deleted' => array(
  437. 'location' => 'query',
  438. 'type' => 'boolean',
  439. ),
  440. 'internalDateSource' => array(
  441. 'location' => 'query',
  442. 'type' => 'string',
  443. ),
  444. 'neverMarkSpam' => array(
  445. 'location' => 'query',
  446. 'type' => 'boolean',
  447. ),
  448. 'processForCalendar' => array(
  449. 'location' => 'query',
  450. 'type' => 'boolean',
  451. ),
  452. ),
  453. ),'insert' => array(
  454. 'path' => '{userId}/messages',
  455. 'httpMethod' => 'POST',
  456. 'parameters' => array(
  457. 'userId' => array(
  458. 'location' => 'path',
  459. 'type' => 'string',
  460. 'required' => true,
  461. ),
  462. 'deleted' => array(
  463. 'location' => 'query',
  464. 'type' => 'boolean',
  465. ),
  466. 'internalDateSource' => array(
  467. 'location' => 'query',
  468. 'type' => 'string',
  469. ),
  470. ),
  471. ),'list' => array(
  472. 'path' => '{userId}/messages',
  473. 'httpMethod' => 'GET',
  474. 'parameters' => array(
  475. 'userId' => array(
  476. 'location' => 'path',
  477. 'type' => 'string',
  478. 'required' => true,
  479. ),
  480. 'includeSpamTrash' => array(
  481. 'location' => 'query',
  482. 'type' => 'boolean',
  483. ),
  484. 'labelIds' => array(
  485. 'location' => 'query',
  486. 'type' => 'string',
  487. 'repeated' => true,
  488. ),
  489. 'maxResults' => array(
  490. 'location' => 'query',
  491. 'type' => 'integer',
  492. ),
  493. 'pageToken' => array(
  494. 'location' => 'query',
  495. 'type' => 'string',
  496. ),
  497. 'q' => array(
  498. 'location' => 'query',
  499. 'type' => 'string',
  500. ),
  501. ),
  502. ),'modify' => array(
  503. 'path' => '{userId}/messages/{id}/modify',
  504. 'httpMethod' => 'POST',
  505. 'parameters' => array(
  506. 'userId' => array(
  507. 'location' => 'path',
  508. 'type' => 'string',
  509. 'required' => true,
  510. ),
  511. 'id' => array(
  512. 'location' => 'path',
  513. 'type' => 'string',
  514. 'required' => true,
  515. ),
  516. ),
  517. ),'send' => array(
  518. 'path' => '{userId}/messages/send',
  519. 'httpMethod' => 'POST',
  520. 'parameters' => array(
  521. 'userId' => array(
  522. 'location' => 'path',
  523. 'type' => 'string',
  524. 'required' => true,
  525. ),
  526. ),
  527. ),'trash' => array(
  528. 'path' => '{userId}/messages/{id}/trash',
  529. 'httpMethod' => 'POST',
  530. 'parameters' => array(
  531. 'userId' => array(
  532. 'location' => 'path',
  533. 'type' => 'string',
  534. 'required' => true,
  535. ),
  536. 'id' => array(
  537. 'location' => 'path',
  538. 'type' => 'string',
  539. 'required' => true,
  540. ),
  541. ),
  542. ),'untrash' => array(
  543. 'path' => '{userId}/messages/{id}/untrash',
  544. 'httpMethod' => 'POST',
  545. 'parameters' => array(
  546. 'userId' => array(
  547. 'location' => 'path',
  548. 'type' => 'string',
  549. 'required' => true,
  550. ),
  551. 'id' => array(
  552. 'location' => 'path',
  553. 'type' => 'string',
  554. 'required' => true,
  555. ),
  556. ),
  557. ),
  558. )
  559. )
  560. );
  561. $this->users_messages_attachments = new Google_Service_Gmail_Resource_UsersMessagesAttachments(
  562. $this,
  563. $this->serviceName,
  564. 'attachments',
  565. array(
  566. 'methods' => array(
  567. 'get' => array(
  568. 'path' => '{userId}/messages/{messageId}/attachments/{id}',
  569. 'httpMethod' => 'GET',
  570. 'parameters' => array(
  571. 'userId' => array(
  572. 'location' => 'path',
  573. 'type' => 'string',
  574. 'required' => true,
  575. ),
  576. 'messageId' => array(
  577. 'location' => 'path',
  578. 'type' => 'string',
  579. 'required' => true,
  580. ),
  581. 'id' => array(
  582. 'location' => 'path',
  583. 'type' => 'string',
  584. 'required' => true,
  585. ),
  586. ),
  587. ),
  588. )
  589. )
  590. );
  591. $this->users_settings = new Google_Service_Gmail_Resource_UsersSettings(
  592. $this,
  593. $this->serviceName,
  594. 'settings',
  595. array(
  596. 'methods' => array(
  597. 'getAutoForwarding' => array(
  598. 'path' => '{userId}/settings/autoForwarding',
  599. 'httpMethod' => 'GET',
  600. 'parameters' => array(
  601. 'userId' => array(
  602. 'location' => 'path',
  603. 'type' => 'string',
  604. 'required' => true,
  605. ),
  606. ),
  607. ),'getImap' => array(
  608. 'path' => '{userId}/settings/imap',
  609. 'httpMethod' => 'GET',
  610. 'parameters' => array(
  611. 'userId' => array(
  612. 'location' => 'path',
  613. 'type' => 'string',
  614. 'required' => true,
  615. ),
  616. ),
  617. ),'getPop' => array(
  618. 'path' => '{userId}/settings/pop',
  619. 'httpMethod' => 'GET',
  620. 'parameters' => array(
  621. 'userId' => array(
  622. 'location' => 'path',
  623. 'type' => 'string',
  624. 'required' => true,
  625. ),
  626. ),
  627. ),'getVacation' => array(
  628. 'path' => '{userId}/settings/vacation',
  629. 'httpMethod' => 'GET',
  630. 'parameters' => array(
  631. 'userId' => array(
  632. 'location' => 'path',
  633. 'type' => 'string',
  634. 'required' => true,
  635. ),
  636. ),
  637. ),'updateAutoForwarding' => array(
  638. 'path' => '{userId}/settings/autoForwarding',
  639. 'httpMethod' => 'PUT',
  640. 'parameters' => array(
  641. 'userId' => array(
  642. 'location' => 'path',
  643. 'type' => 'string',
  644. 'required' => true,
  645. ),
  646. ),
  647. ),'updateImap' => array(
  648. 'path' => '{userId}/settings/imap',
  649. 'httpMethod' => 'PUT',
  650. 'parameters' => array(
  651. 'userId' => array(
  652. 'location' => 'path',
  653. 'type' => 'string',
  654. 'required' => true,
  655. ),
  656. ),
  657. ),'updatePop' => array(
  658. 'path' => '{userId}/settings/pop',
  659. 'httpMethod' => 'PUT',
  660. 'parameters' => array(
  661. 'userId' => array(
  662. 'location' => 'path',
  663. 'type' => 'string',
  664. 'required' => true,
  665. ),
  666. ),
  667. ),'updateVacation' => array(
  668. 'path' => '{userId}/settings/vacation',
  669. 'httpMethod' => 'PUT',
  670. 'parameters' => array(
  671. 'userId' => array(
  672. 'location' => 'path',
  673. 'type' => 'string',
  674. 'required' => true,
  675. ),
  676. ),
  677. ),
  678. )
  679. )
  680. );
  681. $this->users_settings_filters = new Google_Service_Gmail_Resource_UsersSettingsFilters(
  682. $this,
  683. $this->serviceName,
  684. 'filters',
  685. array(
  686. 'methods' => array(
  687. 'create' => array(
  688. 'path' => '{userId}/settings/filters',
  689. 'httpMethod' => 'POST',
  690. 'parameters' => array(
  691. 'userId' => array(
  692. 'location' => 'path',
  693. 'type' => 'string',
  694. 'required' => true,
  695. ),
  696. ),
  697. ),'delete' => array(
  698. 'path' => '{userId}/settings/filters/{id}',
  699. 'httpMethod' => 'DELETE',
  700. 'parameters' => array(
  701. 'userId' => array(
  702. 'location' => 'path',
  703. 'type' => 'string',
  704. 'required' => true,
  705. ),
  706. 'id' => array(
  707. 'location' => 'path',
  708. 'type' => 'string',
  709. 'required' => true,
  710. ),
  711. ),
  712. ),'get' => array(
  713. 'path' => '{userId}/settings/filters/{id}',
  714. 'httpMethod' => 'GET',
  715. 'parameters' => array(
  716. 'userId' => array(
  717. 'location' => 'path',
  718. 'type' => 'string',
  719. 'required' => true,
  720. ),
  721. 'id' => array(
  722. 'location' => 'path',
  723. 'type' => 'string',
  724. 'required' => true,
  725. ),
  726. ),
  727. ),'list' => array(
  728. 'path' => '{userId}/settings/filters',
  729. 'httpMethod' => 'GET',
  730. 'parameters' => array(
  731. 'userId' => array(
  732. 'location' => 'path',
  733. 'type' => 'string',
  734. 'required' => true,
  735. ),
  736. ),
  737. ),
  738. )
  739. )
  740. );
  741. $this->users_settings_forwardingAddresses = new Google_Service_Gmail_Resource_UsersSettingsForwardingAddresses(
  742. $this,
  743. $this->serviceName,
  744. 'forwardingAddresses',
  745. array(
  746. 'methods' => array(
  747. 'create' => array(
  748. 'path' => '{userId}/settings/forwardingAddresses',
  749. 'httpMethod' => 'POST',
  750. 'parameters' => array(
  751. 'userId' => array(
  752. 'location' => 'path',
  753. 'type' => 'string',
  754. 'required' => true,
  755. ),
  756. ),
  757. ),'delete' => array(
  758. 'path' => '{userId}/settings/forwardingAddresses/{forwardingEmail}',
  759. 'httpMethod' => 'DELETE',
  760. 'parameters' => array(
  761. 'userId' => array(
  762. 'location' => 'path',
  763. 'type' => 'string',
  764. 'required' => true,
  765. ),
  766. 'forwardingEmail' => array(
  767. 'location' => 'path',
  768. 'type' => 'string',
  769. 'required' => true,
  770. ),
  771. ),
  772. ),'get' => array(
  773. 'path' => '{userId}/settings/forwardingAddresses/{forwardingEmail}',
  774. 'httpMethod' => 'GET',
  775. 'parameters' => array(
  776. 'userId' => array(
  777. 'location' => 'path',
  778. 'type' => 'string',
  779. 'required' => true,
  780. ),
  781. 'forwardingEmail' => array(
  782. 'location' => 'path',
  783. 'type' => 'string',
  784. 'required' => true,
  785. ),
  786. ),
  787. ),'list' => array(
  788. 'path' => '{userId}/settings/forwardingAddresses',
  789. 'httpMethod' => 'GET',
  790. 'parameters' => array(
  791. 'userId' => array(
  792. 'location' => 'path',
  793. 'type' => 'string',
  794. 'required' => true,
  795. ),
  796. ),
  797. ),
  798. )
  799. )
  800. );
  801. $this->users_settings_sendAs = new Google_Service_Gmail_Resource_UsersSettingsSendAs(
  802. $this,
  803. $this->serviceName,
  804. 'sendAs',
  805. array(
  806. 'methods' => array(
  807. 'create' => array(
  808. 'path' => '{userId}/settings/sendAs',
  809. 'httpMethod' => 'POST',
  810. 'parameters' => array(
  811. 'userId' => array(
  812. 'location' => 'path',
  813. 'type' => 'string',
  814. 'required' => true,
  815. ),
  816. ),
  817. ),'delete' => array(
  818. 'path' => '{userId}/settings/sendAs/{sendAsEmail}',
  819. 'httpMethod' => 'DELETE',
  820. 'parameters' => array(
  821. 'userId' => array(
  822. 'location' => 'path',
  823. 'type' => 'string',
  824. 'required' => true,
  825. ),
  826. 'sendAsEmail' => array(
  827. 'location' => 'path',
  828. 'type' => 'string',
  829. 'required' => true,
  830. ),
  831. ),
  832. ),'get' => array(
  833. 'path' => '{userId}/settings/sendAs/{sendAsEmail}',
  834. 'httpMethod' => 'GET',
  835. 'parameters' => array(
  836. 'userId' => array(
  837. 'location' => 'path',
  838. 'type' => 'string',
  839. 'required' => true,
  840. ),
  841. 'sendAsEmail' => array(
  842. 'location' => 'path',
  843. 'type' => 'string',
  844. 'required' => true,
  845. ),
  846. ),
  847. ),'list' => array(
  848. 'path' => '{userId}/settings/sendAs',
  849. 'httpMethod' => 'GET',
  850. 'parameters' => array(
  851. 'userId' => array(
  852. 'location' => 'path',
  853. 'type' => 'string',
  854. 'required' => true,
  855. ),
  856. ),
  857. ),'patch' => array(
  858. 'path' => '{userId}/settings/sendAs/{sendAsEmail}',
  859. 'httpMethod' => 'PATCH',
  860. 'parameters' => array(
  861. 'userId' => array(
  862. 'location' => 'path',
  863. 'type' => 'string',
  864. 'required' => true,
  865. ),
  866. 'sendAsEmail' => array(
  867. 'location' => 'path',
  868. 'type' => 'string',
  869. 'required' => true,
  870. ),
  871. ),
  872. ),'update' => array(
  873. 'path' => '{userId}/settings/sendAs/{sendAsEmail}',
  874. 'httpMethod' => 'PUT',
  875. 'parameters' => array(
  876. 'userId' => array(
  877. 'location' => 'path',
  878. 'type' => 'string',
  879. 'required' => true,
  880. ),
  881. 'sendAsEmail' => array(
  882. 'location' => 'path',
  883. 'type' => 'string',
  884. 'required' => true,
  885. ),
  886. ),
  887. ),'verify' => array(
  888. 'path' => '{userId}/settings/sendAs/{sendAsEmail}/verify',
  889. 'httpMethod' => 'POST',
  890. 'parameters' => array(
  891. 'userId' => array(
  892. 'location' => 'path',
  893. 'type' => 'string',
  894. 'required' => true,
  895. ),
  896. 'sendAsEmail' => array(
  897. 'location' => 'path',
  898. 'type' => 'string',
  899. 'required' => true,
  900. ),
  901. ),
  902. ),
  903. )
  904. )
  905. );
  906. $this->users_settings_sendAs_smimeInfo = new Google_Service_Gmail_Resource_UsersSettingsSendAsSmimeInfo(
  907. $this,
  908. $this->serviceName,
  909. 'smimeInfo',
  910. array(
  911. 'methods' => array(
  912. 'delete' => array(
  913. 'path' => '{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id}',
  914. 'httpMethod' => 'DELETE',
  915. 'parameters' => array(
  916. 'userId' => array(
  917. 'location' => 'path',
  918. 'type' => 'string',
  919. 'required' => true,
  920. ),
  921. 'sendAsEmail' => array(
  922. 'location' => 'path',
  923. 'type' => 'string',
  924. 'required' => true,
  925. ),
  926. 'id' => array(
  927. 'location' => 'path',
  928. 'type' => 'string',
  929. 'required' => true,
  930. ),
  931. ),
  932. ),'get' => array(
  933. 'path' => '{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id}',
  934. 'httpMethod' => 'GET',
  935. 'parameters' => array(
  936. 'userId' => array(
  937. 'location' => 'path',
  938. 'type' => 'string',
  939. 'required' => true,
  940. ),
  941. 'sendAsEmail' => array(
  942. 'location' => 'path',
  943. 'type' => 'string',
  944. 'required' => true,
  945. ),
  946. 'id' => array(
  947. 'location' => 'path',
  948. 'type' => 'string',
  949. 'required' => true,
  950. ),
  951. ),
  952. ),'insert' => array(
  953. 'path' => '{userId}/settings/sendAs/{sendAsEmail}/smimeInfo',
  954. 'httpMethod' => 'POST',
  955. 'parameters' => array(
  956. 'userId' => array(
  957. 'location' => 'path',
  958. 'type' => 'string',
  959. 'required' => true,
  960. ),
  961. 'sendAsEmail' => array(
  962. 'location' => 'path',
  963. 'type' => 'string',
  964. 'required' => true,
  965. ),
  966. ),
  967. ),'list' => array(
  968. 'path' => '{userId}/settings/sendAs/{sendAsEmail}/smimeInfo',
  969. 'httpMethod' => 'GET',
  970. 'parameters' => array(
  971. 'userId' => array(
  972. 'location' => 'path',
  973. 'type' => 'string',
  974. 'required' => true,
  975. ),
  976. 'sendAsEmail' => array(
  977. 'location' => 'path',
  978. 'type' => 'string',
  979. 'required' => true,
  980. ),
  981. ),
  982. ),'setDefault' => array(
  983. 'path' => '{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id}/setDefault',
  984. 'httpMethod' => 'POST',
  985. 'parameters' => array(
  986. 'userId' => array(
  987. 'location' => 'path',
  988. 'type' => 'string',
  989. 'required' => true,
  990. ),
  991. 'sendAsEmail' => array(
  992. 'location' => 'path',
  993. 'type' => 'string',
  994. 'required' => true,
  995. ),
  996. 'id' => array(
  997. 'location' => 'path',
  998. 'type' => 'string',
  999. 'required' => true,
  1000. ),
  1001. ),
  1002. ),
  1003. )
  1004. )
  1005. );
  1006. $this->users_threads = new Google_Service_Gmail_Resource_UsersThreads(
  1007. $this,
  1008. $this->serviceName,
  1009. 'threads',
  1010. array(
  1011. 'methods' => array(
  1012. 'delete' => array(
  1013. 'path' => '{userId}/threads/{id}',
  1014. 'httpMethod' => 'DELETE',
  1015. 'parameters' => array(
  1016. 'userId' => array(
  1017. 'location' => 'path',
  1018. 'type' => 'string',
  1019. 'required' => true,
  1020. ),
  1021. 'id' => array(
  1022. 'location' => 'path',
  1023. 'type' => 'string',
  1024. 'required' => true,
  1025. ),
  1026. ),
  1027. ),'get' => array(
  1028. 'path' => '{userId}/threads/{id}',
  1029. 'httpMethod' => 'GET',
  1030. 'parameters' => array(
  1031. 'userId' => array(
  1032. 'location' => 'path',
  1033. 'type' => 'string',
  1034. 'required' => true,
  1035. ),
  1036. 'id' => array(
  1037. 'location' => 'path',
  1038. 'type' => 'string',
  1039. 'required' => true,
  1040. ),
  1041. 'format' => array(
  1042. 'location' => 'query',
  1043. 'type' => 'string',
  1044. ),
  1045. 'metadataHeaders' => array(
  1046. 'location' => 'query',
  1047. 'type' => 'string',
  1048. 'repeated' => true,
  1049. ),
  1050. ),
  1051. ),'list' => array(
  1052. 'path' => '{userId}/threads',
  1053. 'httpMethod' => 'GET',
  1054. 'parameters' => array(
  1055. 'userId' => array(
  1056. 'location' => 'path',
  1057. 'type' => 'string',
  1058. 'required' => true,
  1059. ),
  1060. 'includeSpamTrash' => array(
  1061. 'location' => 'query',
  1062. 'type' => 'boolean',
  1063. ),
  1064. 'labelIds' => array(
  1065. 'location' => 'query',
  1066. 'type' => 'string',
  1067. 'repeated' => true,
  1068. ),
  1069. 'maxResults' => array(
  1070. 'location' => 'query',
  1071. 'type' => 'integer',
  1072. ),
  1073. 'pageToken' => array(
  1074. 'location' => 'query',
  1075. 'type' => 'string',
  1076. ),
  1077. 'q' => array(
  1078. 'location' => 'query',
  1079. 'type' => 'string',
  1080. ),
  1081. ),
  1082. ),'modify' => array(
  1083. 'path' => '{userId}/threads/{id}/modify',
  1084. 'httpMethod' => 'POST',
  1085. 'parameters' => array(
  1086. 'userId' => array(
  1087. 'location' => 'path',
  1088. 'type' => 'string',
  1089. 'required' => true,
  1090. ),
  1091. 'id' => array(
  1092. 'location' => 'path',
  1093. 'type' => 'string',
  1094. 'required' => true,
  1095. ),
  1096. ),
  1097. ),'trash' => array(
  1098. 'path' => '{userId}/threads/{id}/trash',
  1099. 'httpMethod' => 'POST',
  1100. 'parameters' => array(
  1101. 'userId' => array(
  1102. 'location' => 'path',
  1103. 'type' => 'string',
  1104. 'required' => true,
  1105. ),
  1106. 'id' => array(
  1107. 'location' => 'path',
  1108. 'type' => 'string',
  1109. 'required' => true,
  1110. ),
  1111. ),
  1112. ),'untrash' => array(
  1113. 'path' => '{userId}/threads/{id}/untrash',
  1114. 'httpMethod' => 'POST',
  1115. 'parameters' => array(
  1116. 'userId' => array(
  1117. 'location' => 'path',
  1118. 'type' => 'string',
  1119. 'required' => true,
  1120. ),
  1121. 'id' => array(
  1122. 'location' => 'path',
  1123. 'type' => 'string',
  1124. 'required' => true,
  1125. ),
  1126. ),
  1127. ),
  1128. )
  1129. )
  1130. );
  1131. }
  1132. }