lemboy-google-api-client 0.9.26

Sign up to get free protection for your applications and to get access to all the features.
Files changed (555) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +20 -0
  3. data/.rspec +2 -0
  4. data/.rubocop.yml +7 -0
  5. data/.rubocop_todo.yml +63 -0
  6. data/.travis.yml +27 -0
  7. data/.yardopts +12 -0
  8. data/CHANGELOG.md +309 -0
  9. data/CONTRIBUTING.md +31 -0
  10. data/Gemfile +53 -0
  11. data/LICENSE +202 -0
  12. data/MIGRATING.md +171 -0
  13. data/README.md +327 -0
  14. data/Rakefile +2 -0
  15. data/api_names.yaml +36215 -0
  16. data/bin/generate-api +109 -0
  17. data/generated/google/apis/adexchangebuyer2_v2beta1.rb +35 -0
  18. data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +298 -0
  19. data/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +122 -0
  20. data/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +458 -0
  21. data/generated/google/apis/adexchangebuyer_v1_3.rb +35 -0
  22. data/generated/google/apis/adexchangebuyer_v1_3/classes.rb +1335 -0
  23. data/generated/google/apis/adexchangebuyer_v1_3/representations.rb +446 -0
  24. data/generated/google/apis/adexchangebuyer_v1_3/service.rb +872 -0
  25. data/generated/google/apis/adexchangebuyer_v1_4.rb +35 -0
  26. data/generated/google/apis/adexchangebuyer_v1_4/classes.rb +3550 -0
  27. data/generated/google/apis/adexchangebuyer_v1_4/representations.rb +1421 -0
  28. data/generated/google/apis/adexchangebuyer_v1_4/service.rb +1538 -0
  29. data/generated/google/apis/adexchangeseller_v2_0.rb +37 -0
  30. data/generated/google/apis/adexchangeseller_v2_0/classes.rb +792 -0
  31. data/generated/google/apis/adexchangeseller_v2_0/representations.rb +347 -0
  32. data/generated/google/apis/adexchangeseller_v2_0/service.rb +667 -0
  33. data/generated/google/apis/admin_datatransfer_v1.rb +37 -0
  34. data/generated/google/apis/admin_datatransfer_v1/classes.rb +267 -0
  35. data/generated/google/apis/admin_datatransfer_v1/representations.rb +130 -0
  36. data/generated/google/apis/admin_datatransfer_v1/service.rb +262 -0
  37. data/generated/google/apis/admin_directory_v1.rb +113 -0
  38. data/generated/google/apis/admin_directory_v1/classes.rb +3241 -0
  39. data/generated/google/apis/admin_directory_v1/representations.rb +1172 -0
  40. data/generated/google/apis/admin_directory_v1/service.rb +3857 -0
  41. data/generated/google/apis/admin_reports_v1.rb +38 -0
  42. data/generated/google/apis/admin_reports_v1/classes.rb +582 -0
  43. data/generated/google/apis/admin_reports_v1/representations.rb +257 -0
  44. data/generated/google/apis/admin_reports_v1/service.rb +336 -0
  45. data/generated/google/apis/adsense_v1_4.rb +37 -0
  46. data/generated/google/apis/adsense_v1_4/classes.rb +1280 -0
  47. data/generated/google/apis/adsense_v1_4/representations.rb +555 -0
  48. data/generated/google/apis/adsense_v1_4/service.rb +1713 -0
  49. data/generated/google/apis/adsensehost_v4_1.rb +35 -0
  50. data/generated/google/apis/adsensehost_v4_1/classes.rb +836 -0
  51. data/generated/google/apis/adsensehost_v4_1/representations.rb +367 -0
  52. data/generated/google/apis/adsensehost_v4_1/service.rb +1164 -0
  53. data/generated/google/apis/analytics_v3.rb +49 -0
  54. data/generated/google/apis/analytics_v3/classes.rb +5536 -0
  55. data/generated/google/apis/analytics_v3/representations.rb +1992 -0
  56. data/generated/google/apis/analytics_v3/service.rb +3785 -0
  57. data/generated/google/apis/analyticsreporting_v4.rb +37 -0
  58. data/generated/google/apis/analyticsreporting_v4/classes.rb +1420 -0
  59. data/generated/google/apis/analyticsreporting_v4/representations.rb +598 -0
  60. data/generated/google/apis/analyticsreporting_v4/service.rb +88 -0
  61. data/generated/google/apis/androidenterprise_v1.rb +34 -0
  62. data/generated/google/apis/androidenterprise_v1/classes.rb +2250 -0
  63. data/generated/google/apis/androidenterprise_v1/representations.rb +970 -0
  64. data/generated/google/apis/androidenterprise_v1/service.rb +3267 -0
  65. data/generated/google/apis/androidpublisher_v2.rb +34 -0
  66. data/generated/google/apis/androidpublisher_v2/classes.rb +1941 -0
  67. data/generated/google/apis/androidpublisher_v2/representations.rb +975 -0
  68. data/generated/google/apis/androidpublisher_v2/service.rb +2572 -0
  69. data/generated/google/apis/appengine_v1beta4.rb +35 -0
  70. data/generated/google/apis/appengine_v1beta4/classes.rb +1585 -0
  71. data/generated/google/apis/appengine_v1beta4/representations.rb +542 -0
  72. data/generated/google/apis/appengine_v1beta4/service.rb +477 -0
  73. data/generated/google/apis/appengine_v1beta5.rb +40 -0
  74. data/generated/google/apis/appengine_v1beta5/classes.rb +1984 -0
  75. data/generated/google/apis/appengine_v1beta5/representations.rb +765 -0
  76. data/generated/google/apis/appengine_v1beta5/service.rb +864 -0
  77. data/generated/google/apis/appsactivity_v1.rb +46 -0
  78. data/generated/google/apis/appsactivity_v1/classes.rb +415 -0
  79. data/generated/google/apis/appsactivity_v1/representations.rb +209 -0
  80. data/generated/google/apis/appsactivity_v1/service.rb +128 -0
  81. data/generated/google/apis/appstate_v1.rb +34 -0
  82. data/generated/google/apis/appstate_v1/classes.rb +154 -0
  83. data/generated/google/apis/appstate_v1/representations.rb +87 -0
  84. data/generated/google/apis/appstate_v1/service.rb +260 -0
  85. data/generated/google/apis/autoscaler_v1beta2.rb +38 -0
  86. data/generated/google/apis/autoscaler_v1beta2/classes.rb +710 -0
  87. data/generated/google/apis/autoscaler_v1beta2/representations.rb +296 -0
  88. data/generated/google/apis/autoscaler_v1beta2/service.rb +478 -0
  89. data/generated/google/apis/bigquery_v2.rb +52 -0
  90. data/generated/google/apis/bigquery_v2/classes.rb +3081 -0
  91. data/generated/google/apis/bigquery_v2/representations.rb +1094 -0
  92. data/generated/google/apis/bigquery_v2/service.rb +988 -0
  93. data/generated/google/apis/blogger_v3.rb +37 -0
  94. data/generated/google/apis/blogger_v3/classes.rb +1354 -0
  95. data/generated/google/apis/blogger_v3/representations.rb +632 -0
  96. data/generated/google/apis/blogger_v3/service.rb +1587 -0
  97. data/generated/google/apis/books_v1.rb +34 -0
  98. data/generated/google/apis/books_v1/classes.rb +4160 -0
  99. data/generated/google/apis/books_v1/representations.rb +1799 -0
  100. data/generated/google/apis/books_v1/service.rb +2300 -0
  101. data/generated/google/apis/calendar_v3.rb +37 -0
  102. data/generated/google/apis/calendar_v3/classes.rb +1742 -0
  103. data/generated/google/apis/calendar_v3/representations.rb +631 -0
  104. data/generated/google/apis/calendar_v3/service.rb +1968 -0
  105. data/generated/google/apis/civicinfo_v2.rb +32 -0
  106. data/generated/google/apis/civicinfo_v2/classes.rb +1499 -0
  107. data/generated/google/apis/civicinfo_v2/representations.rb +572 -0
  108. data/generated/google/apis/civicinfo_v2/service.rb +300 -0
  109. data/generated/google/apis/classroom_v1.rb +70 -0
  110. data/generated/google/apis/classroom_v1/classes.rb +1572 -0
  111. data/generated/google/apis/classroom_v1/representations.rb +729 -0
  112. data/generated/google/apis/classroom_v1/service.rb +1945 -0
  113. data/generated/google/apis/classroom_v1beta1.rb +49 -0
  114. data/generated/google/apis/classroom_v1beta1/classes.rb +447 -0
  115. data/generated/google/apis/classroom_v1beta1/representations.rb +190 -0
  116. data/generated/google/apis/classroom_v1beta1/service.rb +791 -0
  117. data/generated/google/apis/cloudbilling_v1.rb +35 -0
  118. data/generated/google/apis/cloudbilling_v1/classes.rb +169 -0
  119. data/generated/google/apis/cloudbilling_v1/representations.rb +87 -0
  120. data/generated/google/apis/cloudbilling_v1/service.rb +258 -0
  121. data/generated/google/apis/cloudbuild_v1.rb +34 -0
  122. data/generated/google/apis/cloudbuild_v1/classes.rb +919 -0
  123. data/generated/google/apis/cloudbuild_v1/representations.rb +364 -0
  124. data/generated/google/apis/cloudbuild_v1/service.rb +492 -0
  125. data/generated/google/apis/clouddebugger_v2.rb +38 -0
  126. data/generated/google/apis/clouddebugger_v2/classes.rb +1081 -0
  127. data/generated/google/apis/clouddebugger_v2/representations.rb +465 -0
  128. data/generated/google/apis/clouddebugger_v2/service.rb +396 -0
  129. data/generated/google/apis/cloudkms_v1beta1.rb +34 -0
  130. data/generated/google/apis/cloudkms_v1beta1/classes.rb +999 -0
  131. data/generated/google/apis/cloudkms_v1beta1/representations.rb +448 -0
  132. data/generated/google/apis/cloudkms_v1beta1/service.rb +932 -0
  133. data/generated/google/apis/cloudlatencytest_v2.rb +34 -0
  134. data/generated/google/apis/cloudlatencytest_v2/classes.rb +195 -0
  135. data/generated/google/apis/cloudlatencytest_v2/representations.rb +127 -0
  136. data/generated/google/apis/cloudlatencytest_v2/service.rb +135 -0
  137. data/generated/google/apis/cloudmonitoring_v2beta2.rb +37 -0
  138. data/generated/google/apis/cloudmonitoring_v2beta2/classes.rb +679 -0
  139. data/generated/google/apis/cloudmonitoring_v2beta2/representations.rb +353 -0
  140. data/generated/google/apis/cloudmonitoring_v2beta2/service.rb +452 -0
  141. data/generated/google/apis/cloudresourcemanager_v1.rb +38 -0
  142. data/generated/google/apis/cloudresourcemanager_v1/classes.rb +886 -0
  143. data/generated/google/apis/cloudresourcemanager_v1/representations.rb +359 -0
  144. data/generated/google/apis/cloudresourcemanager_v1/service.rb +686 -0
  145. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +38 -0
  146. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +682 -0
  147. data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +312 -0
  148. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +710 -0
  149. data/generated/google/apis/cloudtrace_v1.rb +43 -0
  150. data/generated/google/apis/cloudtrace_v1/classes.rb +188 -0
  151. data/generated/google/apis/cloudtrace_v1/representations.rb +102 -0
  152. data/generated/google/apis/cloudtrace_v1/service.rb +192 -0
  153. data/generated/google/apis/clouduseraccounts_beta.rb +44 -0
  154. data/generated/google/apis/clouduseraccounts_beta/classes.rb +845 -0
  155. data/generated/google/apis/clouduseraccounts_beta/representations.rb +352 -0
  156. data/generated/google/apis/clouduseraccounts_beta/service.rb +907 -0
  157. data/generated/google/apis/compute_beta.rb +49 -0
  158. data/generated/google/apis/compute_beta/classes.rb +12261 -0
  159. data/generated/google/apis/compute_beta/representations.rb +4615 -0
  160. data/generated/google/apis/compute_beta/service.rb +15330 -0
  161. data/generated/google/apis/compute_v1.rb +49 -0
  162. data/generated/google/apis/compute_v1/classes.rb +11179 -0
  163. data/generated/google/apis/compute_v1/representations.rb +4203 -0
  164. data/generated/google/apis/compute_v1/service.rb +12937 -0
  165. data/generated/google/apis/container_v1.rb +35 -0
  166. data/generated/google/apis/container_v1/classes.rb +1040 -0
  167. data/generated/google/apis/container_v1/representations.rb +415 -0
  168. data/generated/google/apis/container_v1/service.rb +659 -0
  169. data/generated/google/apis/container_v1beta1.rb +35 -0
  170. data/generated/google/apis/container_v1beta1/classes.rb +466 -0
  171. data/generated/google/apis/container_v1beta1/representations.rb +177 -0
  172. data/generated/google/apis/container_v1beta1/service.rb +394 -0
  173. data/generated/google/apis/content_v2.rb +35 -0
  174. data/generated/google/apis/content_v2/classes.rb +6887 -0
  175. data/generated/google/apis/content_v2/representations.rb +2963 -0
  176. data/generated/google/apis/content_v2/service.rb +2653 -0
  177. data/generated/google/apis/coordinate_v1.rb +37 -0
  178. data/generated/google/apis/coordinate_v1/classes.rb +669 -0
  179. data/generated/google/apis/coordinate_v1/representations.rb +321 -0
  180. data/generated/google/apis/coordinate_v1/service.rb +678 -0
  181. data/generated/google/apis/customsearch_v1.rb +31 -0
  182. data/generated/google/apis/customsearch_v1/classes.rb +771 -0
  183. data/generated/google/apis/customsearch_v1/representations.rb +302 -0
  184. data/generated/google/apis/customsearch_v1/service.rb +207 -0
  185. data/generated/google/apis/dataflow_v1b3.rb +37 -0
  186. data/generated/google/apis/dataflow_v1b3/classes.rb +4225 -0
  187. data/generated/google/apis/dataflow_v1b3/representations.rb +1809 -0
  188. data/generated/google/apis/dataflow_v1b3/service.rb +874 -0
  189. data/generated/google/apis/dataproc_v1.rb +34 -0
  190. data/generated/google/apis/dataproc_v1/classes.rb +1716 -0
  191. data/generated/google/apis/dataproc_v1/representations.rb +678 -0
  192. data/generated/google/apis/dataproc_v1/service.rb +670 -0
  193. data/generated/google/apis/datastore_v1.rb +38 -0
  194. data/generated/google/apis/datastore_v1/classes.rb +1289 -0
  195. data/generated/google/apis/datastore_v1/representations.rb +572 -0
  196. data/generated/google/apis/datastore_v1/service.rb +259 -0
  197. data/generated/google/apis/datastore_v1beta2.rb +40 -0
  198. data/generated/google/apis/datastore_v1beta2/classes.rb +1186 -0
  199. data/generated/google/apis/datastore_v1beta2/representations.rb +594 -0
  200. data/generated/google/apis/datastore_v1beta2/service.rb +294 -0
  201. data/generated/google/apis/datastore_v1beta3.rb +38 -0
  202. data/generated/google/apis/datastore_v1beta3/classes.rb +1284 -0
  203. data/generated/google/apis/datastore_v1beta3/representations.rb +572 -0
  204. data/generated/google/apis/datastore_v1beta3/service.rb +259 -0
  205. data/generated/google/apis/deploymentmanager_v2.rb +43 -0
  206. data/generated/google/apis/deploymentmanager_v2/classes.rb +1582 -0
  207. data/generated/google/apis/deploymentmanager_v2/representations.rb +686 -0
  208. data/generated/google/apis/deploymentmanager_v2/service.rb +1026 -0
  209. data/generated/google/apis/deploymentmanager_v2beta2.rb +44 -0
  210. data/generated/google/apis/deploymentmanager_v2beta2/classes.rb +843 -0
  211. data/generated/google/apis/deploymentmanager_v2beta2/representations.rb +306 -0
  212. data/generated/google/apis/deploymentmanager_v2beta2/service.rb +689 -0
  213. data/generated/google/apis/dfareporting_v2_1.rb +37 -0
  214. data/generated/google/apis/dfareporting_v2_1/classes.rb +10770 -0
  215. data/generated/google/apis/dfareporting_v2_1/representations.rb +3438 -0
  216. data/generated/google/apis/dfareporting_v2_1/service.rb +8585 -0
  217. data/generated/google/apis/dfareporting_v2_3.rb +37 -0
  218. data/generated/google/apis/dfareporting_v2_3/classes.rb +10839 -0
  219. data/generated/google/apis/dfareporting_v2_3/representations.rb +3829 -0
  220. data/generated/google/apis/dfareporting_v2_3/service.rb +8581 -0
  221. data/generated/google/apis/dfareporting_v2_5.rb +40 -0
  222. data/generated/google/apis/dfareporting_v2_5/classes.rb +11225 -0
  223. data/generated/google/apis/dfareporting_v2_5/representations.rb +3982 -0
  224. data/generated/google/apis/dfareporting_v2_5/service.rb +8755 -0
  225. data/generated/google/apis/dfareporting_v2_6.rb +40 -0
  226. data/generated/google/apis/dfareporting_v2_6/classes.rb +11586 -0
  227. data/generated/google/apis/dfareporting_v2_6/representations.rb +4119 -0
  228. data/generated/google/apis/dfareporting_v2_6/service.rb +9025 -0
  229. data/generated/google/apis/dfareporting_v2_7.rb +40 -0
  230. data/generated/google/apis/dfareporting_v2_7/classes.rb +11876 -0
  231. data/generated/google/apis/dfareporting_v2_7/representations.rb +4243 -0
  232. data/generated/google/apis/dfareporting_v2_7/service.rb +9095 -0
  233. data/generated/google/apis/discovery_v1.rb +32 -0
  234. data/generated/google/apis/discovery_v1/classes.rb +961 -0
  235. data/generated/google/apis/discovery_v1/representations.rb +397 -0
  236. data/generated/google/apis/discovery_v1/service.rb +142 -0
  237. data/generated/google/apis/dns_v1.rb +43 -0
  238. data/generated/google/apis/dns_v1/classes.rb +406 -0
  239. data/generated/google/apis/dns_v1/representations.rb +167 -0
  240. data/generated/google/apis/dns_v1/service.rb +453 -0
  241. data/generated/google/apis/dns_v2beta1.rb +43 -0
  242. data/generated/google/apis/dns_v2beta1/classes.rb +915 -0
  243. data/generated/google/apis/dns_v2beta1/representations.rb +368 -0
  244. data/generated/google/apis/dns_v2beta1/service.rb +768 -0
  245. data/generated/google/apis/doubleclickbidmanager_v1.rb +31 -0
  246. data/generated/google/apis/doubleclickbidmanager_v1/classes.rb +795 -0
  247. data/generated/google/apis/doubleclickbidmanager_v1/representations.rb +368 -0
  248. data/generated/google/apis/doubleclickbidmanager_v1/service.rb +376 -0
  249. data/generated/google/apis/doubleclicksearch_v2.rb +35 -0
  250. data/generated/google/apis/doubleclicksearch_v2/classes.rb +960 -0
  251. data/generated/google/apis/doubleclicksearch_v2/representations.rb +350 -0
  252. data/generated/google/apis/doubleclicksearch_v2/service.rb +480 -0
  253. data/generated/google/apis/drive_v2.rb +59 -0
  254. data/generated/google/apis/drive_v2/classes.rb +2633 -0
  255. data/generated/google/apis/drive_v2/representations.rb +885 -0
  256. data/generated/google/apis/drive_v2/service.rb +2754 -0
  257. data/generated/google/apis/drive_v3.rb +56 -0
  258. data/generated/google/apis/drive_v3/classes.rb +1611 -0
  259. data/generated/google/apis/drive_v3/representations.rb +555 -0
  260. data/generated/google/apis/drive_v3/service.rb +1553 -0
  261. data/generated/google/apis/fitness_v1.rb +85 -0
  262. data/generated/google/apis/fitness_v1/classes.rb +943 -0
  263. data/generated/google/apis/fitness_v1/representations.rb +380 -0
  264. data/generated/google/apis/fitness_v1/service.rb +674 -0
  265. data/generated/google/apis/fusiontables_v2.rb +37 -0
  266. data/generated/google/apis/fusiontables_v2/classes.rb +1049 -0
  267. data/generated/google/apis/fusiontables_v2/representations.rb +457 -0
  268. data/generated/google/apis/fusiontables_v2/service.rb +1463 -0
  269. data/generated/google/apis/games_configuration_v1configuration.rb +34 -0
  270. data/generated/google/apis/games_configuration_v1configuration/classes.rb +506 -0
  271. data/generated/google/apis/games_configuration_v1configuration/representations.rb +228 -0
  272. data/generated/google/apis/games_configuration_v1configuration/service.rb +565 -0
  273. data/generated/google/apis/games_management_v1management.rb +37 -0
  274. data/generated/google/apis/games_management_v1management/classes.rb +567 -0
  275. data/generated/google/apis/games_management_v1management/representations.rb +278 -0
  276. data/generated/google/apis/games_management_v1management/service.rb +994 -0
  277. data/generated/google/apis/games_v1.rb +40 -0
  278. data/generated/google/apis/games_v1/classes.rb +4667 -0
  279. data/generated/google/apis/games_v1/representations.rb +1800 -0
  280. data/generated/google/apis/games_v1/service.rb +2449 -0
  281. data/generated/google/apis/gan_v1beta1.rb +31 -0
  282. data/generated/google/apis/gan_v1beta1/classes.rb +1428 -0
  283. data/generated/google/apis/gan_v1beta1/representations.rb +462 -0
  284. data/generated/google/apis/gan_v1beta1/service.rb +682 -0
  285. data/generated/google/apis/genomics_v1.rb +46 -0
  286. data/generated/google/apis/genomics_v1/classes.rb +3477 -0
  287. data/generated/google/apis/genomics_v1/representations.rb +1284 -0
  288. data/generated/google/apis/genomics_v1/service.rb +2207 -0
  289. data/generated/google/apis/genomics_v1beta2.rb +46 -0
  290. data/generated/google/apis/genomics_v1beta2/classes.rb +3288 -0
  291. data/generated/google/apis/genomics_v1beta2/representations.rb +1194 -0
  292. data/generated/google/apis/genomics_v1beta2/service.rb +2392 -0
  293. data/generated/google/apis/gmail_v1.rb +61 -0
  294. data/generated/google/apis/gmail_v1/classes.rb +1382 -0
  295. data/generated/google/apis/gmail_v1/representations.rb +624 -0
  296. data/generated/google/apis/gmail_v1/service.rb +2447 -0
  297. data/generated/google/apis/groupsmigration_v1.rb +34 -0
  298. data/generated/google/apis/groupsmigration_v1/classes.rb +51 -0
  299. data/generated/google/apis/groupsmigration_v1/representations.rb +40 -0
  300. data/generated/google/apis/groupsmigration_v1/service.rb +110 -0
  301. data/generated/google/apis/groupssettings_v1.rb +34 -0
  302. data/generated/google/apis/groupssettings_v1/classes.rb +240 -0
  303. data/generated/google/apis/groupssettings_v1/representations.rb +69 -0
  304. data/generated/google/apis/groupssettings_v1/service.rb +179 -0
  305. data/generated/google/apis/iam_v1.rb +36 -0
  306. data/generated/google/apis/iam_v1/classes.rb +640 -0
  307. data/generated/google/apis/iam_v1/representations.rb +316 -0
  308. data/generated/google/apis/iam_v1/service.rb +554 -0
  309. data/generated/google/apis/identitytoolkit_v3.rb +37 -0
  310. data/generated/google/apis/identitytoolkit_v3/classes.rb +2182 -0
  311. data/generated/google/apis/identitytoolkit_v3/representations.rb +742 -0
  312. data/generated/google/apis/identitytoolkit_v3/service.rb +657 -0
  313. data/generated/google/apis/kgsearch_v1.rb +31 -0
  314. data/generated/google/apis/kgsearch_v1/classes.rb +59 -0
  315. data/generated/google/apis/kgsearch_v1/representations.rb +41 -0
  316. data/generated/google/apis/kgsearch_v1/service.rb +113 -0
  317. data/generated/google/apis/language_v1beta1.rb +36 -0
  318. data/generated/google/apis/language_v1beta1/classes.rb +757 -0
  319. data/generated/google/apis/language_v1beta1/representations.rb +339 -0
  320. data/generated/google/apis/language_v1beta1/service.rb +184 -0
  321. data/generated/google/apis/licensing_v1.rb +34 -0
  322. data/generated/google/apis/licensing_v1/classes.rb +132 -0
  323. data/generated/google/apis/licensing_v1/representations.rb +74 -0
  324. data/generated/google/apis/licensing_v1/service.rb +369 -0
  325. data/generated/google/apis/logging_v1beta3.rb +47 -0
  326. data/generated/google/apis/logging_v1beta3/classes.rb +1079 -0
  327. data/generated/google/apis/logging_v1beta3/representations.rb +366 -0
  328. data/generated/google/apis/logging_v1beta3/service.rb +1001 -0
  329. data/generated/google/apis/logging_v2beta1.rb +46 -0
  330. data/generated/google/apis/logging_v2beta1/classes.rb +1254 -0
  331. data/generated/google/apis/logging_v2beta1/representations.rb +421 -0
  332. data/generated/google/apis/logging_v2beta1/service.rb +788 -0
  333. data/generated/google/apis/manager_v1beta2.rb +53 -0
  334. data/generated/google/apis/manager_v1beta2/classes.rb +1287 -0
  335. data/generated/google/apis/manager_v1beta2/representations.rb +606 -0
  336. data/generated/google/apis/manager_v1beta2/service.rb +372 -0
  337. data/generated/google/apis/manufacturers_v1.rb +34 -0
  338. data/generated/google/apis/manufacturers_v1/classes.rb +258 -0
  339. data/generated/google/apis/manufacturers_v1/representations.rb +103 -0
  340. data/generated/google/apis/manufacturers_v1/service.rb +138 -0
  341. data/generated/google/apis/mirror_v1.rb +37 -0
  342. data/generated/google/apis/mirror_v1/classes.rb +1072 -0
  343. data/generated/google/apis/mirror_v1/representations.rb +390 -0
  344. data/generated/google/apis/mirror_v1/service.rb +977 -0
  345. data/generated/google/apis/monitoring_v3.rb +45 -0
  346. data/generated/google/apis/monitoring_v3/classes.rb +1335 -0
  347. data/generated/google/apis/monitoring_v3/representations.rb +516 -0
  348. data/generated/google/apis/monitoring_v3/service.rb +706 -0
  349. data/generated/google/apis/mybusiness_v3.rb +32 -0
  350. data/generated/google/apis/mybusiness_v3/classes.rb +1864 -0
  351. data/generated/google/apis/mybusiness_v3/representations.rb +741 -0
  352. data/generated/google/apis/mybusiness_v3/service.rb +960 -0
  353. data/generated/google/apis/oauth2_v2.rb +43 -0
  354. data/generated/google/apis/oauth2_v2/classes.rb +245 -0
  355. data/generated/google/apis/oauth2_v2/representations.rb +102 -0
  356. data/generated/google/apis/oauth2_v2/service.rb +199 -0
  357. data/generated/google/apis/pagespeedonline_v2.rb +32 -0
  358. data/generated/google/apis/pagespeedonline_v2/classes.rb +614 -0
  359. data/generated/google/apis/pagespeedonline_v2/representations.rb +272 -0
  360. data/generated/google/apis/pagespeedonline_v2/service.rb +119 -0
  361. data/generated/google/apis/partners_v2.rb +32 -0
  362. data/generated/google/apis/partners_v2/classes.rb +942 -0
  363. data/generated/google/apis/partners_v2/representations.rb +454 -0
  364. data/generated/google/apis/partners_v2/service.rb +400 -0
  365. data/generated/google/apis/people_v1.rb +59 -0
  366. data/generated/google/apis/people_v1/classes.rb +1521 -0
  367. data/generated/google/apis/people_v1/representations.rb +663 -0
  368. data/generated/google/apis/people_v1/service.rb +189 -0
  369. data/generated/google/apis/plus_domains_v1.rb +61 -0
  370. data/generated/google/apis/plus_domains_v1/classes.rb +2609 -0
  371. data/generated/google/apis/plus_domains_v1/representations.rb +1111 -0
  372. data/generated/google/apis/plus_domains_v1/service.rb +904 -0
  373. data/generated/google/apis/plus_v1.rb +43 -0
  374. data/generated/google/apis/plus_v1/classes.rb +2094 -0
  375. data/generated/google/apis/plus_v1/representations.rb +907 -0
  376. data/generated/google/apis/plus_v1/service.rb +470 -0
  377. data/generated/google/apis/prediction_v1_6.rb +47 -0
  378. data/generated/google/apis/prediction_v1_6/classes.rb +751 -0
  379. data/generated/google/apis/prediction_v1_6/representations.rb +369 -0
  380. data/generated/google/apis/prediction_v1_6/service.rb +380 -0
  381. data/generated/google/apis/proximitybeacon_v1beta1.rb +34 -0
  382. data/generated/google/apis/proximitybeacon_v1beta1/classes.rb +786 -0
  383. data/generated/google/apis/proximitybeacon_v1beta1/representations.rb +347 -0
  384. data/generated/google/apis/proximitybeacon_v1beta1/service.rb +806 -0
  385. data/generated/google/apis/pubsub_v1.rb +37 -0
  386. data/generated/google/apis/pubsub_v1/classes.rb +676 -0
  387. data/generated/google/apis/pubsub_v1/representations.rb +323 -0
  388. data/generated/google/apis/pubsub_v1/service.rb +900 -0
  389. data/generated/google/apis/pubsub_v1beta2.rb +37 -0
  390. data/generated/google/apis/pubsub_v1beta2/classes.rb +620 -0
  391. data/generated/google/apis/pubsub_v1beta2/representations.rb +282 -0
  392. data/generated/google/apis/pubsub_v1beta2/service.rb +774 -0
  393. data/generated/google/apis/qpx_express_v1.rb +31 -0
  394. data/generated/google/apis/qpx_express_v1/classes.rb +1274 -0
  395. data/generated/google/apis/qpx_express_v1/representations.rb +473 -0
  396. data/generated/google/apis/qpx_express_v1/service.rb +100 -0
  397. data/generated/google/apis/replicapool_v1beta2.rb +44 -0
  398. data/generated/google/apis/replicapool_v1beta2/classes.rb +631 -0
  399. data/generated/google/apis/replicapool_v1beta2/representations.rb +264 -0
  400. data/generated/google/apis/replicapool_v1beta2/service.rb +608 -0
  401. data/generated/google/apis/replicapoolupdater_v1beta1.rb +45 -0
  402. data/generated/google/apis/replicapoolupdater_v1beta1/classes.rb +733 -0
  403. data/generated/google/apis/replicapoolupdater_v1beta1/representations.rb +294 -0
  404. data/generated/google/apis/replicapoolupdater_v1beta1/service.rb +509 -0
  405. data/generated/google/apis/reseller_v1.rb +37 -0
  406. data/generated/google/apis/reseller_v1/classes.rb +540 -0
  407. data/generated/google/apis/reseller_v1/representations.rb +225 -0
  408. data/generated/google/apis/reseller_v1/service.rb +623 -0
  409. data/generated/google/apis/resourceviews_v1beta2.rb +50 -0
  410. data/generated/google/apis/resourceviews_v1beta2/classes.rb +660 -0
  411. data/generated/google/apis/resourceviews_v1beta2/representations.rb +301 -0
  412. data/generated/google/apis/resourceviews_v1beta2/service.rb +563 -0
  413. data/generated/google/apis/script_v1.rb +64 -0
  414. data/generated/google/apis/script_v1/classes.rb +265 -0
  415. data/generated/google/apis/script_v1/representations.rb +119 -0
  416. data/generated/google/apis/script_v1/service.rb +98 -0
  417. data/generated/google/apis/sheets_v4.rb +43 -0
  418. data/generated/google/apis/sheets_v4/classes.rb +6368 -0
  419. data/generated/google/apis/sheets_v4/representations.rb +2289 -0
  420. data/generated/google/apis/sheets_v4/service.rb +569 -0
  421. data/generated/google/apis/site_verification_v1.rb +37 -0
  422. data/generated/google/apis/site_verification_v1/classes.rb +185 -0
  423. data/generated/google/apis/site_verification_v1/representations.rb +113 -0
  424. data/generated/google/apis/site_verification_v1/service.rb +315 -0
  425. data/generated/google/apis/slides_v1.rb +49 -0
  426. data/generated/google/apis/slides_v1/classes.rb +4044 -0
  427. data/generated/google/apis/slides_v1/representations.rb +1765 -0
  428. data/generated/google/apis/slides_v1/service.rb +202 -0
  429. data/generated/google/apis/speech_v1beta1.rb +34 -0
  430. data/generated/google/apis/speech_v1beta1/classes.rb +513 -0
  431. data/generated/google/apis/speech_v1beta1/representations.rb +218 -0
  432. data/generated/google/apis/speech_v1beta1/service.rb +273 -0
  433. data/generated/google/apis/sqladmin_v1beta4.rb +38 -0
  434. data/generated/google/apis/sqladmin_v1beta4/classes.rb +2142 -0
  435. data/generated/google/apis/sqladmin_v1beta4/representations.rb +893 -0
  436. data/generated/google/apis/sqladmin_v1beta4/service.rb +1709 -0
  437. data/generated/google/apis/storage_v1.rb +46 -0
  438. data/generated/google/apis/storage_v1/classes.rb +1255 -0
  439. data/generated/google/apis/storage_v1/representations.rb +502 -0
  440. data/generated/google/apis/storage_v1/service.rb +1906 -0
  441. data/generated/google/apis/storagetransfer_v1.rb +35 -0
  442. data/generated/google/apis/storagetransfer_v1/classes.rb +1046 -0
  443. data/generated/google/apis/storagetransfer_v1/representations.rb +418 -0
  444. data/generated/google/apis/storagetransfer_v1/service.rb +473 -0
  445. data/generated/google/apis/tagmanager_v1.rb +52 -0
  446. data/generated/google/apis/tagmanager_v1/classes.rb +1494 -0
  447. data/generated/google/apis/tagmanager_v1/representations.rb +611 -0
  448. data/generated/google/apis/tagmanager_v1/service.rb +2119 -0
  449. data/generated/google/apis/taskqueue_v1beta2.rb +37 -0
  450. data/generated/google/apis/taskqueue_v1beta2/classes.rb +254 -0
  451. data/generated/google/apis/taskqueue_v1beta2/representations.rb +126 -0
  452. data/generated/google/apis/taskqueue_v1beta2/service.rb +408 -0
  453. data/generated/google/apis/tasks_v1.rb +37 -0
  454. data/generated/google/apis/tasks_v1/classes.rb +296 -0
  455. data/generated/google/apis/tasks_v1/representations.rb +125 -0
  456. data/generated/google/apis/tasks_v1/service.rb +643 -0
  457. data/generated/google/apis/translate_v2.rb +31 -0
  458. data/generated/google/apis/translate_v2/classes.rb +168 -0
  459. data/generated/google/apis/translate_v2/representations.rb +121 -0
  460. data/generated/google/apis/translate_v2/service.rb +182 -0
  461. data/generated/google/apis/urlshortener_v1.rb +34 -0
  462. data/generated/google/apis/urlshortener_v1/classes.rb +246 -0
  463. data/generated/google/apis/urlshortener_v1/representations.rb +121 -0
  464. data/generated/google/apis/urlshortener_v1/service.rb +176 -0
  465. data/generated/google/apis/vision_v1.rb +36 -0
  466. data/generated/google/apis/vision_v1/classes.rb +1267 -0
  467. data/generated/google/apis/vision_v1/representations.rb +418 -0
  468. data/generated/google/apis/vision_v1/service.rb +90 -0
  469. data/generated/google/apis/webmasters_v3.rb +37 -0
  470. data/generated/google/apis/webmasters_v3/classes.rb +570 -0
  471. data/generated/google/apis/webmasters_v3/representations.rb +283 -0
  472. data/generated/google/apis/webmasters_v3/service.rb +573 -0
  473. data/generated/google/apis/youtube_analytics_v1.rb +46 -0
  474. data/generated/google/apis/youtube_analytics_v1/classes.rb +337 -0
  475. data/generated/google/apis/youtube_analytics_v1/representations.rb +174 -0
  476. data/generated/google/apis/youtube_analytics_v1/service.rb +486 -0
  477. data/generated/google/apis/youtube_partner_v1.rb +37 -0
  478. data/generated/google/apis/youtube_partner_v1/classes.rb +3854 -0
  479. data/generated/google/apis/youtube_partner_v1/representations.rb +1537 -0
  480. data/generated/google/apis/youtube_partner_v1/service.rb +3269 -0
  481. data/generated/google/apis/youtube_v3.rb +50 -0
  482. data/generated/google/apis/youtube_v3/classes.rb +8375 -0
  483. data/generated/google/apis/youtube_v3/representations.rb +3273 -0
  484. data/generated/google/apis/youtube_v3/service.rb +4440 -0
  485. data/generated/google/apis/youtubereporting_v1.rb +38 -0
  486. data/generated/google/apis/youtubereporting_v1/classes.rb +302 -0
  487. data/generated/google/apis/youtubereporting_v1/representations.rb +149 -0
  488. data/generated/google/apis/youtubereporting_v1/service.rb +385 -0
  489. data/google-api-client.gemspec +33 -0
  490. data/lib/cacerts.pem +2183 -0
  491. data/lib/google/api_client/auth/installed_app.rb +128 -0
  492. data/lib/google/api_client/auth/key_utils.rb +94 -0
  493. data/lib/google/api_client/auth/storage.rb +104 -0
  494. data/lib/google/api_client/auth/storages/file_store.rb +57 -0
  495. data/lib/google/api_client/auth/storages/redis_store.rb +59 -0
  496. data/lib/google/api_client/client_secrets.rb +177 -0
  497. data/lib/google/apis.rb +58 -0
  498. data/lib/google/apis/core/api_command.rb +146 -0
  499. data/lib/google/apis/core/base_service.rb +401 -0
  500. data/lib/google/apis/core/batch.rb +239 -0
  501. data/lib/google/apis/core/download.rb +108 -0
  502. data/lib/google/apis/core/hashable.rb +44 -0
  503. data/lib/google/apis/core/http_client_adapter.rb +82 -0
  504. data/lib/google/apis/core/http_command.rb +332 -0
  505. data/lib/google/apis/core/json_representation.rb +145 -0
  506. data/lib/google/apis/core/logging.rb +30 -0
  507. data/lib/google/apis/core/multipart.rb +187 -0
  508. data/lib/google/apis/core/upload.rb +295 -0
  509. data/lib/google/apis/errors.rb +80 -0
  510. data/lib/google/apis/generator.rb +70 -0
  511. data/lib/google/apis/generator/annotator.rb +301 -0
  512. data/lib/google/apis/generator/helpers.rb +74 -0
  513. data/lib/google/apis/generator/model.rb +143 -0
  514. data/lib/google/apis/generator/template.rb +124 -0
  515. data/lib/google/apis/generator/templates/_class.tmpl +40 -0
  516. data/lib/google/apis/generator/templates/_method.tmpl +92 -0
  517. data/lib/google/apis/generator/templates/_representation.tmpl +51 -0
  518. data/lib/google/apis/generator/templates/_representation_stub.tmpl +17 -0
  519. data/lib/google/apis/generator/templates/_representation_type.tmpl +10 -0
  520. data/lib/google/apis/generator/templates/classes.rb.tmpl +29 -0
  521. data/lib/google/apis/generator/templates/module.rb.tmpl +40 -0
  522. data/lib/google/apis/generator/templates/representations.rb.tmpl +32 -0
  523. data/lib/google/apis/generator/templates/service.rb.tmpl +60 -0
  524. data/lib/google/apis/options.rb +85 -0
  525. data/lib/google/apis/version.rb +39 -0
  526. data/rakelib/metrics.rake +22 -0
  527. data/rakelib/rubocop.rake +10 -0
  528. data/rakelib/spec.rake +11 -0
  529. data/rakelib/yard.rake +11 -0
  530. data/samples/cli/.env +4 -0
  531. data/samples/cli/Gemfile +7 -0
  532. data/samples/cli/README.md +51 -0
  533. data/samples/cli/google-api-samples +32 -0
  534. data/samples/cli/lib/base_cli.rb +95 -0
  535. data/samples/cli/lib/samples/analytics.rb +62 -0
  536. data/samples/cli/lib/samples/androidpublisher.rb +47 -0
  537. data/samples/cli/lib/samples/bigquery.rb +101 -0
  538. data/samples/cli/lib/samples/calendar.rb +83 -0
  539. data/samples/cli/lib/samples/drive.rb +82 -0
  540. data/samples/cli/lib/samples/gmail.rb +124 -0
  541. data/samples/cli/lib/samples/pubsub.rb +114 -0
  542. data/samples/cli/lib/samples/sheets.rb +61 -0
  543. data/samples/cli/lib/samples/translate.rb +44 -0
  544. data/samples/cli/lib/samples/you_tube.rb +44 -0
  545. data/samples/web/.env +2 -0
  546. data/samples/web/Gemfile +7 -0
  547. data/samples/web/README.md +44 -0
  548. data/samples/web/app.rb +120 -0
  549. data/samples/web/views/calendar.erb +34 -0
  550. data/samples/web/views/drive.erb +33 -0
  551. data/samples/web/views/home.erb +34 -0
  552. data/samples/web/views/layout.erb +40 -0
  553. data/sync.rb +71 -0
  554. data/third_party/hurley_patches.rb +103 -0
  555. metadata +735 -0
@@ -0,0 +1,2447 @@
1
+ # Copyright 2015 Google Inc.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of 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,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'google/apis/core/base_service'
16
+ require 'google/apis/core/json_representation'
17
+ require 'google/apis/core/hashable'
18
+ require 'google/apis/errors'
19
+
20
+ module Google
21
+ module Apis
22
+ module GmailV1
23
+ # Gmail API
24
+ #
25
+ # Access Gmail mailboxes including sending user email.
26
+ #
27
+ # @example
28
+ # require 'google/apis/gmail_v1'
29
+ #
30
+ # Gmail = Google::Apis::GmailV1 # Alias the module
31
+ # service = Gmail::GmailService.new
32
+ #
33
+ # @see https://developers.google.com/gmail/api/
34
+ class GmailService < Google::Apis::Core::BaseService
35
+ # @return [String]
36
+ # API key. Your API key identifies your project and provides you with API access,
37
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
38
+ attr_accessor :key
39
+
40
+ # @return [String]
41
+ # Available to use for quota purposes for server-side applications. Can be any
42
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
43
+ # Overrides userIp if both are provided.
44
+ attr_accessor :quota_user
45
+
46
+ # @return [String]
47
+ # IP address of the site where the request originates. Use this if you want to
48
+ # enforce per-user limits.
49
+ attr_accessor :user_ip
50
+
51
+ def initialize
52
+ super('https://www.googleapis.com/', 'gmail/v1/users/')
53
+ end
54
+
55
+ # Gets the current user's Gmail profile.
56
+ # @param [String] user_id
57
+ # The user's email address. The special value me can be used to indicate the
58
+ # authenticated user.
59
+ # @param [String] fields
60
+ # Selector specifying which fields to include in a partial response.
61
+ # @param [String] quota_user
62
+ # Available to use for quota purposes for server-side applications. Can be any
63
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
64
+ # Overrides userIp if both are provided.
65
+ # @param [String] user_ip
66
+ # IP address of the site where the request originates. Use this if you want to
67
+ # enforce per-user limits.
68
+ # @param [Google::Apis::RequestOptions] options
69
+ # Request-specific options
70
+ #
71
+ # @yield [result, err] Result & error if block supplied
72
+ # @yieldparam result [Google::Apis::GmailV1::Profile] parsed result object
73
+ # @yieldparam err [StandardError] error object if request failed
74
+ #
75
+ # @return [Google::Apis::GmailV1::Profile]
76
+ #
77
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
78
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
79
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
80
+ def get_user_profile(user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
81
+ command = make_simple_command(:get, '{userId}/profile', options)
82
+ command.response_representation = Google::Apis::GmailV1::Profile::Representation
83
+ command.response_class = Google::Apis::GmailV1::Profile
84
+ command.params['userId'] = user_id unless user_id.nil?
85
+ command.query['fields'] = fields unless fields.nil?
86
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
87
+ command.query['userIp'] = user_ip unless user_ip.nil?
88
+ execute_or_queue_command(command, &block)
89
+ end
90
+
91
+ # Stop receiving push notifications for the given user mailbox.
92
+ # @param [String] user_id
93
+ # The user's email address. The special value me can be used to indicate the
94
+ # authenticated user.
95
+ # @param [String] fields
96
+ # Selector specifying which fields to include in a partial response.
97
+ # @param [String] quota_user
98
+ # Available to use for quota purposes for server-side applications. Can be any
99
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
100
+ # Overrides userIp if both are provided.
101
+ # @param [String] user_ip
102
+ # IP address of the site where the request originates. Use this if you want to
103
+ # enforce per-user limits.
104
+ # @param [Google::Apis::RequestOptions] options
105
+ # Request-specific options
106
+ #
107
+ # @yield [result, err] Result & error if block supplied
108
+ # @yieldparam result [NilClass] No result returned for this method
109
+ # @yieldparam err [StandardError] error object if request failed
110
+ #
111
+ # @return [void]
112
+ #
113
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
114
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
115
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
116
+ def stop_user(user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
117
+ command = make_simple_command(:post, '{userId}/stop', options)
118
+ command.params['userId'] = user_id unless user_id.nil?
119
+ command.query['fields'] = fields unless fields.nil?
120
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
121
+ command.query['userIp'] = user_ip unless user_ip.nil?
122
+ execute_or_queue_command(command, &block)
123
+ end
124
+
125
+ # Set up or update a push notification watch on the given user mailbox.
126
+ # @param [String] user_id
127
+ # The user's email address. The special value me can be used to indicate the
128
+ # authenticated user.
129
+ # @param [Google::Apis::GmailV1::WatchRequest] watch_request_object
130
+ # @param [String] fields
131
+ # Selector specifying which fields to include in a partial response.
132
+ # @param [String] quota_user
133
+ # Available to use for quota purposes for server-side applications. Can be any
134
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
135
+ # Overrides userIp if both are provided.
136
+ # @param [String] user_ip
137
+ # IP address of the site where the request originates. Use this if you want to
138
+ # enforce per-user limits.
139
+ # @param [Google::Apis::RequestOptions] options
140
+ # Request-specific options
141
+ #
142
+ # @yield [result, err] Result & error if block supplied
143
+ # @yieldparam result [Google::Apis::GmailV1::WatchResponse] parsed result object
144
+ # @yieldparam err [StandardError] error object if request failed
145
+ #
146
+ # @return [Google::Apis::GmailV1::WatchResponse]
147
+ #
148
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
149
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
150
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
151
+ def watch_user(user_id, watch_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
152
+ command = make_simple_command(:post, '{userId}/watch', options)
153
+ command.request_representation = Google::Apis::GmailV1::WatchRequest::Representation
154
+ command.request_object = watch_request_object
155
+ command.response_representation = Google::Apis::GmailV1::WatchResponse::Representation
156
+ command.response_class = Google::Apis::GmailV1::WatchResponse
157
+ command.params['userId'] = user_id unless user_id.nil?
158
+ command.query['fields'] = fields unless fields.nil?
159
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
160
+ command.query['userIp'] = user_ip unless user_ip.nil?
161
+ execute_or_queue_command(command, &block)
162
+ end
163
+
164
+ # Creates a new draft with the DRAFT label.
165
+ # @param [String] user_id
166
+ # The user's email address. The special value me can be used to indicate the
167
+ # authenticated user.
168
+ # @param [Google::Apis::GmailV1::Draft] draft_object
169
+ # @param [String] fields
170
+ # Selector specifying which fields to include in a partial response.
171
+ # @param [String] quota_user
172
+ # Available to use for quota purposes for server-side applications. Can be any
173
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
174
+ # Overrides userIp if both are provided.
175
+ # @param [String] user_ip
176
+ # IP address of the site where the request originates. Use this if you want to
177
+ # enforce per-user limits.
178
+ # @param [IO, String] upload_source
179
+ # IO stream or filename containing content to upload
180
+ # @param [String] content_type
181
+ # Content type of the uploaded content.
182
+ # @param [Google::Apis::RequestOptions] options
183
+ # Request-specific options
184
+ #
185
+ # @yield [result, err] Result & error if block supplied
186
+ # @yieldparam result [Google::Apis::GmailV1::Draft] parsed result object
187
+ # @yieldparam err [StandardError] error object if request failed
188
+ #
189
+ # @return [Google::Apis::GmailV1::Draft]
190
+ #
191
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
192
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
193
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
194
+ def create_user_draft(user_id, draft_object = nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block)
195
+ if upload_source.nil?
196
+ command = make_simple_command(:post, '{userId}/drafts', options)
197
+ else
198
+ command = make_upload_command(:post, '{userId}/drafts', options)
199
+ command.upload_source = upload_source
200
+ command.upload_content_type = content_type
201
+ end
202
+ command.request_representation = Google::Apis::GmailV1::Draft::Representation
203
+ command.request_object = draft_object
204
+ command.response_representation = Google::Apis::GmailV1::Draft::Representation
205
+ command.response_class = Google::Apis::GmailV1::Draft
206
+ command.params['userId'] = user_id unless user_id.nil?
207
+ command.query['fields'] = fields unless fields.nil?
208
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
209
+ command.query['userIp'] = user_ip unless user_ip.nil?
210
+ execute_or_queue_command(command, &block)
211
+ end
212
+
213
+ # Immediately and permanently deletes the specified draft. Does not simply trash
214
+ # it.
215
+ # @param [String] user_id
216
+ # The user's email address. The special value me can be used to indicate the
217
+ # authenticated user.
218
+ # @param [String] id
219
+ # The ID of the draft to delete.
220
+ # @param [String] fields
221
+ # Selector specifying which fields to include in a partial response.
222
+ # @param [String] quota_user
223
+ # Available to use for quota purposes for server-side applications. Can be any
224
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
225
+ # Overrides userIp if both are provided.
226
+ # @param [String] user_ip
227
+ # IP address of the site where the request originates. Use this if you want to
228
+ # enforce per-user limits.
229
+ # @param [Google::Apis::RequestOptions] options
230
+ # Request-specific options
231
+ #
232
+ # @yield [result, err] Result & error if block supplied
233
+ # @yieldparam result [NilClass] No result returned for this method
234
+ # @yieldparam err [StandardError] error object if request failed
235
+ #
236
+ # @return [void]
237
+ #
238
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
239
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
240
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
241
+ def delete_user_draft(user_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
242
+ command = make_simple_command(:delete, '{userId}/drafts/{id}', options)
243
+ command.params['userId'] = user_id unless user_id.nil?
244
+ command.params['id'] = id unless id.nil?
245
+ command.query['fields'] = fields unless fields.nil?
246
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
247
+ command.query['userIp'] = user_ip unless user_ip.nil?
248
+ execute_or_queue_command(command, &block)
249
+ end
250
+
251
+ # Gets the specified draft.
252
+ # @param [String] user_id
253
+ # The user's email address. The special value me can be used to indicate the
254
+ # authenticated user.
255
+ # @param [String] id
256
+ # The ID of the draft to retrieve.
257
+ # @param [String] format
258
+ # The format to return the draft in.
259
+ # @param [String] fields
260
+ # Selector specifying which fields to include in a partial response.
261
+ # @param [String] quota_user
262
+ # Available to use for quota purposes for server-side applications. Can be any
263
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
264
+ # Overrides userIp if both are provided.
265
+ # @param [String] user_ip
266
+ # IP address of the site where the request originates. Use this if you want to
267
+ # enforce per-user limits.
268
+ # @param [Google::Apis::RequestOptions] options
269
+ # Request-specific options
270
+ #
271
+ # @yield [result, err] Result & error if block supplied
272
+ # @yieldparam result [Google::Apis::GmailV1::Draft] parsed result object
273
+ # @yieldparam err [StandardError] error object if request failed
274
+ #
275
+ # @return [Google::Apis::GmailV1::Draft]
276
+ #
277
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
278
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
279
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
280
+ def get_user_draft(user_id, id, format: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
281
+ command = make_simple_command(:get, '{userId}/drafts/{id}', options)
282
+ command.response_representation = Google::Apis::GmailV1::Draft::Representation
283
+ command.response_class = Google::Apis::GmailV1::Draft
284
+ command.params['userId'] = user_id unless user_id.nil?
285
+ command.params['id'] = id unless id.nil?
286
+ command.query['format'] = format unless format.nil?
287
+ command.query['fields'] = fields unless fields.nil?
288
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
289
+ command.query['userIp'] = user_ip unless user_ip.nil?
290
+ execute_or_queue_command(command, &block)
291
+ end
292
+
293
+ # Lists the drafts in the user's mailbox.
294
+ # @param [String] user_id
295
+ # The user's email address. The special value me can be used to indicate the
296
+ # authenticated user.
297
+ # @param [Boolean] include_spam_trash
298
+ # Include drafts from SPAM and TRASH in the results.
299
+ # @param [Fixnum] max_results
300
+ # Maximum number of drafts to return.
301
+ # @param [String] page_token
302
+ # Page token to retrieve a specific page of results in the list.
303
+ # @param [String] q
304
+ # Only return draft messages matching the specified query. Supports the same
305
+ # query format as the Gmail search box. For example, "from:someuser@example.com
306
+ # rfc822msgid: is:unread".
307
+ # @param [String] fields
308
+ # Selector specifying which fields to include in a partial response.
309
+ # @param [String] quota_user
310
+ # Available to use for quota purposes for server-side applications. Can be any
311
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
312
+ # Overrides userIp if both are provided.
313
+ # @param [String] user_ip
314
+ # IP address of the site where the request originates. Use this if you want to
315
+ # enforce per-user limits.
316
+ # @param [Google::Apis::RequestOptions] options
317
+ # Request-specific options
318
+ #
319
+ # @yield [result, err] Result & error if block supplied
320
+ # @yieldparam result [Google::Apis::GmailV1::ListDraftsResponse] parsed result object
321
+ # @yieldparam err [StandardError] error object if request failed
322
+ #
323
+ # @return [Google::Apis::GmailV1::ListDraftsResponse]
324
+ #
325
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
326
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
327
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
328
+ def list_user_drafts(user_id, include_spam_trash: nil, max_results: nil, page_token: nil, q: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
329
+ command = make_simple_command(:get, '{userId}/drafts', options)
330
+ command.response_representation = Google::Apis::GmailV1::ListDraftsResponse::Representation
331
+ command.response_class = Google::Apis::GmailV1::ListDraftsResponse
332
+ command.params['userId'] = user_id unless user_id.nil?
333
+ command.query['includeSpamTrash'] = include_spam_trash unless include_spam_trash.nil?
334
+ command.query['maxResults'] = max_results unless max_results.nil?
335
+ command.query['pageToken'] = page_token unless page_token.nil?
336
+ command.query['q'] = q unless q.nil?
337
+ command.query['fields'] = fields unless fields.nil?
338
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
339
+ command.query['userIp'] = user_ip unless user_ip.nil?
340
+ execute_or_queue_command(command, &block)
341
+ end
342
+
343
+ # Sends the specified, existing draft to the recipients in the To, Cc, and Bcc
344
+ # headers.
345
+ # @param [String] user_id
346
+ # The user's email address. The special value me can be used to indicate the
347
+ # authenticated user.
348
+ # @param [Google::Apis::GmailV1::Draft] draft_object
349
+ # @param [String] fields
350
+ # Selector specifying which fields to include in a partial response.
351
+ # @param [String] quota_user
352
+ # Available to use for quota purposes for server-side applications. Can be any
353
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
354
+ # Overrides userIp if both are provided.
355
+ # @param [String] user_ip
356
+ # IP address of the site where the request originates. Use this if you want to
357
+ # enforce per-user limits.
358
+ # @param [IO, String] upload_source
359
+ # IO stream or filename containing content to upload
360
+ # @param [String] content_type
361
+ # Content type of the uploaded content.
362
+ # @param [Google::Apis::RequestOptions] options
363
+ # Request-specific options
364
+ #
365
+ # @yield [result, err] Result & error if block supplied
366
+ # @yieldparam result [Google::Apis::GmailV1::Message] parsed result object
367
+ # @yieldparam err [StandardError] error object if request failed
368
+ #
369
+ # @return [Google::Apis::GmailV1::Message]
370
+ #
371
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
372
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
373
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
374
+ def send_user_draft(user_id, draft_object = nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block)
375
+ if upload_source.nil?
376
+ command = make_simple_command(:post, '{userId}/drafts/send', options)
377
+ else
378
+ command = make_upload_command(:post, '{userId}/drafts/send', options)
379
+ command.upload_source = upload_source
380
+ command.upload_content_type = content_type
381
+ end
382
+ command.request_representation = Google::Apis::GmailV1::Draft::Representation
383
+ command.request_object = draft_object
384
+ command.response_representation = Google::Apis::GmailV1::Message::Representation
385
+ command.response_class = Google::Apis::GmailV1::Message
386
+ command.params['userId'] = user_id unless user_id.nil?
387
+ command.query['fields'] = fields unless fields.nil?
388
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
389
+ command.query['userIp'] = user_ip unless user_ip.nil?
390
+ execute_or_queue_command(command, &block)
391
+ end
392
+
393
+ # Replaces a draft's content.
394
+ # @param [String] user_id
395
+ # The user's email address. The special value me can be used to indicate the
396
+ # authenticated user.
397
+ # @param [String] id
398
+ # The ID of the draft to update.
399
+ # @param [Google::Apis::GmailV1::Draft] draft_object
400
+ # @param [String] fields
401
+ # Selector specifying which fields to include in a partial response.
402
+ # @param [String] quota_user
403
+ # Available to use for quota purposes for server-side applications. Can be any
404
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
405
+ # Overrides userIp if both are provided.
406
+ # @param [String] user_ip
407
+ # IP address of the site where the request originates. Use this if you want to
408
+ # enforce per-user limits.
409
+ # @param [IO, String] upload_source
410
+ # IO stream or filename containing content to upload
411
+ # @param [String] content_type
412
+ # Content type of the uploaded content.
413
+ # @param [Google::Apis::RequestOptions] options
414
+ # Request-specific options
415
+ #
416
+ # @yield [result, err] Result & error if block supplied
417
+ # @yieldparam result [Google::Apis::GmailV1::Draft] parsed result object
418
+ # @yieldparam err [StandardError] error object if request failed
419
+ #
420
+ # @return [Google::Apis::GmailV1::Draft]
421
+ #
422
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
423
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
424
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
425
+ def update_user_draft(user_id, id, draft_object = nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block)
426
+ if upload_source.nil?
427
+ command = make_simple_command(:put, '{userId}/drafts/{id}', options)
428
+ else
429
+ command = make_upload_command(:put, '{userId}/drafts/{id}', options)
430
+ command.upload_source = upload_source
431
+ command.upload_content_type = content_type
432
+ end
433
+ command.request_representation = Google::Apis::GmailV1::Draft::Representation
434
+ command.request_object = draft_object
435
+ command.response_representation = Google::Apis::GmailV1::Draft::Representation
436
+ command.response_class = Google::Apis::GmailV1::Draft
437
+ command.params['userId'] = user_id unless user_id.nil?
438
+ command.params['id'] = id unless id.nil?
439
+ command.query['fields'] = fields unless fields.nil?
440
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
441
+ command.query['userIp'] = user_ip unless user_ip.nil?
442
+ execute_or_queue_command(command, &block)
443
+ end
444
+
445
+ # Lists the history of all changes to the given mailbox. History results are
446
+ # returned in chronological order (increasing historyId).
447
+ # @param [String] user_id
448
+ # The user's email address. The special value me can be used to indicate the
449
+ # authenticated user.
450
+ # @param [String] label_id
451
+ # Only return messages with a label matching the ID.
452
+ # @param [Fixnum] max_results
453
+ # The maximum number of history records to return.
454
+ # @param [String] page_token
455
+ # Page token to retrieve a specific page of results in the list.
456
+ # @param [String] start_history_id
457
+ # Required. Returns history records after the specified startHistoryId. The
458
+ # supplied startHistoryId should be obtained from the historyId of a message,
459
+ # thread, or previous list response. History IDs increase chronologically but
460
+ # are not contiguous with random gaps in between valid IDs. Supplying an invalid
461
+ # or out of date startHistoryId typically returns an HTTP 404 error code. A
462
+ # historyId is typically valid for at least a week, but in some rare
463
+ # circumstances may be valid for only a few hours. If you receive an HTTP 404
464
+ # error response, your application should perform a full sync. If you receive no
465
+ # nextPageToken in the response, there are no updates to retrieve and you can
466
+ # store the returned historyId for a future request.
467
+ # @param [String] fields
468
+ # Selector specifying which fields to include in a partial response.
469
+ # @param [String] quota_user
470
+ # Available to use for quota purposes for server-side applications. Can be any
471
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
472
+ # Overrides userIp if both are provided.
473
+ # @param [String] user_ip
474
+ # IP address of the site where the request originates. Use this if you want to
475
+ # enforce per-user limits.
476
+ # @param [Google::Apis::RequestOptions] options
477
+ # Request-specific options
478
+ #
479
+ # @yield [result, err] Result & error if block supplied
480
+ # @yieldparam result [Google::Apis::GmailV1::ListHistoryResponse] parsed result object
481
+ # @yieldparam err [StandardError] error object if request failed
482
+ #
483
+ # @return [Google::Apis::GmailV1::ListHistoryResponse]
484
+ #
485
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
486
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
487
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
488
+ def list_user_histories(user_id, label_id: nil, max_results: nil, page_token: nil, start_history_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
489
+ command = make_simple_command(:get, '{userId}/history', options)
490
+ command.response_representation = Google::Apis::GmailV1::ListHistoryResponse::Representation
491
+ command.response_class = Google::Apis::GmailV1::ListHistoryResponse
492
+ command.params['userId'] = user_id unless user_id.nil?
493
+ command.query['labelId'] = label_id unless label_id.nil?
494
+ command.query['maxResults'] = max_results unless max_results.nil?
495
+ command.query['pageToken'] = page_token unless page_token.nil?
496
+ command.query['startHistoryId'] = start_history_id unless start_history_id.nil?
497
+ command.query['fields'] = fields unless fields.nil?
498
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
499
+ command.query['userIp'] = user_ip unless user_ip.nil?
500
+ execute_or_queue_command(command, &block)
501
+ end
502
+
503
+ # Creates a new label.
504
+ # @param [String] user_id
505
+ # The user's email address. The special value me can be used to indicate the
506
+ # authenticated user.
507
+ # @param [Google::Apis::GmailV1::Label] label_object
508
+ # @param [String] fields
509
+ # Selector specifying which fields to include in a partial response.
510
+ # @param [String] quota_user
511
+ # Available to use for quota purposes for server-side applications. Can be any
512
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
513
+ # Overrides userIp if both are provided.
514
+ # @param [String] user_ip
515
+ # IP address of the site where the request originates. Use this if you want to
516
+ # enforce per-user limits.
517
+ # @param [Google::Apis::RequestOptions] options
518
+ # Request-specific options
519
+ #
520
+ # @yield [result, err] Result & error if block supplied
521
+ # @yieldparam result [Google::Apis::GmailV1::Label] parsed result object
522
+ # @yieldparam err [StandardError] error object if request failed
523
+ #
524
+ # @return [Google::Apis::GmailV1::Label]
525
+ #
526
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
527
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
528
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
529
+ def create_user_label(user_id, label_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
530
+ command = make_simple_command(:post, '{userId}/labels', options)
531
+ command.request_representation = Google::Apis::GmailV1::Label::Representation
532
+ command.request_object = label_object
533
+ command.response_representation = Google::Apis::GmailV1::Label::Representation
534
+ command.response_class = Google::Apis::GmailV1::Label
535
+ command.params['userId'] = user_id unless user_id.nil?
536
+ command.query['fields'] = fields unless fields.nil?
537
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
538
+ command.query['userIp'] = user_ip unless user_ip.nil?
539
+ execute_or_queue_command(command, &block)
540
+ end
541
+
542
+ # Immediately and permanently deletes the specified label and removes it from
543
+ # any messages and threads that it is applied to.
544
+ # @param [String] user_id
545
+ # The user's email address. The special value me can be used to indicate the
546
+ # authenticated user.
547
+ # @param [String] id
548
+ # The ID of the label to delete.
549
+ # @param [String] fields
550
+ # Selector specifying which fields to include in a partial response.
551
+ # @param [String] quota_user
552
+ # Available to use for quota purposes for server-side applications. Can be any
553
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
554
+ # Overrides userIp if both are provided.
555
+ # @param [String] user_ip
556
+ # IP address of the site where the request originates. Use this if you want to
557
+ # enforce per-user limits.
558
+ # @param [Google::Apis::RequestOptions] options
559
+ # Request-specific options
560
+ #
561
+ # @yield [result, err] Result & error if block supplied
562
+ # @yieldparam result [NilClass] No result returned for this method
563
+ # @yieldparam err [StandardError] error object if request failed
564
+ #
565
+ # @return [void]
566
+ #
567
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
568
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
569
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
570
+ def delete_user_label(user_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
571
+ command = make_simple_command(:delete, '{userId}/labels/{id}', options)
572
+ command.params['userId'] = user_id unless user_id.nil?
573
+ command.params['id'] = id unless id.nil?
574
+ command.query['fields'] = fields unless fields.nil?
575
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
576
+ command.query['userIp'] = user_ip unless user_ip.nil?
577
+ execute_or_queue_command(command, &block)
578
+ end
579
+
580
+ # Gets the specified label.
581
+ # @param [String] user_id
582
+ # The user's email address. The special value me can be used to indicate the
583
+ # authenticated user.
584
+ # @param [String] id
585
+ # The ID of the label to retrieve.
586
+ # @param [String] fields
587
+ # Selector specifying which fields to include in a partial response.
588
+ # @param [String] quota_user
589
+ # Available to use for quota purposes for server-side applications. Can be any
590
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
591
+ # Overrides userIp if both are provided.
592
+ # @param [String] user_ip
593
+ # IP address of the site where the request originates. Use this if you want to
594
+ # enforce per-user limits.
595
+ # @param [Google::Apis::RequestOptions] options
596
+ # Request-specific options
597
+ #
598
+ # @yield [result, err] Result & error if block supplied
599
+ # @yieldparam result [Google::Apis::GmailV1::Label] parsed result object
600
+ # @yieldparam err [StandardError] error object if request failed
601
+ #
602
+ # @return [Google::Apis::GmailV1::Label]
603
+ #
604
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
605
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
606
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
607
+ def get_user_label(user_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
608
+ command = make_simple_command(:get, '{userId}/labels/{id}', options)
609
+ command.response_representation = Google::Apis::GmailV1::Label::Representation
610
+ command.response_class = Google::Apis::GmailV1::Label
611
+ command.params['userId'] = user_id unless user_id.nil?
612
+ command.params['id'] = id unless id.nil?
613
+ command.query['fields'] = fields unless fields.nil?
614
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
615
+ command.query['userIp'] = user_ip unless user_ip.nil?
616
+ execute_or_queue_command(command, &block)
617
+ end
618
+
619
+ # Lists all labels in the user's mailbox.
620
+ # @param [String] user_id
621
+ # The user's email address. The special value me can be used to indicate the
622
+ # authenticated user.
623
+ # @param [String] fields
624
+ # Selector specifying which fields to include in a partial response.
625
+ # @param [String] quota_user
626
+ # Available to use for quota purposes for server-side applications. Can be any
627
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
628
+ # Overrides userIp if both are provided.
629
+ # @param [String] user_ip
630
+ # IP address of the site where the request originates. Use this if you want to
631
+ # enforce per-user limits.
632
+ # @param [Google::Apis::RequestOptions] options
633
+ # Request-specific options
634
+ #
635
+ # @yield [result, err] Result & error if block supplied
636
+ # @yieldparam result [Google::Apis::GmailV1::ListLabelsResponse] parsed result object
637
+ # @yieldparam err [StandardError] error object if request failed
638
+ #
639
+ # @return [Google::Apis::GmailV1::ListLabelsResponse]
640
+ #
641
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
642
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
643
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
644
+ def list_user_labels(user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
645
+ command = make_simple_command(:get, '{userId}/labels', options)
646
+ command.response_representation = Google::Apis::GmailV1::ListLabelsResponse::Representation
647
+ command.response_class = Google::Apis::GmailV1::ListLabelsResponse
648
+ command.params['userId'] = user_id unless user_id.nil?
649
+ command.query['fields'] = fields unless fields.nil?
650
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
651
+ command.query['userIp'] = user_ip unless user_ip.nil?
652
+ execute_or_queue_command(command, &block)
653
+ end
654
+
655
+ # Updates the specified label. This method supports patch semantics.
656
+ # @param [String] user_id
657
+ # The user's email address. The special value me can be used to indicate the
658
+ # authenticated user.
659
+ # @param [String] id
660
+ # The ID of the label to update.
661
+ # @param [Google::Apis::GmailV1::Label] label_object
662
+ # @param [String] fields
663
+ # Selector specifying which fields to include in a partial response.
664
+ # @param [String] quota_user
665
+ # Available to use for quota purposes for server-side applications. Can be any
666
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
667
+ # Overrides userIp if both are provided.
668
+ # @param [String] user_ip
669
+ # IP address of the site where the request originates. Use this if you want to
670
+ # enforce per-user limits.
671
+ # @param [Google::Apis::RequestOptions] options
672
+ # Request-specific options
673
+ #
674
+ # @yield [result, err] Result & error if block supplied
675
+ # @yieldparam result [Google::Apis::GmailV1::Label] parsed result object
676
+ # @yieldparam err [StandardError] error object if request failed
677
+ #
678
+ # @return [Google::Apis::GmailV1::Label]
679
+ #
680
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
681
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
682
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
683
+ def patch_user_label(user_id, id, label_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
684
+ command = make_simple_command(:patch, '{userId}/labels/{id}', options)
685
+ command.request_representation = Google::Apis::GmailV1::Label::Representation
686
+ command.request_object = label_object
687
+ command.response_representation = Google::Apis::GmailV1::Label::Representation
688
+ command.response_class = Google::Apis::GmailV1::Label
689
+ command.params['userId'] = user_id unless user_id.nil?
690
+ command.params['id'] = id unless id.nil?
691
+ command.query['fields'] = fields unless fields.nil?
692
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
693
+ command.query['userIp'] = user_ip unless user_ip.nil?
694
+ execute_or_queue_command(command, &block)
695
+ end
696
+
697
+ # Updates the specified label.
698
+ # @param [String] user_id
699
+ # The user's email address. The special value me can be used to indicate the
700
+ # authenticated user.
701
+ # @param [String] id
702
+ # The ID of the label to update.
703
+ # @param [Google::Apis::GmailV1::Label] label_object
704
+ # @param [String] fields
705
+ # Selector specifying which fields to include in a partial response.
706
+ # @param [String] quota_user
707
+ # Available to use for quota purposes for server-side applications. Can be any
708
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
709
+ # Overrides userIp if both are provided.
710
+ # @param [String] user_ip
711
+ # IP address of the site where the request originates. Use this if you want to
712
+ # enforce per-user limits.
713
+ # @param [Google::Apis::RequestOptions] options
714
+ # Request-specific options
715
+ #
716
+ # @yield [result, err] Result & error if block supplied
717
+ # @yieldparam result [Google::Apis::GmailV1::Label] parsed result object
718
+ # @yieldparam err [StandardError] error object if request failed
719
+ #
720
+ # @return [Google::Apis::GmailV1::Label]
721
+ #
722
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
723
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
724
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
725
+ def update_user_label(user_id, id, label_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
726
+ command = make_simple_command(:put, '{userId}/labels/{id}', options)
727
+ command.request_representation = Google::Apis::GmailV1::Label::Representation
728
+ command.request_object = label_object
729
+ command.response_representation = Google::Apis::GmailV1::Label::Representation
730
+ command.response_class = Google::Apis::GmailV1::Label
731
+ command.params['userId'] = user_id unless user_id.nil?
732
+ command.params['id'] = id unless id.nil?
733
+ command.query['fields'] = fields unless fields.nil?
734
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
735
+ command.query['userIp'] = user_ip unless user_ip.nil?
736
+ execute_or_queue_command(command, &block)
737
+ end
738
+
739
+ # Deletes many messages by message ID. Provides no guarantees that messages were
740
+ # not already deleted or even existed at all.
741
+ # @param [String] user_id
742
+ # The user's email address. The special value me can be used to indicate the
743
+ # authenticated user.
744
+ # @param [Google::Apis::GmailV1::BatchDeleteMessagesRequest] batch_delete_messages_request_object
745
+ # @param [String] fields
746
+ # Selector specifying which fields to include in a partial response.
747
+ # @param [String] quota_user
748
+ # Available to use for quota purposes for server-side applications. Can be any
749
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
750
+ # Overrides userIp if both are provided.
751
+ # @param [String] user_ip
752
+ # IP address of the site where the request originates. Use this if you want to
753
+ # enforce per-user limits.
754
+ # @param [Google::Apis::RequestOptions] options
755
+ # Request-specific options
756
+ #
757
+ # @yield [result, err] Result & error if block supplied
758
+ # @yieldparam result [NilClass] No result returned for this method
759
+ # @yieldparam err [StandardError] error object if request failed
760
+ #
761
+ # @return [void]
762
+ #
763
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
764
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
765
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
766
+ def batch_delete_messages(user_id, batch_delete_messages_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
767
+ command = make_simple_command(:post, '{userId}/messages/batchDelete', options)
768
+ command.request_representation = Google::Apis::GmailV1::BatchDeleteMessagesRequest::Representation
769
+ command.request_object = batch_delete_messages_request_object
770
+ command.params['userId'] = user_id unless user_id.nil?
771
+ command.query['fields'] = fields unless fields.nil?
772
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
773
+ command.query['userIp'] = user_ip unless user_ip.nil?
774
+ execute_or_queue_command(command, &block)
775
+ end
776
+
777
+ # Modifies the labels on the specified messages.
778
+ # @param [String] user_id
779
+ # The user's email address. The special value me can be used to indicate the
780
+ # authenticated user.
781
+ # @param [Google::Apis::GmailV1::BatchModifyMessagesRequest] batch_modify_messages_request_object
782
+ # @param [String] fields
783
+ # Selector specifying which fields to include in a partial response.
784
+ # @param [String] quota_user
785
+ # Available to use for quota purposes for server-side applications. Can be any
786
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
787
+ # Overrides userIp if both are provided.
788
+ # @param [String] user_ip
789
+ # IP address of the site where the request originates. Use this if you want to
790
+ # enforce per-user limits.
791
+ # @param [Google::Apis::RequestOptions] options
792
+ # Request-specific options
793
+ #
794
+ # @yield [result, err] Result & error if block supplied
795
+ # @yieldparam result [NilClass] No result returned for this method
796
+ # @yieldparam err [StandardError] error object if request failed
797
+ #
798
+ # @return [void]
799
+ #
800
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
801
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
802
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
803
+ def batch_modify_messages(user_id, batch_modify_messages_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
804
+ command = make_simple_command(:post, '{userId}/messages/batchModify', options)
805
+ command.request_representation = Google::Apis::GmailV1::BatchModifyMessagesRequest::Representation
806
+ command.request_object = batch_modify_messages_request_object
807
+ command.params['userId'] = user_id unless user_id.nil?
808
+ command.query['fields'] = fields unless fields.nil?
809
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
810
+ command.query['userIp'] = user_ip unless user_ip.nil?
811
+ execute_or_queue_command(command, &block)
812
+ end
813
+
814
+ # Immediately and permanently deletes the specified message. This operation
815
+ # cannot be undone. Prefer messages.trash instead.
816
+ # @param [String] user_id
817
+ # The user's email address. The special value me can be used to indicate the
818
+ # authenticated user.
819
+ # @param [String] id
820
+ # The ID of the message to delete.
821
+ # @param [String] fields
822
+ # Selector specifying which fields to include in a partial response.
823
+ # @param [String] quota_user
824
+ # Available to use for quota purposes for server-side applications. Can be any
825
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
826
+ # Overrides userIp if both are provided.
827
+ # @param [String] user_ip
828
+ # IP address of the site where the request originates. Use this if you want to
829
+ # enforce per-user limits.
830
+ # @param [Google::Apis::RequestOptions] options
831
+ # Request-specific options
832
+ #
833
+ # @yield [result, err] Result & error if block supplied
834
+ # @yieldparam result [NilClass] No result returned for this method
835
+ # @yieldparam err [StandardError] error object if request failed
836
+ #
837
+ # @return [void]
838
+ #
839
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
840
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
841
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
842
+ def delete_user_message(user_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
843
+ command = make_simple_command(:delete, '{userId}/messages/{id}', options)
844
+ command.params['userId'] = user_id unless user_id.nil?
845
+ command.params['id'] = id unless id.nil?
846
+ command.query['fields'] = fields unless fields.nil?
847
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
848
+ command.query['userIp'] = user_ip unless user_ip.nil?
849
+ execute_or_queue_command(command, &block)
850
+ end
851
+
852
+ # Gets the specified message.
853
+ # @param [String] user_id
854
+ # The user's email address. The special value me can be used to indicate the
855
+ # authenticated user.
856
+ # @param [String] id
857
+ # The ID of the message to retrieve.
858
+ # @param [String] format
859
+ # The format to return the message in.
860
+ # @param [Array<String>, String] metadata_headers
861
+ # When given and format is METADATA, only include headers specified.
862
+ # @param [String] fields
863
+ # Selector specifying which fields to include in a partial response.
864
+ # @param [String] quota_user
865
+ # Available to use for quota purposes for server-side applications. Can be any
866
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
867
+ # Overrides userIp if both are provided.
868
+ # @param [String] user_ip
869
+ # IP address of the site where the request originates. Use this if you want to
870
+ # enforce per-user limits.
871
+ # @param [Google::Apis::RequestOptions] options
872
+ # Request-specific options
873
+ #
874
+ # @yield [result, err] Result & error if block supplied
875
+ # @yieldparam result [Google::Apis::GmailV1::Message] parsed result object
876
+ # @yieldparam err [StandardError] error object if request failed
877
+ #
878
+ # @return [Google::Apis::GmailV1::Message]
879
+ #
880
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
881
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
882
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
883
+ def get_user_message(user_id, id, format: nil, metadata_headers: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
884
+ command = make_simple_command(:get, '{userId}/messages/{id}', options)
885
+ command.response_representation = Google::Apis::GmailV1::Message::Representation
886
+ command.response_class = Google::Apis::GmailV1::Message
887
+ command.params['userId'] = user_id unless user_id.nil?
888
+ command.params['id'] = id unless id.nil?
889
+ command.query['format'] = format unless format.nil?
890
+ command.query['metadataHeaders'] = metadata_headers unless metadata_headers.nil?
891
+ command.query['fields'] = fields unless fields.nil?
892
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
893
+ command.query['userIp'] = user_ip unless user_ip.nil?
894
+ execute_or_queue_command(command, &block)
895
+ end
896
+
897
+ # Imports a message into only this user's mailbox, with standard email delivery
898
+ # scanning and classification similar to receiving via SMTP. Does not send a
899
+ # message.
900
+ # @param [String] user_id
901
+ # The user's email address. The special value me can be used to indicate the
902
+ # authenticated user.
903
+ # @param [Google::Apis::GmailV1::Message] message_object
904
+ # @param [Boolean] deleted
905
+ # Mark the email as permanently deleted (not TRASH) and only visible in Google
906
+ # Apps Vault to a Vault administrator. Only used for Google Apps for Work
907
+ # accounts.
908
+ # @param [String] internal_date_source
909
+ # Source for Gmail's internal date of the message.
910
+ # @param [Boolean] never_mark_spam
911
+ # Ignore the Gmail spam classifier decision and never mark this email as SPAM in
912
+ # the mailbox.
913
+ # @param [Boolean] process_for_calendar
914
+ # Process calendar invites in the email and add any extracted meetings to the
915
+ # Google Calendar for this user.
916
+ # @param [String] fields
917
+ # Selector specifying which fields to include in a partial response.
918
+ # @param [String] quota_user
919
+ # Available to use for quota purposes for server-side applications. Can be any
920
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
921
+ # Overrides userIp if both are provided.
922
+ # @param [String] user_ip
923
+ # IP address of the site where the request originates. Use this if you want to
924
+ # enforce per-user limits.
925
+ # @param [IO, String] upload_source
926
+ # IO stream or filename containing content to upload
927
+ # @param [String] content_type
928
+ # Content type of the uploaded content.
929
+ # @param [Google::Apis::RequestOptions] options
930
+ # Request-specific options
931
+ #
932
+ # @yield [result, err] Result & error if block supplied
933
+ # @yieldparam result [Google::Apis::GmailV1::Message] parsed result object
934
+ # @yieldparam err [StandardError] error object if request failed
935
+ #
936
+ # @return [Google::Apis::GmailV1::Message]
937
+ #
938
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
939
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
940
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
941
+ def import_user_message(user_id, message_object = nil, deleted: nil, internal_date_source: nil, never_mark_spam: nil, process_for_calendar: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block)
942
+ if upload_source.nil?
943
+ command = make_simple_command(:post, '{userId}/messages/import', options)
944
+ else
945
+ command = make_upload_command(:post, '{userId}/messages/import', options)
946
+ command.upload_source = upload_source
947
+ command.upload_content_type = content_type
948
+ end
949
+ command.request_representation = Google::Apis::GmailV1::Message::Representation
950
+ command.request_object = message_object
951
+ command.response_representation = Google::Apis::GmailV1::Message::Representation
952
+ command.response_class = Google::Apis::GmailV1::Message
953
+ command.params['userId'] = user_id unless user_id.nil?
954
+ command.query['deleted'] = deleted unless deleted.nil?
955
+ command.query['internalDateSource'] = internal_date_source unless internal_date_source.nil?
956
+ command.query['neverMarkSpam'] = never_mark_spam unless never_mark_spam.nil?
957
+ command.query['processForCalendar'] = process_for_calendar unless process_for_calendar.nil?
958
+ command.query['fields'] = fields unless fields.nil?
959
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
960
+ command.query['userIp'] = user_ip unless user_ip.nil?
961
+ execute_or_queue_command(command, &block)
962
+ end
963
+
964
+ # Directly inserts a message into only this user's mailbox similar to IMAP
965
+ # APPEND, bypassing most scanning and classification. Does not send a message.
966
+ # @param [String] user_id
967
+ # The user's email address. The special value me can be used to indicate the
968
+ # authenticated user.
969
+ # @param [Google::Apis::GmailV1::Message] message_object
970
+ # @param [Boolean] deleted
971
+ # Mark the email as permanently deleted (not TRASH) and only visible in Google
972
+ # Apps Vault to a Vault administrator. Only used for Google Apps for Work
973
+ # accounts.
974
+ # @param [String] internal_date_source
975
+ # Source for Gmail's internal date of the message.
976
+ # @param [String] fields
977
+ # Selector specifying which fields to include in a partial response.
978
+ # @param [String] quota_user
979
+ # Available to use for quota purposes for server-side applications. Can be any
980
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
981
+ # Overrides userIp if both are provided.
982
+ # @param [String] user_ip
983
+ # IP address of the site where the request originates. Use this if you want to
984
+ # enforce per-user limits.
985
+ # @param [IO, String] upload_source
986
+ # IO stream or filename containing content to upload
987
+ # @param [String] content_type
988
+ # Content type of the uploaded content.
989
+ # @param [Google::Apis::RequestOptions] options
990
+ # Request-specific options
991
+ #
992
+ # @yield [result, err] Result & error if block supplied
993
+ # @yieldparam result [Google::Apis::GmailV1::Message] parsed result object
994
+ # @yieldparam err [StandardError] error object if request failed
995
+ #
996
+ # @return [Google::Apis::GmailV1::Message]
997
+ #
998
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
999
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1000
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1001
+ def insert_user_message(user_id, message_object = nil, deleted: nil, internal_date_source: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block)
1002
+ if upload_source.nil?
1003
+ command = make_simple_command(:post, '{userId}/messages', options)
1004
+ else
1005
+ command = make_upload_command(:post, '{userId}/messages', options)
1006
+ command.upload_source = upload_source
1007
+ command.upload_content_type = content_type
1008
+ end
1009
+ command.request_representation = Google::Apis::GmailV1::Message::Representation
1010
+ command.request_object = message_object
1011
+ command.response_representation = Google::Apis::GmailV1::Message::Representation
1012
+ command.response_class = Google::Apis::GmailV1::Message
1013
+ command.params['userId'] = user_id unless user_id.nil?
1014
+ command.query['deleted'] = deleted unless deleted.nil?
1015
+ command.query['internalDateSource'] = internal_date_source unless internal_date_source.nil?
1016
+ command.query['fields'] = fields unless fields.nil?
1017
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1018
+ command.query['userIp'] = user_ip unless user_ip.nil?
1019
+ execute_or_queue_command(command, &block)
1020
+ end
1021
+
1022
+ # Lists the messages in the user's mailbox.
1023
+ # @param [String] user_id
1024
+ # The user's email address. The special value me can be used to indicate the
1025
+ # authenticated user.
1026
+ # @param [Boolean] include_spam_trash
1027
+ # Include messages from SPAM and TRASH in the results.
1028
+ # @param [Array<String>, String] label_ids
1029
+ # Only return messages with labels that match all of the specified label IDs.
1030
+ # @param [Fixnum] max_results
1031
+ # Maximum number of messages to return.
1032
+ # @param [String] page_token
1033
+ # Page token to retrieve a specific page of results in the list.
1034
+ # @param [String] q
1035
+ # Only return messages matching the specified query. Supports the same query
1036
+ # format as the Gmail search box. For example, "from:someuser@example.com
1037
+ # rfc822msgid: is:unread". Parameter cannot be used when accessing the api using
1038
+ # the gmail.metadata scope.
1039
+ # @param [String] fields
1040
+ # Selector specifying which fields to include in a partial response.
1041
+ # @param [String] quota_user
1042
+ # Available to use for quota purposes for server-side applications. Can be any
1043
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1044
+ # Overrides userIp if both are provided.
1045
+ # @param [String] user_ip
1046
+ # IP address of the site where the request originates. Use this if you want to
1047
+ # enforce per-user limits.
1048
+ # @param [Google::Apis::RequestOptions] options
1049
+ # Request-specific options
1050
+ #
1051
+ # @yield [result, err] Result & error if block supplied
1052
+ # @yieldparam result [Google::Apis::GmailV1::ListMessagesResponse] parsed result object
1053
+ # @yieldparam err [StandardError] error object if request failed
1054
+ #
1055
+ # @return [Google::Apis::GmailV1::ListMessagesResponse]
1056
+ #
1057
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1058
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1059
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1060
+ def list_user_messages(user_id, include_spam_trash: nil, label_ids: nil, max_results: nil, page_token: nil, q: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1061
+ command = make_simple_command(:get, '{userId}/messages', options)
1062
+ command.response_representation = Google::Apis::GmailV1::ListMessagesResponse::Representation
1063
+ command.response_class = Google::Apis::GmailV1::ListMessagesResponse
1064
+ command.params['userId'] = user_id unless user_id.nil?
1065
+ command.query['includeSpamTrash'] = include_spam_trash unless include_spam_trash.nil?
1066
+ command.query['labelIds'] = label_ids unless label_ids.nil?
1067
+ command.query['maxResults'] = max_results unless max_results.nil?
1068
+ command.query['pageToken'] = page_token unless page_token.nil?
1069
+ command.query['q'] = q unless q.nil?
1070
+ command.query['fields'] = fields unless fields.nil?
1071
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1072
+ command.query['userIp'] = user_ip unless user_ip.nil?
1073
+ execute_or_queue_command(command, &block)
1074
+ end
1075
+
1076
+ # Modifies the labels on the specified message.
1077
+ # @param [String] user_id
1078
+ # The user's email address. The special value me can be used to indicate the
1079
+ # authenticated user.
1080
+ # @param [String] id
1081
+ # The ID of the message to modify.
1082
+ # @param [Google::Apis::GmailV1::ModifyMessageRequest] modify_message_request_object
1083
+ # @param [String] fields
1084
+ # Selector specifying which fields to include in a partial response.
1085
+ # @param [String] quota_user
1086
+ # Available to use for quota purposes for server-side applications. Can be any
1087
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1088
+ # Overrides userIp if both are provided.
1089
+ # @param [String] user_ip
1090
+ # IP address of the site where the request originates. Use this if you want to
1091
+ # enforce per-user limits.
1092
+ # @param [Google::Apis::RequestOptions] options
1093
+ # Request-specific options
1094
+ #
1095
+ # @yield [result, err] Result & error if block supplied
1096
+ # @yieldparam result [Google::Apis::GmailV1::Message] parsed result object
1097
+ # @yieldparam err [StandardError] error object if request failed
1098
+ #
1099
+ # @return [Google::Apis::GmailV1::Message]
1100
+ #
1101
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1102
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1103
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1104
+ def modify_message(user_id, id, modify_message_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1105
+ command = make_simple_command(:post, '{userId}/messages/{id}/modify', options)
1106
+ command.request_representation = Google::Apis::GmailV1::ModifyMessageRequest::Representation
1107
+ command.request_object = modify_message_request_object
1108
+ command.response_representation = Google::Apis::GmailV1::Message::Representation
1109
+ command.response_class = Google::Apis::GmailV1::Message
1110
+ command.params['userId'] = user_id unless user_id.nil?
1111
+ command.params['id'] = id unless id.nil?
1112
+ command.query['fields'] = fields unless fields.nil?
1113
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1114
+ command.query['userIp'] = user_ip unless user_ip.nil?
1115
+ execute_or_queue_command(command, &block)
1116
+ end
1117
+
1118
+ # Sends the specified message to the recipients in the To, Cc, and Bcc headers.
1119
+ # @param [String] user_id
1120
+ # The user's email address. The special value me can be used to indicate the
1121
+ # authenticated user.
1122
+ # @param [Google::Apis::GmailV1::Message] message_object
1123
+ # @param [String] fields
1124
+ # Selector specifying which fields to include in a partial response.
1125
+ # @param [String] quota_user
1126
+ # Available to use for quota purposes for server-side applications. Can be any
1127
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1128
+ # Overrides userIp if both are provided.
1129
+ # @param [String] user_ip
1130
+ # IP address of the site where the request originates. Use this if you want to
1131
+ # enforce per-user limits.
1132
+ # @param [IO, String] upload_source
1133
+ # IO stream or filename containing content to upload
1134
+ # @param [String] content_type
1135
+ # Content type of the uploaded content.
1136
+ # @param [Google::Apis::RequestOptions] options
1137
+ # Request-specific options
1138
+ #
1139
+ # @yield [result, err] Result & error if block supplied
1140
+ # @yieldparam result [Google::Apis::GmailV1::Message] parsed result object
1141
+ # @yieldparam err [StandardError] error object if request failed
1142
+ #
1143
+ # @return [Google::Apis::GmailV1::Message]
1144
+ #
1145
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1146
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1147
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1148
+ def send_user_message(user_id, message_object = nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block)
1149
+ if upload_source.nil?
1150
+ command = make_simple_command(:post, '{userId}/messages/send', options)
1151
+ else
1152
+ command = make_upload_command(:post, '{userId}/messages/send', options)
1153
+ command.upload_source = upload_source
1154
+ command.upload_content_type = content_type
1155
+ end
1156
+ command.request_representation = Google::Apis::GmailV1::Message::Representation
1157
+ command.request_object = message_object
1158
+ command.response_representation = Google::Apis::GmailV1::Message::Representation
1159
+ command.response_class = Google::Apis::GmailV1::Message
1160
+ command.params['userId'] = user_id unless user_id.nil?
1161
+ command.query['fields'] = fields unless fields.nil?
1162
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1163
+ command.query['userIp'] = user_ip unless user_ip.nil?
1164
+ execute_or_queue_command(command, &block)
1165
+ end
1166
+
1167
+ # Moves the specified message to the trash.
1168
+ # @param [String] user_id
1169
+ # The user's email address. The special value me can be used to indicate the
1170
+ # authenticated user.
1171
+ # @param [String] id
1172
+ # The ID of the message to Trash.
1173
+ # @param [String] fields
1174
+ # Selector specifying which fields to include in a partial response.
1175
+ # @param [String] quota_user
1176
+ # Available to use for quota purposes for server-side applications. Can be any
1177
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1178
+ # Overrides userIp if both are provided.
1179
+ # @param [String] user_ip
1180
+ # IP address of the site where the request originates. Use this if you want to
1181
+ # enforce per-user limits.
1182
+ # @param [Google::Apis::RequestOptions] options
1183
+ # Request-specific options
1184
+ #
1185
+ # @yield [result, err] Result & error if block supplied
1186
+ # @yieldparam result [Google::Apis::GmailV1::Message] parsed result object
1187
+ # @yieldparam err [StandardError] error object if request failed
1188
+ #
1189
+ # @return [Google::Apis::GmailV1::Message]
1190
+ #
1191
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1192
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1193
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1194
+ def trash_user_message(user_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1195
+ command = make_simple_command(:post, '{userId}/messages/{id}/trash', options)
1196
+ command.response_representation = Google::Apis::GmailV1::Message::Representation
1197
+ command.response_class = Google::Apis::GmailV1::Message
1198
+ command.params['userId'] = user_id unless user_id.nil?
1199
+ command.params['id'] = id unless id.nil?
1200
+ command.query['fields'] = fields unless fields.nil?
1201
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1202
+ command.query['userIp'] = user_ip unless user_ip.nil?
1203
+ execute_or_queue_command(command, &block)
1204
+ end
1205
+
1206
+ # Removes the specified message from the trash.
1207
+ # @param [String] user_id
1208
+ # The user's email address. The special value me can be used to indicate the
1209
+ # authenticated user.
1210
+ # @param [String] id
1211
+ # The ID of the message to remove from Trash.
1212
+ # @param [String] fields
1213
+ # Selector specifying which fields to include in a partial response.
1214
+ # @param [String] quota_user
1215
+ # Available to use for quota purposes for server-side applications. Can be any
1216
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1217
+ # Overrides userIp if both are provided.
1218
+ # @param [String] user_ip
1219
+ # IP address of the site where the request originates. Use this if you want to
1220
+ # enforce per-user limits.
1221
+ # @param [Google::Apis::RequestOptions] options
1222
+ # Request-specific options
1223
+ #
1224
+ # @yield [result, err] Result & error if block supplied
1225
+ # @yieldparam result [Google::Apis::GmailV1::Message] parsed result object
1226
+ # @yieldparam err [StandardError] error object if request failed
1227
+ #
1228
+ # @return [Google::Apis::GmailV1::Message]
1229
+ #
1230
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1231
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1232
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1233
+ def untrash_user_message(user_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1234
+ command = make_simple_command(:post, '{userId}/messages/{id}/untrash', options)
1235
+ command.response_representation = Google::Apis::GmailV1::Message::Representation
1236
+ command.response_class = Google::Apis::GmailV1::Message
1237
+ command.params['userId'] = user_id unless user_id.nil?
1238
+ command.params['id'] = id unless id.nil?
1239
+ command.query['fields'] = fields unless fields.nil?
1240
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1241
+ command.query['userIp'] = user_ip unless user_ip.nil?
1242
+ execute_or_queue_command(command, &block)
1243
+ end
1244
+
1245
+ # Gets the specified message attachment.
1246
+ # @param [String] user_id
1247
+ # The user's email address. The special value me can be used to indicate the
1248
+ # authenticated user.
1249
+ # @param [String] message_id
1250
+ # The ID of the message containing the attachment.
1251
+ # @param [String] id
1252
+ # The ID of the attachment.
1253
+ # @param [String] fields
1254
+ # Selector specifying which fields to include in a partial response.
1255
+ # @param [String] quota_user
1256
+ # Available to use for quota purposes for server-side applications. Can be any
1257
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1258
+ # Overrides userIp if both are provided.
1259
+ # @param [String] user_ip
1260
+ # IP address of the site where the request originates. Use this if you want to
1261
+ # enforce per-user limits.
1262
+ # @param [Google::Apis::RequestOptions] options
1263
+ # Request-specific options
1264
+ #
1265
+ # @yield [result, err] Result & error if block supplied
1266
+ # @yieldparam result [Google::Apis::GmailV1::MessagePartBody] parsed result object
1267
+ # @yieldparam err [StandardError] error object if request failed
1268
+ #
1269
+ # @return [Google::Apis::GmailV1::MessagePartBody]
1270
+ #
1271
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1272
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1273
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1274
+ def get_user_message_attachment(user_id, message_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1275
+ command = make_simple_command(:get, '{userId}/messages/{messageId}/attachments/{id}', options)
1276
+ command.response_representation = Google::Apis::GmailV1::MessagePartBody::Representation
1277
+ command.response_class = Google::Apis::GmailV1::MessagePartBody
1278
+ command.params['userId'] = user_id unless user_id.nil?
1279
+ command.params['messageId'] = message_id unless message_id.nil?
1280
+ command.params['id'] = id unless id.nil?
1281
+ command.query['fields'] = fields unless fields.nil?
1282
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1283
+ command.query['userIp'] = user_ip unless user_ip.nil?
1284
+ execute_or_queue_command(command, &block)
1285
+ end
1286
+
1287
+ # Gets the auto-forwarding setting for the specified account.
1288
+ # @param [String] user_id
1289
+ # User's email address. The special value "me" can be used to indicate the
1290
+ # authenticated user.
1291
+ # @param [String] fields
1292
+ # Selector specifying which fields to include in a partial response.
1293
+ # @param [String] quota_user
1294
+ # Available to use for quota purposes for server-side applications. Can be any
1295
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1296
+ # Overrides userIp if both are provided.
1297
+ # @param [String] user_ip
1298
+ # IP address of the site where the request originates. Use this if you want to
1299
+ # enforce per-user limits.
1300
+ # @param [Google::Apis::RequestOptions] options
1301
+ # Request-specific options
1302
+ #
1303
+ # @yield [result, err] Result & error if block supplied
1304
+ # @yieldparam result [Google::Apis::GmailV1::AutoForwarding] parsed result object
1305
+ # @yieldparam err [StandardError] error object if request failed
1306
+ #
1307
+ # @return [Google::Apis::GmailV1::AutoForwarding]
1308
+ #
1309
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1310
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1311
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1312
+ def get_user_setting_auto_forwarding(user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1313
+ command = make_simple_command(:get, '{userId}/settings/autoForwarding', options)
1314
+ command.response_representation = Google::Apis::GmailV1::AutoForwarding::Representation
1315
+ command.response_class = Google::Apis::GmailV1::AutoForwarding
1316
+ command.params['userId'] = user_id unless user_id.nil?
1317
+ command.query['fields'] = fields unless fields.nil?
1318
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1319
+ command.query['userIp'] = user_ip unless user_ip.nil?
1320
+ execute_or_queue_command(command, &block)
1321
+ end
1322
+
1323
+ # Gets IMAP settings.
1324
+ # @param [String] user_id
1325
+ # User's email address. The special value "me" can be used to indicate the
1326
+ # authenticated user.
1327
+ # @param [String] fields
1328
+ # Selector specifying which fields to include in a partial response.
1329
+ # @param [String] quota_user
1330
+ # Available to use for quota purposes for server-side applications. Can be any
1331
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1332
+ # Overrides userIp if both are provided.
1333
+ # @param [String] user_ip
1334
+ # IP address of the site where the request originates. Use this if you want to
1335
+ # enforce per-user limits.
1336
+ # @param [Google::Apis::RequestOptions] options
1337
+ # Request-specific options
1338
+ #
1339
+ # @yield [result, err] Result & error if block supplied
1340
+ # @yieldparam result [Google::Apis::GmailV1::ImapSettings] parsed result object
1341
+ # @yieldparam err [StandardError] error object if request failed
1342
+ #
1343
+ # @return [Google::Apis::GmailV1::ImapSettings]
1344
+ #
1345
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1346
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1347
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1348
+ def get_user_setting_imap(user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1349
+ command = make_simple_command(:get, '{userId}/settings/imap', options)
1350
+ command.response_representation = Google::Apis::GmailV1::ImapSettings::Representation
1351
+ command.response_class = Google::Apis::GmailV1::ImapSettings
1352
+ command.params['userId'] = user_id unless user_id.nil?
1353
+ command.query['fields'] = fields unless fields.nil?
1354
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1355
+ command.query['userIp'] = user_ip unless user_ip.nil?
1356
+ execute_or_queue_command(command, &block)
1357
+ end
1358
+
1359
+ # Gets POP settings.
1360
+ # @param [String] user_id
1361
+ # User's email address. The special value "me" can be used to indicate the
1362
+ # authenticated user.
1363
+ # @param [String] fields
1364
+ # Selector specifying which fields to include in a partial response.
1365
+ # @param [String] quota_user
1366
+ # Available to use for quota purposes for server-side applications. Can be any
1367
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1368
+ # Overrides userIp if both are provided.
1369
+ # @param [String] user_ip
1370
+ # IP address of the site where the request originates. Use this if you want to
1371
+ # enforce per-user limits.
1372
+ # @param [Google::Apis::RequestOptions] options
1373
+ # Request-specific options
1374
+ #
1375
+ # @yield [result, err] Result & error if block supplied
1376
+ # @yieldparam result [Google::Apis::GmailV1::PopSettings] parsed result object
1377
+ # @yieldparam err [StandardError] error object if request failed
1378
+ #
1379
+ # @return [Google::Apis::GmailV1::PopSettings]
1380
+ #
1381
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1382
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1383
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1384
+ def get_user_setting_pop(user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1385
+ command = make_simple_command(:get, '{userId}/settings/pop', options)
1386
+ command.response_representation = Google::Apis::GmailV1::PopSettings::Representation
1387
+ command.response_class = Google::Apis::GmailV1::PopSettings
1388
+ command.params['userId'] = user_id unless user_id.nil?
1389
+ command.query['fields'] = fields unless fields.nil?
1390
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1391
+ command.query['userIp'] = user_ip unless user_ip.nil?
1392
+ execute_or_queue_command(command, &block)
1393
+ end
1394
+
1395
+ # Gets vacation responder settings.
1396
+ # @param [String] user_id
1397
+ # User's email address. The special value "me" can be used to indicate the
1398
+ # authenticated user.
1399
+ # @param [String] fields
1400
+ # Selector specifying which fields to include in a partial response.
1401
+ # @param [String] quota_user
1402
+ # Available to use for quota purposes for server-side applications. Can be any
1403
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1404
+ # Overrides userIp if both are provided.
1405
+ # @param [String] user_ip
1406
+ # IP address of the site where the request originates. Use this if you want to
1407
+ # enforce per-user limits.
1408
+ # @param [Google::Apis::RequestOptions] options
1409
+ # Request-specific options
1410
+ #
1411
+ # @yield [result, err] Result & error if block supplied
1412
+ # @yieldparam result [Google::Apis::GmailV1::VacationSettings] parsed result object
1413
+ # @yieldparam err [StandardError] error object if request failed
1414
+ #
1415
+ # @return [Google::Apis::GmailV1::VacationSettings]
1416
+ #
1417
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1418
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1419
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1420
+ def get_user_setting_vacation(user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1421
+ command = make_simple_command(:get, '{userId}/settings/vacation', options)
1422
+ command.response_representation = Google::Apis::GmailV1::VacationSettings::Representation
1423
+ command.response_class = Google::Apis::GmailV1::VacationSettings
1424
+ command.params['userId'] = user_id unless user_id.nil?
1425
+ command.query['fields'] = fields unless fields.nil?
1426
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1427
+ command.query['userIp'] = user_ip unless user_ip.nil?
1428
+ execute_or_queue_command(command, &block)
1429
+ end
1430
+
1431
+ # Updates the auto-forwarding setting for the specified account. A verified
1432
+ # forwarding address must be specified when auto-forwarding is enabled.
1433
+ # @param [String] user_id
1434
+ # User's email address. The special value "me" can be used to indicate the
1435
+ # authenticated user.
1436
+ # @param [Google::Apis::GmailV1::AutoForwarding] auto_forwarding_object
1437
+ # @param [String] fields
1438
+ # Selector specifying which fields to include in a partial response.
1439
+ # @param [String] quota_user
1440
+ # Available to use for quota purposes for server-side applications. Can be any
1441
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1442
+ # Overrides userIp if both are provided.
1443
+ # @param [String] user_ip
1444
+ # IP address of the site where the request originates. Use this if you want to
1445
+ # enforce per-user limits.
1446
+ # @param [Google::Apis::RequestOptions] options
1447
+ # Request-specific options
1448
+ #
1449
+ # @yield [result, err] Result & error if block supplied
1450
+ # @yieldparam result [Google::Apis::GmailV1::AutoForwarding] parsed result object
1451
+ # @yieldparam err [StandardError] error object if request failed
1452
+ #
1453
+ # @return [Google::Apis::GmailV1::AutoForwarding]
1454
+ #
1455
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1456
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1457
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1458
+ def update_user_setting_auto_forwarding(user_id, auto_forwarding_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1459
+ command = make_simple_command(:put, '{userId}/settings/autoForwarding', options)
1460
+ command.request_representation = Google::Apis::GmailV1::AutoForwarding::Representation
1461
+ command.request_object = auto_forwarding_object
1462
+ command.response_representation = Google::Apis::GmailV1::AutoForwarding::Representation
1463
+ command.response_class = Google::Apis::GmailV1::AutoForwarding
1464
+ command.params['userId'] = user_id unless user_id.nil?
1465
+ command.query['fields'] = fields unless fields.nil?
1466
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1467
+ command.query['userIp'] = user_ip unless user_ip.nil?
1468
+ execute_or_queue_command(command, &block)
1469
+ end
1470
+
1471
+ # Updates IMAP settings.
1472
+ # @param [String] user_id
1473
+ # User's email address. The special value "me" can be used to indicate the
1474
+ # authenticated user.
1475
+ # @param [Google::Apis::GmailV1::ImapSettings] imap_settings_object
1476
+ # @param [String] fields
1477
+ # Selector specifying which fields to include in a partial response.
1478
+ # @param [String] quota_user
1479
+ # Available to use for quota purposes for server-side applications. Can be any
1480
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1481
+ # Overrides userIp if both are provided.
1482
+ # @param [String] user_ip
1483
+ # IP address of the site where the request originates. Use this if you want to
1484
+ # enforce per-user limits.
1485
+ # @param [Google::Apis::RequestOptions] options
1486
+ # Request-specific options
1487
+ #
1488
+ # @yield [result, err] Result & error if block supplied
1489
+ # @yieldparam result [Google::Apis::GmailV1::ImapSettings] parsed result object
1490
+ # @yieldparam err [StandardError] error object if request failed
1491
+ #
1492
+ # @return [Google::Apis::GmailV1::ImapSettings]
1493
+ #
1494
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1495
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1496
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1497
+ def update_user_setting_imap(user_id, imap_settings_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1498
+ command = make_simple_command(:put, '{userId}/settings/imap', options)
1499
+ command.request_representation = Google::Apis::GmailV1::ImapSettings::Representation
1500
+ command.request_object = imap_settings_object
1501
+ command.response_representation = Google::Apis::GmailV1::ImapSettings::Representation
1502
+ command.response_class = Google::Apis::GmailV1::ImapSettings
1503
+ command.params['userId'] = user_id unless user_id.nil?
1504
+ command.query['fields'] = fields unless fields.nil?
1505
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1506
+ command.query['userIp'] = user_ip unless user_ip.nil?
1507
+ execute_or_queue_command(command, &block)
1508
+ end
1509
+
1510
+ # Updates POP settings.
1511
+ # @param [String] user_id
1512
+ # User's email address. The special value "me" can be used to indicate the
1513
+ # authenticated user.
1514
+ # @param [Google::Apis::GmailV1::PopSettings] pop_settings_object
1515
+ # @param [String] fields
1516
+ # Selector specifying which fields to include in a partial response.
1517
+ # @param [String] quota_user
1518
+ # Available to use for quota purposes for server-side applications. Can be any
1519
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1520
+ # Overrides userIp if both are provided.
1521
+ # @param [String] user_ip
1522
+ # IP address of the site where the request originates. Use this if you want to
1523
+ # enforce per-user limits.
1524
+ # @param [Google::Apis::RequestOptions] options
1525
+ # Request-specific options
1526
+ #
1527
+ # @yield [result, err] Result & error if block supplied
1528
+ # @yieldparam result [Google::Apis::GmailV1::PopSettings] parsed result object
1529
+ # @yieldparam err [StandardError] error object if request failed
1530
+ #
1531
+ # @return [Google::Apis::GmailV1::PopSettings]
1532
+ #
1533
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1534
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1535
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1536
+ def update_user_setting_pop(user_id, pop_settings_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1537
+ command = make_simple_command(:put, '{userId}/settings/pop', options)
1538
+ command.request_representation = Google::Apis::GmailV1::PopSettings::Representation
1539
+ command.request_object = pop_settings_object
1540
+ command.response_representation = Google::Apis::GmailV1::PopSettings::Representation
1541
+ command.response_class = Google::Apis::GmailV1::PopSettings
1542
+ command.params['userId'] = user_id unless user_id.nil?
1543
+ command.query['fields'] = fields unless fields.nil?
1544
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1545
+ command.query['userIp'] = user_ip unless user_ip.nil?
1546
+ execute_or_queue_command(command, &block)
1547
+ end
1548
+
1549
+ # Updates vacation responder settings.
1550
+ # @param [String] user_id
1551
+ # User's email address. The special value "me" can be used to indicate the
1552
+ # authenticated user.
1553
+ # @param [Google::Apis::GmailV1::VacationSettings] vacation_settings_object
1554
+ # @param [String] fields
1555
+ # Selector specifying which fields to include in a partial response.
1556
+ # @param [String] quota_user
1557
+ # Available to use for quota purposes for server-side applications. Can be any
1558
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1559
+ # Overrides userIp if both are provided.
1560
+ # @param [String] user_ip
1561
+ # IP address of the site where the request originates. Use this if you want to
1562
+ # enforce per-user limits.
1563
+ # @param [Google::Apis::RequestOptions] options
1564
+ # Request-specific options
1565
+ #
1566
+ # @yield [result, err] Result & error if block supplied
1567
+ # @yieldparam result [Google::Apis::GmailV1::VacationSettings] parsed result object
1568
+ # @yieldparam err [StandardError] error object if request failed
1569
+ #
1570
+ # @return [Google::Apis::GmailV1::VacationSettings]
1571
+ #
1572
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1573
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1574
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1575
+ def update_user_setting_vacation(user_id, vacation_settings_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1576
+ command = make_simple_command(:put, '{userId}/settings/vacation', options)
1577
+ command.request_representation = Google::Apis::GmailV1::VacationSettings::Representation
1578
+ command.request_object = vacation_settings_object
1579
+ command.response_representation = Google::Apis::GmailV1::VacationSettings::Representation
1580
+ command.response_class = Google::Apis::GmailV1::VacationSettings
1581
+ command.params['userId'] = user_id unless user_id.nil?
1582
+ command.query['fields'] = fields unless fields.nil?
1583
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1584
+ command.query['userIp'] = user_ip unless user_ip.nil?
1585
+ execute_or_queue_command(command, &block)
1586
+ end
1587
+
1588
+ # Creates a filter.
1589
+ # @param [String] user_id
1590
+ # User's email address. The special value "me" can be used to indicate the
1591
+ # authenticated user.
1592
+ # @param [Google::Apis::GmailV1::Filter] filter_object
1593
+ # @param [String] fields
1594
+ # Selector specifying which fields to include in a partial response.
1595
+ # @param [String] quota_user
1596
+ # Available to use for quota purposes for server-side applications. Can be any
1597
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1598
+ # Overrides userIp if both are provided.
1599
+ # @param [String] user_ip
1600
+ # IP address of the site where the request originates. Use this if you want to
1601
+ # enforce per-user limits.
1602
+ # @param [Google::Apis::RequestOptions] options
1603
+ # Request-specific options
1604
+ #
1605
+ # @yield [result, err] Result & error if block supplied
1606
+ # @yieldparam result [Google::Apis::GmailV1::Filter] parsed result object
1607
+ # @yieldparam err [StandardError] error object if request failed
1608
+ #
1609
+ # @return [Google::Apis::GmailV1::Filter]
1610
+ #
1611
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1612
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1613
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1614
+ def create_user_setting_filter(user_id, filter_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1615
+ command = make_simple_command(:post, '{userId}/settings/filters', options)
1616
+ command.request_representation = Google::Apis::GmailV1::Filter::Representation
1617
+ command.request_object = filter_object
1618
+ command.response_representation = Google::Apis::GmailV1::Filter::Representation
1619
+ command.response_class = Google::Apis::GmailV1::Filter
1620
+ command.params['userId'] = user_id unless user_id.nil?
1621
+ command.query['fields'] = fields unless fields.nil?
1622
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1623
+ command.query['userIp'] = user_ip unless user_ip.nil?
1624
+ execute_or_queue_command(command, &block)
1625
+ end
1626
+
1627
+ # Deletes a filter.
1628
+ # @param [String] user_id
1629
+ # User's email address. The special value "me" can be used to indicate the
1630
+ # authenticated user.
1631
+ # @param [String] id
1632
+ # The ID of the filter to be deleted.
1633
+ # @param [String] fields
1634
+ # Selector specifying which fields to include in a partial response.
1635
+ # @param [String] quota_user
1636
+ # Available to use for quota purposes for server-side applications. Can be any
1637
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1638
+ # Overrides userIp if both are provided.
1639
+ # @param [String] user_ip
1640
+ # IP address of the site where the request originates. Use this if you want to
1641
+ # enforce per-user limits.
1642
+ # @param [Google::Apis::RequestOptions] options
1643
+ # Request-specific options
1644
+ #
1645
+ # @yield [result, err] Result & error if block supplied
1646
+ # @yieldparam result [NilClass] No result returned for this method
1647
+ # @yieldparam err [StandardError] error object if request failed
1648
+ #
1649
+ # @return [void]
1650
+ #
1651
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1652
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1653
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1654
+ def delete_user_setting_filter(user_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1655
+ command = make_simple_command(:delete, '{userId}/settings/filters/{id}', options)
1656
+ command.params['userId'] = user_id unless user_id.nil?
1657
+ command.params['id'] = id unless id.nil?
1658
+ command.query['fields'] = fields unless fields.nil?
1659
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1660
+ command.query['userIp'] = user_ip unless user_ip.nil?
1661
+ execute_or_queue_command(command, &block)
1662
+ end
1663
+
1664
+ # Gets a filter.
1665
+ # @param [String] user_id
1666
+ # User's email address. The special value "me" can be used to indicate the
1667
+ # authenticated user.
1668
+ # @param [String] id
1669
+ # The ID of the filter to be fetched.
1670
+ # @param [String] fields
1671
+ # Selector specifying which fields to include in a partial response.
1672
+ # @param [String] quota_user
1673
+ # Available to use for quota purposes for server-side applications. Can be any
1674
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1675
+ # Overrides userIp if both are provided.
1676
+ # @param [String] user_ip
1677
+ # IP address of the site where the request originates. Use this if you want to
1678
+ # enforce per-user limits.
1679
+ # @param [Google::Apis::RequestOptions] options
1680
+ # Request-specific options
1681
+ #
1682
+ # @yield [result, err] Result & error if block supplied
1683
+ # @yieldparam result [Google::Apis::GmailV1::Filter] parsed result object
1684
+ # @yieldparam err [StandardError] error object if request failed
1685
+ #
1686
+ # @return [Google::Apis::GmailV1::Filter]
1687
+ #
1688
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1689
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1690
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1691
+ def get_user_setting_filter(user_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1692
+ command = make_simple_command(:get, '{userId}/settings/filters/{id}', options)
1693
+ command.response_representation = Google::Apis::GmailV1::Filter::Representation
1694
+ command.response_class = Google::Apis::GmailV1::Filter
1695
+ command.params['userId'] = user_id unless user_id.nil?
1696
+ command.params['id'] = id unless id.nil?
1697
+ command.query['fields'] = fields unless fields.nil?
1698
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1699
+ command.query['userIp'] = user_ip unless user_ip.nil?
1700
+ execute_or_queue_command(command, &block)
1701
+ end
1702
+
1703
+ # Lists the message filters of a Gmail user.
1704
+ # @param [String] user_id
1705
+ # User's email address. The special value "me" can be used to indicate the
1706
+ # authenticated user.
1707
+ # @param [String] fields
1708
+ # Selector specifying which fields to include in a partial response.
1709
+ # @param [String] quota_user
1710
+ # Available to use for quota purposes for server-side applications. Can be any
1711
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1712
+ # Overrides userIp if both are provided.
1713
+ # @param [String] user_ip
1714
+ # IP address of the site where the request originates. Use this if you want to
1715
+ # enforce per-user limits.
1716
+ # @param [Google::Apis::RequestOptions] options
1717
+ # Request-specific options
1718
+ #
1719
+ # @yield [result, err] Result & error if block supplied
1720
+ # @yieldparam result [Google::Apis::GmailV1::ListFiltersResponse] parsed result object
1721
+ # @yieldparam err [StandardError] error object if request failed
1722
+ #
1723
+ # @return [Google::Apis::GmailV1::ListFiltersResponse]
1724
+ #
1725
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1726
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1727
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1728
+ def list_user_setting_filters(user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1729
+ command = make_simple_command(:get, '{userId}/settings/filters', options)
1730
+ command.response_representation = Google::Apis::GmailV1::ListFiltersResponse::Representation
1731
+ command.response_class = Google::Apis::GmailV1::ListFiltersResponse
1732
+ command.params['userId'] = user_id unless user_id.nil?
1733
+ command.query['fields'] = fields unless fields.nil?
1734
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1735
+ command.query['userIp'] = user_ip unless user_ip.nil?
1736
+ execute_or_queue_command(command, &block)
1737
+ end
1738
+
1739
+ # Creates a forwarding address. If ownership verification is required, a message
1740
+ # will be sent to the recipient and the resource's verification status will be
1741
+ # set to pending; otherwise, the resource will be created with verification
1742
+ # status set to accepted.
1743
+ # @param [String] user_id
1744
+ # User's email address. The special value "me" can be used to indicate the
1745
+ # authenticated user.
1746
+ # @param [Google::Apis::GmailV1::ForwardingAddress] forwarding_address_object
1747
+ # @param [String] fields
1748
+ # Selector specifying which fields to include in a partial response.
1749
+ # @param [String] quota_user
1750
+ # Available to use for quota purposes for server-side applications. Can be any
1751
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1752
+ # Overrides userIp if both are provided.
1753
+ # @param [String] user_ip
1754
+ # IP address of the site where the request originates. Use this if you want to
1755
+ # enforce per-user limits.
1756
+ # @param [Google::Apis::RequestOptions] options
1757
+ # Request-specific options
1758
+ #
1759
+ # @yield [result, err] Result & error if block supplied
1760
+ # @yieldparam result [Google::Apis::GmailV1::ForwardingAddress] parsed result object
1761
+ # @yieldparam err [StandardError] error object if request failed
1762
+ #
1763
+ # @return [Google::Apis::GmailV1::ForwardingAddress]
1764
+ #
1765
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1766
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1767
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1768
+ def create_user_setting_forwarding_address(user_id, forwarding_address_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1769
+ command = make_simple_command(:post, '{userId}/settings/forwardingAddresses', options)
1770
+ command.request_representation = Google::Apis::GmailV1::ForwardingAddress::Representation
1771
+ command.request_object = forwarding_address_object
1772
+ command.response_representation = Google::Apis::GmailV1::ForwardingAddress::Representation
1773
+ command.response_class = Google::Apis::GmailV1::ForwardingAddress
1774
+ command.params['userId'] = user_id unless user_id.nil?
1775
+ command.query['fields'] = fields unless fields.nil?
1776
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1777
+ command.query['userIp'] = user_ip unless user_ip.nil?
1778
+ execute_or_queue_command(command, &block)
1779
+ end
1780
+
1781
+ # Deletes the specified forwarding address and revokes any verification that may
1782
+ # have been required.
1783
+ # @param [String] user_id
1784
+ # User's email address. The special value "me" can be used to indicate the
1785
+ # authenticated user.
1786
+ # @param [String] forwarding_email
1787
+ # The forwarding address to be deleted.
1788
+ # @param [String] fields
1789
+ # Selector specifying which fields to include in a partial response.
1790
+ # @param [String] quota_user
1791
+ # Available to use for quota purposes for server-side applications. Can be any
1792
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1793
+ # Overrides userIp if both are provided.
1794
+ # @param [String] user_ip
1795
+ # IP address of the site where the request originates. Use this if you want to
1796
+ # enforce per-user limits.
1797
+ # @param [Google::Apis::RequestOptions] options
1798
+ # Request-specific options
1799
+ #
1800
+ # @yield [result, err] Result & error if block supplied
1801
+ # @yieldparam result [NilClass] No result returned for this method
1802
+ # @yieldparam err [StandardError] error object if request failed
1803
+ #
1804
+ # @return [void]
1805
+ #
1806
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1807
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1808
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1809
+ def delete_user_setting_forwarding_address(user_id, forwarding_email, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1810
+ command = make_simple_command(:delete, '{userId}/settings/forwardingAddresses/{forwardingEmail}', options)
1811
+ command.params['userId'] = user_id unless user_id.nil?
1812
+ command.params['forwardingEmail'] = forwarding_email unless forwarding_email.nil?
1813
+ command.query['fields'] = fields unless fields.nil?
1814
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1815
+ command.query['userIp'] = user_ip unless user_ip.nil?
1816
+ execute_or_queue_command(command, &block)
1817
+ end
1818
+
1819
+ # Gets the specified forwarding address.
1820
+ # @param [String] user_id
1821
+ # User's email address. The special value "me" can be used to indicate the
1822
+ # authenticated user.
1823
+ # @param [String] forwarding_email
1824
+ # The forwarding address to be retrieved.
1825
+ # @param [String] fields
1826
+ # Selector specifying which fields to include in a partial response.
1827
+ # @param [String] quota_user
1828
+ # Available to use for quota purposes for server-side applications. Can be any
1829
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1830
+ # Overrides userIp if both are provided.
1831
+ # @param [String] user_ip
1832
+ # IP address of the site where the request originates. Use this if you want to
1833
+ # enforce per-user limits.
1834
+ # @param [Google::Apis::RequestOptions] options
1835
+ # Request-specific options
1836
+ #
1837
+ # @yield [result, err] Result & error if block supplied
1838
+ # @yieldparam result [Google::Apis::GmailV1::ForwardingAddress] parsed result object
1839
+ # @yieldparam err [StandardError] error object if request failed
1840
+ #
1841
+ # @return [Google::Apis::GmailV1::ForwardingAddress]
1842
+ #
1843
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1844
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1845
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1846
+ def get_user_setting_forwarding_address(user_id, forwarding_email, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1847
+ command = make_simple_command(:get, '{userId}/settings/forwardingAddresses/{forwardingEmail}', options)
1848
+ command.response_representation = Google::Apis::GmailV1::ForwardingAddress::Representation
1849
+ command.response_class = Google::Apis::GmailV1::ForwardingAddress
1850
+ command.params['userId'] = user_id unless user_id.nil?
1851
+ command.params['forwardingEmail'] = forwarding_email unless forwarding_email.nil?
1852
+ command.query['fields'] = fields unless fields.nil?
1853
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1854
+ command.query['userIp'] = user_ip unless user_ip.nil?
1855
+ execute_or_queue_command(command, &block)
1856
+ end
1857
+
1858
+ # Lists the forwarding addresses for the specified account.
1859
+ # @param [String] user_id
1860
+ # User's email address. The special value "me" can be used to indicate the
1861
+ # authenticated user.
1862
+ # @param [String] fields
1863
+ # Selector specifying which fields to include in a partial response.
1864
+ # @param [String] quota_user
1865
+ # Available to use for quota purposes for server-side applications. Can be any
1866
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1867
+ # Overrides userIp if both are provided.
1868
+ # @param [String] user_ip
1869
+ # IP address of the site where the request originates. Use this if you want to
1870
+ # enforce per-user limits.
1871
+ # @param [Google::Apis::RequestOptions] options
1872
+ # Request-specific options
1873
+ #
1874
+ # @yield [result, err] Result & error if block supplied
1875
+ # @yieldparam result [Google::Apis::GmailV1::ListForwardingAddressesResponse] parsed result object
1876
+ # @yieldparam err [StandardError] error object if request failed
1877
+ #
1878
+ # @return [Google::Apis::GmailV1::ListForwardingAddressesResponse]
1879
+ #
1880
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1881
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1882
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1883
+ def list_user_setting_forwarding_addresses(user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1884
+ command = make_simple_command(:get, '{userId}/settings/forwardingAddresses', options)
1885
+ command.response_representation = Google::Apis::GmailV1::ListForwardingAddressesResponse::Representation
1886
+ command.response_class = Google::Apis::GmailV1::ListForwardingAddressesResponse
1887
+ command.params['userId'] = user_id unless user_id.nil?
1888
+ command.query['fields'] = fields unless fields.nil?
1889
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1890
+ command.query['userIp'] = user_ip unless user_ip.nil?
1891
+ execute_or_queue_command(command, &block)
1892
+ end
1893
+
1894
+ # Creates a custom "from" send-as alias. If an SMTP MSA is specified, Gmail will
1895
+ # attempt to connect to the SMTP service to validate the configuration before
1896
+ # creating the alias. If ownership verification is required for the alias, a
1897
+ # message will be sent to the email address and the resource's verification
1898
+ # status will be set to pending; otherwise, the resource will be created with
1899
+ # verification status set to accepted. If a signature is provided, Gmail will
1900
+ # sanitize the HTML before saving it with the alias.
1901
+ # @param [String] user_id
1902
+ # User's email address. The special value "me" can be used to indicate the
1903
+ # authenticated user.
1904
+ # @param [Google::Apis::GmailV1::SendAs] send_as_object
1905
+ # @param [String] fields
1906
+ # Selector specifying which fields to include in a partial response.
1907
+ # @param [String] quota_user
1908
+ # Available to use for quota purposes for server-side applications. Can be any
1909
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1910
+ # Overrides userIp if both are provided.
1911
+ # @param [String] user_ip
1912
+ # IP address of the site where the request originates. Use this if you want to
1913
+ # enforce per-user limits.
1914
+ # @param [Google::Apis::RequestOptions] options
1915
+ # Request-specific options
1916
+ #
1917
+ # @yield [result, err] Result & error if block supplied
1918
+ # @yieldparam result [Google::Apis::GmailV1::SendAs] parsed result object
1919
+ # @yieldparam err [StandardError] error object if request failed
1920
+ #
1921
+ # @return [Google::Apis::GmailV1::SendAs]
1922
+ #
1923
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1924
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1925
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1926
+ def create_user_setting_send_as(user_id, send_as_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1927
+ command = make_simple_command(:post, '{userId}/settings/sendAs', options)
1928
+ command.request_representation = Google::Apis::GmailV1::SendAs::Representation
1929
+ command.request_object = send_as_object
1930
+ command.response_representation = Google::Apis::GmailV1::SendAs::Representation
1931
+ command.response_class = Google::Apis::GmailV1::SendAs
1932
+ command.params['userId'] = user_id unless user_id.nil?
1933
+ command.query['fields'] = fields unless fields.nil?
1934
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1935
+ command.query['userIp'] = user_ip unless user_ip.nil?
1936
+ execute_or_queue_command(command, &block)
1937
+ end
1938
+
1939
+ # Deletes the specified send-as alias. Revokes any verification that may have
1940
+ # been required for using it.
1941
+ # @param [String] user_id
1942
+ # User's email address. The special value "me" can be used to indicate the
1943
+ # authenticated user.
1944
+ # @param [String] send_as_email
1945
+ # The send-as alias to be deleted.
1946
+ # @param [String] fields
1947
+ # Selector specifying which fields to include in a partial response.
1948
+ # @param [String] quota_user
1949
+ # Available to use for quota purposes for server-side applications. Can be any
1950
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1951
+ # Overrides userIp if both are provided.
1952
+ # @param [String] user_ip
1953
+ # IP address of the site where the request originates. Use this if you want to
1954
+ # enforce per-user limits.
1955
+ # @param [Google::Apis::RequestOptions] options
1956
+ # Request-specific options
1957
+ #
1958
+ # @yield [result, err] Result & error if block supplied
1959
+ # @yieldparam result [NilClass] No result returned for this method
1960
+ # @yieldparam err [StandardError] error object if request failed
1961
+ #
1962
+ # @return [void]
1963
+ #
1964
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1965
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1966
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1967
+ def delete_user_setting_send_as(user_id, send_as_email, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1968
+ command = make_simple_command(:delete, '{userId}/settings/sendAs/{sendAsEmail}', options)
1969
+ command.params['userId'] = user_id unless user_id.nil?
1970
+ command.params['sendAsEmail'] = send_as_email unless send_as_email.nil?
1971
+ command.query['fields'] = fields unless fields.nil?
1972
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1973
+ command.query['userIp'] = user_ip unless user_ip.nil?
1974
+ execute_or_queue_command(command, &block)
1975
+ end
1976
+
1977
+ # Gets the specified send-as alias. Fails with an HTTP 404 error if the
1978
+ # specified address is not a member of the collection.
1979
+ # @param [String] user_id
1980
+ # User's email address. The special value "me" can be used to indicate the
1981
+ # authenticated user.
1982
+ # @param [String] send_as_email
1983
+ # The send-as alias to be retrieved.
1984
+ # @param [String] fields
1985
+ # Selector specifying which fields to include in a partial response.
1986
+ # @param [String] quota_user
1987
+ # Available to use for quota purposes for server-side applications. Can be any
1988
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1989
+ # Overrides userIp if both are provided.
1990
+ # @param [String] user_ip
1991
+ # IP address of the site where the request originates. Use this if you want to
1992
+ # enforce per-user limits.
1993
+ # @param [Google::Apis::RequestOptions] options
1994
+ # Request-specific options
1995
+ #
1996
+ # @yield [result, err] Result & error if block supplied
1997
+ # @yieldparam result [Google::Apis::GmailV1::SendAs] parsed result object
1998
+ # @yieldparam err [StandardError] error object if request failed
1999
+ #
2000
+ # @return [Google::Apis::GmailV1::SendAs]
2001
+ #
2002
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2003
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2004
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2005
+ def get_user_setting_send_as(user_id, send_as_email, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2006
+ command = make_simple_command(:get, '{userId}/settings/sendAs/{sendAsEmail}', options)
2007
+ command.response_representation = Google::Apis::GmailV1::SendAs::Representation
2008
+ command.response_class = Google::Apis::GmailV1::SendAs
2009
+ command.params['userId'] = user_id unless user_id.nil?
2010
+ command.params['sendAsEmail'] = send_as_email unless send_as_email.nil?
2011
+ command.query['fields'] = fields unless fields.nil?
2012
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2013
+ command.query['userIp'] = user_ip unless user_ip.nil?
2014
+ execute_or_queue_command(command, &block)
2015
+ end
2016
+
2017
+ # Lists the send-as aliases for the specified account. The result includes the
2018
+ # primary send-as address associated with the account as well as any custom "
2019
+ # from" aliases.
2020
+ # @param [String] user_id
2021
+ # User's email address. The special value "me" can be used to indicate the
2022
+ # authenticated user.
2023
+ # @param [String] fields
2024
+ # Selector specifying which fields to include in a partial response.
2025
+ # @param [String] quota_user
2026
+ # Available to use for quota purposes for server-side applications. Can be any
2027
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2028
+ # Overrides userIp if both are provided.
2029
+ # @param [String] user_ip
2030
+ # IP address of the site where the request originates. Use this if you want to
2031
+ # enforce per-user limits.
2032
+ # @param [Google::Apis::RequestOptions] options
2033
+ # Request-specific options
2034
+ #
2035
+ # @yield [result, err] Result & error if block supplied
2036
+ # @yieldparam result [Google::Apis::GmailV1::ListSendAsResponse] parsed result object
2037
+ # @yieldparam err [StandardError] error object if request failed
2038
+ #
2039
+ # @return [Google::Apis::GmailV1::ListSendAsResponse]
2040
+ #
2041
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2042
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2043
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2044
+ def list_user_setting_send_as(user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2045
+ command = make_simple_command(:get, '{userId}/settings/sendAs', options)
2046
+ command.response_representation = Google::Apis::GmailV1::ListSendAsResponse::Representation
2047
+ command.response_class = Google::Apis::GmailV1::ListSendAsResponse
2048
+ command.params['userId'] = user_id unless user_id.nil?
2049
+ command.query['fields'] = fields unless fields.nil?
2050
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2051
+ command.query['userIp'] = user_ip unless user_ip.nil?
2052
+ execute_or_queue_command(command, &block)
2053
+ end
2054
+
2055
+ # Updates a send-as alias. If a signature is provided, Gmail will sanitize the
2056
+ # HTML before saving it with the alias. This method supports patch semantics.
2057
+ # @param [String] user_id
2058
+ # User's email address. The special value "me" can be used to indicate the
2059
+ # authenticated user.
2060
+ # @param [String] send_as_email
2061
+ # The send-as alias to be updated.
2062
+ # @param [Google::Apis::GmailV1::SendAs] send_as_object
2063
+ # @param [String] fields
2064
+ # Selector specifying which fields to include in a partial response.
2065
+ # @param [String] quota_user
2066
+ # Available to use for quota purposes for server-side applications. Can be any
2067
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2068
+ # Overrides userIp if both are provided.
2069
+ # @param [String] user_ip
2070
+ # IP address of the site where the request originates. Use this if you want to
2071
+ # enforce per-user limits.
2072
+ # @param [Google::Apis::RequestOptions] options
2073
+ # Request-specific options
2074
+ #
2075
+ # @yield [result, err] Result & error if block supplied
2076
+ # @yieldparam result [Google::Apis::GmailV1::SendAs] parsed result object
2077
+ # @yieldparam err [StandardError] error object if request failed
2078
+ #
2079
+ # @return [Google::Apis::GmailV1::SendAs]
2080
+ #
2081
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2082
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2083
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2084
+ def patch_user_setting_send_as(user_id, send_as_email, send_as_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2085
+ command = make_simple_command(:patch, '{userId}/settings/sendAs/{sendAsEmail}', options)
2086
+ command.request_representation = Google::Apis::GmailV1::SendAs::Representation
2087
+ command.request_object = send_as_object
2088
+ command.response_representation = Google::Apis::GmailV1::SendAs::Representation
2089
+ command.response_class = Google::Apis::GmailV1::SendAs
2090
+ command.params['userId'] = user_id unless user_id.nil?
2091
+ command.params['sendAsEmail'] = send_as_email unless send_as_email.nil?
2092
+ command.query['fields'] = fields unless fields.nil?
2093
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2094
+ command.query['userIp'] = user_ip unless user_ip.nil?
2095
+ execute_or_queue_command(command, &block)
2096
+ end
2097
+
2098
+ # Updates a send-as alias. If a signature is provided, Gmail will sanitize the
2099
+ # HTML before saving it with the alias.
2100
+ # @param [String] user_id
2101
+ # User's email address. The special value "me" can be used to indicate the
2102
+ # authenticated user.
2103
+ # @param [String] send_as_email
2104
+ # The send-as alias to be updated.
2105
+ # @param [Google::Apis::GmailV1::SendAs] send_as_object
2106
+ # @param [String] fields
2107
+ # Selector specifying which fields to include in a partial response.
2108
+ # @param [String] quota_user
2109
+ # Available to use for quota purposes for server-side applications. Can be any
2110
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2111
+ # Overrides userIp if both are provided.
2112
+ # @param [String] user_ip
2113
+ # IP address of the site where the request originates. Use this if you want to
2114
+ # enforce per-user limits.
2115
+ # @param [Google::Apis::RequestOptions] options
2116
+ # Request-specific options
2117
+ #
2118
+ # @yield [result, err] Result & error if block supplied
2119
+ # @yieldparam result [Google::Apis::GmailV1::SendAs] parsed result object
2120
+ # @yieldparam err [StandardError] error object if request failed
2121
+ #
2122
+ # @return [Google::Apis::GmailV1::SendAs]
2123
+ #
2124
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2125
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2126
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2127
+ def update_user_setting_send_as(user_id, send_as_email, send_as_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2128
+ command = make_simple_command(:put, '{userId}/settings/sendAs/{sendAsEmail}', options)
2129
+ command.request_representation = Google::Apis::GmailV1::SendAs::Representation
2130
+ command.request_object = send_as_object
2131
+ command.response_representation = Google::Apis::GmailV1::SendAs::Representation
2132
+ command.response_class = Google::Apis::GmailV1::SendAs
2133
+ command.params['userId'] = user_id unless user_id.nil?
2134
+ command.params['sendAsEmail'] = send_as_email unless send_as_email.nil?
2135
+ command.query['fields'] = fields unless fields.nil?
2136
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2137
+ command.query['userIp'] = user_ip unless user_ip.nil?
2138
+ execute_or_queue_command(command, &block)
2139
+ end
2140
+
2141
+ # Sends a verification email to the specified send-as alias address. The
2142
+ # verification status must be pending.
2143
+ # @param [String] user_id
2144
+ # User's email address. The special value "me" can be used to indicate the
2145
+ # authenticated user.
2146
+ # @param [String] send_as_email
2147
+ # The send-as alias to be verified.
2148
+ # @param [String] fields
2149
+ # Selector specifying which fields to include in a partial response.
2150
+ # @param [String] quota_user
2151
+ # Available to use for quota purposes for server-side applications. Can be any
2152
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2153
+ # Overrides userIp if both are provided.
2154
+ # @param [String] user_ip
2155
+ # IP address of the site where the request originates. Use this if you want to
2156
+ # enforce per-user limits.
2157
+ # @param [Google::Apis::RequestOptions] options
2158
+ # Request-specific options
2159
+ #
2160
+ # @yield [result, err] Result & error if block supplied
2161
+ # @yieldparam result [NilClass] No result returned for this method
2162
+ # @yieldparam err [StandardError] error object if request failed
2163
+ #
2164
+ # @return [void]
2165
+ #
2166
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2167
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2168
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2169
+ def verify_user_setting_send_as(user_id, send_as_email, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2170
+ command = make_simple_command(:post, '{userId}/settings/sendAs/{sendAsEmail}/verify', options)
2171
+ command.params['userId'] = user_id unless user_id.nil?
2172
+ command.params['sendAsEmail'] = send_as_email unless send_as_email.nil?
2173
+ command.query['fields'] = fields unless fields.nil?
2174
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2175
+ command.query['userIp'] = user_ip unless user_ip.nil?
2176
+ execute_or_queue_command(command, &block)
2177
+ end
2178
+
2179
+ # Immediately and permanently deletes the specified thread. This operation
2180
+ # cannot be undone. Prefer threads.trash instead.
2181
+ # @param [String] user_id
2182
+ # The user's email address. The special value me can be used to indicate the
2183
+ # authenticated user.
2184
+ # @param [String] id
2185
+ # ID of the Thread to delete.
2186
+ # @param [String] fields
2187
+ # Selector specifying which fields to include in a partial response.
2188
+ # @param [String] quota_user
2189
+ # Available to use for quota purposes for server-side applications. Can be any
2190
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2191
+ # Overrides userIp if both are provided.
2192
+ # @param [String] user_ip
2193
+ # IP address of the site where the request originates. Use this if you want to
2194
+ # enforce per-user limits.
2195
+ # @param [Google::Apis::RequestOptions] options
2196
+ # Request-specific options
2197
+ #
2198
+ # @yield [result, err] Result & error if block supplied
2199
+ # @yieldparam result [NilClass] No result returned for this method
2200
+ # @yieldparam err [StandardError] error object if request failed
2201
+ #
2202
+ # @return [void]
2203
+ #
2204
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2205
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2206
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2207
+ def delete_user_thread(user_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2208
+ command = make_simple_command(:delete, '{userId}/threads/{id}', options)
2209
+ command.params['userId'] = user_id unless user_id.nil?
2210
+ command.params['id'] = id unless id.nil?
2211
+ command.query['fields'] = fields unless fields.nil?
2212
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2213
+ command.query['userIp'] = user_ip unless user_ip.nil?
2214
+ execute_or_queue_command(command, &block)
2215
+ end
2216
+
2217
+ # Gets the specified thread.
2218
+ # @param [String] user_id
2219
+ # The user's email address. The special value me can be used to indicate the
2220
+ # authenticated user.
2221
+ # @param [String] id
2222
+ # The ID of the thread to retrieve.
2223
+ # @param [String] format
2224
+ # The format to return the messages in.
2225
+ # @param [Array<String>, String] metadata_headers
2226
+ # When given and format is METADATA, only include headers specified.
2227
+ # @param [String] fields
2228
+ # Selector specifying which fields to include in a partial response.
2229
+ # @param [String] quota_user
2230
+ # Available to use for quota purposes for server-side applications. Can be any
2231
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2232
+ # Overrides userIp if both are provided.
2233
+ # @param [String] user_ip
2234
+ # IP address of the site where the request originates. Use this if you want to
2235
+ # enforce per-user limits.
2236
+ # @param [Google::Apis::RequestOptions] options
2237
+ # Request-specific options
2238
+ #
2239
+ # @yield [result, err] Result & error if block supplied
2240
+ # @yieldparam result [Google::Apis::GmailV1::Thread] parsed result object
2241
+ # @yieldparam err [StandardError] error object if request failed
2242
+ #
2243
+ # @return [Google::Apis::GmailV1::Thread]
2244
+ #
2245
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2246
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2247
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2248
+ def get_user_thread(user_id, id, format: nil, metadata_headers: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2249
+ command = make_simple_command(:get, '{userId}/threads/{id}', options)
2250
+ command.response_representation = Google::Apis::GmailV1::Thread::Representation
2251
+ command.response_class = Google::Apis::GmailV1::Thread
2252
+ command.params['userId'] = user_id unless user_id.nil?
2253
+ command.params['id'] = id unless id.nil?
2254
+ command.query['format'] = format unless format.nil?
2255
+ command.query['metadataHeaders'] = metadata_headers unless metadata_headers.nil?
2256
+ command.query['fields'] = fields unless fields.nil?
2257
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2258
+ command.query['userIp'] = user_ip unless user_ip.nil?
2259
+ execute_or_queue_command(command, &block)
2260
+ end
2261
+
2262
+ # Lists the threads in the user's mailbox.
2263
+ # @param [String] user_id
2264
+ # The user's email address. The special value me can be used to indicate the
2265
+ # authenticated user.
2266
+ # @param [Boolean] include_spam_trash
2267
+ # Include threads from SPAM and TRASH in the results.
2268
+ # @param [Array<String>, String] label_ids
2269
+ # Only return threads with labels that match all of the specified label IDs.
2270
+ # @param [Fixnum] max_results
2271
+ # Maximum number of threads to return.
2272
+ # @param [String] page_token
2273
+ # Page token to retrieve a specific page of results in the list.
2274
+ # @param [String] q
2275
+ # Only return threads matching the specified query. Supports the same query
2276
+ # format as the Gmail search box. For example, "from:someuser@example.com
2277
+ # rfc822msgid: is:unread". Parameter cannot be used when accessing the api using
2278
+ # the gmail.metadata scope.
2279
+ # @param [String] fields
2280
+ # Selector specifying which fields to include in a partial response.
2281
+ # @param [String] quota_user
2282
+ # Available to use for quota purposes for server-side applications. Can be any
2283
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2284
+ # Overrides userIp if both are provided.
2285
+ # @param [String] user_ip
2286
+ # IP address of the site where the request originates. Use this if you want to
2287
+ # enforce per-user limits.
2288
+ # @param [Google::Apis::RequestOptions] options
2289
+ # Request-specific options
2290
+ #
2291
+ # @yield [result, err] Result & error if block supplied
2292
+ # @yieldparam result [Google::Apis::GmailV1::ListThreadsResponse] parsed result object
2293
+ # @yieldparam err [StandardError] error object if request failed
2294
+ #
2295
+ # @return [Google::Apis::GmailV1::ListThreadsResponse]
2296
+ #
2297
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2298
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2299
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2300
+ def list_user_threads(user_id, include_spam_trash: nil, label_ids: nil, max_results: nil, page_token: nil, q: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2301
+ command = make_simple_command(:get, '{userId}/threads', options)
2302
+ command.response_representation = Google::Apis::GmailV1::ListThreadsResponse::Representation
2303
+ command.response_class = Google::Apis::GmailV1::ListThreadsResponse
2304
+ command.params['userId'] = user_id unless user_id.nil?
2305
+ command.query['includeSpamTrash'] = include_spam_trash unless include_spam_trash.nil?
2306
+ command.query['labelIds'] = label_ids unless label_ids.nil?
2307
+ command.query['maxResults'] = max_results unless max_results.nil?
2308
+ command.query['pageToken'] = page_token unless page_token.nil?
2309
+ command.query['q'] = q unless q.nil?
2310
+ command.query['fields'] = fields unless fields.nil?
2311
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2312
+ command.query['userIp'] = user_ip unless user_ip.nil?
2313
+ execute_or_queue_command(command, &block)
2314
+ end
2315
+
2316
+ # Modifies the labels applied to the thread. This applies to all messages in the
2317
+ # thread.
2318
+ # @param [String] user_id
2319
+ # The user's email address. The special value me can be used to indicate the
2320
+ # authenticated user.
2321
+ # @param [String] id
2322
+ # The ID of the thread to modify.
2323
+ # @param [Google::Apis::GmailV1::ModifyThreadRequest] modify_thread_request_object
2324
+ # @param [String] fields
2325
+ # Selector specifying which fields to include in a partial response.
2326
+ # @param [String] quota_user
2327
+ # Available to use for quota purposes for server-side applications. Can be any
2328
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2329
+ # Overrides userIp if both are provided.
2330
+ # @param [String] user_ip
2331
+ # IP address of the site where the request originates. Use this if you want to
2332
+ # enforce per-user limits.
2333
+ # @param [Google::Apis::RequestOptions] options
2334
+ # Request-specific options
2335
+ #
2336
+ # @yield [result, err] Result & error if block supplied
2337
+ # @yieldparam result [Google::Apis::GmailV1::Thread] parsed result object
2338
+ # @yieldparam err [StandardError] error object if request failed
2339
+ #
2340
+ # @return [Google::Apis::GmailV1::Thread]
2341
+ #
2342
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2343
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2344
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2345
+ def modify_thread(user_id, id, modify_thread_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2346
+ command = make_simple_command(:post, '{userId}/threads/{id}/modify', options)
2347
+ command.request_representation = Google::Apis::GmailV1::ModifyThreadRequest::Representation
2348
+ command.request_object = modify_thread_request_object
2349
+ command.response_representation = Google::Apis::GmailV1::Thread::Representation
2350
+ command.response_class = Google::Apis::GmailV1::Thread
2351
+ command.params['userId'] = user_id unless user_id.nil?
2352
+ command.params['id'] = id unless id.nil?
2353
+ command.query['fields'] = fields unless fields.nil?
2354
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2355
+ command.query['userIp'] = user_ip unless user_ip.nil?
2356
+ execute_or_queue_command(command, &block)
2357
+ end
2358
+
2359
+ # Moves the specified thread to the trash.
2360
+ # @param [String] user_id
2361
+ # The user's email address. The special value me can be used to indicate the
2362
+ # authenticated user.
2363
+ # @param [String] id
2364
+ # The ID of the thread to Trash.
2365
+ # @param [String] fields
2366
+ # Selector specifying which fields to include in a partial response.
2367
+ # @param [String] quota_user
2368
+ # Available to use for quota purposes for server-side applications. Can be any
2369
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2370
+ # Overrides userIp if both are provided.
2371
+ # @param [String] user_ip
2372
+ # IP address of the site where the request originates. Use this if you want to
2373
+ # enforce per-user limits.
2374
+ # @param [Google::Apis::RequestOptions] options
2375
+ # Request-specific options
2376
+ #
2377
+ # @yield [result, err] Result & error if block supplied
2378
+ # @yieldparam result [Google::Apis::GmailV1::Thread] parsed result object
2379
+ # @yieldparam err [StandardError] error object if request failed
2380
+ #
2381
+ # @return [Google::Apis::GmailV1::Thread]
2382
+ #
2383
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2384
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2385
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2386
+ def trash_user_thread(user_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2387
+ command = make_simple_command(:post, '{userId}/threads/{id}/trash', options)
2388
+ command.response_representation = Google::Apis::GmailV1::Thread::Representation
2389
+ command.response_class = Google::Apis::GmailV1::Thread
2390
+ command.params['userId'] = user_id unless user_id.nil?
2391
+ command.params['id'] = id unless id.nil?
2392
+ command.query['fields'] = fields unless fields.nil?
2393
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2394
+ command.query['userIp'] = user_ip unless user_ip.nil?
2395
+ execute_or_queue_command(command, &block)
2396
+ end
2397
+
2398
+ # Removes the specified thread from the trash.
2399
+ # @param [String] user_id
2400
+ # The user's email address. The special value me can be used to indicate the
2401
+ # authenticated user.
2402
+ # @param [String] id
2403
+ # The ID of the thread to remove from Trash.
2404
+ # @param [String] fields
2405
+ # Selector specifying which fields to include in a partial response.
2406
+ # @param [String] quota_user
2407
+ # Available to use for quota purposes for server-side applications. Can be any
2408
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2409
+ # Overrides userIp if both are provided.
2410
+ # @param [String] user_ip
2411
+ # IP address of the site where the request originates. Use this if you want to
2412
+ # enforce per-user limits.
2413
+ # @param [Google::Apis::RequestOptions] options
2414
+ # Request-specific options
2415
+ #
2416
+ # @yield [result, err] Result & error if block supplied
2417
+ # @yieldparam result [Google::Apis::GmailV1::Thread] parsed result object
2418
+ # @yieldparam err [StandardError] error object if request failed
2419
+ #
2420
+ # @return [Google::Apis::GmailV1::Thread]
2421
+ #
2422
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2423
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2424
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2425
+ def untrash_user_thread(user_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2426
+ command = make_simple_command(:post, '{userId}/threads/{id}/untrash', options)
2427
+ command.response_representation = Google::Apis::GmailV1::Thread::Representation
2428
+ command.response_class = Google::Apis::GmailV1::Thread
2429
+ command.params['userId'] = user_id unless user_id.nil?
2430
+ command.params['id'] = id unless id.nil?
2431
+ command.query['fields'] = fields unless fields.nil?
2432
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2433
+ command.query['userIp'] = user_ip unless user_ip.nil?
2434
+ execute_or_queue_command(command, &block)
2435
+ end
2436
+
2437
+ protected
2438
+
2439
+ def apply_command_defaults(command)
2440
+ command.query['key'] = key unless key.nil?
2441
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2442
+ command.query['userIp'] = user_ip unless user_ip.nil?
2443
+ end
2444
+ end
2445
+ end
2446
+ end
2447
+ end