google-api-client 0.9.8 → 0.10.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (320) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +15 -8
  3. data/CHANGELOG.md +84 -0
  4. data/Gemfile +10 -2
  5. data/README.md +10 -2
  6. data/api_names.yaml +37172 -135
  7. data/generated/google/apis/adexchangebuyer2_v2beta1.rb +35 -0
  8. data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +1200 -0
  9. data/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +526 -0
  10. data/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +844 -0
  11. data/generated/google/apis/adexchangebuyer_v1_4.rb +1 -1
  12. data/generated/google/apis/adexchangebuyer_v1_4/classes.rb +310 -28
  13. data/generated/google/apis/adexchangebuyer_v1_4/representations.rb +84 -0
  14. data/generated/google/apis/adexchangebuyer_v1_4/service.rb +60 -8
  15. data/generated/google/apis/adexchangeseller_v2_0.rb +2 -3
  16. data/generated/google/apis/adexchangeseller_v2_0/service.rb +1 -2
  17. data/generated/google/apis/admin_directory_v1.rb +1 -1
  18. data/generated/google/apis/admin_directory_v1/classes.rb +206 -0
  19. data/generated/google/apis/admin_directory_v1/representations.rb +63 -0
  20. data/generated/google/apis/admin_directory_v1/service.rb +41 -2
  21. data/generated/google/apis/admin_reports_v1.rb +5 -5
  22. data/generated/google/apis/admin_reports_v1/service.rb +6 -6
  23. data/generated/google/apis/adsense_v1_4.rb +1 -1
  24. data/generated/google/apis/adsense_v1_4/classes.rb +1 -1
  25. data/generated/google/apis/adsensehost_v4_1.rb +1 -1
  26. data/generated/google/apis/adsensehost_v4_1/classes.rb +1 -2
  27. data/generated/google/apis/analytics_v3.rb +1 -1
  28. data/generated/google/apis/analytics_v3/classes.rb +379 -3
  29. data/generated/google/apis/analytics_v3/representations.rb +136 -0
  30. data/generated/google/apis/analytics_v3/service.rb +256 -0
  31. data/generated/google/apis/analyticsreporting_v4.rb +1 -1
  32. data/generated/google/apis/analyticsreporting_v4/classes.rb +858 -823
  33. data/generated/google/apis/analyticsreporting_v4/representations.rb +194 -193
  34. data/generated/google/apis/analyticsreporting_v4/service.rb +4 -4
  35. data/generated/google/apis/androidenterprise_v1.rb +1 -1
  36. data/generated/google/apis/androidenterprise_v1/classes.rb +913 -220
  37. data/generated/google/apis/androidenterprise_v1/representations.rb +337 -30
  38. data/generated/google/apis/androidenterprise_v1/service.rb +1163 -561
  39. data/generated/google/apis/androidpublisher_v2.rb +1 -1
  40. data/generated/google/apis/androidpublisher_v2/classes.rb +230 -8
  41. data/generated/google/apis/androidpublisher_v2/representations.rb +90 -0
  42. data/generated/google/apis/androidpublisher_v2/service.rb +116 -3
  43. data/generated/google/apis/appengine_v1beta5.rb +7 -1
  44. data/generated/google/apis/appengine_v1beta5/classes.rb +810 -395
  45. data/generated/google/apis/appengine_v1beta5/representations.rb +188 -22
  46. data/generated/google/apis/appengine_v1beta5/service.rb +343 -39
  47. data/generated/google/apis/appsactivity_v1.rb +3 -3
  48. data/generated/google/apis/appsactivity_v1/classes.rb +7 -0
  49. data/generated/google/apis/appsactivity_v1/representations.rb +1 -0
  50. data/generated/google/apis/appsactivity_v1/service.rb +1 -1
  51. data/generated/google/apis/appstate_v1.rb +1 -1
  52. data/generated/google/apis/bigquery_v2.rb +1 -1
  53. data/generated/google/apis/bigquery_v2/classes.rb +360 -38
  54. data/generated/google/apis/bigquery_v2/representations.rb +106 -0
  55. data/generated/google/apis/bigquery_v2/service.rb +18 -4
  56. data/generated/google/apis/books_v1.rb +2 -2
  57. data/generated/google/apis/books_v1/classes.rb +83 -0
  58. data/generated/google/apis/books_v1/representations.rb +35 -0
  59. data/generated/google/apis/books_v1/service.rb +7 -3
  60. data/generated/google/apis/calendar_v3.rb +1 -1
  61. data/generated/google/apis/calendar_v3/classes.rb +208 -5
  62. data/generated/google/apis/calendar_v3/representations.rb +97 -0
  63. data/generated/google/apis/civicinfo_v2.rb +3 -2
  64. data/generated/google/apis/civicinfo_v2/classes.rb +377 -5
  65. data/generated/google/apis/civicinfo_v2/representations.rb +149 -0
  66. data/generated/google/apis/civicinfo_v2/service.rb +27 -6
  67. data/generated/google/apis/classroom_v1.rb +22 -25
  68. data/generated/google/apis/classroom_v1/classes.rb +998 -761
  69. data/generated/google/apis/classroom_v1/representations.rb +263 -198
  70. data/generated/google/apis/classroom_v1/service.rb +1349 -672
  71. data/generated/google/apis/cloudbilling_v1.rb +3 -3
  72. data/generated/google/apis/cloudbilling_v1/classes.rb +76 -75
  73. data/generated/google/apis/cloudbilling_v1/representations.rb +17 -17
  74. data/generated/google/apis/cloudbilling_v1/service.rb +117 -110
  75. data/generated/google/apis/cloudbuild_v1.rb +1 -1
  76. data/generated/google/apis/cloudbuild_v1/classes.rb +661 -264
  77. data/generated/google/apis/cloudbuild_v1/representations.rb +198 -48
  78. data/generated/google/apis/cloudbuild_v1/service.rb +259 -44
  79. data/generated/google/apis/clouddebugger_v2.rb +5 -8
  80. data/generated/google/apis/clouddebugger_v2/classes.rb +686 -616
  81. data/generated/google/apis/clouddebugger_v2/representations.rb +151 -151
  82. data/generated/google/apis/clouddebugger_v2/service.rb +165 -159
  83. data/generated/google/apis/cloudkms_v1.rb +35 -0
  84. data/generated/google/apis/cloudkms_v1/classes.rb +1022 -0
  85. data/generated/google/apis/cloudkms_v1/representations.rb +448 -0
  86. data/generated/google/apis/cloudkms_v1/service.rb +933 -0
  87. data/generated/google/apis/cloudkms_v1beta1.rb +35 -0
  88. data/generated/google/apis/cloudkms_v1beta1/classes.rb +1039 -0
  89. data/generated/google/apis/cloudkms_v1beta1/representations.rb +448 -0
  90. data/generated/google/apis/cloudkms_v1beta1/service.rb +933 -0
  91. data/generated/google/apis/cloudmonitoring_v2beta2.rb +1 -1
  92. data/generated/google/apis/cloudresourcemanager_v1.rb +4 -4
  93. data/generated/google/apis/cloudresourcemanager_v1/classes.rb +1529 -167
  94. data/generated/google/apis/cloudresourcemanager_v1/representations.rb +491 -26
  95. data/generated/google/apis/cloudresourcemanager_v1/service.rb +1593 -135
  96. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +1 -1
  97. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +1155 -235
  98. data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +344 -44
  99. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +702 -310
  100. data/generated/google/apis/cloudtrace_v1.rb +9 -9
  101. data/generated/google/apis/cloudtrace_v1/classes.rb +98 -92
  102. data/generated/google/apis/cloudtrace_v1/representations.rb +24 -24
  103. data/generated/google/apis/cloudtrace_v1/service.rb +42 -37
  104. data/generated/google/apis/compute_beta.rb +1 -1
  105. data/generated/google/apis/compute_beta/classes.rb +7007 -3648
  106. data/generated/google/apis/compute_beta/representations.rb +1459 -120
  107. data/generated/google/apis/compute_beta/service.rb +7943 -3726
  108. data/generated/google/apis/compute_v1.rb +1 -1
  109. data/generated/google/apis/compute_v1/classes.rb +2567 -370
  110. data/generated/google/apis/compute_v1/representations.rb +855 -0
  111. data/generated/google/apis/compute_v1/service.rb +6388 -2908
  112. data/generated/google/apis/container_v1.rb +1 -1
  113. data/generated/google/apis/container_v1/classes.rb +287 -16
  114. data/generated/google/apis/container_v1/representations.rb +113 -2
  115. data/generated/google/apis/container_v1/service.rb +130 -0
  116. data/generated/google/apis/content_v2.rb +1 -1
  117. data/generated/google/apis/content_v2/classes.rb +778 -10
  118. data/generated/google/apis/content_v2/representations.rb +339 -0
  119. data/generated/google/apis/content_v2/service.rb +364 -49
  120. data/generated/google/apis/dataflow_v1b3.rb +37 -0
  121. data/generated/google/apis/dataflow_v1b3/classes.rb +4941 -0
  122. data/generated/google/apis/dataflow_v1b3/representations.rb +2037 -0
  123. data/generated/google/apis/dataflow_v1b3/service.rb +957 -0
  124. data/generated/google/apis/dataproc_v1.rb +1 -1
  125. data/generated/google/apis/dataproc_v1/classes.rb +1235 -963
  126. data/generated/google/apis/dataproc_v1/representations.rb +299 -225
  127. data/generated/google/apis/dataproc_v1/service.rb +277 -192
  128. data/generated/google/apis/datastore_v1.rb +38 -0
  129. data/generated/google/apis/datastore_v1/classes.rb +1289 -0
  130. data/generated/google/apis/datastore_v1/representations.rb +572 -0
  131. data/generated/google/apis/datastore_v1/service.rb +259 -0
  132. data/generated/google/apis/datastore_v1beta3.rb +38 -0
  133. data/generated/google/apis/datastore_v1beta3/classes.rb +1284 -0
  134. data/generated/google/apis/datastore_v1beta3/representations.rb +572 -0
  135. data/generated/google/apis/datastore_v1beta3/service.rb +259 -0
  136. data/generated/google/apis/deploymentmanager_v2.rb +1 -1
  137. data/generated/google/apis/deploymentmanager_v2/classes.rb +436 -3
  138. data/generated/google/apis/deploymentmanager_v2/representations.rb +178 -0
  139. data/generated/google/apis/deploymentmanager_v2/service.rb +226 -61
  140. data/generated/google/apis/dfareporting_v2_5.rb +40 -0
  141. data/generated/google/apis/dfareporting_v2_5/classes.rb +11225 -0
  142. data/generated/google/apis/dfareporting_v2_5/representations.rb +3982 -0
  143. data/generated/google/apis/dfareporting_v2_5/service.rb +8755 -0
  144. data/generated/google/apis/dfareporting_v2_6.rb +40 -0
  145. data/generated/google/apis/dfareporting_v2_6/classes.rb +11586 -0
  146. data/generated/google/apis/dfareporting_v2_6/representations.rb +4119 -0
  147. data/generated/google/apis/dfareporting_v2_6/service.rb +9025 -0
  148. data/generated/google/apis/dfareporting_v2_7.rb +40 -0
  149. data/generated/google/apis/dfareporting_v2_7/classes.rb +11876 -0
  150. data/generated/google/apis/dfareporting_v2_7/representations.rb +4243 -0
  151. data/generated/google/apis/dfareporting_v2_7/service.rb +9095 -0
  152. data/generated/google/apis/dns_v1.rb +1 -1
  153. data/generated/google/apis/dns_v1/classes.rb +1 -1
  154. data/generated/google/apis/dns_v2beta1.rb +43 -0
  155. data/generated/google/apis/dns_v2beta1/classes.rb +915 -0
  156. data/generated/google/apis/dns_v2beta1/representations.rb +368 -0
  157. data/generated/google/apis/dns_v2beta1/service.rb +768 -0
  158. data/generated/google/apis/doubleclickbidmanager_v1.rb +1 -1
  159. data/generated/google/apis/doubleclickbidmanager_v1/classes.rb +79 -86
  160. data/generated/google/apis/doubleclickbidmanager_v1/representations.rb +25 -28
  161. data/generated/google/apis/doubleclickbidmanager_v1/service.rb +10 -8
  162. data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
  163. data/generated/google/apis/doubleclicksearch_v2/classes.rb +6 -4
  164. data/generated/google/apis/drive_v2.rb +1 -1
  165. data/generated/google/apis/drive_v2/classes.rb +595 -37
  166. data/generated/google/apis/drive_v2/representations.rb +140 -0
  167. data/generated/google/apis/drive_v2/service.rb +406 -40
  168. data/generated/google/apis/drive_v3.rb +1 -1
  169. data/generated/google/apis/drive_v3/classes.rb +507 -40
  170. data/generated/google/apis/drive_v3/representations.rb +105 -0
  171. data/generated/google/apis/drive_v3/service.rb +326 -29
  172. data/generated/google/apis/fitness_v1.rb +38 -2
  173. data/generated/google/apis/fitness_v1/classes.rb +65 -7
  174. data/generated/google/apis/fitness_v1/representations.rb +20 -0
  175. data/generated/google/apis/fitness_v1/service.rb +17 -18
  176. data/generated/google/apis/fusiontables_v2.rb +1 -1
  177. data/generated/google/apis/fusiontables_v2/classes.rb +4 -3
  178. data/generated/google/apis/games_configuration_v1configuration.rb +1 -1
  179. data/generated/google/apis/games_management_v1management.rb +1 -1
  180. data/generated/google/apis/games_v1.rb +1 -1
  181. data/generated/google/apis/genomics_v1.rb +10 -12
  182. data/generated/google/apis/genomics_v1/classes.rb +2276 -2165
  183. data/generated/google/apis/genomics_v1/representations.rb +468 -496
  184. data/generated/google/apis/genomics_v1/service.rb +978 -882
  185. data/generated/google/apis/gmail_v1.rb +11 -2
  186. data/generated/google/apis/gmail_v1/classes.rb +655 -5
  187. data/generated/google/apis/gmail_v1/representations.rb +261 -0
  188. data/generated/google/apis/gmail_v1/service.rb +1211 -48
  189. data/generated/google/apis/groupssettings_v1.rb +2 -2
  190. data/generated/google/apis/groupssettings_v1/classes.rb +12 -0
  191. data/generated/google/apis/groupssettings_v1/representations.rb +2 -0
  192. data/generated/google/apis/iam_v1.rb +2 -2
  193. data/generated/google/apis/iam_v1/classes.rb +446 -368
  194. data/generated/google/apis/iam_v1/representations.rb +109 -91
  195. data/generated/google/apis/iam_v1/service.rb +249 -162
  196. data/generated/google/apis/identitytoolkit_v3.rb +7 -1
  197. data/generated/google/apis/identitytoolkit_v3/classes.rb +254 -2
  198. data/generated/google/apis/identitytoolkit_v3/representations.rb +38 -0
  199. data/generated/google/apis/kgsearch_v1.rb +2 -3
  200. data/generated/google/apis/kgsearch_v1/classes.rb +13 -13
  201. data/generated/google/apis/kgsearch_v1/representations.rb +2 -2
  202. data/generated/google/apis/kgsearch_v1/service.rb +26 -24
  203. data/generated/google/apis/language_v1beta1.rb +36 -0
  204. data/generated/google/apis/language_v1beta1/classes.rb +757 -0
  205. data/generated/google/apis/language_v1beta1/representations.rb +339 -0
  206. data/generated/google/apis/language_v1beta1/service.rb +185 -0
  207. data/generated/google/apis/licensing_v1.rb +3 -3
  208. data/generated/google/apis/licensing_v1/classes.rb +14 -2
  209. data/generated/google/apis/licensing_v1/representations.rb +2 -0
  210. data/generated/google/apis/licensing_v1/service.rb +1 -1
  211. data/generated/google/apis/logging_v2beta1.rb +6 -6
  212. data/generated/google/apis/logging_v2beta1/classes.rb +900 -775
  213. data/generated/google/apis/logging_v2beta1/representations.rb +163 -142
  214. data/generated/google/apis/logging_v2beta1/service.rb +427 -155
  215. data/generated/google/apis/manufacturers_v1.rb +34 -0
  216. data/generated/google/apis/manufacturers_v1/classes.rb +605 -0
  217. data/generated/google/apis/manufacturers_v1/representations.rb +223 -0
  218. data/generated/google/apis/manufacturers_v1/service.rb +138 -0
  219. data/generated/google/apis/mirror_v1.rb +2 -2
  220. data/generated/google/apis/mirror_v1/service.rb +1 -1
  221. data/generated/google/apis/monitoring_v3.rb +45 -0
  222. data/generated/google/apis/monitoring_v3/classes.rb +1333 -0
  223. data/generated/google/apis/monitoring_v3/representations.rb +516 -0
  224. data/generated/google/apis/monitoring_v3/service.rb +706 -0
  225. data/generated/google/apis/oauth2_v2.rb +1 -1
  226. data/generated/google/apis/pagespeedonline_v2.rb +1 -1
  227. data/generated/google/apis/partners_v2.rb +3 -3
  228. data/generated/google/apis/partners_v2/classes.rb +1831 -477
  229. data/generated/google/apis/partners_v2/representations.rb +571 -114
  230. data/generated/google/apis/partners_v2/service.rb +898 -167
  231. data/generated/google/apis/people_v1.rb +15 -16
  232. data/generated/google/apis/people_v1/classes.rb +1047 -859
  233. data/generated/google/apis/people_v1/representations.rb +252 -213
  234. data/generated/google/apis/people_v1/service.rb +75 -62
  235. data/generated/google/apis/plus_domains_v1.rb +1 -1
  236. data/generated/google/apis/plus_v1.rb +1 -1
  237. data/generated/google/apis/proximitybeacon_v1beta1.rb +1 -1
  238. data/generated/google/apis/proximitybeacon_v1beta1/classes.rb +527 -456
  239. data/generated/google/apis/proximitybeacon_v1beta1/representations.rb +101 -100
  240. data/generated/google/apis/proximitybeacon_v1beta1/service.rb +467 -343
  241. data/generated/google/apis/pubsub_v1.rb +1 -1
  242. data/generated/google/apis/pubsub_v1/classes.rb +363 -310
  243. data/generated/google/apis/pubsub_v1/representations.rb +76 -76
  244. data/generated/google/apis/pubsub_v1/service.rb +464 -335
  245. data/generated/google/apis/qpx_express_v1.rb +1 -1
  246. data/generated/google/apis/qpx_express_v1/classes.rb +6 -0
  247. data/generated/google/apis/qpx_express_v1/representations.rb +1 -0
  248. data/generated/google/apis/replicapool_v1beta2.rb +1 -1
  249. data/generated/google/apis/replicapoolupdater_v1beta1.rb +4 -2
  250. data/generated/google/apis/replicapoolupdater_v1beta1/service.rb +3 -1
  251. data/generated/google/apis/reseller_v1.rb +1 -1
  252. data/generated/google/apis/reseller_v1/classes.rb +222 -61
  253. data/generated/google/apis/reseller_v1/representations.rb +28 -0
  254. data/generated/google/apis/reseller_v1/service.rb +240 -47
  255. data/generated/google/apis/script_v1.rb +19 -19
  256. data/generated/google/apis/script_v1/classes.rb +151 -137
  257. data/generated/google/apis/script_v1/representations.rb +26 -26
  258. data/generated/google/apis/script_v1/service.rb +9 -8
  259. data/generated/google/apis/sheets_v4.rb +7 -7
  260. data/generated/google/apis/sheets_v4/classes.rb +4530 -3506
  261. data/generated/google/apis/sheets_v4/representations.rb +988 -737
  262. data/generated/google/apis/sheets_v4/service.rb +266 -99
  263. data/generated/google/apis/site_verification_v1.rb +1 -1
  264. data/generated/google/apis/slides_v1.rb +49 -0
  265. data/generated/google/apis/slides_v1/classes.rb +4480 -0
  266. data/generated/google/apis/slides_v1/representations.rb +1926 -0
  267. data/generated/google/apis/slides_v1/service.rb +245 -0
  268. data/generated/google/apis/speech_v1beta1.rb +34 -0
  269. data/generated/google/apis/speech_v1beta1/classes.rb +498 -0
  270. data/generated/google/apis/speech_v1beta1/representations.rb +206 -0
  271. data/generated/google/apis/speech_v1beta1/service.rb +270 -0
  272. data/generated/google/apis/sqladmin_v1beta4.rb +1 -1
  273. data/generated/google/apis/sqladmin_v1beta4/classes.rb +131 -10
  274. data/generated/google/apis/sqladmin_v1beta4/representations.rb +50 -0
  275. data/generated/google/apis/sqladmin_v1beta4/service.rb +92 -2
  276. data/generated/google/apis/storage_v1.rb +1 -1
  277. data/generated/google/apis/storage_v1/classes.rb +205 -21
  278. data/generated/google/apis/storage_v1/representations.rb +51 -1
  279. data/generated/google/apis/storage_v1/service.rb +263 -9
  280. data/generated/google/apis/tagmanager_v1.rb +5 -5
  281. data/generated/google/apis/translate_v2.rb +2 -2
  282. data/generated/google/apis/translate_v2/service.rb +1 -1
  283. data/generated/google/apis/vision_v1.rb +1 -1
  284. data/generated/google/apis/vision_v1/classes.rb +1275 -731
  285. data/generated/google/apis/vision_v1/representations.rb +378 -111
  286. data/generated/google/apis/vision_v1/service.rb +4 -4
  287. data/generated/google/apis/webmasters_v3.rb +1 -1
  288. data/generated/google/apis/youtube_analytics_v1.rb +1 -1
  289. data/generated/google/apis/youtube_analytics_v1/classes.rb +0 -209
  290. data/generated/google/apis/youtube_analytics_v1/representations.rb +0 -99
  291. data/generated/google/apis/youtube_analytics_v1/service.rb +5 -77
  292. data/generated/google/apis/youtube_partner_v1.rb +1 -1
  293. data/generated/google/apis/youtube_partner_v1/classes.rb +155 -0
  294. data/generated/google/apis/youtube_partner_v1/representations.rb +69 -0
  295. data/generated/google/apis/youtube_partner_v1/service.rb +107 -3
  296. data/generated/google/apis/youtube_v3.rb +1 -1
  297. data/generated/google/apis/youtube_v3/classes.rb +430 -22
  298. data/generated/google/apis/youtube_v3/representations.rb +171 -4
  299. data/generated/google/apis/youtube_v3/service.rb +100 -9
  300. data/generated/google/apis/youtubereporting_v1.rb +4 -4
  301. data/generated/google/apis/youtubereporting_v1/classes.rb +140 -131
  302. data/generated/google/apis/youtubereporting_v1/representations.rb +37 -37
  303. data/generated/google/apis/youtubereporting_v1/service.rb +139 -135
  304. data/google-api-client.gemspec +4 -3
  305. data/lib/google/apis/core/api_command.rb +16 -6
  306. data/lib/google/apis/core/base_service.rb +17 -9
  307. data/lib/google/apis/core/download.rb +7 -2
  308. data/lib/google/apis/core/http_command.rb +5 -1
  309. data/lib/google/apis/core/json_representation.rb +2 -2
  310. data/lib/google/apis/core/upload.rb +7 -1
  311. data/lib/google/apis/errors.rb +6 -2
  312. data/lib/google/apis/generator/annotator.rb +6 -0
  313. data/lib/google/apis/version.rb +1 -1
  314. data/samples/cli/lib/samples/bigquery.rb +101 -0
  315. data/samples/cli/lib/samples/calendar.rb +1 -1
  316. data/samples/cli/lib/samples/gmail.rb +74 -0
  317. data/samples/cli/lib/samples/sheets.rb +61 -0
  318. data/samples/cli/lib/samples/you_tube.rb +4 -1
  319. data/sync.rb +71 -0
  320. metadata +86 -18
@@ -22,18 +22,54 @@ module Google
22
22
  module Apis
23
23
  module GmailV1
24
24
 
25
+ class AutoForwarding
26
+ class Representation < Google::Apis::Core::JsonRepresentation; end
27
+
28
+ include Google::Apis::Core::JsonObjectSupport
29
+ end
30
+
25
31
  class BatchDeleteMessagesRequest
26
32
  class Representation < Google::Apis::Core::JsonRepresentation; end
27
33
 
28
34
  include Google::Apis::Core::JsonObjectSupport
29
35
  end
30
36
 
37
+ class BatchModifyMessagesRequest
38
+ class Representation < Google::Apis::Core::JsonRepresentation; end
39
+
40
+ include Google::Apis::Core::JsonObjectSupport
41
+ end
42
+
31
43
  class Draft
32
44
  class Representation < Google::Apis::Core::JsonRepresentation; end
33
45
 
34
46
  include Google::Apis::Core::JsonObjectSupport
35
47
  end
36
48
 
49
+ class Filter
50
+ class Representation < Google::Apis::Core::JsonRepresentation; end
51
+
52
+ include Google::Apis::Core::JsonObjectSupport
53
+ end
54
+
55
+ class FilterAction
56
+ class Representation < Google::Apis::Core::JsonRepresentation; end
57
+
58
+ include Google::Apis::Core::JsonObjectSupport
59
+ end
60
+
61
+ class FilterCriteria
62
+ class Representation < Google::Apis::Core::JsonRepresentation; end
63
+
64
+ include Google::Apis::Core::JsonObjectSupport
65
+ end
66
+
67
+ class ForwardingAddress
68
+ class Representation < Google::Apis::Core::JsonRepresentation; end
69
+
70
+ include Google::Apis::Core::JsonObjectSupport
71
+ end
72
+
37
73
  class History
38
74
  class Representation < Google::Apis::Core::JsonRepresentation; end
39
75
 
@@ -64,6 +100,12 @@ module Google
64
100
  include Google::Apis::Core::JsonObjectSupport
65
101
  end
66
102
 
103
+ class ImapSettings
104
+ class Representation < Google::Apis::Core::JsonRepresentation; end
105
+
106
+ include Google::Apis::Core::JsonObjectSupport
107
+ end
108
+
67
109
  class Label
68
110
  class Representation < Google::Apis::Core::JsonRepresentation; end
69
111
 
@@ -76,6 +118,18 @@ module Google
76
118
  include Google::Apis::Core::JsonObjectSupport
77
119
  end
78
120
 
121
+ class ListFiltersResponse
122
+ class Representation < Google::Apis::Core::JsonRepresentation; end
123
+
124
+ include Google::Apis::Core::JsonObjectSupport
125
+ end
126
+
127
+ class ListForwardingAddressesResponse
128
+ class Representation < Google::Apis::Core::JsonRepresentation; end
129
+
130
+ include Google::Apis::Core::JsonObjectSupport
131
+ end
132
+
79
133
  class ListHistoryResponse
80
134
  class Representation < Google::Apis::Core::JsonRepresentation; end
81
135
 
@@ -94,6 +148,18 @@ module Google
94
148
  include Google::Apis::Core::JsonObjectSupport
95
149
  end
96
150
 
151
+ class ListSendAsResponse
152
+ class Representation < Google::Apis::Core::JsonRepresentation; end
153
+
154
+ include Google::Apis::Core::JsonObjectSupport
155
+ end
156
+
157
+ class ListSmimeInfoResponse
158
+ class Representation < Google::Apis::Core::JsonRepresentation; end
159
+
160
+ include Google::Apis::Core::JsonObjectSupport
161
+ end
162
+
97
163
  class ListThreadsResponse
98
164
  class Representation < Google::Apis::Core::JsonRepresentation; end
99
165
 
@@ -136,18 +202,48 @@ module Google
136
202
  include Google::Apis::Core::JsonObjectSupport
137
203
  end
138
204
 
205
+ class PopSettings
206
+ class Representation < Google::Apis::Core::JsonRepresentation; end
207
+
208
+ include Google::Apis::Core::JsonObjectSupport
209
+ end
210
+
139
211
  class Profile
140
212
  class Representation < Google::Apis::Core::JsonRepresentation; end
141
213
 
142
214
  include Google::Apis::Core::JsonObjectSupport
143
215
  end
144
216
 
217
+ class SendAs
218
+ class Representation < Google::Apis::Core::JsonRepresentation; end
219
+
220
+ include Google::Apis::Core::JsonObjectSupport
221
+ end
222
+
223
+ class SmimeInfo
224
+ class Representation < Google::Apis::Core::JsonRepresentation; end
225
+
226
+ include Google::Apis::Core::JsonObjectSupport
227
+ end
228
+
229
+ class SmtpMsa
230
+ class Representation < Google::Apis::Core::JsonRepresentation; end
231
+
232
+ include Google::Apis::Core::JsonObjectSupport
233
+ end
234
+
145
235
  class Thread
146
236
  class Representation < Google::Apis::Core::JsonRepresentation; end
147
237
 
148
238
  include Google::Apis::Core::JsonObjectSupport
149
239
  end
150
240
 
241
+ class VacationSettings
242
+ class Representation < Google::Apis::Core::JsonRepresentation; end
243
+
244
+ include Google::Apis::Core::JsonObjectSupport
245
+ end
246
+
151
247
  class WatchRequest
152
248
  class Representation < Google::Apis::Core::JsonRepresentation; end
153
249
 
@@ -160,6 +256,15 @@ module Google
160
256
  include Google::Apis::Core::JsonObjectSupport
161
257
  end
162
258
 
259
+ class AutoForwarding
260
+ # @private
261
+ class Representation < Google::Apis::Core::JsonRepresentation
262
+ property :disposition, as: 'disposition'
263
+ property :email_address, as: 'emailAddress'
264
+ property :enabled, as: 'enabled'
265
+ end
266
+ end
267
+
163
268
  class BatchDeleteMessagesRequest
164
269
  # @private
165
270
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -167,6 +272,15 @@ module Google
167
272
  end
168
273
  end
169
274
 
275
+ class BatchModifyMessagesRequest
276
+ # @private
277
+ class Representation < Google::Apis::Core::JsonRepresentation
278
+ collection :add_label_ids, as: 'addLabelIds'
279
+ collection :ids, as: 'ids'
280
+ collection :remove_label_ids, as: 'removeLabelIds'
281
+ end
282
+ end
283
+
170
284
  class Draft
171
285
  # @private
172
286
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -176,6 +290,49 @@ module Google
176
290
  end
177
291
  end
178
292
 
293
+ class Filter
294
+ # @private
295
+ class Representation < Google::Apis::Core::JsonRepresentation
296
+ property :action, as: 'action', class: Google::Apis::GmailV1::FilterAction, decorator: Google::Apis::GmailV1::FilterAction::Representation
297
+
298
+ property :criteria, as: 'criteria', class: Google::Apis::GmailV1::FilterCriteria, decorator: Google::Apis::GmailV1::FilterCriteria::Representation
299
+
300
+ property :id, as: 'id'
301
+ end
302
+ end
303
+
304
+ class FilterAction
305
+ # @private
306
+ class Representation < Google::Apis::Core::JsonRepresentation
307
+ collection :add_label_ids, as: 'addLabelIds'
308
+ property :forward, as: 'forward'
309
+ collection :remove_label_ids, as: 'removeLabelIds'
310
+ end
311
+ end
312
+
313
+ class FilterCriteria
314
+ # @private
315
+ class Representation < Google::Apis::Core::JsonRepresentation
316
+ property :exclude_chats, as: 'excludeChats'
317
+ property :from, as: 'from'
318
+ property :has_attachment, as: 'hasAttachment'
319
+ property :negated_query, as: 'negatedQuery'
320
+ property :query, as: 'query'
321
+ property :size, as: 'size'
322
+ property :size_comparison, as: 'sizeComparison'
323
+ property :subject, as: 'subject'
324
+ property :to, as: 'to'
325
+ end
326
+ end
327
+
328
+ class ForwardingAddress
329
+ # @private
330
+ class Representation < Google::Apis::Core::JsonRepresentation
331
+ property :forwarding_email, as: 'forwardingEmail'
332
+ property :verification_status, as: 'verificationStatus'
333
+ end
334
+ end
335
+
179
336
  class History
180
337
  # @private
181
338
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -227,6 +384,16 @@ module Google
227
384
  end
228
385
  end
229
386
 
387
+ class ImapSettings
388
+ # @private
389
+ class Representation < Google::Apis::Core::JsonRepresentation
390
+ property :auto_expunge, as: 'autoExpunge'
391
+ property :enabled, as: 'enabled'
392
+ property :expunge_behavior, as: 'expungeBehavior'
393
+ property :max_folder_size, as: 'maxFolderSize'
394
+ end
395
+ end
396
+
230
397
  class Label
231
398
  # @private
232
399
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -252,6 +419,22 @@ module Google
252
419
  end
253
420
  end
254
421
 
422
+ class ListFiltersResponse
423
+ # @private
424
+ class Representation < Google::Apis::Core::JsonRepresentation
425
+ collection :filter, as: 'filter', class: Google::Apis::GmailV1::Filter, decorator: Google::Apis::GmailV1::Filter::Representation
426
+
427
+ end
428
+ end
429
+
430
+ class ListForwardingAddressesResponse
431
+ # @private
432
+ class Representation < Google::Apis::Core::JsonRepresentation
433
+ collection :forwarding_addresses, as: 'forwardingAddresses', class: Google::Apis::GmailV1::ForwardingAddress, decorator: Google::Apis::GmailV1::ForwardingAddress::Representation
434
+
435
+ end
436
+ end
437
+
255
438
  class ListHistoryResponse
256
439
  # @private
257
440
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -280,6 +463,22 @@ module Google
280
463
  end
281
464
  end
282
465
 
466
+ class ListSendAsResponse
467
+ # @private
468
+ class Representation < Google::Apis::Core::JsonRepresentation
469
+ collection :send_as, as: 'sendAs', class: Google::Apis::GmailV1::SendAs, decorator: Google::Apis::GmailV1::SendAs::Representation
470
+
471
+ end
472
+ end
473
+
474
+ class ListSmimeInfoResponse
475
+ # @private
476
+ class Representation < Google::Apis::Core::JsonRepresentation
477
+ collection :smime_info, as: 'smimeInfo', class: Google::Apis::GmailV1::SmimeInfo, decorator: Google::Apis::GmailV1::SmimeInfo::Representation
478
+
479
+ end
480
+ end
481
+
283
482
  class ListThreadsResponse
284
483
  # @private
285
484
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -354,6 +553,14 @@ module Google
354
553
  end
355
554
  end
356
555
 
556
+ class PopSettings
557
+ # @private
558
+ class Representation < Google::Apis::Core::JsonRepresentation
559
+ property :access_window, as: 'accessWindow'
560
+ property :disposition, as: 'disposition'
561
+ end
562
+ end
563
+
357
564
  class Profile
358
565
  # @private
359
566
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -364,6 +571,46 @@ module Google
364
571
  end
365
572
  end
366
573
 
574
+ class SendAs
575
+ # @private
576
+ class Representation < Google::Apis::Core::JsonRepresentation
577
+ property :display_name, as: 'displayName'
578
+ property :is_default, as: 'isDefault'
579
+ property :is_primary, as: 'isPrimary'
580
+ property :reply_to_address, as: 'replyToAddress'
581
+ property :send_as_email, as: 'sendAsEmail'
582
+ property :signature, as: 'signature'
583
+ property :smtp_msa, as: 'smtpMsa', class: Google::Apis::GmailV1::SmtpMsa, decorator: Google::Apis::GmailV1::SmtpMsa::Representation
584
+
585
+ property :treat_as_alias, as: 'treatAsAlias'
586
+ property :verification_status, as: 'verificationStatus'
587
+ end
588
+ end
589
+
590
+ class SmimeInfo
591
+ # @private
592
+ class Representation < Google::Apis::Core::JsonRepresentation
593
+ property :encrypted_key_password, as: 'encryptedKeyPassword'
594
+ property :expiration, as: 'expiration'
595
+ property :id, as: 'id'
596
+ property :is_default, as: 'isDefault'
597
+ property :issuer_cn, as: 'issuerCn'
598
+ property :pem, as: 'pem'
599
+ property :pkcs12, :base64 => true, as: 'pkcs12'
600
+ end
601
+ end
602
+
603
+ class SmtpMsa
604
+ # @private
605
+ class Representation < Google::Apis::Core::JsonRepresentation
606
+ property :host, as: 'host'
607
+ property :password, as: 'password'
608
+ property :port, as: 'port'
609
+ property :security_mode, as: 'securityMode'
610
+ property :username, as: 'username'
611
+ end
612
+ end
613
+
367
614
  class Thread
368
615
  # @private
369
616
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -375,6 +622,20 @@ module Google
375
622
  end
376
623
  end
377
624
 
625
+ class VacationSettings
626
+ # @private
627
+ class Representation < Google::Apis::Core::JsonRepresentation
628
+ property :enable_auto_reply, as: 'enableAutoReply'
629
+ property :end_time, as: 'endTime'
630
+ property :response_body_html, as: 'responseBodyHtml'
631
+ property :response_body_plain_text, as: 'responseBodyPlainText'
632
+ property :response_subject, as: 'responseSubject'
633
+ property :restrict_to_contacts, as: 'restrictToContacts'
634
+ property :restrict_to_domain, as: 'restrictToDomain'
635
+ property :start_time, as: 'startTime'
636
+ end
637
+ end
638
+
378
639
  class WatchRequest
379
640
  # @private
380
641
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -300,6 +300,10 @@ module Google
300
300
  # Maximum number of drafts to return.
301
301
  # @param [String] page_token
302
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".
303
307
  # @param [String] fields
304
308
  # Selector specifying which fields to include in a partial response.
305
309
  # @param [String] quota_user
@@ -321,7 +325,7 @@ module Google
321
325
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
322
326
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
323
327
  # @raise [Google::Apis::AuthorizationError] Authorization is required
324
- def list_user_drafts(user_id, include_spam_trash: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
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)
325
329
  command = make_simple_command(:get, '{userId}/drafts', options)
326
330
  command.response_representation = Google::Apis::GmailV1::ListDraftsResponse::Representation
327
331
  command.response_class = Google::Apis::GmailV1::ListDraftsResponse
@@ -329,6 +333,7 @@ module Google
329
333
  command.query['includeSpamTrash'] = include_spam_trash unless include_spam_trash.nil?
330
334
  command.query['maxResults'] = max_results unless max_results.nil?
331
335
  command.query['pageToken'] = page_token unless page_token.nil?
336
+ command.query['q'] = q unless q.nil?
332
337
  command.query['fields'] = fields unless fields.nil?
333
338
  command.query['quotaUser'] = quota_user unless quota_user.nil?
334
339
  command.query['userIp'] = user_ip unless user_ip.nil?
@@ -442,6 +447,8 @@ module Google
442
447
  # @param [String] user_id
443
448
  # The user's email address. The special value me can be used to indicate the
444
449
  # authenticated user.
450
+ # @param [Array<String>, String] history_types
451
+ # History types to be returned by the function
445
452
  # @param [String] label_id
446
453
  # Only return messages with a label matching the ID.
447
454
  # @param [Fixnum] max_results
@@ -480,11 +487,12 @@ module Google
480
487
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
481
488
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
482
489
  # @raise [Google::Apis::AuthorizationError] Authorization is required
483
- 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)
490
+ def list_user_histories(user_id, history_types: nil, label_id: nil, max_results: nil, page_token: nil, start_history_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
484
491
  command = make_simple_command(:get, '{userId}/history', options)
485
492
  command.response_representation = Google::Apis::GmailV1::ListHistoryResponse::Representation
486
493
  command.response_class = Google::Apis::GmailV1::ListHistoryResponse
487
494
  command.params['userId'] = user_id unless user_id.nil?
495
+ command.query['historyTypes'] = history_types unless history_types.nil?
488
496
  command.query['labelId'] = label_id unless label_id.nil?
489
497
  command.query['maxResults'] = max_results unless max_results.nil?
490
498
  command.query['pageToken'] = page_token unless page_token.nil?
@@ -769,6 +777,43 @@ module Google
769
777
  execute_or_queue_command(command, &block)
770
778
  end
771
779
 
780
+ # Modifies the labels on the specified messages.
781
+ # @param [String] user_id
782
+ # The user's email address. The special value me can be used to indicate the
783
+ # authenticated user.
784
+ # @param [Google::Apis::GmailV1::BatchModifyMessagesRequest] batch_modify_messages_request_object
785
+ # @param [String] fields
786
+ # Selector specifying which fields to include in a partial response.
787
+ # @param [String] quota_user
788
+ # Available to use for quota purposes for server-side applications. Can be any
789
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
790
+ # Overrides userIp if both are provided.
791
+ # @param [String] user_ip
792
+ # IP address of the site where the request originates. Use this if you want to
793
+ # enforce per-user limits.
794
+ # @param [Google::Apis::RequestOptions] options
795
+ # Request-specific options
796
+ #
797
+ # @yield [result, err] Result & error if block supplied
798
+ # @yieldparam result [NilClass] No result returned for this method
799
+ # @yieldparam err [StandardError] error object if request failed
800
+ #
801
+ # @return [void]
802
+ #
803
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
804
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
805
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
806
+ def batch_modify_messages(user_id, batch_modify_messages_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
807
+ command = make_simple_command(:post, '{userId}/messages/batchModify', options)
808
+ command.request_representation = Google::Apis::GmailV1::BatchModifyMessagesRequest::Representation
809
+ command.request_object = batch_modify_messages_request_object
810
+ command.params['userId'] = user_id unless user_id.nil?
811
+ command.query['fields'] = fields unless fields.nil?
812
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
813
+ command.query['userIp'] = user_ip unless user_ip.nil?
814
+ execute_or_queue_command(command, &block)
815
+ end
816
+
772
817
  # Immediately and permanently deletes the specified message. This operation
773
818
  # cannot be undone. Prefer messages.trash instead.
774
819
  # @param [String] user_id
@@ -861,8 +906,7 @@ module Google
861
906
  # @param [Google::Apis::GmailV1::Message] message_object
862
907
  # @param [Boolean] deleted
863
908
  # Mark the email as permanently deleted (not TRASH) and only visible in Google
864
- # Apps Vault to a Vault administrator. Only used for Google Apps for Work
865
- # accounts.
909
+ # Vault to a Vault administrator. Only used for G Suite accounts.
866
910
  # @param [String] internal_date_source
867
911
  # Source for Gmail's internal date of the message.
868
912
  # @param [Boolean] never_mark_spam
@@ -927,8 +971,7 @@ module Google
927
971
  # @param [Google::Apis::GmailV1::Message] message_object
928
972
  # @param [Boolean] deleted
929
973
  # Mark the email as permanently deleted (not TRASH) and only visible in Google
930
- # Apps Vault to a Vault administrator. Only used for Google Apps for Work
931
- # accounts.
974
+ # Vault to a Vault administrator. Only used for G Suite accounts.
932
975
  # @param [String] internal_date_source
933
976
  # Source for Gmail's internal date of the message.
934
977
  # @param [String] fields
@@ -992,7 +1035,8 @@ module Google
992
1035
  # @param [String] q
993
1036
  # Only return messages matching the specified query. Supports the same query
994
1037
  # format as the Gmail search box. For example, "from:someuser@example.com
995
- # rfc822msgid: is:unread".
1038
+ # rfc822msgid: is:unread". Parameter cannot be used when accessing the api using
1039
+ # the gmail.metadata scope.
996
1040
  # @param [String] fields
997
1041
  # Selector specifying which fields to include in a partial response.
998
1042
  # @param [String] quota_user
@@ -1241,13 +1285,10 @@ module Google
1241
1285
  execute_or_queue_command(command, &block)
1242
1286
  end
1243
1287
 
1244
- # Immediately and permanently deletes the specified thread. This operation
1245
- # cannot be undone. Prefer threads.trash instead.
1288
+ # Gets the auto-forwarding setting for the specified account.
1246
1289
  # @param [String] user_id
1247
- # The user's email address. The special value me can be used to indicate the
1290
+ # User's email address. The special value "me" can be used to indicate the
1248
1291
  # authenticated user.
1249
- # @param [String] id
1250
- # ID of the Thread to delete.
1251
1292
  # @param [String] fields
1252
1293
  # Selector specifying which fields to include in a partial response.
1253
1294
  # @param [String] quota_user
@@ -1261,34 +1302,29 @@ module Google
1261
1302
  # Request-specific options
1262
1303
  #
1263
1304
  # @yield [result, err] Result & error if block supplied
1264
- # @yieldparam result [NilClass] No result returned for this method
1305
+ # @yieldparam result [Google::Apis::GmailV1::AutoForwarding] parsed result object
1265
1306
  # @yieldparam err [StandardError] error object if request failed
1266
1307
  #
1267
- # @return [void]
1308
+ # @return [Google::Apis::GmailV1::AutoForwarding]
1268
1309
  #
1269
1310
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1270
1311
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1271
1312
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1272
- def delete_user_thread(user_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1273
- command = make_simple_command(:delete, '{userId}/threads/{id}', options)
1313
+ def get_user_setting_auto_forwarding(user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1314
+ command = make_simple_command(:get, '{userId}/settings/autoForwarding', options)
1315
+ command.response_representation = Google::Apis::GmailV1::AutoForwarding::Representation
1316
+ command.response_class = Google::Apis::GmailV1::AutoForwarding
1274
1317
  command.params['userId'] = user_id unless user_id.nil?
1275
- command.params['id'] = id unless id.nil?
1276
1318
  command.query['fields'] = fields unless fields.nil?
1277
1319
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1278
1320
  command.query['userIp'] = user_ip unless user_ip.nil?
1279
1321
  execute_or_queue_command(command, &block)
1280
1322
  end
1281
1323
 
1282
- # Gets the specified thread.
1324
+ # Gets IMAP settings.
1283
1325
  # @param [String] user_id
1284
- # The user's email address. The special value me can be used to indicate the
1326
+ # User's email address. The special value "me" can be used to indicate the
1285
1327
  # authenticated user.
1286
- # @param [String] id
1287
- # The ID of the thread to retrieve.
1288
- # @param [String] format
1289
- # The format to return the messages in.
1290
- # @param [Array<String>, String] metadata_headers
1291
- # When given and format is METADATA, only include headers specified.
1292
1328
  # @param [String] fields
1293
1329
  # Selector specifying which fields to include in a partial response.
1294
1330
  # @param [String] quota_user
@@ -1302,44 +1338,1171 @@ module Google
1302
1338
  # Request-specific options
1303
1339
  #
1304
1340
  # @yield [result, err] Result & error if block supplied
1305
- # @yieldparam result [Google::Apis::GmailV1::Thread] parsed result object
1341
+ # @yieldparam result [Google::Apis::GmailV1::ImapSettings] parsed result object
1306
1342
  # @yieldparam err [StandardError] error object if request failed
1307
1343
  #
1308
- # @return [Google::Apis::GmailV1::Thread]
1344
+ # @return [Google::Apis::GmailV1::ImapSettings]
1309
1345
  #
1310
1346
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1311
1347
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1312
1348
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1313
- def get_user_thread(user_id, id, format: nil, metadata_headers: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1314
- command = make_simple_command(:get, '{userId}/threads/{id}', options)
1315
- command.response_representation = Google::Apis::GmailV1::Thread::Representation
1316
- command.response_class = Google::Apis::GmailV1::Thread
1349
+ def get_user_setting_imap(user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1350
+ command = make_simple_command(:get, '{userId}/settings/imap', options)
1351
+ command.response_representation = Google::Apis::GmailV1::ImapSettings::Representation
1352
+ command.response_class = Google::Apis::GmailV1::ImapSettings
1317
1353
  command.params['userId'] = user_id unless user_id.nil?
1318
- command.params['id'] = id unless id.nil?
1319
- command.query['format'] = format unless format.nil?
1320
- command.query['metadataHeaders'] = metadata_headers unless metadata_headers.nil?
1321
1354
  command.query['fields'] = fields unless fields.nil?
1322
1355
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1323
1356
  command.query['userIp'] = user_ip unless user_ip.nil?
1324
1357
  execute_or_queue_command(command, &block)
1325
1358
  end
1326
1359
 
1327
- # Lists the threads in the user's mailbox.
1360
+ # Gets POP settings.
1328
1361
  # @param [String] user_id
1329
- # The user's email address. The special value me can be used to indicate the
1362
+ # User's email address. The special value "me" can be used to indicate the
1330
1363
  # authenticated user.
1331
- # @param [Boolean] include_spam_trash
1332
- # Include threads from SPAM and TRASH in the results.
1333
- # @param [Array<String>, String] label_ids
1334
- # Only return threads with labels that match all of the specified label IDs.
1335
- # @param [Fixnum] max_results
1336
- # Maximum number of threads to return.
1337
- # @param [String] page_token
1338
- # Page token to retrieve a specific page of results in the list.
1339
- # @param [String] q
1340
- # Only return threads matching the specified query. Supports the same query
1341
- # format as the Gmail search box. For example, "from:someuser@example.com
1342
- # rfc822msgid: is:unread".
1364
+ # @param [String] fields
1365
+ # Selector specifying which fields to include in a partial response.
1366
+ # @param [String] quota_user
1367
+ # Available to use for quota purposes for server-side applications. Can be any
1368
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1369
+ # Overrides userIp if both are provided.
1370
+ # @param [String] user_ip
1371
+ # IP address of the site where the request originates. Use this if you want to
1372
+ # enforce per-user limits.
1373
+ # @param [Google::Apis::RequestOptions] options
1374
+ # Request-specific options
1375
+ #
1376
+ # @yield [result, err] Result & error if block supplied
1377
+ # @yieldparam result [Google::Apis::GmailV1::PopSettings] parsed result object
1378
+ # @yieldparam err [StandardError] error object if request failed
1379
+ #
1380
+ # @return [Google::Apis::GmailV1::PopSettings]
1381
+ #
1382
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1383
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1384
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1385
+ def get_user_setting_pop(user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1386
+ command = make_simple_command(:get, '{userId}/settings/pop', options)
1387
+ command.response_representation = Google::Apis::GmailV1::PopSettings::Representation
1388
+ command.response_class = Google::Apis::GmailV1::PopSettings
1389
+ command.params['userId'] = user_id unless user_id.nil?
1390
+ command.query['fields'] = fields unless fields.nil?
1391
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1392
+ command.query['userIp'] = user_ip unless user_ip.nil?
1393
+ execute_or_queue_command(command, &block)
1394
+ end
1395
+
1396
+ # Gets vacation responder settings.
1397
+ # @param [String] user_id
1398
+ # User's email address. The special value "me" can be used to indicate the
1399
+ # authenticated user.
1400
+ # @param [String] fields
1401
+ # Selector specifying which fields to include in a partial response.
1402
+ # @param [String] quota_user
1403
+ # Available to use for quota purposes for server-side applications. Can be any
1404
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1405
+ # Overrides userIp if both are provided.
1406
+ # @param [String] user_ip
1407
+ # IP address of the site where the request originates. Use this if you want to
1408
+ # enforce per-user limits.
1409
+ # @param [Google::Apis::RequestOptions] options
1410
+ # Request-specific options
1411
+ #
1412
+ # @yield [result, err] Result & error if block supplied
1413
+ # @yieldparam result [Google::Apis::GmailV1::VacationSettings] parsed result object
1414
+ # @yieldparam err [StandardError] error object if request failed
1415
+ #
1416
+ # @return [Google::Apis::GmailV1::VacationSettings]
1417
+ #
1418
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1419
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1420
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1421
+ def get_user_setting_vacation(user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1422
+ command = make_simple_command(:get, '{userId}/settings/vacation', options)
1423
+ command.response_representation = Google::Apis::GmailV1::VacationSettings::Representation
1424
+ command.response_class = Google::Apis::GmailV1::VacationSettings
1425
+ command.params['userId'] = user_id unless user_id.nil?
1426
+ command.query['fields'] = fields unless fields.nil?
1427
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1428
+ command.query['userIp'] = user_ip unless user_ip.nil?
1429
+ execute_or_queue_command(command, &block)
1430
+ end
1431
+
1432
+ # Updates the auto-forwarding setting for the specified account. A verified
1433
+ # forwarding address must be specified when auto-forwarding is enabled.
1434
+ # This method is only available to service account clients that have been
1435
+ # delegated domain-wide authority.
1436
+ # @param [String] user_id
1437
+ # User's email address. The special value "me" can be used to indicate the
1438
+ # authenticated user.
1439
+ # @param [Google::Apis::GmailV1::AutoForwarding] auto_forwarding_object
1440
+ # @param [String] fields
1441
+ # Selector specifying which fields to include in a partial response.
1442
+ # @param [String] quota_user
1443
+ # Available to use for quota purposes for server-side applications. Can be any
1444
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1445
+ # Overrides userIp if both are provided.
1446
+ # @param [String] user_ip
1447
+ # IP address of the site where the request originates. Use this if you want to
1448
+ # enforce per-user limits.
1449
+ # @param [Google::Apis::RequestOptions] options
1450
+ # Request-specific options
1451
+ #
1452
+ # @yield [result, err] Result & error if block supplied
1453
+ # @yieldparam result [Google::Apis::GmailV1::AutoForwarding] parsed result object
1454
+ # @yieldparam err [StandardError] error object if request failed
1455
+ #
1456
+ # @return [Google::Apis::GmailV1::AutoForwarding]
1457
+ #
1458
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1459
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1460
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1461
+ def update_user_setting_auto_forwarding(user_id, auto_forwarding_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1462
+ command = make_simple_command(:put, '{userId}/settings/autoForwarding', options)
1463
+ command.request_representation = Google::Apis::GmailV1::AutoForwarding::Representation
1464
+ command.request_object = auto_forwarding_object
1465
+ command.response_representation = Google::Apis::GmailV1::AutoForwarding::Representation
1466
+ command.response_class = Google::Apis::GmailV1::AutoForwarding
1467
+ command.params['userId'] = user_id unless user_id.nil?
1468
+ command.query['fields'] = fields unless fields.nil?
1469
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1470
+ command.query['userIp'] = user_ip unless user_ip.nil?
1471
+ execute_or_queue_command(command, &block)
1472
+ end
1473
+
1474
+ # Updates IMAP settings.
1475
+ # @param [String] user_id
1476
+ # User's email address. The special value "me" can be used to indicate the
1477
+ # authenticated user.
1478
+ # @param [Google::Apis::GmailV1::ImapSettings] imap_settings_object
1479
+ # @param [String] fields
1480
+ # Selector specifying which fields to include in a partial response.
1481
+ # @param [String] quota_user
1482
+ # Available to use for quota purposes for server-side applications. Can be any
1483
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1484
+ # Overrides userIp if both are provided.
1485
+ # @param [String] user_ip
1486
+ # IP address of the site where the request originates. Use this if you want to
1487
+ # enforce per-user limits.
1488
+ # @param [Google::Apis::RequestOptions] options
1489
+ # Request-specific options
1490
+ #
1491
+ # @yield [result, err] Result & error if block supplied
1492
+ # @yieldparam result [Google::Apis::GmailV1::ImapSettings] parsed result object
1493
+ # @yieldparam err [StandardError] error object if request failed
1494
+ #
1495
+ # @return [Google::Apis::GmailV1::ImapSettings]
1496
+ #
1497
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1498
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1499
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1500
+ def update_user_setting_imap(user_id, imap_settings_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1501
+ command = make_simple_command(:put, '{userId}/settings/imap', options)
1502
+ command.request_representation = Google::Apis::GmailV1::ImapSettings::Representation
1503
+ command.request_object = imap_settings_object
1504
+ command.response_representation = Google::Apis::GmailV1::ImapSettings::Representation
1505
+ command.response_class = Google::Apis::GmailV1::ImapSettings
1506
+ command.params['userId'] = user_id unless user_id.nil?
1507
+ command.query['fields'] = fields unless fields.nil?
1508
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1509
+ command.query['userIp'] = user_ip unless user_ip.nil?
1510
+ execute_or_queue_command(command, &block)
1511
+ end
1512
+
1513
+ # Updates POP settings.
1514
+ # @param [String] user_id
1515
+ # User's email address. The special value "me" can be used to indicate the
1516
+ # authenticated user.
1517
+ # @param [Google::Apis::GmailV1::PopSettings] pop_settings_object
1518
+ # @param [String] fields
1519
+ # Selector specifying which fields to include in a partial response.
1520
+ # @param [String] quota_user
1521
+ # Available to use for quota purposes for server-side applications. Can be any
1522
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1523
+ # Overrides userIp if both are provided.
1524
+ # @param [String] user_ip
1525
+ # IP address of the site where the request originates. Use this if you want to
1526
+ # enforce per-user limits.
1527
+ # @param [Google::Apis::RequestOptions] options
1528
+ # Request-specific options
1529
+ #
1530
+ # @yield [result, err] Result & error if block supplied
1531
+ # @yieldparam result [Google::Apis::GmailV1::PopSettings] parsed result object
1532
+ # @yieldparam err [StandardError] error object if request failed
1533
+ #
1534
+ # @return [Google::Apis::GmailV1::PopSettings]
1535
+ #
1536
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1537
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1538
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1539
+ def update_user_setting_pop(user_id, pop_settings_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1540
+ command = make_simple_command(:put, '{userId}/settings/pop', options)
1541
+ command.request_representation = Google::Apis::GmailV1::PopSettings::Representation
1542
+ command.request_object = pop_settings_object
1543
+ command.response_representation = Google::Apis::GmailV1::PopSettings::Representation
1544
+ command.response_class = Google::Apis::GmailV1::PopSettings
1545
+ command.params['userId'] = user_id unless user_id.nil?
1546
+ command.query['fields'] = fields unless fields.nil?
1547
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1548
+ command.query['userIp'] = user_ip unless user_ip.nil?
1549
+ execute_or_queue_command(command, &block)
1550
+ end
1551
+
1552
+ # Updates vacation responder settings.
1553
+ # @param [String] user_id
1554
+ # User's email address. The special value "me" can be used to indicate the
1555
+ # authenticated user.
1556
+ # @param [Google::Apis::GmailV1::VacationSettings] vacation_settings_object
1557
+ # @param [String] fields
1558
+ # Selector specifying which fields to include in a partial response.
1559
+ # @param [String] quota_user
1560
+ # Available to use for quota purposes for server-side applications. Can be any
1561
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1562
+ # Overrides userIp if both are provided.
1563
+ # @param [String] user_ip
1564
+ # IP address of the site where the request originates. Use this if you want to
1565
+ # enforce per-user limits.
1566
+ # @param [Google::Apis::RequestOptions] options
1567
+ # Request-specific options
1568
+ #
1569
+ # @yield [result, err] Result & error if block supplied
1570
+ # @yieldparam result [Google::Apis::GmailV1::VacationSettings] parsed result object
1571
+ # @yieldparam err [StandardError] error object if request failed
1572
+ #
1573
+ # @return [Google::Apis::GmailV1::VacationSettings]
1574
+ #
1575
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1576
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1577
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1578
+ def update_user_setting_vacation(user_id, vacation_settings_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1579
+ command = make_simple_command(:put, '{userId}/settings/vacation', options)
1580
+ command.request_representation = Google::Apis::GmailV1::VacationSettings::Representation
1581
+ command.request_object = vacation_settings_object
1582
+ command.response_representation = Google::Apis::GmailV1::VacationSettings::Representation
1583
+ command.response_class = Google::Apis::GmailV1::VacationSettings
1584
+ command.params['userId'] = user_id unless user_id.nil?
1585
+ command.query['fields'] = fields unless fields.nil?
1586
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1587
+ command.query['userIp'] = user_ip unless user_ip.nil?
1588
+ execute_or_queue_command(command, &block)
1589
+ end
1590
+
1591
+ # Creates a filter.
1592
+ # @param [String] user_id
1593
+ # User's email address. The special value "me" can be used to indicate the
1594
+ # authenticated user.
1595
+ # @param [Google::Apis::GmailV1::Filter] filter_object
1596
+ # @param [String] fields
1597
+ # Selector specifying which fields to include in a partial response.
1598
+ # @param [String] quota_user
1599
+ # Available to use for quota purposes for server-side applications. Can be any
1600
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1601
+ # Overrides userIp if both are provided.
1602
+ # @param [String] user_ip
1603
+ # IP address of the site where the request originates. Use this if you want to
1604
+ # enforce per-user limits.
1605
+ # @param [Google::Apis::RequestOptions] options
1606
+ # Request-specific options
1607
+ #
1608
+ # @yield [result, err] Result & error if block supplied
1609
+ # @yieldparam result [Google::Apis::GmailV1::Filter] parsed result object
1610
+ # @yieldparam err [StandardError] error object if request failed
1611
+ #
1612
+ # @return [Google::Apis::GmailV1::Filter]
1613
+ #
1614
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1615
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1616
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1617
+ def create_user_setting_filter(user_id, filter_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1618
+ command = make_simple_command(:post, '{userId}/settings/filters', options)
1619
+ command.request_representation = Google::Apis::GmailV1::Filter::Representation
1620
+ command.request_object = filter_object
1621
+ command.response_representation = Google::Apis::GmailV1::Filter::Representation
1622
+ command.response_class = Google::Apis::GmailV1::Filter
1623
+ command.params['userId'] = user_id unless user_id.nil?
1624
+ command.query['fields'] = fields unless fields.nil?
1625
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1626
+ command.query['userIp'] = user_ip unless user_ip.nil?
1627
+ execute_or_queue_command(command, &block)
1628
+ end
1629
+
1630
+ # Deletes a filter.
1631
+ # @param [String] user_id
1632
+ # User's email address. The special value "me" can be used to indicate the
1633
+ # authenticated user.
1634
+ # @param [String] id
1635
+ # The ID of the filter to be deleted.
1636
+ # @param [String] fields
1637
+ # Selector specifying which fields to include in a partial response.
1638
+ # @param [String] quota_user
1639
+ # Available to use for quota purposes for server-side applications. Can be any
1640
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1641
+ # Overrides userIp if both are provided.
1642
+ # @param [String] user_ip
1643
+ # IP address of the site where the request originates. Use this if you want to
1644
+ # enforce per-user limits.
1645
+ # @param [Google::Apis::RequestOptions] options
1646
+ # Request-specific options
1647
+ #
1648
+ # @yield [result, err] Result & error if block supplied
1649
+ # @yieldparam result [NilClass] No result returned for this method
1650
+ # @yieldparam err [StandardError] error object if request failed
1651
+ #
1652
+ # @return [void]
1653
+ #
1654
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1655
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1656
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1657
+ def delete_user_setting_filter(user_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1658
+ command = make_simple_command(:delete, '{userId}/settings/filters/{id}', options)
1659
+ command.params['userId'] = user_id unless user_id.nil?
1660
+ command.params['id'] = id unless id.nil?
1661
+ command.query['fields'] = fields unless fields.nil?
1662
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1663
+ command.query['userIp'] = user_ip unless user_ip.nil?
1664
+ execute_or_queue_command(command, &block)
1665
+ end
1666
+
1667
+ # Gets a filter.
1668
+ # @param [String] user_id
1669
+ # User's email address. The special value "me" can be used to indicate the
1670
+ # authenticated user.
1671
+ # @param [String] id
1672
+ # The ID of the filter to be fetched.
1673
+ # @param [String] fields
1674
+ # Selector specifying which fields to include in a partial response.
1675
+ # @param [String] quota_user
1676
+ # Available to use for quota purposes for server-side applications. Can be any
1677
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1678
+ # Overrides userIp if both are provided.
1679
+ # @param [String] user_ip
1680
+ # IP address of the site where the request originates. Use this if you want to
1681
+ # enforce per-user limits.
1682
+ # @param [Google::Apis::RequestOptions] options
1683
+ # Request-specific options
1684
+ #
1685
+ # @yield [result, err] Result & error if block supplied
1686
+ # @yieldparam result [Google::Apis::GmailV1::Filter] parsed result object
1687
+ # @yieldparam err [StandardError] error object if request failed
1688
+ #
1689
+ # @return [Google::Apis::GmailV1::Filter]
1690
+ #
1691
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1692
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1693
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1694
+ def get_user_setting_filter(user_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1695
+ command = make_simple_command(:get, '{userId}/settings/filters/{id}', options)
1696
+ command.response_representation = Google::Apis::GmailV1::Filter::Representation
1697
+ command.response_class = Google::Apis::GmailV1::Filter
1698
+ command.params['userId'] = user_id unless user_id.nil?
1699
+ command.params['id'] = id unless id.nil?
1700
+ command.query['fields'] = fields unless fields.nil?
1701
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1702
+ command.query['userIp'] = user_ip unless user_ip.nil?
1703
+ execute_or_queue_command(command, &block)
1704
+ end
1705
+
1706
+ # Lists the message filters of a Gmail user.
1707
+ # @param [String] user_id
1708
+ # User's email address. The special value "me" can be used to indicate the
1709
+ # authenticated user.
1710
+ # @param [String] fields
1711
+ # Selector specifying which fields to include in a partial response.
1712
+ # @param [String] quota_user
1713
+ # Available to use for quota purposes for server-side applications. Can be any
1714
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1715
+ # Overrides userIp if both are provided.
1716
+ # @param [String] user_ip
1717
+ # IP address of the site where the request originates. Use this if you want to
1718
+ # enforce per-user limits.
1719
+ # @param [Google::Apis::RequestOptions] options
1720
+ # Request-specific options
1721
+ #
1722
+ # @yield [result, err] Result & error if block supplied
1723
+ # @yieldparam result [Google::Apis::GmailV1::ListFiltersResponse] parsed result object
1724
+ # @yieldparam err [StandardError] error object if request failed
1725
+ #
1726
+ # @return [Google::Apis::GmailV1::ListFiltersResponse]
1727
+ #
1728
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1729
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1730
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1731
+ def list_user_setting_filters(user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1732
+ command = make_simple_command(:get, '{userId}/settings/filters', options)
1733
+ command.response_representation = Google::Apis::GmailV1::ListFiltersResponse::Representation
1734
+ command.response_class = Google::Apis::GmailV1::ListFiltersResponse
1735
+ command.params['userId'] = user_id unless user_id.nil?
1736
+ command.query['fields'] = fields unless fields.nil?
1737
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1738
+ command.query['userIp'] = user_ip unless user_ip.nil?
1739
+ execute_or_queue_command(command, &block)
1740
+ end
1741
+
1742
+ # Creates a forwarding address. If ownership verification is required, a message
1743
+ # will be sent to the recipient and the resource's verification status will be
1744
+ # set to pending; otherwise, the resource will be created with verification
1745
+ # status set to accepted.
1746
+ # This method is only available to service account clients that have been
1747
+ # delegated domain-wide authority.
1748
+ # @param [String] user_id
1749
+ # User's email address. The special value "me" can be used to indicate the
1750
+ # authenticated user.
1751
+ # @param [Google::Apis::GmailV1::ForwardingAddress] forwarding_address_object
1752
+ # @param [String] fields
1753
+ # Selector specifying which fields to include in a partial response.
1754
+ # @param [String] quota_user
1755
+ # Available to use for quota purposes for server-side applications. Can be any
1756
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1757
+ # Overrides userIp if both are provided.
1758
+ # @param [String] user_ip
1759
+ # IP address of the site where the request originates. Use this if you want to
1760
+ # enforce per-user limits.
1761
+ # @param [Google::Apis::RequestOptions] options
1762
+ # Request-specific options
1763
+ #
1764
+ # @yield [result, err] Result & error if block supplied
1765
+ # @yieldparam result [Google::Apis::GmailV1::ForwardingAddress] parsed result object
1766
+ # @yieldparam err [StandardError] error object if request failed
1767
+ #
1768
+ # @return [Google::Apis::GmailV1::ForwardingAddress]
1769
+ #
1770
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1771
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1772
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1773
+ def create_user_setting_forwarding_address(user_id, forwarding_address_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1774
+ command = make_simple_command(:post, '{userId}/settings/forwardingAddresses', options)
1775
+ command.request_representation = Google::Apis::GmailV1::ForwardingAddress::Representation
1776
+ command.request_object = forwarding_address_object
1777
+ command.response_representation = Google::Apis::GmailV1::ForwardingAddress::Representation
1778
+ command.response_class = Google::Apis::GmailV1::ForwardingAddress
1779
+ command.params['userId'] = user_id unless user_id.nil?
1780
+ command.query['fields'] = fields unless fields.nil?
1781
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1782
+ command.query['userIp'] = user_ip unless user_ip.nil?
1783
+ execute_or_queue_command(command, &block)
1784
+ end
1785
+
1786
+ # Deletes the specified forwarding address and revokes any verification that may
1787
+ # have been required.
1788
+ # This method is only available to service account clients that have been
1789
+ # delegated domain-wide authority.
1790
+ # @param [String] user_id
1791
+ # User's email address. The special value "me" can be used to indicate the
1792
+ # authenticated user.
1793
+ # @param [String] forwarding_email
1794
+ # The forwarding address to be deleted.
1795
+ # @param [String] fields
1796
+ # Selector specifying which fields to include in a partial response.
1797
+ # @param [String] quota_user
1798
+ # Available to use for quota purposes for server-side applications. Can be any
1799
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1800
+ # Overrides userIp if both are provided.
1801
+ # @param [String] user_ip
1802
+ # IP address of the site where the request originates. Use this if you want to
1803
+ # enforce per-user limits.
1804
+ # @param [Google::Apis::RequestOptions] options
1805
+ # Request-specific options
1806
+ #
1807
+ # @yield [result, err] Result & error if block supplied
1808
+ # @yieldparam result [NilClass] No result returned for this method
1809
+ # @yieldparam err [StandardError] error object if request failed
1810
+ #
1811
+ # @return [void]
1812
+ #
1813
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1814
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1815
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1816
+ def delete_user_setting_forwarding_address(user_id, forwarding_email, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1817
+ command = make_simple_command(:delete, '{userId}/settings/forwardingAddresses/{forwardingEmail}', options)
1818
+ command.params['userId'] = user_id unless user_id.nil?
1819
+ command.params['forwardingEmail'] = forwarding_email unless forwarding_email.nil?
1820
+ command.query['fields'] = fields unless fields.nil?
1821
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1822
+ command.query['userIp'] = user_ip unless user_ip.nil?
1823
+ execute_or_queue_command(command, &block)
1824
+ end
1825
+
1826
+ # Gets the specified forwarding address.
1827
+ # @param [String] user_id
1828
+ # User's email address. The special value "me" can be used to indicate the
1829
+ # authenticated user.
1830
+ # @param [String] forwarding_email
1831
+ # The forwarding address to be retrieved.
1832
+ # @param [String] fields
1833
+ # Selector specifying which fields to include in a partial response.
1834
+ # @param [String] quota_user
1835
+ # Available to use for quota purposes for server-side applications. Can be any
1836
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1837
+ # Overrides userIp if both are provided.
1838
+ # @param [String] user_ip
1839
+ # IP address of the site where the request originates. Use this if you want to
1840
+ # enforce per-user limits.
1841
+ # @param [Google::Apis::RequestOptions] options
1842
+ # Request-specific options
1843
+ #
1844
+ # @yield [result, err] Result & error if block supplied
1845
+ # @yieldparam result [Google::Apis::GmailV1::ForwardingAddress] parsed result object
1846
+ # @yieldparam err [StandardError] error object if request failed
1847
+ #
1848
+ # @return [Google::Apis::GmailV1::ForwardingAddress]
1849
+ #
1850
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1851
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1852
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1853
+ def get_user_setting_forwarding_address(user_id, forwarding_email, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1854
+ command = make_simple_command(:get, '{userId}/settings/forwardingAddresses/{forwardingEmail}', options)
1855
+ command.response_representation = Google::Apis::GmailV1::ForwardingAddress::Representation
1856
+ command.response_class = Google::Apis::GmailV1::ForwardingAddress
1857
+ command.params['userId'] = user_id unless user_id.nil?
1858
+ command.params['forwardingEmail'] = forwarding_email unless forwarding_email.nil?
1859
+ command.query['fields'] = fields unless fields.nil?
1860
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1861
+ command.query['userIp'] = user_ip unless user_ip.nil?
1862
+ execute_or_queue_command(command, &block)
1863
+ end
1864
+
1865
+ # Lists the forwarding addresses for the specified account.
1866
+ # @param [String] user_id
1867
+ # User's email address. The special value "me" can be used to indicate the
1868
+ # authenticated user.
1869
+ # @param [String] fields
1870
+ # Selector specifying which fields to include in a partial response.
1871
+ # @param [String] quota_user
1872
+ # Available to use for quota purposes for server-side applications. Can be any
1873
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1874
+ # Overrides userIp if both are provided.
1875
+ # @param [String] user_ip
1876
+ # IP address of the site where the request originates. Use this if you want to
1877
+ # enforce per-user limits.
1878
+ # @param [Google::Apis::RequestOptions] options
1879
+ # Request-specific options
1880
+ #
1881
+ # @yield [result, err] Result & error if block supplied
1882
+ # @yieldparam result [Google::Apis::GmailV1::ListForwardingAddressesResponse] parsed result object
1883
+ # @yieldparam err [StandardError] error object if request failed
1884
+ #
1885
+ # @return [Google::Apis::GmailV1::ListForwardingAddressesResponse]
1886
+ #
1887
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1888
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1889
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1890
+ def list_user_setting_forwarding_addresses(user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1891
+ command = make_simple_command(:get, '{userId}/settings/forwardingAddresses', options)
1892
+ command.response_representation = Google::Apis::GmailV1::ListForwardingAddressesResponse::Representation
1893
+ command.response_class = Google::Apis::GmailV1::ListForwardingAddressesResponse
1894
+ command.params['userId'] = user_id unless user_id.nil?
1895
+ command.query['fields'] = fields unless fields.nil?
1896
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1897
+ command.query['userIp'] = user_ip unless user_ip.nil?
1898
+ execute_or_queue_command(command, &block)
1899
+ end
1900
+
1901
+ # Creates a custom "from" send-as alias. If an SMTP MSA is specified, Gmail will
1902
+ # attempt to connect to the SMTP service to validate the configuration before
1903
+ # creating the alias. If ownership verification is required for the alias, a
1904
+ # message will be sent to the email address and the resource's verification
1905
+ # status will be set to pending; otherwise, the resource will be created with
1906
+ # verification status set to accepted. If a signature is provided, Gmail will
1907
+ # sanitize the HTML before saving it with the alias.
1908
+ # This method is only available to service account clients that have been
1909
+ # delegated domain-wide authority.
1910
+ # @param [String] user_id
1911
+ # User's email address. The special value "me" can be used to indicate the
1912
+ # authenticated user.
1913
+ # @param [Google::Apis::GmailV1::SendAs] send_as_object
1914
+ # @param [String] fields
1915
+ # Selector specifying which fields to include in a partial response.
1916
+ # @param [String] quota_user
1917
+ # Available to use for quota purposes for server-side applications. Can be any
1918
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1919
+ # Overrides userIp if both are provided.
1920
+ # @param [String] user_ip
1921
+ # IP address of the site where the request originates. Use this if you want to
1922
+ # enforce per-user limits.
1923
+ # @param [Google::Apis::RequestOptions] options
1924
+ # Request-specific options
1925
+ #
1926
+ # @yield [result, err] Result & error if block supplied
1927
+ # @yieldparam result [Google::Apis::GmailV1::SendAs] parsed result object
1928
+ # @yieldparam err [StandardError] error object if request failed
1929
+ #
1930
+ # @return [Google::Apis::GmailV1::SendAs]
1931
+ #
1932
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1933
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1934
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1935
+ def create_user_setting_send_as(user_id, send_as_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1936
+ command = make_simple_command(:post, '{userId}/settings/sendAs', options)
1937
+ command.request_representation = Google::Apis::GmailV1::SendAs::Representation
1938
+ command.request_object = send_as_object
1939
+ command.response_representation = Google::Apis::GmailV1::SendAs::Representation
1940
+ command.response_class = Google::Apis::GmailV1::SendAs
1941
+ command.params['userId'] = user_id unless user_id.nil?
1942
+ command.query['fields'] = fields unless fields.nil?
1943
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1944
+ command.query['userIp'] = user_ip unless user_ip.nil?
1945
+ execute_or_queue_command(command, &block)
1946
+ end
1947
+
1948
+ # Deletes the specified send-as alias. Revokes any verification that may have
1949
+ # been required for using it.
1950
+ # This method is only available to service account clients that have been
1951
+ # delegated domain-wide authority.
1952
+ # @param [String] user_id
1953
+ # User's email address. The special value "me" can be used to indicate the
1954
+ # authenticated user.
1955
+ # @param [String] send_as_email
1956
+ # The send-as alias to be deleted.
1957
+ # @param [String] fields
1958
+ # Selector specifying which fields to include in a partial response.
1959
+ # @param [String] quota_user
1960
+ # Available to use for quota purposes for server-side applications. Can be any
1961
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1962
+ # Overrides userIp if both are provided.
1963
+ # @param [String] user_ip
1964
+ # IP address of the site where the request originates. Use this if you want to
1965
+ # enforce per-user limits.
1966
+ # @param [Google::Apis::RequestOptions] options
1967
+ # Request-specific options
1968
+ #
1969
+ # @yield [result, err] Result & error if block supplied
1970
+ # @yieldparam result [NilClass] No result returned for this method
1971
+ # @yieldparam err [StandardError] error object if request failed
1972
+ #
1973
+ # @return [void]
1974
+ #
1975
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1976
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1977
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1978
+ def delete_user_setting_send_as(user_id, send_as_email, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1979
+ command = make_simple_command(:delete, '{userId}/settings/sendAs/{sendAsEmail}', options)
1980
+ command.params['userId'] = user_id unless user_id.nil?
1981
+ command.params['sendAsEmail'] = send_as_email unless send_as_email.nil?
1982
+ command.query['fields'] = fields unless fields.nil?
1983
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1984
+ command.query['userIp'] = user_ip unless user_ip.nil?
1985
+ execute_or_queue_command(command, &block)
1986
+ end
1987
+
1988
+ # Gets the specified send-as alias. Fails with an HTTP 404 error if the
1989
+ # specified address is not a member of the collection.
1990
+ # @param [String] user_id
1991
+ # User's email address. The special value "me" can be used to indicate the
1992
+ # authenticated user.
1993
+ # @param [String] send_as_email
1994
+ # The send-as alias to be retrieved.
1995
+ # @param [String] fields
1996
+ # Selector specifying which fields to include in a partial response.
1997
+ # @param [String] quota_user
1998
+ # Available to use for quota purposes for server-side applications. Can be any
1999
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2000
+ # Overrides userIp if both are provided.
2001
+ # @param [String] user_ip
2002
+ # IP address of the site where the request originates. Use this if you want to
2003
+ # enforce per-user limits.
2004
+ # @param [Google::Apis::RequestOptions] options
2005
+ # Request-specific options
2006
+ #
2007
+ # @yield [result, err] Result & error if block supplied
2008
+ # @yieldparam result [Google::Apis::GmailV1::SendAs] parsed result object
2009
+ # @yieldparam err [StandardError] error object if request failed
2010
+ #
2011
+ # @return [Google::Apis::GmailV1::SendAs]
2012
+ #
2013
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2014
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2015
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2016
+ def get_user_setting_send_as(user_id, send_as_email, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2017
+ command = make_simple_command(:get, '{userId}/settings/sendAs/{sendAsEmail}', options)
2018
+ command.response_representation = Google::Apis::GmailV1::SendAs::Representation
2019
+ command.response_class = Google::Apis::GmailV1::SendAs
2020
+ command.params['userId'] = user_id unless user_id.nil?
2021
+ command.params['sendAsEmail'] = send_as_email unless send_as_email.nil?
2022
+ command.query['fields'] = fields unless fields.nil?
2023
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2024
+ command.query['userIp'] = user_ip unless user_ip.nil?
2025
+ execute_or_queue_command(command, &block)
2026
+ end
2027
+
2028
+ # Lists the send-as aliases for the specified account. The result includes the
2029
+ # primary send-as address associated with the account as well as any custom "
2030
+ # from" aliases.
2031
+ # @param [String] user_id
2032
+ # User's email address. The special value "me" can be used to indicate the
2033
+ # authenticated user.
2034
+ # @param [String] fields
2035
+ # Selector specifying which fields to include in a partial response.
2036
+ # @param [String] quota_user
2037
+ # Available to use for quota purposes for server-side applications. Can be any
2038
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2039
+ # Overrides userIp if both are provided.
2040
+ # @param [String] user_ip
2041
+ # IP address of the site where the request originates. Use this if you want to
2042
+ # enforce per-user limits.
2043
+ # @param [Google::Apis::RequestOptions] options
2044
+ # Request-specific options
2045
+ #
2046
+ # @yield [result, err] Result & error if block supplied
2047
+ # @yieldparam result [Google::Apis::GmailV1::ListSendAsResponse] parsed result object
2048
+ # @yieldparam err [StandardError] error object if request failed
2049
+ #
2050
+ # @return [Google::Apis::GmailV1::ListSendAsResponse]
2051
+ #
2052
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2053
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2054
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2055
+ def list_user_setting_send_as(user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2056
+ command = make_simple_command(:get, '{userId}/settings/sendAs', options)
2057
+ command.response_representation = Google::Apis::GmailV1::ListSendAsResponse::Representation
2058
+ command.response_class = Google::Apis::GmailV1::ListSendAsResponse
2059
+ command.params['userId'] = user_id unless user_id.nil?
2060
+ command.query['fields'] = fields unless fields.nil?
2061
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2062
+ command.query['userIp'] = user_ip unless user_ip.nil?
2063
+ execute_or_queue_command(command, &block)
2064
+ end
2065
+
2066
+ # Updates a send-as alias. If a signature is provided, Gmail will sanitize the
2067
+ # HTML before saving it with the alias.
2068
+ # Addresses other than the primary address for the account can only be updated
2069
+ # by service account clients that have been delegated domain-wide authority.
2070
+ # This method supports patch semantics.
2071
+ # @param [String] user_id
2072
+ # User's email address. The special value "me" can be used to indicate the
2073
+ # authenticated user.
2074
+ # @param [String] send_as_email
2075
+ # The send-as alias to be updated.
2076
+ # @param [Google::Apis::GmailV1::SendAs] send_as_object
2077
+ # @param [String] fields
2078
+ # Selector specifying which fields to include in a partial response.
2079
+ # @param [String] quota_user
2080
+ # Available to use for quota purposes for server-side applications. Can be any
2081
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2082
+ # Overrides userIp if both are provided.
2083
+ # @param [String] user_ip
2084
+ # IP address of the site where the request originates. Use this if you want to
2085
+ # enforce per-user limits.
2086
+ # @param [Google::Apis::RequestOptions] options
2087
+ # Request-specific options
2088
+ #
2089
+ # @yield [result, err] Result & error if block supplied
2090
+ # @yieldparam result [Google::Apis::GmailV1::SendAs] parsed result object
2091
+ # @yieldparam err [StandardError] error object if request failed
2092
+ #
2093
+ # @return [Google::Apis::GmailV1::SendAs]
2094
+ #
2095
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2096
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2097
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2098
+ 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)
2099
+ command = make_simple_command(:patch, '{userId}/settings/sendAs/{sendAsEmail}', options)
2100
+ command.request_representation = Google::Apis::GmailV1::SendAs::Representation
2101
+ command.request_object = send_as_object
2102
+ command.response_representation = Google::Apis::GmailV1::SendAs::Representation
2103
+ command.response_class = Google::Apis::GmailV1::SendAs
2104
+ command.params['userId'] = user_id unless user_id.nil?
2105
+ command.params['sendAsEmail'] = send_as_email unless send_as_email.nil?
2106
+ command.query['fields'] = fields unless fields.nil?
2107
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2108
+ command.query['userIp'] = user_ip unless user_ip.nil?
2109
+ execute_or_queue_command(command, &block)
2110
+ end
2111
+
2112
+ # Updates a send-as alias. If a signature is provided, Gmail will sanitize the
2113
+ # HTML before saving it with the alias.
2114
+ # Addresses other than the primary address for the account can only be updated
2115
+ # by service account clients that have been delegated domain-wide authority.
2116
+ # @param [String] user_id
2117
+ # User's email address. The special value "me" can be used to indicate the
2118
+ # authenticated user.
2119
+ # @param [String] send_as_email
2120
+ # The send-as alias to be updated.
2121
+ # @param [Google::Apis::GmailV1::SendAs] send_as_object
2122
+ # @param [String] fields
2123
+ # Selector specifying which fields to include in a partial response.
2124
+ # @param [String] quota_user
2125
+ # Available to use for quota purposes for server-side applications. Can be any
2126
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2127
+ # Overrides userIp if both are provided.
2128
+ # @param [String] user_ip
2129
+ # IP address of the site where the request originates. Use this if you want to
2130
+ # enforce per-user limits.
2131
+ # @param [Google::Apis::RequestOptions] options
2132
+ # Request-specific options
2133
+ #
2134
+ # @yield [result, err] Result & error if block supplied
2135
+ # @yieldparam result [Google::Apis::GmailV1::SendAs] parsed result object
2136
+ # @yieldparam err [StandardError] error object if request failed
2137
+ #
2138
+ # @return [Google::Apis::GmailV1::SendAs]
2139
+ #
2140
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2141
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2142
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2143
+ 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)
2144
+ command = make_simple_command(:put, '{userId}/settings/sendAs/{sendAsEmail}', options)
2145
+ command.request_representation = Google::Apis::GmailV1::SendAs::Representation
2146
+ command.request_object = send_as_object
2147
+ command.response_representation = Google::Apis::GmailV1::SendAs::Representation
2148
+ command.response_class = Google::Apis::GmailV1::SendAs
2149
+ command.params['userId'] = user_id unless user_id.nil?
2150
+ command.params['sendAsEmail'] = send_as_email unless send_as_email.nil?
2151
+ command.query['fields'] = fields unless fields.nil?
2152
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2153
+ command.query['userIp'] = user_ip unless user_ip.nil?
2154
+ execute_or_queue_command(command, &block)
2155
+ end
2156
+
2157
+ # Sends a verification email to the specified send-as alias address. The
2158
+ # verification status must be pending.
2159
+ # This method is only available to service account clients that have been
2160
+ # delegated domain-wide authority.
2161
+ # @param [String] user_id
2162
+ # User's email address. The special value "me" can be used to indicate the
2163
+ # authenticated user.
2164
+ # @param [String] send_as_email
2165
+ # The send-as alias to be verified.
2166
+ # @param [String] fields
2167
+ # Selector specifying which fields to include in a partial response.
2168
+ # @param [String] quota_user
2169
+ # Available to use for quota purposes for server-side applications. Can be any
2170
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2171
+ # Overrides userIp if both are provided.
2172
+ # @param [String] user_ip
2173
+ # IP address of the site where the request originates. Use this if you want to
2174
+ # enforce per-user limits.
2175
+ # @param [Google::Apis::RequestOptions] options
2176
+ # Request-specific options
2177
+ #
2178
+ # @yield [result, err] Result & error if block supplied
2179
+ # @yieldparam result [NilClass] No result returned for this method
2180
+ # @yieldparam err [StandardError] error object if request failed
2181
+ #
2182
+ # @return [void]
2183
+ #
2184
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2185
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2186
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2187
+ def verify_user_setting_send_as(user_id, send_as_email, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2188
+ command = make_simple_command(:post, '{userId}/settings/sendAs/{sendAsEmail}/verify', options)
2189
+ command.params['userId'] = user_id unless user_id.nil?
2190
+ command.params['sendAsEmail'] = send_as_email unless send_as_email.nil?
2191
+ command.query['fields'] = fields unless fields.nil?
2192
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2193
+ command.query['userIp'] = user_ip unless user_ip.nil?
2194
+ execute_or_queue_command(command, &block)
2195
+ end
2196
+
2197
+ # Deletes the specified S/MIME config for the specified send-as alias.
2198
+ # @param [String] user_id
2199
+ # The user's email address. The special value me can be used to indicate the
2200
+ # authenticated user.
2201
+ # @param [String] send_as_email
2202
+ # The email address that appears in the "From:" header for mail sent using this
2203
+ # alias.
2204
+ # @param [String] id
2205
+ # The immutable ID for the SmimeInfo.
2206
+ # @param [String] fields
2207
+ # Selector specifying which fields to include in a partial response.
2208
+ # @param [String] quota_user
2209
+ # Available to use for quota purposes for server-side applications. Can be any
2210
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2211
+ # Overrides userIp if both are provided.
2212
+ # @param [String] user_ip
2213
+ # IP address of the site where the request originates. Use this if you want to
2214
+ # enforce per-user limits.
2215
+ # @param [Google::Apis::RequestOptions] options
2216
+ # Request-specific options
2217
+ #
2218
+ # @yield [result, err] Result & error if block supplied
2219
+ # @yieldparam result [NilClass] No result returned for this method
2220
+ # @yieldparam err [StandardError] error object if request failed
2221
+ #
2222
+ # @return [void]
2223
+ #
2224
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2225
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2226
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2227
+ def delete_user_setting_send_a_smime_info(user_id, send_as_email, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2228
+ command = make_simple_command(:delete, '{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id}', options)
2229
+ command.params['userId'] = user_id unless user_id.nil?
2230
+ command.params['sendAsEmail'] = send_as_email unless send_as_email.nil?
2231
+ command.params['id'] = id unless id.nil?
2232
+ command.query['fields'] = fields unless fields.nil?
2233
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2234
+ command.query['userIp'] = user_ip unless user_ip.nil?
2235
+ execute_or_queue_command(command, &block)
2236
+ end
2237
+
2238
+ # Gets the specified S/MIME config for the specified send-as alias.
2239
+ # @param [String] user_id
2240
+ # The user's email address. The special value me can be used to indicate the
2241
+ # authenticated user.
2242
+ # @param [String] send_as_email
2243
+ # The email address that appears in the "From:" header for mail sent using this
2244
+ # alias.
2245
+ # @param [String] id
2246
+ # The immutable ID for the SmimeInfo.
2247
+ # @param [String] fields
2248
+ # Selector specifying which fields to include in a partial response.
2249
+ # @param [String] quota_user
2250
+ # Available to use for quota purposes for server-side applications. Can be any
2251
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2252
+ # Overrides userIp if both are provided.
2253
+ # @param [String] user_ip
2254
+ # IP address of the site where the request originates. Use this if you want to
2255
+ # enforce per-user limits.
2256
+ # @param [Google::Apis::RequestOptions] options
2257
+ # Request-specific options
2258
+ #
2259
+ # @yield [result, err] Result & error if block supplied
2260
+ # @yieldparam result [Google::Apis::GmailV1::SmimeInfo] parsed result object
2261
+ # @yieldparam err [StandardError] error object if request failed
2262
+ #
2263
+ # @return [Google::Apis::GmailV1::SmimeInfo]
2264
+ #
2265
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2266
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2267
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2268
+ def get_user_setting_send_a_smime_info(user_id, send_as_email, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2269
+ command = make_simple_command(:get, '{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id}', options)
2270
+ command.response_representation = Google::Apis::GmailV1::SmimeInfo::Representation
2271
+ command.response_class = Google::Apis::GmailV1::SmimeInfo
2272
+ command.params['userId'] = user_id unless user_id.nil?
2273
+ command.params['sendAsEmail'] = send_as_email unless send_as_email.nil?
2274
+ command.params['id'] = id unless id.nil?
2275
+ command.query['fields'] = fields unless fields.nil?
2276
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2277
+ command.query['userIp'] = user_ip unless user_ip.nil?
2278
+ execute_or_queue_command(command, &block)
2279
+ end
2280
+
2281
+ # Insert (upload) the given S/MIME config for the specified send-as alias. Note
2282
+ # that pkcs12 format is required for the key.
2283
+ # @param [String] user_id
2284
+ # The user's email address. The special value me can be used to indicate the
2285
+ # authenticated user.
2286
+ # @param [String] send_as_email
2287
+ # The email address that appears in the "From:" header for mail sent using this
2288
+ # alias.
2289
+ # @param [Google::Apis::GmailV1::SmimeInfo] smime_info_object
2290
+ # @param [String] fields
2291
+ # Selector specifying which fields to include in a partial response.
2292
+ # @param [String] quota_user
2293
+ # Available to use for quota purposes for server-side applications. Can be any
2294
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2295
+ # Overrides userIp if both are provided.
2296
+ # @param [String] user_ip
2297
+ # IP address of the site where the request originates. Use this if you want to
2298
+ # enforce per-user limits.
2299
+ # @param [Google::Apis::RequestOptions] options
2300
+ # Request-specific options
2301
+ #
2302
+ # @yield [result, err] Result & error if block supplied
2303
+ # @yieldparam result [Google::Apis::GmailV1::SmimeInfo] parsed result object
2304
+ # @yieldparam err [StandardError] error object if request failed
2305
+ #
2306
+ # @return [Google::Apis::GmailV1::SmimeInfo]
2307
+ #
2308
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2309
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2310
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2311
+ def insert_user_setting_send_a_smime_info(user_id, send_as_email, smime_info_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2312
+ command = make_simple_command(:post, '{userId}/settings/sendAs/{sendAsEmail}/smimeInfo', options)
2313
+ command.request_representation = Google::Apis::GmailV1::SmimeInfo::Representation
2314
+ command.request_object = smime_info_object
2315
+ command.response_representation = Google::Apis::GmailV1::SmimeInfo::Representation
2316
+ command.response_class = Google::Apis::GmailV1::SmimeInfo
2317
+ command.params['userId'] = user_id unless user_id.nil?
2318
+ command.params['sendAsEmail'] = send_as_email unless send_as_email.nil?
2319
+ command.query['fields'] = fields unless fields.nil?
2320
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2321
+ command.query['userIp'] = user_ip unless user_ip.nil?
2322
+ execute_or_queue_command(command, &block)
2323
+ end
2324
+
2325
+ # Lists S/MIME configs for the specified send-as alias.
2326
+ # @param [String] user_id
2327
+ # The user's email address. The special value me can be used to indicate the
2328
+ # authenticated user.
2329
+ # @param [String] send_as_email
2330
+ # The email address that appears in the "From:" header for mail sent using this
2331
+ # alias.
2332
+ # @param [String] fields
2333
+ # Selector specifying which fields to include in a partial response.
2334
+ # @param [String] quota_user
2335
+ # Available to use for quota purposes for server-side applications. Can be any
2336
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2337
+ # Overrides userIp if both are provided.
2338
+ # @param [String] user_ip
2339
+ # IP address of the site where the request originates. Use this if you want to
2340
+ # enforce per-user limits.
2341
+ # @param [Google::Apis::RequestOptions] options
2342
+ # Request-specific options
2343
+ #
2344
+ # @yield [result, err] Result & error if block supplied
2345
+ # @yieldparam result [Google::Apis::GmailV1::ListSmimeInfoResponse] parsed result object
2346
+ # @yieldparam err [StandardError] error object if request failed
2347
+ #
2348
+ # @return [Google::Apis::GmailV1::ListSmimeInfoResponse]
2349
+ #
2350
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2351
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2352
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2353
+ def list_user_setting_send_a_smime_infos(user_id, send_as_email, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2354
+ command = make_simple_command(:get, '{userId}/settings/sendAs/{sendAsEmail}/smimeInfo', options)
2355
+ command.response_representation = Google::Apis::GmailV1::ListSmimeInfoResponse::Representation
2356
+ command.response_class = Google::Apis::GmailV1::ListSmimeInfoResponse
2357
+ command.params['userId'] = user_id unless user_id.nil?
2358
+ command.params['sendAsEmail'] = send_as_email unless send_as_email.nil?
2359
+ command.query['fields'] = fields unless fields.nil?
2360
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2361
+ command.query['userIp'] = user_ip unless user_ip.nil?
2362
+ execute_or_queue_command(command, &block)
2363
+ end
2364
+
2365
+ # Sets the default S/MIME config for the specified send-as alias.
2366
+ # @param [String] user_id
2367
+ # The user's email address. The special value me can be used to indicate the
2368
+ # authenticated user.
2369
+ # @param [String] send_as_email
2370
+ # The email address that appears in the "From:" header for mail sent using this
2371
+ # alias.
2372
+ # @param [String] id
2373
+ # The immutable ID for the SmimeInfo.
2374
+ # @param [String] fields
2375
+ # Selector specifying which fields to include in a partial response.
2376
+ # @param [String] quota_user
2377
+ # Available to use for quota purposes for server-side applications. Can be any
2378
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2379
+ # Overrides userIp if both are provided.
2380
+ # @param [String] user_ip
2381
+ # IP address of the site where the request originates. Use this if you want to
2382
+ # enforce per-user limits.
2383
+ # @param [Google::Apis::RequestOptions] options
2384
+ # Request-specific options
2385
+ #
2386
+ # @yield [result, err] Result & error if block supplied
2387
+ # @yieldparam result [NilClass] No result returned for this method
2388
+ # @yieldparam err [StandardError] error object if request failed
2389
+ #
2390
+ # @return [void]
2391
+ #
2392
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2393
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2394
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2395
+ def set_user_setting_send_a_smime_info_default(user_id, send_as_email, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2396
+ command = make_simple_command(:post, '{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id}/setDefault', options)
2397
+ command.params['userId'] = user_id unless user_id.nil?
2398
+ command.params['sendAsEmail'] = send_as_email unless send_as_email.nil?
2399
+ command.params['id'] = id unless id.nil?
2400
+ command.query['fields'] = fields unless fields.nil?
2401
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2402
+ command.query['userIp'] = user_ip unless user_ip.nil?
2403
+ execute_or_queue_command(command, &block)
2404
+ end
2405
+
2406
+ # Immediately and permanently deletes the specified thread. This operation
2407
+ # cannot be undone. Prefer threads.trash instead.
2408
+ # @param [String] user_id
2409
+ # The user's email address. The special value me can be used to indicate the
2410
+ # authenticated user.
2411
+ # @param [String] id
2412
+ # ID of the Thread to delete.
2413
+ # @param [String] fields
2414
+ # Selector specifying which fields to include in a partial response.
2415
+ # @param [String] quota_user
2416
+ # Available to use for quota purposes for server-side applications. Can be any
2417
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2418
+ # Overrides userIp if both are provided.
2419
+ # @param [String] user_ip
2420
+ # IP address of the site where the request originates. Use this if you want to
2421
+ # enforce per-user limits.
2422
+ # @param [Google::Apis::RequestOptions] options
2423
+ # Request-specific options
2424
+ #
2425
+ # @yield [result, err] Result & error if block supplied
2426
+ # @yieldparam result [NilClass] No result returned for this method
2427
+ # @yieldparam err [StandardError] error object if request failed
2428
+ #
2429
+ # @return [void]
2430
+ #
2431
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2432
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2433
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2434
+ def delete_user_thread(user_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2435
+ command = make_simple_command(:delete, '{userId}/threads/{id}', options)
2436
+ command.params['userId'] = user_id unless user_id.nil?
2437
+ command.params['id'] = id unless id.nil?
2438
+ command.query['fields'] = fields unless fields.nil?
2439
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2440
+ command.query['userIp'] = user_ip unless user_ip.nil?
2441
+ execute_or_queue_command(command, &block)
2442
+ end
2443
+
2444
+ # Gets the specified thread.
2445
+ # @param [String] user_id
2446
+ # The user's email address. The special value me can be used to indicate the
2447
+ # authenticated user.
2448
+ # @param [String] id
2449
+ # The ID of the thread to retrieve.
2450
+ # @param [String] format
2451
+ # The format to return the messages in.
2452
+ # @param [Array<String>, String] metadata_headers
2453
+ # When given and format is METADATA, only include headers specified.
2454
+ # @param [String] fields
2455
+ # Selector specifying which fields to include in a partial response.
2456
+ # @param [String] quota_user
2457
+ # Available to use for quota purposes for server-side applications. Can be any
2458
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2459
+ # Overrides userIp if both are provided.
2460
+ # @param [String] user_ip
2461
+ # IP address of the site where the request originates. Use this if you want to
2462
+ # enforce per-user limits.
2463
+ # @param [Google::Apis::RequestOptions] options
2464
+ # Request-specific options
2465
+ #
2466
+ # @yield [result, err] Result & error if block supplied
2467
+ # @yieldparam result [Google::Apis::GmailV1::Thread] parsed result object
2468
+ # @yieldparam err [StandardError] error object if request failed
2469
+ #
2470
+ # @return [Google::Apis::GmailV1::Thread]
2471
+ #
2472
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2473
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2474
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2475
+ def get_user_thread(user_id, id, format: nil, metadata_headers: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2476
+ command = make_simple_command(:get, '{userId}/threads/{id}', options)
2477
+ command.response_representation = Google::Apis::GmailV1::Thread::Representation
2478
+ command.response_class = Google::Apis::GmailV1::Thread
2479
+ command.params['userId'] = user_id unless user_id.nil?
2480
+ command.params['id'] = id unless id.nil?
2481
+ command.query['format'] = format unless format.nil?
2482
+ command.query['metadataHeaders'] = metadata_headers unless metadata_headers.nil?
2483
+ command.query['fields'] = fields unless fields.nil?
2484
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2485
+ command.query['userIp'] = user_ip unless user_ip.nil?
2486
+ execute_or_queue_command(command, &block)
2487
+ end
2488
+
2489
+ # Lists the threads in the user's mailbox.
2490
+ # @param [String] user_id
2491
+ # The user's email address. The special value me can be used to indicate the
2492
+ # authenticated user.
2493
+ # @param [Boolean] include_spam_trash
2494
+ # Include threads from SPAM and TRASH in the results.
2495
+ # @param [Array<String>, String] label_ids
2496
+ # Only return threads with labels that match all of the specified label IDs.
2497
+ # @param [Fixnum] max_results
2498
+ # Maximum number of threads to return.
2499
+ # @param [String] page_token
2500
+ # Page token to retrieve a specific page of results in the list.
2501
+ # @param [String] q
2502
+ # Only return threads matching the specified query. Supports the same query
2503
+ # format as the Gmail search box. For example, "from:someuser@example.com
2504
+ # rfc822msgid: is:unread". Parameter cannot be used when accessing the api using
2505
+ # the gmail.metadata scope.
1343
2506
  # @param [String] fields
1344
2507
  # Selector specifying which fields to include in a partial response.
1345
2508
  # @param [String] quota_user