google-api-client 0.8.7 → 0.9.pre1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (397) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +20 -0
  3. data/.rspec +2 -0
  4. data/.rubocop.yml +7 -0
  5. data/.rubocop_todo.yml +63 -0
  6. data/.travis.yml +21 -0
  7. data/.yardopts +12 -0
  8. data/CHANGELOG.md +6 -3
  9. data/CONTRIBUTING.md +31 -0
  10. data/Gemfile +28 -2
  11. data/MIGRATING.md +171 -0
  12. data/README.md +158 -150
  13. data/Rakefile +1 -40
  14. data/api_names.yaml +872 -0
  15. data/api_names_out.yaml +20843 -0
  16. data/bin/generate-api +93 -0
  17. data/generated/google/apis/adexchangebuyer_v1_3.rb +35 -0
  18. data/generated/google/apis/adexchangebuyer_v1_3/classes.rb +1124 -0
  19. data/generated/google/apis/adexchangebuyer_v1_3/representations.rb +375 -0
  20. data/generated/google/apis/adexchangebuyer_v1_3/service.rb +893 -0
  21. data/generated/google/apis/adexchangeseller_v2_0.rb +38 -0
  22. data/generated/google/apis/adexchangeseller_v2_0/classes.rb +792 -0
  23. data/generated/google/apis/adexchangeseller_v2_0/representations.rb +309 -0
  24. data/generated/google/apis/adexchangeseller_v2_0/service.rb +682 -0
  25. data/generated/google/apis/admin_directory_v1.rb +89 -0
  26. data/generated/google/apis/admin_directory_v1/classes.rb +2389 -0
  27. data/generated/google/apis/admin_directory_v1/representations.rb +780 -0
  28. data/generated/google/apis/admin_directory_v1/service.rb +2805 -0
  29. data/generated/google/apis/admin_reports_v1.rb +38 -0
  30. data/generated/google/apis/admin_reports_v1/classes.rb +582 -0
  31. data/generated/google/apis/admin_reports_v1/representations.rb +231 -0
  32. data/generated/google/apis/admin_reports_v1/service.rb +341 -0
  33. data/generated/google/apis/adsense_v1_4.rb +38 -0
  34. data/generated/google/apis/adsense_v1_4/classes.rb +1279 -0
  35. data/generated/google/apis/adsense_v1_4/representations.rb +493 -0
  36. data/generated/google/apis/adsense_v1_4/service.rb +1752 -0
  37. data/generated/google/apis/adsensehost_v4_1.rb +35 -0
  38. data/generated/google/apis/adsensehost_v4_1/classes.rb +834 -0
  39. data/generated/google/apis/adsensehost_v4_1/representations.rb +327 -0
  40. data/generated/google/apis/adsensehost_v4_1/service.rb +1190 -0
  41. data/generated/google/apis/analytics_v3.rb +49 -0
  42. data/generated/google/apis/analytics_v3/classes.rb +5113 -0
  43. data/generated/google/apis/analytics_v3/representations.rb +1661 -0
  44. data/generated/google/apis/analytics_v3/service.rb +3600 -0
  45. data/generated/google/apis/androidenterprise_v1.rb +34 -0
  46. data/generated/google/apis/androidenterprise_v1/classes.rb +1162 -0
  47. data/generated/google/apis/androidenterprise_v1/representations.rb +431 -0
  48. data/generated/google/apis/androidenterprise_v1/service.rb +1979 -0
  49. data/generated/google/apis/androidpublisher_v2.rb +34 -0
  50. data/generated/google/apis/androidpublisher_v2/classes.rb +1374 -0
  51. data/generated/google/apis/androidpublisher_v2/representations.rb +630 -0
  52. data/generated/google/apis/androidpublisher_v2/service.rb +2390 -0
  53. data/generated/google/apis/appsactivity_v1.rb +46 -0
  54. data/generated/google/apis/appsactivity_v1/classes.rb +392 -0
  55. data/generated/google/apis/appsactivity_v1/representations.rb +184 -0
  56. data/generated/google/apis/appsactivity_v1/service.rb +129 -0
  57. data/generated/google/apis/appstate_v1.rb +34 -0
  58. data/generated/google/apis/appstate_v1/classes.rb +154 -0
  59. data/generated/google/apis/appstate_v1/representations.rb +79 -0
  60. data/generated/google/apis/appstate_v1/service.rb +265 -0
  61. data/generated/google/apis/autoscaler_v1beta2.rb +38 -0
  62. data/generated/google/apis/autoscaler_v1beta2/classes.rb +747 -0
  63. data/generated/google/apis/autoscaler_v1beta2/representations.rb +281 -0
  64. data/generated/google/apis/autoscaler_v1beta2/service.rb +488 -0
  65. data/generated/google/apis/bigquery_v2.rb +49 -0
  66. data/generated/google/apis/bigquery_v2/classes.rb +2255 -0
  67. data/generated/google/apis/bigquery_v2/representations.rb +754 -0
  68. data/generated/google/apis/bigquery_v2/service.rb +1003 -0
  69. data/generated/google/apis/blogger_v3.rb +37 -0
  70. data/generated/google/apis/blogger_v3/classes.rb +1354 -0
  71. data/generated/google/apis/blogger_v3/representations.rb +562 -0
  72. data/generated/google/apis/blogger_v3/service.rb +1620 -0
  73. data/generated/google/apis/books_v1.rb +34 -0
  74. data/generated/google/apis/books_v1/classes.rb +3515 -0
  75. data/generated/google/apis/books_v1/representations.rb +1361 -0
  76. data/generated/google/apis/books_v1/service.rb +2170 -0
  77. data/generated/google/apis/calendar_v3.rb +37 -0
  78. data/generated/google/apis/calendar_v3/classes.rb +1702 -0
  79. data/generated/google/apis/calendar_v3/representations.rb +566 -0
  80. data/generated/google/apis/calendar_v3/service.rb +1943 -0
  81. data/generated/google/apis/civicinfo_v2.rb +31 -0
  82. data/generated/google/apis/civicinfo_v2/classes.rb +1057 -0
  83. data/generated/google/apis/civicinfo_v2/representations.rb +374 -0
  84. data/generated/google/apis/civicinfo_v2/service.rb +284 -0
  85. data/generated/google/apis/cloudmonitoring_v2beta2.rb +34 -0
  86. data/generated/google/apis/cloudmonitoring_v2beta2/classes.rb +679 -0
  87. data/generated/google/apis/cloudmonitoring_v2beta2/representations.rb +311 -0
  88. data/generated/google/apis/cloudmonitoring_v2beta2/service.rb +458 -0
  89. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +38 -0
  90. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +139 -0
  91. data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +65 -0
  92. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +301 -0
  93. data/generated/google/apis/compute_v1.rb +49 -0
  94. data/generated/google/apis/compute_v1/classes.rb +6391 -0
  95. data/generated/google/apis/compute_v1/representations.rb +2209 -0
  96. data/generated/google/apis/compute_v1/service.rb +6352 -0
  97. data/generated/google/apis/container_v1beta1.rb +35 -0
  98. data/generated/google/apis/container_v1beta1/classes.rb +466 -0
  99. data/generated/google/apis/container_v1beta1/representations.rb +177 -0
  100. data/generated/google/apis/container_v1beta1/service.rb +394 -0
  101. data/generated/google/apis/content_v2.rb +35 -0
  102. data/generated/google/apis/content_v2/classes.rb +3780 -0
  103. data/generated/google/apis/content_v2/representations.rb +1456 -0
  104. data/generated/google/apis/content_v2/service.rb +1706 -0
  105. data/generated/google/apis/coordinate_v1.rb +37 -0
  106. data/generated/google/apis/coordinate_v1/classes.rb +669 -0
  107. data/generated/google/apis/coordinate_v1/representations.rb +285 -0
  108. data/generated/google/apis/coordinate_v1/service.rb +687 -0
  109. data/{lib/google/api_client/auth/compute_service_account.rb → generated/google/apis/customsearch_v1.rb} +13 -10
  110. data/generated/google/apis/customsearch_v1/classes.rb +771 -0
  111. data/generated/google/apis/customsearch_v1/representations.rb +276 -0
  112. data/generated/google/apis/customsearch_v1/service.rb +208 -0
  113. data/generated/google/apis/datastore_v1beta2.rb +40 -0
  114. data/generated/google/apis/datastore_v1beta2/classes.rb +1186 -0
  115. data/generated/google/apis/datastore_v1beta2/representations.rb +526 -0
  116. data/generated/google/apis/datastore_v1beta2/service.rb +300 -0
  117. data/generated/google/apis/deploymentmanager_v2beta2.rb +41 -0
  118. data/generated/google/apis/deploymentmanager_v2beta2/classes.rb +820 -0
  119. data/generated/google/apis/deploymentmanager_v2beta2/representations.rb +303 -0
  120. data/generated/google/apis/deploymentmanager_v2beta2/service.rb +647 -0
  121. data/generated/google/apis/dfareporting_v2_1.rb +37 -0
  122. data/generated/google/apis/dfareporting_v2_1/classes.rb +10755 -0
  123. data/generated/google/apis/dfareporting_v2_1/representations.rb +3438 -0
  124. data/generated/google/apis/dfareporting_v2_1/service.rb +8775 -0
  125. data/generated/google/apis/discovery_v1.rb +32 -0
  126. data/generated/google/apis/discovery_v1/classes.rb +947 -0
  127. data/generated/google/apis/discovery_v1/representations.rb +355 -0
  128. data/generated/google/apis/discovery_v1/service.rb +144 -0
  129. data/generated/google/apis/dns_v1.rb +41 -0
  130. data/generated/google/apis/dns_v1/classes.rb +406 -0
  131. data/generated/google/apis/dns_v1/representations.rb +151 -0
  132. data/generated/google/apis/dns_v1/service.rb +460 -0
  133. data/{spec/google/api_client/request_spec.rb → generated/google/apis/doubleclickbidmanager_v1.rb} +15 -13
  134. data/generated/google/apis/doubleclickbidmanager_v1/classes.rb +709 -0
  135. data/generated/google/apis/doubleclickbidmanager_v1/representations.rb +297 -0
  136. data/generated/google/apis/doubleclickbidmanager_v1/service.rb +349 -0
  137. data/generated/google/apis/doubleclicksearch_v2.rb +35 -0
  138. data/generated/google/apis/doubleclicksearch_v2/classes.rb +947 -0
  139. data/generated/google/apis/doubleclicksearch_v2/representations.rb +315 -0
  140. data/generated/google/apis/doubleclicksearch_v2/service.rb +490 -0
  141. data/generated/google/apis/drive_v2.rb +55 -0
  142. data/generated/google/apis/drive_v2/classes.rb +2519 -0
  143. data/generated/google/apis/drive_v2/representations.rb +781 -0
  144. data/generated/google/apis/drive_v2/service.rb +2685 -0
  145. data/generated/google/apis/fitness_v1.rb +49 -0
  146. data/generated/google/apis/fitness_v1/classes.rb +809 -0
  147. data/generated/google/apis/fitness_v1/representations.rb +295 -0
  148. data/generated/google/apis/fitness_v1/service.rb +684 -0
  149. data/generated/google/apis/fusiontables_v2.rb +37 -0
  150. data/generated/google/apis/fusiontables_v2/classes.rb +1048 -0
  151. data/generated/google/apis/fusiontables_v2/representations.rb +409 -0
  152. data/generated/google/apis/fusiontables_v2/service.rb +1496 -0
  153. data/generated/google/apis/games_configuration_v1configuration.rb +34 -0
  154. data/generated/google/apis/games_configuration_v1configuration/classes.rb +506 -0
  155. data/generated/google/apis/games_configuration_v1configuration/representations.rb +206 -0
  156. data/generated/google/apis/games_configuration_v1configuration/service.rb +578 -0
  157. data/generated/google/apis/games_v1.rb +40 -0
  158. data/generated/google/apis/games_v1/classes.rb +4578 -0
  159. data/generated/google/apis/games_v1/representations.rb +1570 -0
  160. data/generated/google/apis/games_v1/service.rb +2306 -0
  161. data/generated/google/apis/gan_v1beta1.rb +31 -0
  162. data/generated/google/apis/gan_v1beta1/classes.rb +1428 -0
  163. data/generated/google/apis/gan_v1beta1/representations.rb +428 -0
  164. data/generated/google/apis/gan_v1beta1/service.rb +692 -0
  165. data/generated/google/apis/genomics_v1beta2.rb +46 -0
  166. data/generated/google/apis/genomics_v1beta2/classes.rb +3288 -0
  167. data/generated/google/apis/genomics_v1beta2/representations.rb +1194 -0
  168. data/generated/google/apis/genomics_v1beta2/service.rb +2356 -0
  169. data/generated/google/apis/gmail_v1.rb +49 -0
  170. data/generated/google/apis/gmail_v1/classes.rb +794 -0
  171. data/generated/google/apis/gmail_v1/representations.rb +339 -0
  172. data/generated/google/apis/gmail_v1/service.rb +1502 -0
  173. data/generated/google/apis/groupsmigration_v1.rb +34 -0
  174. data/generated/google/apis/groupsmigration_v1/classes.rb +51 -0
  175. data/generated/google/apis/groupsmigration_v1/representations.rb +38 -0
  176. data/generated/google/apis/groupsmigration_v1/service.rb +111 -0
  177. data/generated/google/apis/groupssettings_v1.rb +34 -0
  178. data/generated/google/apis/groupssettings_v1/classes.rb +221 -0
  179. data/generated/google/apis/groupssettings_v1/representations.rb +64 -0
  180. data/generated/google/apis/groupssettings_v1/service.rb +179 -0
  181. data/generated/google/apis/identitytoolkit_v3.rb +31 -0
  182. data/generated/google/apis/identitytoolkit_v3/classes.rb +1229 -0
  183. data/generated/google/apis/identitytoolkit_v3/representations.rb +422 -0
  184. data/generated/google/apis/identitytoolkit_v3/service.rb +491 -0
  185. data/generated/google/apis/licensing_v1.rb +34 -0
  186. data/generated/google/apis/licensing_v1/classes.rb +132 -0
  187. data/generated/google/apis/licensing_v1/representations.rb +68 -0
  188. data/generated/google/apis/licensing_v1/service.rb +376 -0
  189. data/generated/google/apis/logging_v1beta3.rb +35 -0
  190. data/generated/google/apis/logging_v1beta3/classes.rb +505 -0
  191. data/generated/google/apis/logging_v1beta3/representations.rb +222 -0
  192. data/generated/google/apis/logging_v1beta3/service.rb +670 -0
  193. data/generated/google/apis/manager_v1beta2.rb +50 -0
  194. data/generated/google/apis/manager_v1beta2/classes.rb +1287 -0
  195. data/generated/google/apis/manager_v1beta2/representations.rb +536 -0
  196. data/generated/google/apis/manager_v1beta2/service.rb +380 -0
  197. data/generated/google/apis/mapsengine_v1.rb +38 -0
  198. data/generated/google/apis/mapsengine_v1/classes.rb +2873 -0
  199. data/generated/google/apis/mapsengine_v1/representations.rb +1235 -0
  200. data/generated/google/apis/mapsengine_v1/service.rb +3465 -0
  201. data/generated/google/apis/mirror_v1.rb +37 -0
  202. data/generated/google/apis/mirror_v1/classes.rb +1072 -0
  203. data/generated/google/apis/mirror_v1/representations.rb +350 -0
  204. data/generated/google/apis/mirror_v1/service.rb +1001 -0
  205. data/generated/google/apis/oauth2_v2.rb +43 -0
  206. data/generated/google/apis/oauth2_v2/classes.rb +245 -0
  207. data/generated/google/apis/oauth2_v2/representations.rb +94 -0
  208. data/generated/google/apis/oauth2_v2/service.rb +203 -0
  209. data/generated/google/apis/pagespeedonline_v2.rb +32 -0
  210. data/generated/google/apis/pagespeedonline_v2/classes.rb +614 -0
  211. data/generated/google/apis/pagespeedonline_v2/representations.rb +244 -0
  212. data/generated/google/apis/pagespeedonline_v2/service.rb +120 -0
  213. data/generated/google/apis/plus_domains_v1.rb +61 -0
  214. data/generated/google/apis/plus_domains_v1/classes.rb +2402 -0
  215. data/generated/google/apis/plus_domains_v1/representations.rb +873 -0
  216. data/generated/google/apis/plus_domains_v1/service.rb +924 -0
  217. data/generated/google/apis/plus_v1.rb +43 -0
  218. data/generated/google/apis/plus_v1/classes.rb +2384 -0
  219. data/generated/google/apis/plus_v1/representations.rb +812 -0
  220. data/generated/google/apis/plus_v1/service.rb +616 -0
  221. data/generated/google/apis/prediction_v1_6.rb +44 -0
  222. data/generated/google/apis/prediction_v1_6/classes.rb +751 -0
  223. data/generated/google/apis/prediction_v1_6/representations.rb +327 -0
  224. data/generated/google/apis/prediction_v1_6/service.rb +388 -0
  225. data/generated/google/apis/pubsub_v1beta2.rb +37 -0
  226. data/generated/google/apis/pubsub_v1beta2/classes.rb +824 -0
  227. data/generated/google/apis/pubsub_v1beta2/representations.rb +366 -0
  228. data/generated/google/apis/pubsub_v1beta2/service.rb +778 -0
  229. data/generated/google/apis/qpx_express_v1.rb +31 -0
  230. data/generated/google/apis/qpx_express_v1/classes.rb +1268 -0
  231. data/generated/google/apis/qpx_express_v1/representations.rb +424 -0
  232. data/generated/google/apis/qpx_express_v1/service.rb +101 -0
  233. data/generated/google/apis/replicapool_v1beta2.rb +41 -0
  234. data/generated/google/apis/replicapool_v1beta2/classes.rb +621 -0
  235. data/generated/google/apis/replicapool_v1beta2/representations.rb +235 -0
  236. data/generated/google/apis/replicapool_v1beta2/service.rb +620 -0
  237. data/generated/google/apis/replicapoolupdater_v1beta1.rb +41 -0
  238. data/generated/google/apis/replicapoolupdater_v1beta1/classes.rb +682 -0
  239. data/generated/google/apis/replicapoolupdater_v1beta1/representations.rb +247 -0
  240. data/generated/google/apis/replicapoolupdater_v1beta1/service.rb +472 -0
  241. data/generated/google/apis/reseller_v1.rb +37 -0
  242. data/generated/google/apis/reseller_v1/classes.rb +502 -0
  243. data/generated/google/apis/reseller_v1/representations.rb +199 -0
  244. data/generated/google/apis/reseller_v1/service.rb +637 -0
  245. data/generated/google/apis/resourceviews_v1beta2.rb +47 -0
  246. data/generated/google/apis/resourceviews_v1beta2/classes.rb +660 -0
  247. data/generated/google/apis/resourceviews_v1beta2/representations.rb +269 -0
  248. data/generated/google/apis/resourceviews_v1beta2/service.rb +574 -0
  249. data/generated/google/apis/site_verification_v1.rb +37 -0
  250. data/generated/google/apis/site_verification_v1/classes.rb +185 -0
  251. data/generated/google/apis/site_verification_v1/representations.rb +101 -0
  252. data/generated/google/apis/site_verification_v1/service.rb +322 -0
  253. data/generated/google/apis/sqladmin_v1beta4.rb +37 -0
  254. data/generated/google/apis/sqladmin_v1beta4/classes.rb +1817 -0
  255. data/generated/google/apis/sqladmin_v1beta4/representations.rb +688 -0
  256. data/generated/google/apis/sqladmin_v1beta4/service.rb +1534 -0
  257. data/generated/google/apis/storage_v1.rb +43 -0
  258. data/generated/google/apis/storage_v1/classes.rb +1177 -0
  259. data/generated/google/apis/storage_v1/representations.rb +427 -0
  260. data/generated/google/apis/storage_v1/service.rb +1920 -0
  261. data/generated/google/apis/tagmanager_v1.rb +52 -0
  262. data/generated/google/apis/tagmanager_v1/classes.rb +1226 -0
  263. data/generated/google/apis/tagmanager_v1/representations.rb +461 -0
  264. data/generated/google/apis/tagmanager_v1/service.rb +1978 -0
  265. data/generated/google/apis/taskqueue_v1beta2.rb +37 -0
  266. data/generated/google/apis/taskqueue_v1beta2/classes.rb +254 -0
  267. data/generated/google/apis/taskqueue_v1beta2/representations.rb +114 -0
  268. data/generated/google/apis/taskqueue_v1beta2/service.rb +416 -0
  269. data/generated/google/apis/tasks_v1.rb +37 -0
  270. data/generated/google/apis/tasks_v1/classes.rb +296 -0
  271. data/generated/google/apis/tasks_v1/representations.rb +115 -0
  272. data/generated/google/apis/tasks_v1/service.rb +657 -0
  273. data/generated/google/apis/translate_v2.rb +31 -0
  274. data/generated/google/apis/translate_v2/classes.rb +168 -0
  275. data/generated/google/apis/translate_v2/representations.rb +109 -0
  276. data/generated/google/apis/translate_v2/service.rb +185 -0
  277. data/generated/google/apis/urlshortener_v1.rb +34 -0
  278. data/generated/google/apis/urlshortener_v1/classes.rb +246 -0
  279. data/generated/google/apis/urlshortener_v1/representations.rb +111 -0
  280. data/generated/google/apis/urlshortener_v1/service.rb +179 -0
  281. data/generated/google/apis/webmasters_v3.rb +37 -0
  282. data/generated/google/apis/webmasters_v3/classes.rb +563 -0
  283. data/generated/google/apis/webmasters_v3/representations.rb +250 -0
  284. data/generated/google/apis/webmasters_v3/service.rb +587 -0
  285. data/generated/google/apis/youtube_analytics_v1.rb +46 -0
  286. data/generated/google/apis/youtube_analytics_v1/classes.rb +540 -0
  287. data/generated/google/apis/youtube_analytics_v1/representations.rb +242 -0
  288. data/generated/google/apis/youtube_analytics_v1/service.rb +567 -0
  289. data/generated/google/apis/youtube_v3.rb +49 -0
  290. data/generated/google/apis/youtube_v3/classes.rb +7225 -0
  291. data/generated/google/apis/youtube_v3/representations.rb +2529 -0
  292. data/generated/google/apis/youtube_v3/service.rb +4051 -0
  293. data/google-api-client.gemspec +27 -39
  294. data/lib/google/api_client/auth/storage.rb +3 -2
  295. data/lib/google/api_client/auth/storages/file_store.rb +1 -3
  296. data/lib/google/api_client/auth/storages/redis_store.rb +6 -2
  297. data/lib/google/apis.rb +48 -0
  298. data/lib/google/apis/core/api_command.rb +128 -0
  299. data/lib/google/apis/core/base_service.rb +314 -0
  300. data/lib/google/apis/core/batch.rb +222 -0
  301. data/lib/google/apis/core/download.rb +94 -0
  302. data/lib/google/apis/core/hashable.rb +44 -0
  303. data/lib/google/apis/core/http_command.rb +275 -0
  304. data/lib/google/apis/core/json_representation.rb +122 -0
  305. data/lib/google/{api_client/version.rb → apis/core/logging.rb} +12 -8
  306. data/lib/google/apis/core/multipart.rb +173 -0
  307. data/lib/google/apis/core/upload.rb +275 -0
  308. data/lib/google/{api_client → apis}/errors.rb +32 -28
  309. data/lib/google/apis/generator.rb +70 -0
  310. data/lib/google/apis/generator/annotator.rb +271 -0
  311. data/lib/google/apis/generator/helpers.rb +74 -0
  312. data/lib/google/apis/generator/model.rb +130 -0
  313. data/lib/google/apis/generator/template.rb +124 -0
  314. data/lib/google/apis/generator/templates/_class.tmpl +40 -0
  315. data/lib/google/apis/generator/templates/_method.tmpl +90 -0
  316. data/lib/google/apis/generator/templates/_representation.tmpl +51 -0
  317. data/lib/google/apis/generator/templates/_representation_stub.tmpl +15 -0
  318. data/lib/google/apis/generator/templates/_representation_type.tmpl +10 -0
  319. data/lib/google/{api_client/reference.rb → apis/generator/templates/classes.rb.tmpl} +11 -9
  320. data/lib/google/apis/generator/templates/module.rb.tmpl +40 -0
  321. data/lib/google/apis/generator/templates/representations.rb.tmpl +32 -0
  322. data/lib/google/apis/generator/templates/service.rb.tmpl +60 -0
  323. data/lib/google/apis/options.rb +79 -0
  324. data/lib/google/apis/version.rb +39 -0
  325. data/rakelib/metrics.rake +22 -0
  326. data/rakelib/rubocop.rake +10 -0
  327. data/rakelib/spec.rake +11 -0
  328. data/rakelib/yard.rake +11 -0
  329. data/samples/calendar/calendar.rb +43 -0
  330. data/samples/drive/drive.rb +40 -0
  331. data/samples/pubsub/pubsub.rb +52 -0
  332. data/{lib/google/api_client/discovery.rb → samples/translate/translate.rb} +14 -5
  333. data/script/generate +79 -0
  334. data/script/package +8 -0
  335. data/script/release +15 -0
  336. data/spec/fixtures/files/api_names.yaml +3 -0
  337. data/spec/fixtures/files/auth_stored_credentials.json +8 -0
  338. data/spec/fixtures/files/client_secrets.json +1 -0
  339. data/spec/fixtures/files/test.blah +1 -0
  340. data/spec/fixtures/files/test.txt +1 -0
  341. data/spec/fixtures/files/test_api.json +440 -0
  342. data/spec/google/api_client/auth/storage_spec.rb +1 -3
  343. data/spec/google/api_client/auth/storages/file_store_spec.rb +1 -2
  344. data/spec/google/api_client/auth/storages/redis_store_spec.rb +1 -3
  345. data/spec/google/apis/core/api_command_spec.rb +170 -0
  346. data/spec/google/apis/core/batch_spec.rb +128 -0
  347. data/spec/google/apis/core/download_spec.rb +90 -0
  348. data/spec/google/apis/core/hashable_spec.rb +60 -0
  349. data/spec/google/apis/core/http_command_spec.rb +238 -0
  350. data/spec/google/apis/core/json_representation_spec.rb +192 -0
  351. data/spec/google/apis/core/service_spec.rb +247 -0
  352. data/spec/google/apis/core/upload_spec.rb +238 -0
  353. data/{lib/google/api_client/service_account.rb → spec/google/apis/generated_spec.rb} +14 -8
  354. data/spec/google/apis/generator/generator_spec.rb +272 -0
  355. data/spec/google/apis/logging_spec.rb +45 -0
  356. data/spec/google/apis/options_spec.rb +40 -0
  357. data/spec/integration_tests/drive_spec.rb +35 -0
  358. data/spec/integration_tests/pubsub_spec.rb +48 -0
  359. data/spec/integration_tests/url_shortener_spec.rb +31 -0
  360. data/spec/spec_helper.rb +102 -46
  361. metadata +433 -178
  362. data/lib/compat/multi_json.rb +0 -19
  363. data/lib/google/api_client.rb +0 -750
  364. data/lib/google/api_client/auth/file_storage.rb +0 -59
  365. data/lib/google/api_client/auth/jwt_asserter.rb +0 -126
  366. data/lib/google/api_client/auth/key_utils.rb +0 -93
  367. data/lib/google/api_client/auth/pkcs12.rb +0 -41
  368. data/lib/google/api_client/batch.rb +0 -326
  369. data/lib/google/api_client/charset.rb +0 -33
  370. data/lib/google/api_client/discovery/api.rb +0 -310
  371. data/lib/google/api_client/discovery/media.rb +0 -77
  372. data/lib/google/api_client/discovery/method.rb +0 -363
  373. data/lib/google/api_client/discovery/resource.rb +0 -156
  374. data/lib/google/api_client/discovery/schema.rb +0 -117
  375. data/lib/google/api_client/environment.rb +0 -42
  376. data/lib/google/api_client/gzip.rb +0 -28
  377. data/lib/google/api_client/logging.rb +0 -32
  378. data/lib/google/api_client/media.rb +0 -259
  379. data/lib/google/api_client/railtie.rb +0 -18
  380. data/lib/google/api_client/request.rb +0 -350
  381. data/lib/google/api_client/result.rb +0 -255
  382. data/lib/google/api_client/service.rb +0 -233
  383. data/lib/google/api_client/service/batch.rb +0 -110
  384. data/lib/google/api_client/service/request.rb +0 -144
  385. data/lib/google/api_client/service/resource.rb +0 -40
  386. data/lib/google/api_client/service/result.rb +0 -162
  387. data/lib/google/api_client/service/simple_file_store.rb +0 -151
  388. data/lib/google/api_client/service/stub_generator.rb +0 -61
  389. data/spec/google/api_client/batch_spec.rb +0 -248
  390. data/spec/google/api_client/discovery_spec.rb +0 -708
  391. data/spec/google/api_client/gzip_spec.rb +0 -98
  392. data/spec/google/api_client/media_spec.rb +0 -178
  393. data/spec/google/api_client/result_spec.rb +0 -207
  394. data/spec/google/api_client/service_account_spec.rb +0 -169
  395. data/spec/google/api_client/service_spec.rb +0 -618
  396. data/spec/google/api_client/simple_file_store_spec.rb +0 -133
  397. data/spec/google/api_client_spec.rb +0 -352
@@ -0,0 +1,1943 @@
1
+ # Copyright 2015 Google Inc.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'google/apis/core/base_service'
16
+ require 'google/apis/core/json_representation'
17
+ require 'google/apis/core/hashable'
18
+ require 'google/apis/errors'
19
+
20
+ module Google
21
+ module Apis
22
+ module CalendarV3
23
+ # Calendar API
24
+ #
25
+ # Lets you manipulate events and other calendar data.
26
+ #
27
+ # @example
28
+ # require 'google/apis/calendar_v3'
29
+ #
30
+ # Calendar = Google::Apis::CalendarV3 # Alias the module
31
+ # service = Calendar::CalendarService.new
32
+ #
33
+ # @see https://developers.google.com/google-apps/calendar/firstapp
34
+ class CalendarService < Google::Apis::Core::BaseService
35
+ # @return [String]
36
+ # API key. Your API key identifies your project and provides you with API access,
37
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
38
+ attr_accessor :key
39
+
40
+ # @return [String]
41
+ # Available to use for quota purposes for server-side applications. Can be any
42
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
43
+ # Overrides userIp if both are provided.
44
+ attr_accessor :quota_user
45
+
46
+ # @return [String]
47
+ # IP address of the site where the request originates. Use this if you want to
48
+ # enforce per-user limits.
49
+ attr_accessor :user_ip
50
+
51
+ def initialize
52
+ super('https://www.googleapis.com/', 'calendar/v3/')
53
+ end
54
+
55
+ # Deletes an access control rule.
56
+ # @param [String] calendar_id
57
+ # Calendar identifier.
58
+ # @param [String] rule_id
59
+ # ACL rule identifier.
60
+ # @param [String] fields
61
+ # Selector specifying which fields to include in a partial response.
62
+ # @param [String] quota_user
63
+ # Available to use for quota purposes for server-side applications. Can be any
64
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
65
+ # Overrides userIp if both are provided.
66
+ # @param [String] user_ip
67
+ # IP address of the site where the request originates. Use this if you want to
68
+ # enforce per-user limits.
69
+ # @param [Google::Apis::RequestOptions] options
70
+ # Request-specific options
71
+ #
72
+ # @yield [result, err] Result & error if block supplied
73
+ # @yieldparam result [NilClass] No result returned for this method
74
+ # @yieldparam err [StandardError] error object if request failed
75
+ #
76
+ # @return [void]
77
+ #
78
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
79
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
80
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
81
+ def delete_acl(calendar_id, rule_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
82
+ path = 'calendars/{calendarId}/acl/{ruleId}'
83
+ command = make_simple_command(:delete, path, options)
84
+ command.params['calendarId'] = calendar_id unless calendar_id.nil?
85
+ command.params['ruleId'] = rule_id unless rule_id.nil?
86
+ command.query['fields'] = fields unless fields.nil?
87
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
88
+ command.query['userIp'] = user_ip unless user_ip.nil?
89
+ execute_or_queue_command(command, &block)
90
+ end
91
+
92
+ # Returns an access control rule.
93
+ # @param [String] calendar_id
94
+ # Calendar identifier.
95
+ # @param [String] rule_id
96
+ # ACL rule identifier.
97
+ # @param [String] fields
98
+ # Selector specifying which fields to include in a partial response.
99
+ # @param [String] quota_user
100
+ # Available to use for quota purposes for server-side applications. Can be any
101
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
102
+ # Overrides userIp if both are provided.
103
+ # @param [String] user_ip
104
+ # IP address of the site where the request originates. Use this if you want to
105
+ # enforce per-user limits.
106
+ # @param [Google::Apis::RequestOptions] options
107
+ # Request-specific options
108
+ #
109
+ # @yield [result, err] Result & error if block supplied
110
+ # @yieldparam result [Google::Apis::CalendarV3::AclRule] parsed result object
111
+ # @yieldparam err [StandardError] error object if request failed
112
+ #
113
+ # @return [Google::Apis::CalendarV3::AclRule]
114
+ #
115
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
116
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
117
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
118
+ def get_acl(calendar_id, rule_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
119
+ path = 'calendars/{calendarId}/acl/{ruleId}'
120
+ command = make_simple_command(:get, path, options)
121
+ command.response_representation = Google::Apis::CalendarV3::AclRule::Representation
122
+ command.response_class = Google::Apis::CalendarV3::AclRule
123
+ command.params['calendarId'] = calendar_id unless calendar_id.nil?
124
+ command.params['ruleId'] = rule_id unless rule_id.nil?
125
+ command.query['fields'] = fields unless fields.nil?
126
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
127
+ command.query['userIp'] = user_ip unless user_ip.nil?
128
+ execute_or_queue_command(command, &block)
129
+ end
130
+
131
+ # Creates an access control rule.
132
+ # @param [String] calendar_id
133
+ # Calendar identifier.
134
+ # @param [Google::Apis::CalendarV3::AclRule] acl_rule_object
135
+ # @param [String] fields
136
+ # Selector specifying which fields to include in a partial response.
137
+ # @param [String] quota_user
138
+ # Available to use for quota purposes for server-side applications. Can be any
139
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
140
+ # Overrides userIp if both are provided.
141
+ # @param [String] user_ip
142
+ # IP address of the site where the request originates. Use this if you want to
143
+ # enforce per-user limits.
144
+ # @param [Google::Apis::RequestOptions] options
145
+ # Request-specific options
146
+ #
147
+ # @yield [result, err] Result & error if block supplied
148
+ # @yieldparam result [Google::Apis::CalendarV3::AclRule] parsed result object
149
+ # @yieldparam err [StandardError] error object if request failed
150
+ #
151
+ # @return [Google::Apis::CalendarV3::AclRule]
152
+ #
153
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
154
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
155
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
156
+ def insert_acl(calendar_id, acl_rule_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
157
+ path = 'calendars/{calendarId}/acl'
158
+ command = make_simple_command(:post, path, options)
159
+ command.request_representation = Google::Apis::CalendarV3::AclRule::Representation
160
+ command.request_object = acl_rule_object
161
+ command.response_representation = Google::Apis::CalendarV3::AclRule::Representation
162
+ command.response_class = Google::Apis::CalendarV3::AclRule
163
+ command.params['calendarId'] = calendar_id unless calendar_id.nil?
164
+ command.query['fields'] = fields unless fields.nil?
165
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
166
+ command.query['userIp'] = user_ip unless user_ip.nil?
167
+ execute_or_queue_command(command, &block)
168
+ end
169
+
170
+ # Returns the rules in the access control list for the calendar.
171
+ # @param [String] calendar_id
172
+ # Calendar identifier.
173
+ # @param [Fixnum] max_results
174
+ # Maximum number of entries returned on one result page. By default the value is
175
+ # 100 entries. The page size can never be larger than 250 entries. Optional.
176
+ # @param [String] page_token
177
+ # Token specifying which result page to return. Optional.
178
+ # @param [Boolean] show_deleted
179
+ # Whether to include deleted ACLs in the result. Deleted ACLs are represented by
180
+ # role equal to "none". Deleted ACLs will always be included if syncToken is
181
+ # provided. Optional. The default is False.
182
+ # @param [String] sync_token
183
+ # Token obtained from the nextSyncToken field returned on the last page of
184
+ # results from the previous list request. It makes the result of this list
185
+ # request contain only entries that have changed since then. All entries deleted
186
+ # since the previous list request will always be in the result set and it is not
187
+ # allowed to set showDeleted to False.
188
+ # If the syncToken expires, the server will respond with a 410 GONE response
189
+ # code and the client should clear its storage and perform a full
190
+ # synchronization without any syncToken.
191
+ # Learn more about incremental synchronization.
192
+ # Optional. The default is to return all entries.
193
+ # @param [String] fields
194
+ # Selector specifying which fields to include in a partial response.
195
+ # @param [String] quota_user
196
+ # Available to use for quota purposes for server-side applications. Can be any
197
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
198
+ # Overrides userIp if both are provided.
199
+ # @param [String] user_ip
200
+ # IP address of the site where the request originates. Use this if you want to
201
+ # enforce per-user limits.
202
+ # @param [Google::Apis::RequestOptions] options
203
+ # Request-specific options
204
+ #
205
+ # @yield [result, err] Result & error if block supplied
206
+ # @yieldparam result [Google::Apis::CalendarV3::Acl] parsed result object
207
+ # @yieldparam err [StandardError] error object if request failed
208
+ #
209
+ # @return [Google::Apis::CalendarV3::Acl]
210
+ #
211
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
212
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
213
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
214
+ def list_acls(calendar_id, max_results: nil, page_token: nil, show_deleted: nil, sync_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
215
+ path = 'calendars/{calendarId}/acl'
216
+ command = make_simple_command(:get, path, options)
217
+ command.response_representation = Google::Apis::CalendarV3::Acl::Representation
218
+ command.response_class = Google::Apis::CalendarV3::Acl
219
+ command.params['calendarId'] = calendar_id unless calendar_id.nil?
220
+ command.query['maxResults'] = max_results unless max_results.nil?
221
+ command.query['pageToken'] = page_token unless page_token.nil?
222
+ command.query['showDeleted'] = show_deleted unless show_deleted.nil?
223
+ command.query['syncToken'] = sync_token unless sync_token.nil?
224
+ command.query['fields'] = fields unless fields.nil?
225
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
226
+ command.query['userIp'] = user_ip unless user_ip.nil?
227
+ execute_or_queue_command(command, &block)
228
+ end
229
+
230
+ # Updates an access control rule. This method supports patch semantics.
231
+ # @param [String] calendar_id
232
+ # Calendar identifier.
233
+ # @param [String] rule_id
234
+ # ACL rule identifier.
235
+ # @param [Google::Apis::CalendarV3::AclRule] acl_rule_object
236
+ # @param [String] fields
237
+ # Selector specifying which fields to include in a partial response.
238
+ # @param [String] quota_user
239
+ # Available to use for quota purposes for server-side applications. Can be any
240
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
241
+ # Overrides userIp if both are provided.
242
+ # @param [String] user_ip
243
+ # IP address of the site where the request originates. Use this if you want to
244
+ # enforce per-user limits.
245
+ # @param [Google::Apis::RequestOptions] options
246
+ # Request-specific options
247
+ #
248
+ # @yield [result, err] Result & error if block supplied
249
+ # @yieldparam result [Google::Apis::CalendarV3::AclRule] parsed result object
250
+ # @yieldparam err [StandardError] error object if request failed
251
+ #
252
+ # @return [Google::Apis::CalendarV3::AclRule]
253
+ #
254
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
255
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
256
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
257
+ def patch_acl(calendar_id, rule_id, acl_rule_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
258
+ path = 'calendars/{calendarId}/acl/{ruleId}'
259
+ command = make_simple_command(:patch, path, options)
260
+ command.request_representation = Google::Apis::CalendarV3::AclRule::Representation
261
+ command.request_object = acl_rule_object
262
+ command.response_representation = Google::Apis::CalendarV3::AclRule::Representation
263
+ command.response_class = Google::Apis::CalendarV3::AclRule
264
+ command.params['calendarId'] = calendar_id unless calendar_id.nil?
265
+ command.params['ruleId'] = rule_id unless rule_id.nil?
266
+ command.query['fields'] = fields unless fields.nil?
267
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
268
+ command.query['userIp'] = user_ip unless user_ip.nil?
269
+ execute_or_queue_command(command, &block)
270
+ end
271
+
272
+ # Updates an access control rule.
273
+ # @param [String] calendar_id
274
+ # Calendar identifier.
275
+ # @param [String] rule_id
276
+ # ACL rule identifier.
277
+ # @param [Google::Apis::CalendarV3::AclRule] acl_rule_object
278
+ # @param [String] fields
279
+ # Selector specifying which fields to include in a partial response.
280
+ # @param [String] quota_user
281
+ # Available to use for quota purposes for server-side applications. Can be any
282
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
283
+ # Overrides userIp if both are provided.
284
+ # @param [String] user_ip
285
+ # IP address of the site where the request originates. Use this if you want to
286
+ # enforce per-user limits.
287
+ # @param [Google::Apis::RequestOptions] options
288
+ # Request-specific options
289
+ #
290
+ # @yield [result, err] Result & error if block supplied
291
+ # @yieldparam result [Google::Apis::CalendarV3::AclRule] parsed result object
292
+ # @yieldparam err [StandardError] error object if request failed
293
+ #
294
+ # @return [Google::Apis::CalendarV3::AclRule]
295
+ #
296
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
297
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
298
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
299
+ def update_acl(calendar_id, rule_id, acl_rule_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
300
+ path = 'calendars/{calendarId}/acl/{ruleId}'
301
+ command = make_simple_command(:put, path, options)
302
+ command.request_representation = Google::Apis::CalendarV3::AclRule::Representation
303
+ command.request_object = acl_rule_object
304
+ command.response_representation = Google::Apis::CalendarV3::AclRule::Representation
305
+ command.response_class = Google::Apis::CalendarV3::AclRule
306
+ command.params['calendarId'] = calendar_id unless calendar_id.nil?
307
+ command.params['ruleId'] = rule_id unless rule_id.nil?
308
+ command.query['fields'] = fields unless fields.nil?
309
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
310
+ command.query['userIp'] = user_ip unless user_ip.nil?
311
+ execute_or_queue_command(command, &block)
312
+ end
313
+
314
+ # Watch for changes to ACL resources.
315
+ # @param [String] calendar_id
316
+ # Calendar identifier.
317
+ # @param [Google::Apis::CalendarV3::Channel] channel_object
318
+ # @param [Fixnum] max_results
319
+ # Maximum number of entries returned on one result page. By default the value is
320
+ # 100 entries. The page size can never be larger than 250 entries. Optional.
321
+ # @param [String] page_token
322
+ # Token specifying which result page to return. Optional.
323
+ # @param [Boolean] show_deleted
324
+ # Whether to include deleted ACLs in the result. Deleted ACLs are represented by
325
+ # role equal to "none". Deleted ACLs will always be included if syncToken is
326
+ # provided. Optional. The default is False.
327
+ # @param [String] sync_token
328
+ # Token obtained from the nextSyncToken field returned on the last page of
329
+ # results from the previous list request. It makes the result of this list
330
+ # request contain only entries that have changed since then. All entries deleted
331
+ # since the previous list request will always be in the result set and it is not
332
+ # allowed to set showDeleted to False.
333
+ # If the syncToken expires, the server will respond with a 410 GONE response
334
+ # code and the client should clear its storage and perform a full
335
+ # synchronization without any syncToken.
336
+ # Learn more about incremental synchronization.
337
+ # Optional. The default is to return all entries.
338
+ # @param [String] fields
339
+ # Selector specifying which fields to include in a partial response.
340
+ # @param [String] quota_user
341
+ # Available to use for quota purposes for server-side applications. Can be any
342
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
343
+ # Overrides userIp if both are provided.
344
+ # @param [String] user_ip
345
+ # IP address of the site where the request originates. Use this if you want to
346
+ # enforce per-user limits.
347
+ # @param [Google::Apis::RequestOptions] options
348
+ # Request-specific options
349
+ #
350
+ # @yield [result, err] Result & error if block supplied
351
+ # @yieldparam result [Google::Apis::CalendarV3::Channel] parsed result object
352
+ # @yieldparam err [StandardError] error object if request failed
353
+ #
354
+ # @return [Google::Apis::CalendarV3::Channel]
355
+ #
356
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
357
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
358
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
359
+ def watch_acl(calendar_id, channel_object = nil, max_results: nil, page_token: nil, show_deleted: nil, sync_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
360
+ path = 'calendars/{calendarId}/acl/watch'
361
+ command = make_simple_command(:post, path, options)
362
+ command.request_representation = Google::Apis::CalendarV3::Channel::Representation
363
+ command.request_object = channel_object
364
+ command.response_representation = Google::Apis::CalendarV3::Channel::Representation
365
+ command.response_class = Google::Apis::CalendarV3::Channel
366
+ command.params['calendarId'] = calendar_id unless calendar_id.nil?
367
+ command.query['maxResults'] = max_results unless max_results.nil?
368
+ command.query['pageToken'] = page_token unless page_token.nil?
369
+ command.query['showDeleted'] = show_deleted unless show_deleted.nil?
370
+ command.query['syncToken'] = sync_token unless sync_token.nil?
371
+ command.query['fields'] = fields unless fields.nil?
372
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
373
+ command.query['userIp'] = user_ip unless user_ip.nil?
374
+ execute_or_queue_command(command, &block)
375
+ end
376
+
377
+ # Deletes an entry on the user's calendar list.
378
+ # @param [String] calendar_id
379
+ # Calendar identifier.
380
+ # @param [String] fields
381
+ # Selector specifying which fields to include in a partial response.
382
+ # @param [String] quota_user
383
+ # Available to use for quota purposes for server-side applications. Can be any
384
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
385
+ # Overrides userIp if both are provided.
386
+ # @param [String] user_ip
387
+ # IP address of the site where the request originates. Use this if you want to
388
+ # enforce per-user limits.
389
+ # @param [Google::Apis::RequestOptions] options
390
+ # Request-specific options
391
+ #
392
+ # @yield [result, err] Result & error if block supplied
393
+ # @yieldparam result [NilClass] No result returned for this method
394
+ # @yieldparam err [StandardError] error object if request failed
395
+ #
396
+ # @return [void]
397
+ #
398
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
399
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
400
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
401
+ def delete_calendar_list(calendar_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
402
+ path = 'users/me/calendarList/{calendarId}'
403
+ command = make_simple_command(:delete, path, options)
404
+ command.params['calendarId'] = calendar_id unless calendar_id.nil?
405
+ command.query['fields'] = fields unless fields.nil?
406
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
407
+ command.query['userIp'] = user_ip unless user_ip.nil?
408
+ execute_or_queue_command(command, &block)
409
+ end
410
+
411
+ # Returns an entry on the user's calendar list.
412
+ # @param [String] calendar_id
413
+ # Calendar identifier.
414
+ # @param [String] fields
415
+ # Selector specifying which fields to include in a partial response.
416
+ # @param [String] quota_user
417
+ # Available to use for quota purposes for server-side applications. Can be any
418
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
419
+ # Overrides userIp if both are provided.
420
+ # @param [String] user_ip
421
+ # IP address of the site where the request originates. Use this if you want to
422
+ # enforce per-user limits.
423
+ # @param [Google::Apis::RequestOptions] options
424
+ # Request-specific options
425
+ #
426
+ # @yield [result, err] Result & error if block supplied
427
+ # @yieldparam result [Google::Apis::CalendarV3::CalendarListEntry] parsed result object
428
+ # @yieldparam err [StandardError] error object if request failed
429
+ #
430
+ # @return [Google::Apis::CalendarV3::CalendarListEntry]
431
+ #
432
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
433
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
434
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
435
+ def get_calendar_list(calendar_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
436
+ path = 'users/me/calendarList/{calendarId}'
437
+ command = make_simple_command(:get, path, options)
438
+ command.response_representation = Google::Apis::CalendarV3::CalendarListEntry::Representation
439
+ command.response_class = Google::Apis::CalendarV3::CalendarListEntry
440
+ command.params['calendarId'] = calendar_id unless calendar_id.nil?
441
+ command.query['fields'] = fields unless fields.nil?
442
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
443
+ command.query['userIp'] = user_ip unless user_ip.nil?
444
+ execute_or_queue_command(command, &block)
445
+ end
446
+
447
+ # Adds an entry to the user's calendar list.
448
+ # @param [Google::Apis::CalendarV3::CalendarListEntry] calendar_list_entry_object
449
+ # @param [Boolean] color_rgb_format
450
+ # Whether to use the foregroundColor and backgroundColor fields to write the
451
+ # calendar colors (RGB). If this feature is used, the index-based colorId field
452
+ # will be set to the best matching option automatically. Optional. The default
453
+ # is False.
454
+ # @param [String] fields
455
+ # Selector specifying which fields to include in a partial response.
456
+ # @param [String] quota_user
457
+ # Available to use for quota purposes for server-side applications. Can be any
458
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
459
+ # Overrides userIp if both are provided.
460
+ # @param [String] user_ip
461
+ # IP address of the site where the request originates. Use this if you want to
462
+ # enforce per-user limits.
463
+ # @param [Google::Apis::RequestOptions] options
464
+ # Request-specific options
465
+ #
466
+ # @yield [result, err] Result & error if block supplied
467
+ # @yieldparam result [Google::Apis::CalendarV3::CalendarListEntry] parsed result object
468
+ # @yieldparam err [StandardError] error object if request failed
469
+ #
470
+ # @return [Google::Apis::CalendarV3::CalendarListEntry]
471
+ #
472
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
473
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
474
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
475
+ def insert_calendar_list(calendar_list_entry_object = nil, color_rgb_format: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
476
+ path = 'users/me/calendarList'
477
+ command = make_simple_command(:post, path, options)
478
+ command.request_representation = Google::Apis::CalendarV3::CalendarListEntry::Representation
479
+ command.request_object = calendar_list_entry_object
480
+ command.response_representation = Google::Apis::CalendarV3::CalendarListEntry::Representation
481
+ command.response_class = Google::Apis::CalendarV3::CalendarListEntry
482
+ command.query['colorRgbFormat'] = color_rgb_format unless color_rgb_format.nil?
483
+ command.query['fields'] = fields unless fields.nil?
484
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
485
+ command.query['userIp'] = user_ip unless user_ip.nil?
486
+ execute_or_queue_command(command, &block)
487
+ end
488
+
489
+ # Returns entries on the user's calendar list.
490
+ # @param [Fixnum] max_results
491
+ # Maximum number of entries returned on one result page. By default the value is
492
+ # 100 entries. The page size can never be larger than 250 entries. Optional.
493
+ # @param [String] min_access_role
494
+ # The minimum access role for the user in the returned entries. Optional. The
495
+ # default is no restriction.
496
+ # @param [String] page_token
497
+ # Token specifying which result page to return. Optional.
498
+ # @param [Boolean] show_deleted
499
+ # Whether to include deleted calendar list entries in the result. Optional. The
500
+ # default is False.
501
+ # @param [Boolean] show_hidden
502
+ # Whether to show hidden entries. Optional. The default is False.
503
+ # @param [String] sync_token
504
+ # Token obtained from the nextSyncToken field returned on the last page of
505
+ # results from the previous list request. It makes the result of this list
506
+ # request contain only entries that have changed since then. If only read-only
507
+ # fields such as calendar properties or ACLs have changed, the entry won't be
508
+ # returned. All entries deleted and hidden since the previous list request will
509
+ # always be in the result set and it is not allowed to set showDeleted neither
510
+ # showHidden to False.
511
+ # To ensure client state consistency minAccessRole query parameter cannot be
512
+ # specified together with nextSyncToken.
513
+ # If the syncToken expires, the server will respond with a 410 GONE response
514
+ # code and the client should clear its storage and perform a full
515
+ # synchronization without any syncToken.
516
+ # Learn more about incremental synchronization.
517
+ # Optional. The default is to return all entries.
518
+ # @param [String] fields
519
+ # Selector specifying which fields to include in a partial response.
520
+ # @param [String] quota_user
521
+ # Available to use for quota purposes for server-side applications. Can be any
522
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
523
+ # Overrides userIp if both are provided.
524
+ # @param [String] user_ip
525
+ # IP address of the site where the request originates. Use this if you want to
526
+ # enforce per-user limits.
527
+ # @param [Google::Apis::RequestOptions] options
528
+ # Request-specific options
529
+ #
530
+ # @yield [result, err] Result & error if block supplied
531
+ # @yieldparam result [Google::Apis::CalendarV3::CalendarList] parsed result object
532
+ # @yieldparam err [StandardError] error object if request failed
533
+ #
534
+ # @return [Google::Apis::CalendarV3::CalendarList]
535
+ #
536
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
537
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
538
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
539
+ def list_calendar_lists(max_results: nil, min_access_role: nil, page_token: nil, show_deleted: nil, show_hidden: nil, sync_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
540
+ path = 'users/me/calendarList'
541
+ command = make_simple_command(:get, path, options)
542
+ command.response_representation = Google::Apis::CalendarV3::CalendarList::Representation
543
+ command.response_class = Google::Apis::CalendarV3::CalendarList
544
+ command.query['maxResults'] = max_results unless max_results.nil?
545
+ command.query['minAccessRole'] = min_access_role unless min_access_role.nil?
546
+ command.query['pageToken'] = page_token unless page_token.nil?
547
+ command.query['showDeleted'] = show_deleted unless show_deleted.nil?
548
+ command.query['showHidden'] = show_hidden unless show_hidden.nil?
549
+ command.query['syncToken'] = sync_token unless sync_token.nil?
550
+ command.query['fields'] = fields unless fields.nil?
551
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
552
+ command.query['userIp'] = user_ip unless user_ip.nil?
553
+ execute_or_queue_command(command, &block)
554
+ end
555
+
556
+ # Updates an entry on the user's calendar list. This method supports patch
557
+ # semantics.
558
+ # @param [String] calendar_id
559
+ # Calendar identifier.
560
+ # @param [Google::Apis::CalendarV3::CalendarListEntry] calendar_list_entry_object
561
+ # @param [Boolean] color_rgb_format
562
+ # Whether to use the foregroundColor and backgroundColor fields to write the
563
+ # calendar colors (RGB). If this feature is used, the index-based colorId field
564
+ # will be set to the best matching option automatically. Optional. The default
565
+ # is False.
566
+ # @param [String] fields
567
+ # Selector specifying which fields to include in a partial response.
568
+ # @param [String] quota_user
569
+ # Available to use for quota purposes for server-side applications. Can be any
570
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
571
+ # Overrides userIp if both are provided.
572
+ # @param [String] user_ip
573
+ # IP address of the site where the request originates. Use this if you want to
574
+ # enforce per-user limits.
575
+ # @param [Google::Apis::RequestOptions] options
576
+ # Request-specific options
577
+ #
578
+ # @yield [result, err] Result & error if block supplied
579
+ # @yieldparam result [Google::Apis::CalendarV3::CalendarListEntry] parsed result object
580
+ # @yieldparam err [StandardError] error object if request failed
581
+ #
582
+ # @return [Google::Apis::CalendarV3::CalendarListEntry]
583
+ #
584
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
585
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
586
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
587
+ def patch_calendar_list(calendar_id, calendar_list_entry_object = nil, color_rgb_format: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
588
+ path = 'users/me/calendarList/{calendarId}'
589
+ command = make_simple_command(:patch, path, options)
590
+ command.request_representation = Google::Apis::CalendarV3::CalendarListEntry::Representation
591
+ command.request_object = calendar_list_entry_object
592
+ command.response_representation = Google::Apis::CalendarV3::CalendarListEntry::Representation
593
+ command.response_class = Google::Apis::CalendarV3::CalendarListEntry
594
+ command.params['calendarId'] = calendar_id unless calendar_id.nil?
595
+ command.query['colorRgbFormat'] = color_rgb_format unless color_rgb_format.nil?
596
+ command.query['fields'] = fields unless fields.nil?
597
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
598
+ command.query['userIp'] = user_ip unless user_ip.nil?
599
+ execute_or_queue_command(command, &block)
600
+ end
601
+
602
+ # Updates an entry on the user's calendar list.
603
+ # @param [String] calendar_id
604
+ # Calendar identifier.
605
+ # @param [Google::Apis::CalendarV3::CalendarListEntry] calendar_list_entry_object
606
+ # @param [Boolean] color_rgb_format
607
+ # Whether to use the foregroundColor and backgroundColor fields to write the
608
+ # calendar colors (RGB). If this feature is used, the index-based colorId field
609
+ # will be set to the best matching option automatically. Optional. The default
610
+ # is False.
611
+ # @param [String] fields
612
+ # Selector specifying which fields to include in a partial response.
613
+ # @param [String] quota_user
614
+ # Available to use for quota purposes for server-side applications. Can be any
615
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
616
+ # Overrides userIp if both are provided.
617
+ # @param [String] user_ip
618
+ # IP address of the site where the request originates. Use this if you want to
619
+ # enforce per-user limits.
620
+ # @param [Google::Apis::RequestOptions] options
621
+ # Request-specific options
622
+ #
623
+ # @yield [result, err] Result & error if block supplied
624
+ # @yieldparam result [Google::Apis::CalendarV3::CalendarListEntry] parsed result object
625
+ # @yieldparam err [StandardError] error object if request failed
626
+ #
627
+ # @return [Google::Apis::CalendarV3::CalendarListEntry]
628
+ #
629
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
630
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
631
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
632
+ def update_calendar_list(calendar_id, calendar_list_entry_object = nil, color_rgb_format: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
633
+ path = 'users/me/calendarList/{calendarId}'
634
+ command = make_simple_command(:put, path, options)
635
+ command.request_representation = Google::Apis::CalendarV3::CalendarListEntry::Representation
636
+ command.request_object = calendar_list_entry_object
637
+ command.response_representation = Google::Apis::CalendarV3::CalendarListEntry::Representation
638
+ command.response_class = Google::Apis::CalendarV3::CalendarListEntry
639
+ command.params['calendarId'] = calendar_id unless calendar_id.nil?
640
+ command.query['colorRgbFormat'] = color_rgb_format unless color_rgb_format.nil?
641
+ command.query['fields'] = fields unless fields.nil?
642
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
643
+ command.query['userIp'] = user_ip unless user_ip.nil?
644
+ execute_or_queue_command(command, &block)
645
+ end
646
+
647
+ # Watch for changes to CalendarList resources.
648
+ # @param [Google::Apis::CalendarV3::Channel] channel_object
649
+ # @param [Fixnum] max_results
650
+ # Maximum number of entries returned on one result page. By default the value is
651
+ # 100 entries. The page size can never be larger than 250 entries. Optional.
652
+ # @param [String] min_access_role
653
+ # The minimum access role for the user in the returned entries. Optional. The
654
+ # default is no restriction.
655
+ # @param [String] page_token
656
+ # Token specifying which result page to return. Optional.
657
+ # @param [Boolean] show_deleted
658
+ # Whether to include deleted calendar list entries in the result. Optional. The
659
+ # default is False.
660
+ # @param [Boolean] show_hidden
661
+ # Whether to show hidden entries. Optional. The default is False.
662
+ # @param [String] sync_token
663
+ # Token obtained from the nextSyncToken field returned on the last page of
664
+ # results from the previous list request. It makes the result of this list
665
+ # request contain only entries that have changed since then. If only read-only
666
+ # fields such as calendar properties or ACLs have changed, the entry won't be
667
+ # returned. All entries deleted and hidden since the previous list request will
668
+ # always be in the result set and it is not allowed to set showDeleted neither
669
+ # showHidden to False.
670
+ # To ensure client state consistency minAccessRole query parameter cannot be
671
+ # specified together with nextSyncToken.
672
+ # If the syncToken expires, the server will respond with a 410 GONE response
673
+ # code and the client should clear its storage and perform a full
674
+ # synchronization without any syncToken.
675
+ # Learn more about incremental synchronization.
676
+ # Optional. The default is to return all entries.
677
+ # @param [String] fields
678
+ # Selector specifying which fields to include in a partial response.
679
+ # @param [String] quota_user
680
+ # Available to use for quota purposes for server-side applications. Can be any
681
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
682
+ # Overrides userIp if both are provided.
683
+ # @param [String] user_ip
684
+ # IP address of the site where the request originates. Use this if you want to
685
+ # enforce per-user limits.
686
+ # @param [Google::Apis::RequestOptions] options
687
+ # Request-specific options
688
+ #
689
+ # @yield [result, err] Result & error if block supplied
690
+ # @yieldparam result [Google::Apis::CalendarV3::Channel] parsed result object
691
+ # @yieldparam err [StandardError] error object if request failed
692
+ #
693
+ # @return [Google::Apis::CalendarV3::Channel]
694
+ #
695
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
696
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
697
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
698
+ def watch_calendar_list(channel_object = nil, max_results: nil, min_access_role: nil, page_token: nil, show_deleted: nil, show_hidden: nil, sync_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
699
+ path = 'users/me/calendarList/watch'
700
+ command = make_simple_command(:post, path, options)
701
+ command.request_representation = Google::Apis::CalendarV3::Channel::Representation
702
+ command.request_object = channel_object
703
+ command.response_representation = Google::Apis::CalendarV3::Channel::Representation
704
+ command.response_class = Google::Apis::CalendarV3::Channel
705
+ command.query['maxResults'] = max_results unless max_results.nil?
706
+ command.query['minAccessRole'] = min_access_role unless min_access_role.nil?
707
+ command.query['pageToken'] = page_token unless page_token.nil?
708
+ command.query['showDeleted'] = show_deleted unless show_deleted.nil?
709
+ command.query['showHidden'] = show_hidden unless show_hidden.nil?
710
+ command.query['syncToken'] = sync_token unless sync_token.nil?
711
+ command.query['fields'] = fields unless fields.nil?
712
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
713
+ command.query['userIp'] = user_ip unless user_ip.nil?
714
+ execute_or_queue_command(command, &block)
715
+ end
716
+
717
+ # Clears a primary calendar. This operation deletes all events associated with
718
+ # the primary calendar of an account.
719
+ # @param [String] calendar_id
720
+ # Calendar identifier.
721
+ # @param [String] fields
722
+ # Selector specifying which fields to include in a partial response.
723
+ # @param [String] quota_user
724
+ # Available to use for quota purposes for server-side applications. Can be any
725
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
726
+ # Overrides userIp if both are provided.
727
+ # @param [String] user_ip
728
+ # IP address of the site where the request originates. Use this if you want to
729
+ # enforce per-user limits.
730
+ # @param [Google::Apis::RequestOptions] options
731
+ # Request-specific options
732
+ #
733
+ # @yield [result, err] Result & error if block supplied
734
+ # @yieldparam result [NilClass] No result returned for this method
735
+ # @yieldparam err [StandardError] error object if request failed
736
+ #
737
+ # @return [void]
738
+ #
739
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
740
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
741
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
742
+ def clear_calendar(calendar_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
743
+ path = 'calendars/{calendarId}/clear'
744
+ command = make_simple_command(:post, path, options)
745
+ command.params['calendarId'] = calendar_id unless calendar_id.nil?
746
+ command.query['fields'] = fields unless fields.nil?
747
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
748
+ command.query['userIp'] = user_ip unless user_ip.nil?
749
+ execute_or_queue_command(command, &block)
750
+ end
751
+
752
+ # Deletes a secondary calendar. Use calendars.clear for clearing all events on
753
+ # primary calendars.
754
+ # @param [String] calendar_id
755
+ # Calendar identifier.
756
+ # @param [String] fields
757
+ # Selector specifying which fields to include in a partial response.
758
+ # @param [String] quota_user
759
+ # Available to use for quota purposes for server-side applications. Can be any
760
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
761
+ # Overrides userIp if both are provided.
762
+ # @param [String] user_ip
763
+ # IP address of the site where the request originates. Use this if you want to
764
+ # enforce per-user limits.
765
+ # @param [Google::Apis::RequestOptions] options
766
+ # Request-specific options
767
+ #
768
+ # @yield [result, err] Result & error if block supplied
769
+ # @yieldparam result [NilClass] No result returned for this method
770
+ # @yieldparam err [StandardError] error object if request failed
771
+ #
772
+ # @return [void]
773
+ #
774
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
775
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
776
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
777
+ def delete_calendar(calendar_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
778
+ path = 'calendars/{calendarId}'
779
+ command = make_simple_command(:delete, path, options)
780
+ command.params['calendarId'] = calendar_id unless calendar_id.nil?
781
+ command.query['fields'] = fields unless fields.nil?
782
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
783
+ command.query['userIp'] = user_ip unless user_ip.nil?
784
+ execute_or_queue_command(command, &block)
785
+ end
786
+
787
+ # Returns metadata for a calendar.
788
+ # @param [String] calendar_id
789
+ # Calendar identifier.
790
+ # @param [String] fields
791
+ # Selector specifying which fields to include in a partial response.
792
+ # @param [String] quota_user
793
+ # Available to use for quota purposes for server-side applications. Can be any
794
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
795
+ # Overrides userIp if both are provided.
796
+ # @param [String] user_ip
797
+ # IP address of the site where the request originates. Use this if you want to
798
+ # enforce per-user limits.
799
+ # @param [Google::Apis::RequestOptions] options
800
+ # Request-specific options
801
+ #
802
+ # @yield [result, err] Result & error if block supplied
803
+ # @yieldparam result [Google::Apis::CalendarV3::Calendar] parsed result object
804
+ # @yieldparam err [StandardError] error object if request failed
805
+ #
806
+ # @return [Google::Apis::CalendarV3::Calendar]
807
+ #
808
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
809
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
810
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
811
+ def get_calendar(calendar_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
812
+ path = 'calendars/{calendarId}'
813
+ command = make_simple_command(:get, path, options)
814
+ command.response_representation = Google::Apis::CalendarV3::Calendar::Representation
815
+ command.response_class = Google::Apis::CalendarV3::Calendar
816
+ command.params['calendarId'] = calendar_id unless calendar_id.nil?
817
+ command.query['fields'] = fields unless fields.nil?
818
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
819
+ command.query['userIp'] = user_ip unless user_ip.nil?
820
+ execute_or_queue_command(command, &block)
821
+ end
822
+
823
+ # Creates a secondary calendar.
824
+ # @param [Google::Apis::CalendarV3::Calendar] calendar_object
825
+ # @param [String] fields
826
+ # Selector specifying which fields to include in a partial response.
827
+ # @param [String] quota_user
828
+ # Available to use for quota purposes for server-side applications. Can be any
829
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
830
+ # Overrides userIp if both are provided.
831
+ # @param [String] user_ip
832
+ # IP address of the site where the request originates. Use this if you want to
833
+ # enforce per-user limits.
834
+ # @param [Google::Apis::RequestOptions] options
835
+ # Request-specific options
836
+ #
837
+ # @yield [result, err] Result & error if block supplied
838
+ # @yieldparam result [Google::Apis::CalendarV3::Calendar] parsed result object
839
+ # @yieldparam err [StandardError] error object if request failed
840
+ #
841
+ # @return [Google::Apis::CalendarV3::Calendar]
842
+ #
843
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
844
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
845
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
846
+ def insert_calendar(calendar_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
847
+ path = 'calendars'
848
+ command = make_simple_command(:post, path, options)
849
+ command.request_representation = Google::Apis::CalendarV3::Calendar::Representation
850
+ command.request_object = calendar_object
851
+ command.response_representation = Google::Apis::CalendarV3::Calendar::Representation
852
+ command.response_class = Google::Apis::CalendarV3::Calendar
853
+ command.query['fields'] = fields unless fields.nil?
854
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
855
+ command.query['userIp'] = user_ip unless user_ip.nil?
856
+ execute_or_queue_command(command, &block)
857
+ end
858
+
859
+ # Updates metadata for a calendar. This method supports patch semantics.
860
+ # @param [String] calendar_id
861
+ # Calendar identifier.
862
+ # @param [Google::Apis::CalendarV3::Calendar] calendar_object
863
+ # @param [String] fields
864
+ # Selector specifying which fields to include in a partial response.
865
+ # @param [String] quota_user
866
+ # Available to use for quota purposes for server-side applications. Can be any
867
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
868
+ # Overrides userIp if both are provided.
869
+ # @param [String] user_ip
870
+ # IP address of the site where the request originates. Use this if you want to
871
+ # enforce per-user limits.
872
+ # @param [Google::Apis::RequestOptions] options
873
+ # Request-specific options
874
+ #
875
+ # @yield [result, err] Result & error if block supplied
876
+ # @yieldparam result [Google::Apis::CalendarV3::Calendar] parsed result object
877
+ # @yieldparam err [StandardError] error object if request failed
878
+ #
879
+ # @return [Google::Apis::CalendarV3::Calendar]
880
+ #
881
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
882
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
883
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
884
+ def patch_calendar(calendar_id, calendar_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
885
+ path = 'calendars/{calendarId}'
886
+ command = make_simple_command(:patch, path, options)
887
+ command.request_representation = Google::Apis::CalendarV3::Calendar::Representation
888
+ command.request_object = calendar_object
889
+ command.response_representation = Google::Apis::CalendarV3::Calendar::Representation
890
+ command.response_class = Google::Apis::CalendarV3::Calendar
891
+ command.params['calendarId'] = calendar_id unless calendar_id.nil?
892
+ command.query['fields'] = fields unless fields.nil?
893
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
894
+ command.query['userIp'] = user_ip unless user_ip.nil?
895
+ execute_or_queue_command(command, &block)
896
+ end
897
+
898
+ # Updates metadata for a calendar.
899
+ # @param [String] calendar_id
900
+ # Calendar identifier.
901
+ # @param [Google::Apis::CalendarV3::Calendar] calendar_object
902
+ # @param [String] fields
903
+ # Selector specifying which fields to include in a partial response.
904
+ # @param [String] quota_user
905
+ # Available to use for quota purposes for server-side applications. Can be any
906
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
907
+ # Overrides userIp if both are provided.
908
+ # @param [String] user_ip
909
+ # IP address of the site where the request originates. Use this if you want to
910
+ # enforce per-user limits.
911
+ # @param [Google::Apis::RequestOptions] options
912
+ # Request-specific options
913
+ #
914
+ # @yield [result, err] Result & error if block supplied
915
+ # @yieldparam result [Google::Apis::CalendarV3::Calendar] parsed result object
916
+ # @yieldparam err [StandardError] error object if request failed
917
+ #
918
+ # @return [Google::Apis::CalendarV3::Calendar]
919
+ #
920
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
921
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
922
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
923
+ def update_calendar(calendar_id, calendar_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
924
+ path = 'calendars/{calendarId}'
925
+ command = make_simple_command(:put, path, options)
926
+ command.request_representation = Google::Apis::CalendarV3::Calendar::Representation
927
+ command.request_object = calendar_object
928
+ command.response_representation = Google::Apis::CalendarV3::Calendar::Representation
929
+ command.response_class = Google::Apis::CalendarV3::Calendar
930
+ command.params['calendarId'] = calendar_id unless calendar_id.nil?
931
+ command.query['fields'] = fields unless fields.nil?
932
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
933
+ command.query['userIp'] = user_ip unless user_ip.nil?
934
+ execute_or_queue_command(command, &block)
935
+ end
936
+
937
+ # Stop watching resources through this channel
938
+ # @param [Google::Apis::CalendarV3::Channel] channel_object
939
+ # @param [String] fields
940
+ # Selector specifying which fields to include in a partial response.
941
+ # @param [String] quota_user
942
+ # Available to use for quota purposes for server-side applications. Can be any
943
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
944
+ # Overrides userIp if both are provided.
945
+ # @param [String] user_ip
946
+ # IP address of the site where the request originates. Use this if you want to
947
+ # enforce per-user limits.
948
+ # @param [Google::Apis::RequestOptions] options
949
+ # Request-specific options
950
+ #
951
+ # @yield [result, err] Result & error if block supplied
952
+ # @yieldparam result [NilClass] No result returned for this method
953
+ # @yieldparam err [StandardError] error object if request failed
954
+ #
955
+ # @return [void]
956
+ #
957
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
958
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
959
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
960
+ def stop_channel(channel_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
961
+ path = 'channels/stop'
962
+ command = make_simple_command(:post, path, options)
963
+ command.request_representation = Google::Apis::CalendarV3::Channel::Representation
964
+ command.request_object = channel_object
965
+ command.query['fields'] = fields unless fields.nil?
966
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
967
+ command.query['userIp'] = user_ip unless user_ip.nil?
968
+ execute_or_queue_command(command, &block)
969
+ end
970
+
971
+ # Returns the color definitions for calendars and events.
972
+ # @param [String] fields
973
+ # Selector specifying which fields to include in a partial response.
974
+ # @param [String] quota_user
975
+ # Available to use for quota purposes for server-side applications. Can be any
976
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
977
+ # Overrides userIp if both are provided.
978
+ # @param [String] user_ip
979
+ # IP address of the site where the request originates. Use this if you want to
980
+ # enforce per-user limits.
981
+ # @param [Google::Apis::RequestOptions] options
982
+ # Request-specific options
983
+ #
984
+ # @yield [result, err] Result & error if block supplied
985
+ # @yieldparam result [Google::Apis::CalendarV3::Colors] parsed result object
986
+ # @yieldparam err [StandardError] error object if request failed
987
+ #
988
+ # @return [Google::Apis::CalendarV3::Colors]
989
+ #
990
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
991
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
992
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
993
+ def get_color(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
994
+ path = 'colors'
995
+ command = make_simple_command(:get, path, options)
996
+ command.response_representation = Google::Apis::CalendarV3::Colors::Representation
997
+ command.response_class = Google::Apis::CalendarV3::Colors
998
+ command.query['fields'] = fields unless fields.nil?
999
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1000
+ command.query['userIp'] = user_ip unless user_ip.nil?
1001
+ execute_or_queue_command(command, &block)
1002
+ end
1003
+
1004
+ # Deletes an event.
1005
+ # @param [String] calendar_id
1006
+ # Calendar identifier.
1007
+ # @param [String] event_id
1008
+ # Event identifier.
1009
+ # @param [Boolean] send_notifications
1010
+ # Whether to send notifications about the deletion of the event. Optional. The
1011
+ # default is False.
1012
+ # @param [String] fields
1013
+ # Selector specifying which fields to include in a partial response.
1014
+ # @param [String] quota_user
1015
+ # Available to use for quota purposes for server-side applications. Can be any
1016
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1017
+ # Overrides userIp if both are provided.
1018
+ # @param [String] user_ip
1019
+ # IP address of the site where the request originates. Use this if you want to
1020
+ # enforce per-user limits.
1021
+ # @param [Google::Apis::RequestOptions] options
1022
+ # Request-specific options
1023
+ #
1024
+ # @yield [result, err] Result & error if block supplied
1025
+ # @yieldparam result [NilClass] No result returned for this method
1026
+ # @yieldparam err [StandardError] error object if request failed
1027
+ #
1028
+ # @return [void]
1029
+ #
1030
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1031
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1032
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1033
+ def delete_event(calendar_id, event_id, send_notifications: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1034
+ path = 'calendars/{calendarId}/events/{eventId}'
1035
+ command = make_simple_command(:delete, path, options)
1036
+ command.params['calendarId'] = calendar_id unless calendar_id.nil?
1037
+ command.params['eventId'] = event_id unless event_id.nil?
1038
+ command.query['sendNotifications'] = send_notifications unless send_notifications.nil?
1039
+ command.query['fields'] = fields unless fields.nil?
1040
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1041
+ command.query['userIp'] = user_ip unless user_ip.nil?
1042
+ execute_or_queue_command(command, &block)
1043
+ end
1044
+
1045
+ # Returns an event.
1046
+ # @param [String] calendar_id
1047
+ # Calendar identifier.
1048
+ # @param [String] event_id
1049
+ # Event identifier.
1050
+ # @param [Boolean] always_include_email
1051
+ # Whether to always include a value in the email field for the organizer,
1052
+ # creator and attendees, even if no real email is available (i.e. a generated,
1053
+ # non-working value will be provided). The use of this option is discouraged and
1054
+ # should only be used by clients which cannot handle the absence of an email
1055
+ # address value in the mentioned places. Optional. The default is False.
1056
+ # @param [Fixnum] max_attendees
1057
+ # The maximum number of attendees to include in the response. If there are more
1058
+ # than the specified number of attendees, only the participant is returned.
1059
+ # Optional.
1060
+ # @param [String] time_zone
1061
+ # Time zone used in the response. Optional. The default is the time zone of the
1062
+ # calendar.
1063
+ # @param [String] fields
1064
+ # Selector specifying which fields to include in a partial response.
1065
+ # @param [String] quota_user
1066
+ # Available to use for quota purposes for server-side applications. Can be any
1067
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1068
+ # Overrides userIp if both are provided.
1069
+ # @param [String] user_ip
1070
+ # IP address of the site where the request originates. Use this if you want to
1071
+ # enforce per-user limits.
1072
+ # @param [Google::Apis::RequestOptions] options
1073
+ # Request-specific options
1074
+ #
1075
+ # @yield [result, err] Result & error if block supplied
1076
+ # @yieldparam result [Google::Apis::CalendarV3::Event] parsed result object
1077
+ # @yieldparam err [StandardError] error object if request failed
1078
+ #
1079
+ # @return [Google::Apis::CalendarV3::Event]
1080
+ #
1081
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1082
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1083
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1084
+ def get_event(calendar_id, event_id, always_include_email: nil, max_attendees: nil, time_zone: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1085
+ path = 'calendars/{calendarId}/events/{eventId}'
1086
+ command = make_simple_command(:get, path, options)
1087
+ command.response_representation = Google::Apis::CalendarV3::Event::Representation
1088
+ command.response_class = Google::Apis::CalendarV3::Event
1089
+ command.params['calendarId'] = calendar_id unless calendar_id.nil?
1090
+ command.params['eventId'] = event_id unless event_id.nil?
1091
+ command.query['alwaysIncludeEmail'] = always_include_email unless always_include_email.nil?
1092
+ command.query['maxAttendees'] = max_attendees unless max_attendees.nil?
1093
+ command.query['timeZone'] = time_zone unless time_zone.nil?
1094
+ command.query['fields'] = fields unless fields.nil?
1095
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1096
+ command.query['userIp'] = user_ip unless user_ip.nil?
1097
+ execute_or_queue_command(command, &block)
1098
+ end
1099
+
1100
+ # Imports an event. This operation is used to add a private copy of an existing
1101
+ # event to a calendar.
1102
+ # @param [String] calendar_id
1103
+ # Calendar identifier.
1104
+ # @param [Google::Apis::CalendarV3::Event] event_object
1105
+ # @param [Boolean] supports_attachments
1106
+ # Whether API client performing operation supports event attachments. Optional.
1107
+ # The default is False.
1108
+ # @param [String] fields
1109
+ # Selector specifying which fields to include in a partial response.
1110
+ # @param [String] quota_user
1111
+ # Available to use for quota purposes for server-side applications. Can be any
1112
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1113
+ # Overrides userIp if both are provided.
1114
+ # @param [String] user_ip
1115
+ # IP address of the site where the request originates. Use this if you want to
1116
+ # enforce per-user limits.
1117
+ # @param [Google::Apis::RequestOptions] options
1118
+ # Request-specific options
1119
+ #
1120
+ # @yield [result, err] Result & error if block supplied
1121
+ # @yieldparam result [Google::Apis::CalendarV3::Event] parsed result object
1122
+ # @yieldparam err [StandardError] error object if request failed
1123
+ #
1124
+ # @return [Google::Apis::CalendarV3::Event]
1125
+ #
1126
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1127
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1128
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1129
+ def import_event(calendar_id, event_object = nil, supports_attachments: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1130
+ path = 'calendars/{calendarId}/events/import'
1131
+ command = make_simple_command(:post, path, options)
1132
+ command.request_representation = Google::Apis::CalendarV3::Event::Representation
1133
+ command.request_object = event_object
1134
+ command.response_representation = Google::Apis::CalendarV3::Event::Representation
1135
+ command.response_class = Google::Apis::CalendarV3::Event
1136
+ command.params['calendarId'] = calendar_id unless calendar_id.nil?
1137
+ command.query['supportsAttachments'] = supports_attachments unless supports_attachments.nil?
1138
+ command.query['fields'] = fields unless fields.nil?
1139
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1140
+ command.query['userIp'] = user_ip unless user_ip.nil?
1141
+ execute_or_queue_command(command, &block)
1142
+ end
1143
+
1144
+ # Creates an event.
1145
+ # @param [String] calendar_id
1146
+ # Calendar identifier.
1147
+ # @param [Google::Apis::CalendarV3::Event] event_object
1148
+ # @param [Fixnum] max_attendees
1149
+ # The maximum number of attendees to include in the response. If there are more
1150
+ # than the specified number of attendees, only the participant is returned.
1151
+ # Optional.
1152
+ # @param [Boolean] send_notifications
1153
+ # Whether to send notifications about the creation of the new event. Optional.
1154
+ # The default is False.
1155
+ # @param [Boolean] supports_attachments
1156
+ # Whether API client performing operation supports event attachments. Optional.
1157
+ # The default is False.
1158
+ # @param [String] fields
1159
+ # Selector specifying which fields to include in a partial response.
1160
+ # @param [String] quota_user
1161
+ # Available to use for quota purposes for server-side applications. Can be any
1162
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1163
+ # Overrides userIp if both are provided.
1164
+ # @param [String] user_ip
1165
+ # IP address of the site where the request originates. Use this if you want to
1166
+ # enforce per-user limits.
1167
+ # @param [Google::Apis::RequestOptions] options
1168
+ # Request-specific options
1169
+ #
1170
+ # @yield [result, err] Result & error if block supplied
1171
+ # @yieldparam result [Google::Apis::CalendarV3::Event] parsed result object
1172
+ # @yieldparam err [StandardError] error object if request failed
1173
+ #
1174
+ # @return [Google::Apis::CalendarV3::Event]
1175
+ #
1176
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1177
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1178
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1179
+ def insert_event(calendar_id, event_object = nil, max_attendees: nil, send_notifications: nil, supports_attachments: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1180
+ path = 'calendars/{calendarId}/events'
1181
+ command = make_simple_command(:post, path, options)
1182
+ command.request_representation = Google::Apis::CalendarV3::Event::Representation
1183
+ command.request_object = event_object
1184
+ command.response_representation = Google::Apis::CalendarV3::Event::Representation
1185
+ command.response_class = Google::Apis::CalendarV3::Event
1186
+ command.params['calendarId'] = calendar_id unless calendar_id.nil?
1187
+ command.query['maxAttendees'] = max_attendees unless max_attendees.nil?
1188
+ command.query['sendNotifications'] = send_notifications unless send_notifications.nil?
1189
+ command.query['supportsAttachments'] = supports_attachments unless supports_attachments.nil?
1190
+ command.query['fields'] = fields unless fields.nil?
1191
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1192
+ command.query['userIp'] = user_ip unless user_ip.nil?
1193
+ execute_or_queue_command(command, &block)
1194
+ end
1195
+
1196
+ # Returns instances of the specified recurring event.
1197
+ # @param [String] calendar_id
1198
+ # Calendar identifier.
1199
+ # @param [String] event_id
1200
+ # Recurring event identifier.
1201
+ # @param [Boolean] always_include_email
1202
+ # Whether to always include a value in the email field for the organizer,
1203
+ # creator and attendees, even if no real email is available (i.e. a generated,
1204
+ # non-working value will be provided). The use of this option is discouraged and
1205
+ # should only be used by clients which cannot handle the absence of an email
1206
+ # address value in the mentioned places. Optional. The default is False.
1207
+ # @param [Fixnum] max_attendees
1208
+ # The maximum number of attendees to include in the response. If there are more
1209
+ # than the specified number of attendees, only the participant is returned.
1210
+ # Optional.
1211
+ # @param [Fixnum] max_results
1212
+ # Maximum number of events returned on one result page. By default the value is
1213
+ # 250 events. The page size can never be larger than 2500 events. Optional.
1214
+ # @param [String] original_start
1215
+ # The original start time of the instance in the result. Optional.
1216
+ # @param [String] page_token
1217
+ # Token specifying which result page to return. Optional.
1218
+ # @param [Boolean] show_deleted
1219
+ # Whether to include deleted events (with status equals "cancelled") in the
1220
+ # result. Cancelled instances of recurring events will still be included if
1221
+ # singleEvents is False. Optional. The default is False.
1222
+ # @param [DateTime] time_max
1223
+ # Upper bound (exclusive) for an event's start time to filter by. Optional. The
1224
+ # default is not to filter by start time.
1225
+ # @param [DateTime] time_min
1226
+ # Lower bound (inclusive) for an event's end time to filter by. Optional. The
1227
+ # default is not to filter by end time.
1228
+ # @param [String] time_zone
1229
+ # Time zone used in the response. Optional. The default is the time zone of the
1230
+ # calendar.
1231
+ # @param [String] fields
1232
+ # Selector specifying which fields to include in a partial response.
1233
+ # @param [String] quota_user
1234
+ # Available to use for quota purposes for server-side applications. Can be any
1235
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1236
+ # Overrides userIp if both are provided.
1237
+ # @param [String] user_ip
1238
+ # IP address of the site where the request originates. Use this if you want to
1239
+ # enforce per-user limits.
1240
+ # @param [Google::Apis::RequestOptions] options
1241
+ # Request-specific options
1242
+ #
1243
+ # @yield [result, err] Result & error if block supplied
1244
+ # @yieldparam result [Google::Apis::CalendarV3::Events] parsed result object
1245
+ # @yieldparam err [StandardError] error object if request failed
1246
+ #
1247
+ # @return [Google::Apis::CalendarV3::Events]
1248
+ #
1249
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1250
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1251
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1252
+ def instances_event(calendar_id, event_id, always_include_email: nil, max_attendees: nil, max_results: nil, original_start: nil, page_token: nil, show_deleted: nil, time_max: nil, time_min: nil, time_zone: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1253
+ path = 'calendars/{calendarId}/events/{eventId}/instances'
1254
+ command = make_simple_command(:get, path, options)
1255
+ command.response_representation = Google::Apis::CalendarV3::Events::Representation
1256
+ command.response_class = Google::Apis::CalendarV3::Events
1257
+ command.params['calendarId'] = calendar_id unless calendar_id.nil?
1258
+ command.params['eventId'] = event_id unless event_id.nil?
1259
+ command.query['alwaysIncludeEmail'] = always_include_email unless always_include_email.nil?
1260
+ command.query['maxAttendees'] = max_attendees unless max_attendees.nil?
1261
+ command.query['maxResults'] = max_results unless max_results.nil?
1262
+ command.query['originalStart'] = original_start unless original_start.nil?
1263
+ command.query['pageToken'] = page_token unless page_token.nil?
1264
+ command.query['showDeleted'] = show_deleted unless show_deleted.nil?
1265
+ command.query['timeMax'] = time_max unless time_max.nil?
1266
+ command.query['timeMin'] = time_min unless time_min.nil?
1267
+ command.query['timeZone'] = time_zone unless time_zone.nil?
1268
+ command.query['fields'] = fields unless fields.nil?
1269
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1270
+ command.query['userIp'] = user_ip unless user_ip.nil?
1271
+ execute_or_queue_command(command, &block)
1272
+ end
1273
+
1274
+ # Returns events on the specified calendar.
1275
+ # @param [String] calendar_id
1276
+ # Calendar identifier.
1277
+ # @param [Boolean] always_include_email
1278
+ # Whether to always include a value in the email field for the organizer,
1279
+ # creator and attendees, even if no real email is available (i.e. a generated,
1280
+ # non-working value will be provided). The use of this option is discouraged and
1281
+ # should only be used by clients which cannot handle the absence of an email
1282
+ # address value in the mentioned places. Optional. The default is False.
1283
+ # @param [String] i_cal_uid
1284
+ # Specifies event ID in the iCalendar format to be included in the response.
1285
+ # Optional.
1286
+ # @param [Fixnum] max_attendees
1287
+ # The maximum number of attendees to include in the response. If there are more
1288
+ # than the specified number of attendees, only the participant is returned.
1289
+ # Optional.
1290
+ # @param [Fixnum] max_results
1291
+ # Maximum number of events returned on one result page. By default the value is
1292
+ # 250 events. The page size can never be larger than 2500 events. Optional.
1293
+ # @param [String] order_by
1294
+ # The order of the events returned in the result. Optional. The default is an
1295
+ # unspecified, stable order.
1296
+ # @param [String] page_token
1297
+ # Token specifying which result page to return. Optional.
1298
+ # @param [Array<String>, String] private_extended_property
1299
+ # Extended properties constraint specified as propertyName=value. Matches only
1300
+ # private properties. This parameter might be repeated multiple times to return
1301
+ # events that match all given constraints.
1302
+ # @param [String] q
1303
+ # Free text search terms to find events that match these terms in any field,
1304
+ # except for extended properties. Optional.
1305
+ # @param [Array<String>, String] shared_extended_property
1306
+ # Extended properties constraint specified as propertyName=value. Matches only
1307
+ # shared properties. This parameter might be repeated multiple times to return
1308
+ # events that match all given constraints.
1309
+ # @param [Boolean] show_deleted
1310
+ # Whether to include deleted events (with status equals "cancelled") in the
1311
+ # result. Cancelled instances of recurring events (but not the underlying
1312
+ # recurring event) will still be included if showDeleted and singleEvents are
1313
+ # both False. If showDeleted and singleEvents are both True, only single
1314
+ # instances of deleted events (but not the underlying recurring events) are
1315
+ # returned. Optional. The default is False.
1316
+ # @param [Boolean] show_hidden_invitations
1317
+ # Whether to include hidden invitations in the result. Optional. The default is
1318
+ # False.
1319
+ # @param [Boolean] single_events
1320
+ # Whether to expand recurring events into instances and only return single one-
1321
+ # off events and instances of recurring events, but not the underlying recurring
1322
+ # events themselves. Optional. The default is False.
1323
+ # @param [String] sync_token
1324
+ # Token obtained from the nextSyncToken field returned on the last page of
1325
+ # results from the previous list request. It makes the result of this list
1326
+ # request contain only entries that have changed since then. All events deleted
1327
+ # since the previous list request will always be in the result set and it is not
1328
+ # allowed to set showDeleted to False.
1329
+ # There are several query parameters that cannot be specified together with
1330
+ # nextSyncToken to ensure consistency of the client state.
1331
+ # These are:
1332
+ # - iCalUID
1333
+ # - orderBy
1334
+ # - privateExtendedProperty
1335
+ # - q
1336
+ # - sharedExtendedProperty
1337
+ # - timeMin
1338
+ # - timeMax
1339
+ # - updatedMin If the syncToken expires, the server will respond with a 410 GONE
1340
+ # response code and the client should clear its storage and perform a full
1341
+ # synchronization without any syncToken.
1342
+ # Learn more about incremental synchronization.
1343
+ # Optional. The default is to return all entries.
1344
+ # @param [DateTime] time_max
1345
+ # Upper bound (exclusive) for an event's start time to filter by. Optional. The
1346
+ # default is not to filter by start time.
1347
+ # @param [DateTime] time_min
1348
+ # Lower bound (inclusive) for an event's end time to filter by. Optional. The
1349
+ # default is not to filter by end time.
1350
+ # @param [String] time_zone
1351
+ # Time zone used in the response. Optional. The default is the time zone of the
1352
+ # calendar.
1353
+ # @param [DateTime] updated_min
1354
+ # Lower bound for an event's last modification time (as a RFC 3339 timestamp) to
1355
+ # filter by. When specified, entries deleted since this time will always be
1356
+ # included regardless of showDeleted. Optional. The default is not to filter by
1357
+ # last modification time.
1358
+ # @param [String] fields
1359
+ # Selector specifying which fields to include in a partial response.
1360
+ # @param [String] quota_user
1361
+ # Available to use for quota purposes for server-side applications. Can be any
1362
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1363
+ # Overrides userIp if both are provided.
1364
+ # @param [String] user_ip
1365
+ # IP address of the site where the request originates. Use this if you want to
1366
+ # enforce per-user limits.
1367
+ # @param [Google::Apis::RequestOptions] options
1368
+ # Request-specific options
1369
+ #
1370
+ # @yield [result, err] Result & error if block supplied
1371
+ # @yieldparam result [Google::Apis::CalendarV3::Events] parsed result object
1372
+ # @yieldparam err [StandardError] error object if request failed
1373
+ #
1374
+ # @return [Google::Apis::CalendarV3::Events]
1375
+ #
1376
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1377
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1378
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1379
+ def list_events(calendar_id, always_include_email: nil, i_cal_uid: nil, max_attendees: nil, max_results: nil, order_by: nil, page_token: nil, private_extended_property: nil, q: nil, shared_extended_property: nil, show_deleted: nil, show_hidden_invitations: nil, single_events: nil, sync_token: nil, time_max: nil, time_min: nil, time_zone: nil, updated_min: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1380
+ path = 'calendars/{calendarId}/events'
1381
+ command = make_simple_command(:get, path, options)
1382
+ command.response_representation = Google::Apis::CalendarV3::Events::Representation
1383
+ command.response_class = Google::Apis::CalendarV3::Events
1384
+ command.params['calendarId'] = calendar_id unless calendar_id.nil?
1385
+ command.query['alwaysIncludeEmail'] = always_include_email unless always_include_email.nil?
1386
+ command.query['iCalUID'] = i_cal_uid unless i_cal_uid.nil?
1387
+ command.query['maxAttendees'] = max_attendees unless max_attendees.nil?
1388
+ command.query['maxResults'] = max_results unless max_results.nil?
1389
+ command.query['orderBy'] = order_by unless order_by.nil?
1390
+ command.query['pageToken'] = page_token unless page_token.nil?
1391
+ command.query['privateExtendedProperty'] = private_extended_property unless private_extended_property.nil?
1392
+ command.query['q'] = q unless q.nil?
1393
+ command.query['sharedExtendedProperty'] = shared_extended_property unless shared_extended_property.nil?
1394
+ command.query['showDeleted'] = show_deleted unless show_deleted.nil?
1395
+ command.query['showHiddenInvitations'] = show_hidden_invitations unless show_hidden_invitations.nil?
1396
+ command.query['singleEvents'] = single_events unless single_events.nil?
1397
+ command.query['syncToken'] = sync_token unless sync_token.nil?
1398
+ command.query['timeMax'] = time_max unless time_max.nil?
1399
+ command.query['timeMin'] = time_min unless time_min.nil?
1400
+ command.query['timeZone'] = time_zone unless time_zone.nil?
1401
+ command.query['updatedMin'] = updated_min unless updated_min.nil?
1402
+ command.query['fields'] = fields unless fields.nil?
1403
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1404
+ command.query['userIp'] = user_ip unless user_ip.nil?
1405
+ execute_or_queue_command(command, &block)
1406
+ end
1407
+
1408
+ # Moves an event to another calendar, i.e. changes an event's organizer.
1409
+ # @param [String] calendar_id
1410
+ # Calendar identifier of the source calendar where the event currently is on.
1411
+ # @param [String] event_id
1412
+ # Event identifier.
1413
+ # @param [String] destination
1414
+ # Calendar identifier of the target calendar where the event is to be moved to.
1415
+ # @param [Boolean] send_notifications
1416
+ # Whether to send notifications about the change of the event's organizer.
1417
+ # Optional. The default is False.
1418
+ # @param [String] fields
1419
+ # Selector specifying which fields to include in a partial response.
1420
+ # @param [String] quota_user
1421
+ # Available to use for quota purposes for server-side applications. Can be any
1422
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1423
+ # Overrides userIp if both are provided.
1424
+ # @param [String] user_ip
1425
+ # IP address of the site where the request originates. Use this if you want to
1426
+ # enforce per-user limits.
1427
+ # @param [Google::Apis::RequestOptions] options
1428
+ # Request-specific options
1429
+ #
1430
+ # @yield [result, err] Result & error if block supplied
1431
+ # @yieldparam result [Google::Apis::CalendarV3::Event] parsed result object
1432
+ # @yieldparam err [StandardError] error object if request failed
1433
+ #
1434
+ # @return [Google::Apis::CalendarV3::Event]
1435
+ #
1436
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1437
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1438
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1439
+ def move_event(calendar_id, event_id, destination: nil, send_notifications: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1440
+ path = 'calendars/{calendarId}/events/{eventId}/move'
1441
+ command = make_simple_command(:post, path, options)
1442
+ command.response_representation = Google::Apis::CalendarV3::Event::Representation
1443
+ command.response_class = Google::Apis::CalendarV3::Event
1444
+ command.params['calendarId'] = calendar_id unless calendar_id.nil?
1445
+ command.params['eventId'] = event_id unless event_id.nil?
1446
+ command.query['destination'] = destination unless destination.nil?
1447
+ command.query['sendNotifications'] = send_notifications unless send_notifications.nil?
1448
+ command.query['fields'] = fields unless fields.nil?
1449
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1450
+ command.query['userIp'] = user_ip unless user_ip.nil?
1451
+ execute_or_queue_command(command, &block)
1452
+ end
1453
+
1454
+ # Updates an event. This method supports patch semantics.
1455
+ # @param [String] calendar_id
1456
+ # Calendar identifier.
1457
+ # @param [String] event_id
1458
+ # Event identifier.
1459
+ # @param [Google::Apis::CalendarV3::Event] event_object
1460
+ # @param [Boolean] always_include_email
1461
+ # Whether to always include a value in the email field for the organizer,
1462
+ # creator and attendees, even if no real email is available (i.e. a generated,
1463
+ # non-working value will be provided). The use of this option is discouraged and
1464
+ # should only be used by clients which cannot handle the absence of an email
1465
+ # address value in the mentioned places. Optional. The default is False.
1466
+ # @param [Fixnum] max_attendees
1467
+ # The maximum number of attendees to include in the response. If there are more
1468
+ # than the specified number of attendees, only the participant is returned.
1469
+ # Optional.
1470
+ # @param [Boolean] send_notifications
1471
+ # Whether to send notifications about the event update (e.g. attendee's
1472
+ # responses, title changes, etc.). Optional. The default is False.
1473
+ # @param [Boolean] supports_attachments
1474
+ # Whether API client performing operation supports event attachments. Optional.
1475
+ # The default is False.
1476
+ # @param [String] fields
1477
+ # Selector specifying which fields to include in a partial response.
1478
+ # @param [String] quota_user
1479
+ # Available to use for quota purposes for server-side applications. Can be any
1480
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1481
+ # Overrides userIp if both are provided.
1482
+ # @param [String] user_ip
1483
+ # IP address of the site where the request originates. Use this if you want to
1484
+ # enforce per-user limits.
1485
+ # @param [Google::Apis::RequestOptions] options
1486
+ # Request-specific options
1487
+ #
1488
+ # @yield [result, err] Result & error if block supplied
1489
+ # @yieldparam result [Google::Apis::CalendarV3::Event] parsed result object
1490
+ # @yieldparam err [StandardError] error object if request failed
1491
+ #
1492
+ # @return [Google::Apis::CalendarV3::Event]
1493
+ #
1494
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1495
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1496
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1497
+ def patch_event(calendar_id, event_id, event_object = nil, always_include_email: nil, max_attendees: nil, send_notifications: nil, supports_attachments: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1498
+ path = 'calendars/{calendarId}/events/{eventId}'
1499
+ command = make_simple_command(:patch, path, options)
1500
+ command.request_representation = Google::Apis::CalendarV3::Event::Representation
1501
+ command.request_object = event_object
1502
+ command.response_representation = Google::Apis::CalendarV3::Event::Representation
1503
+ command.response_class = Google::Apis::CalendarV3::Event
1504
+ command.params['calendarId'] = calendar_id unless calendar_id.nil?
1505
+ command.params['eventId'] = event_id unless event_id.nil?
1506
+ command.query['alwaysIncludeEmail'] = always_include_email unless always_include_email.nil?
1507
+ command.query['maxAttendees'] = max_attendees unless max_attendees.nil?
1508
+ command.query['sendNotifications'] = send_notifications unless send_notifications.nil?
1509
+ command.query['supportsAttachments'] = supports_attachments unless supports_attachments.nil?
1510
+ command.query['fields'] = fields unless fields.nil?
1511
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1512
+ command.query['userIp'] = user_ip unless user_ip.nil?
1513
+ execute_or_queue_command(command, &block)
1514
+ end
1515
+
1516
+ # Creates an event based on a simple text string.
1517
+ # @param [String] calendar_id
1518
+ # Calendar identifier.
1519
+ # @param [Boolean] send_notifications
1520
+ # Whether to send notifications about the creation of the event. Optional. The
1521
+ # default is False.
1522
+ # @param [String] text
1523
+ # The text describing the event to be created.
1524
+ # @param [String] fields
1525
+ # Selector specifying which fields to include in a partial response.
1526
+ # @param [String] quota_user
1527
+ # Available to use for quota purposes for server-side applications. Can be any
1528
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1529
+ # Overrides userIp if both are provided.
1530
+ # @param [String] user_ip
1531
+ # IP address of the site where the request originates. Use this if you want to
1532
+ # enforce per-user limits.
1533
+ # @param [Google::Apis::RequestOptions] options
1534
+ # Request-specific options
1535
+ #
1536
+ # @yield [result, err] Result & error if block supplied
1537
+ # @yieldparam result [Google::Apis::CalendarV3::Event] parsed result object
1538
+ # @yieldparam err [StandardError] error object if request failed
1539
+ #
1540
+ # @return [Google::Apis::CalendarV3::Event]
1541
+ #
1542
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1543
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1544
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1545
+ def quick_add_event(calendar_id, send_notifications: nil, text: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1546
+ path = 'calendars/{calendarId}/events/quickAdd'
1547
+ command = make_simple_command(:post, path, options)
1548
+ command.response_representation = Google::Apis::CalendarV3::Event::Representation
1549
+ command.response_class = Google::Apis::CalendarV3::Event
1550
+ command.params['calendarId'] = calendar_id unless calendar_id.nil?
1551
+ command.query['sendNotifications'] = send_notifications unless send_notifications.nil?
1552
+ command.query['text'] = text unless text.nil?
1553
+ command.query['fields'] = fields unless fields.nil?
1554
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1555
+ command.query['userIp'] = user_ip unless user_ip.nil?
1556
+ execute_or_queue_command(command, &block)
1557
+ end
1558
+
1559
+ # Updates an event.
1560
+ # @param [String] calendar_id
1561
+ # Calendar identifier.
1562
+ # @param [String] event_id
1563
+ # Event identifier.
1564
+ # @param [Google::Apis::CalendarV3::Event] event_object
1565
+ # @param [Boolean] always_include_email
1566
+ # Whether to always include a value in the email field for the organizer,
1567
+ # creator and attendees, even if no real email is available (i.e. a generated,
1568
+ # non-working value will be provided). The use of this option is discouraged and
1569
+ # should only be used by clients which cannot handle the absence of an email
1570
+ # address value in the mentioned places. Optional. The default is False.
1571
+ # @param [Fixnum] max_attendees
1572
+ # The maximum number of attendees to include in the response. If there are more
1573
+ # than the specified number of attendees, only the participant is returned.
1574
+ # Optional.
1575
+ # @param [Boolean] send_notifications
1576
+ # Whether to send notifications about the event update (e.g. attendee's
1577
+ # responses, title changes, etc.). Optional. The default is False.
1578
+ # @param [Boolean] supports_attachments
1579
+ # Whether API client performing operation supports event attachments. Optional.
1580
+ # The default is False.
1581
+ # @param [String] fields
1582
+ # Selector specifying which fields to include in a partial response.
1583
+ # @param [String] quota_user
1584
+ # Available to use for quota purposes for server-side applications. Can be any
1585
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1586
+ # Overrides userIp if both are provided.
1587
+ # @param [String] user_ip
1588
+ # IP address of the site where the request originates. Use this if you want to
1589
+ # enforce per-user limits.
1590
+ # @param [Google::Apis::RequestOptions] options
1591
+ # Request-specific options
1592
+ #
1593
+ # @yield [result, err] Result & error if block supplied
1594
+ # @yieldparam result [Google::Apis::CalendarV3::Event] parsed result object
1595
+ # @yieldparam err [StandardError] error object if request failed
1596
+ #
1597
+ # @return [Google::Apis::CalendarV3::Event]
1598
+ #
1599
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1600
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1601
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1602
+ def update_event(calendar_id, event_id, event_object = nil, always_include_email: nil, max_attendees: nil, send_notifications: nil, supports_attachments: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1603
+ path = 'calendars/{calendarId}/events/{eventId}'
1604
+ command = make_simple_command(:put, path, options)
1605
+ command.request_representation = Google::Apis::CalendarV3::Event::Representation
1606
+ command.request_object = event_object
1607
+ command.response_representation = Google::Apis::CalendarV3::Event::Representation
1608
+ command.response_class = Google::Apis::CalendarV3::Event
1609
+ command.params['calendarId'] = calendar_id unless calendar_id.nil?
1610
+ command.params['eventId'] = event_id unless event_id.nil?
1611
+ command.query['alwaysIncludeEmail'] = always_include_email unless always_include_email.nil?
1612
+ command.query['maxAttendees'] = max_attendees unless max_attendees.nil?
1613
+ command.query['sendNotifications'] = send_notifications unless send_notifications.nil?
1614
+ command.query['supportsAttachments'] = supports_attachments unless supports_attachments.nil?
1615
+ command.query['fields'] = fields unless fields.nil?
1616
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1617
+ command.query['userIp'] = user_ip unless user_ip.nil?
1618
+ execute_or_queue_command(command, &block)
1619
+ end
1620
+
1621
+ # Watch for changes to Events resources.
1622
+ # @param [String] calendar_id
1623
+ # Calendar identifier.
1624
+ # @param [Google::Apis::CalendarV3::Channel] channel_object
1625
+ # @param [Boolean] always_include_email
1626
+ # Whether to always include a value in the email field for the organizer,
1627
+ # creator and attendees, even if no real email is available (i.e. a generated,
1628
+ # non-working value will be provided). The use of this option is discouraged and
1629
+ # should only be used by clients which cannot handle the absence of an email
1630
+ # address value in the mentioned places. Optional. The default is False.
1631
+ # @param [String] i_cal_uid
1632
+ # Specifies event ID in the iCalendar format to be included in the response.
1633
+ # Optional.
1634
+ # @param [Fixnum] max_attendees
1635
+ # The maximum number of attendees to include in the response. If there are more
1636
+ # than the specified number of attendees, only the participant is returned.
1637
+ # Optional.
1638
+ # @param [Fixnum] max_results
1639
+ # Maximum number of events returned on one result page. By default the value is
1640
+ # 250 events. The page size can never be larger than 2500 events. Optional.
1641
+ # @param [String] order_by
1642
+ # The order of the events returned in the result. Optional. The default is an
1643
+ # unspecified, stable order.
1644
+ # @param [String] page_token
1645
+ # Token specifying which result page to return. Optional.
1646
+ # @param [Array<String>, String] private_extended_property
1647
+ # Extended properties constraint specified as propertyName=value. Matches only
1648
+ # private properties. This parameter might be repeated multiple times to return
1649
+ # events that match all given constraints.
1650
+ # @param [String] q
1651
+ # Free text search terms to find events that match these terms in any field,
1652
+ # except for extended properties. Optional.
1653
+ # @param [Array<String>, String] shared_extended_property
1654
+ # Extended properties constraint specified as propertyName=value. Matches only
1655
+ # shared properties. This parameter might be repeated multiple times to return
1656
+ # events that match all given constraints.
1657
+ # @param [Boolean] show_deleted
1658
+ # Whether to include deleted events (with status equals "cancelled") in the
1659
+ # result. Cancelled instances of recurring events (but not the underlying
1660
+ # recurring event) will still be included if showDeleted and singleEvents are
1661
+ # both False. If showDeleted and singleEvents are both True, only single
1662
+ # instances of deleted events (but not the underlying recurring events) are
1663
+ # returned. Optional. The default is False.
1664
+ # @param [Boolean] show_hidden_invitations
1665
+ # Whether to include hidden invitations in the result. Optional. The default is
1666
+ # False.
1667
+ # @param [Boolean] single_events
1668
+ # Whether to expand recurring events into instances and only return single one-
1669
+ # off events and instances of recurring events, but not the underlying recurring
1670
+ # events themselves. Optional. The default is False.
1671
+ # @param [String] sync_token
1672
+ # Token obtained from the nextSyncToken field returned on the last page of
1673
+ # results from the previous list request. It makes the result of this list
1674
+ # request contain only entries that have changed since then. All events deleted
1675
+ # since the previous list request will always be in the result set and it is not
1676
+ # allowed to set showDeleted to False.
1677
+ # There are several query parameters that cannot be specified together with
1678
+ # nextSyncToken to ensure consistency of the client state.
1679
+ # These are:
1680
+ # - iCalUID
1681
+ # - orderBy
1682
+ # - privateExtendedProperty
1683
+ # - q
1684
+ # - sharedExtendedProperty
1685
+ # - timeMin
1686
+ # - timeMax
1687
+ # - updatedMin If the syncToken expires, the server will respond with a 410 GONE
1688
+ # response code and the client should clear its storage and perform a full
1689
+ # synchronization without any syncToken.
1690
+ # Learn more about incremental synchronization.
1691
+ # Optional. The default is to return all entries.
1692
+ # @param [DateTime] time_max
1693
+ # Upper bound (exclusive) for an event's start time to filter by. Optional. The
1694
+ # default is not to filter by start time.
1695
+ # @param [DateTime] time_min
1696
+ # Lower bound (inclusive) for an event's end time to filter by. Optional. The
1697
+ # default is not to filter by end time.
1698
+ # @param [String] time_zone
1699
+ # Time zone used in the response. Optional. The default is the time zone of the
1700
+ # calendar.
1701
+ # @param [DateTime] updated_min
1702
+ # Lower bound for an event's last modification time (as a RFC 3339 timestamp) to
1703
+ # filter by. When specified, entries deleted since this time will always be
1704
+ # included regardless of showDeleted. Optional. The default is not to filter by
1705
+ # last modification time.
1706
+ # @param [String] fields
1707
+ # Selector specifying which fields to include in a partial response.
1708
+ # @param [String] quota_user
1709
+ # Available to use for quota purposes for server-side applications. Can be any
1710
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1711
+ # Overrides userIp if both are provided.
1712
+ # @param [String] user_ip
1713
+ # IP address of the site where the request originates. Use this if you want to
1714
+ # enforce per-user limits.
1715
+ # @param [Google::Apis::RequestOptions] options
1716
+ # Request-specific options
1717
+ #
1718
+ # @yield [result, err] Result & error if block supplied
1719
+ # @yieldparam result [Google::Apis::CalendarV3::Channel] parsed result object
1720
+ # @yieldparam err [StandardError] error object if request failed
1721
+ #
1722
+ # @return [Google::Apis::CalendarV3::Channel]
1723
+ #
1724
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1725
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1726
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1727
+ def watch_event(calendar_id, channel_object = nil, always_include_email: nil, i_cal_uid: nil, max_attendees: nil, max_results: nil, order_by: nil, page_token: nil, private_extended_property: nil, q: nil, shared_extended_property: nil, show_deleted: nil, show_hidden_invitations: nil, single_events: nil, sync_token: nil, time_max: nil, time_min: nil, time_zone: nil, updated_min: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1728
+ path = 'calendars/{calendarId}/events/watch'
1729
+ command = make_simple_command(:post, path, options)
1730
+ command.request_representation = Google::Apis::CalendarV3::Channel::Representation
1731
+ command.request_object = channel_object
1732
+ command.response_representation = Google::Apis::CalendarV3::Channel::Representation
1733
+ command.response_class = Google::Apis::CalendarV3::Channel
1734
+ command.params['calendarId'] = calendar_id unless calendar_id.nil?
1735
+ command.query['alwaysIncludeEmail'] = always_include_email unless always_include_email.nil?
1736
+ command.query['iCalUID'] = i_cal_uid unless i_cal_uid.nil?
1737
+ command.query['maxAttendees'] = max_attendees unless max_attendees.nil?
1738
+ command.query['maxResults'] = max_results unless max_results.nil?
1739
+ command.query['orderBy'] = order_by unless order_by.nil?
1740
+ command.query['pageToken'] = page_token unless page_token.nil?
1741
+ command.query['privateExtendedProperty'] = private_extended_property unless private_extended_property.nil?
1742
+ command.query['q'] = q unless q.nil?
1743
+ command.query['sharedExtendedProperty'] = shared_extended_property unless shared_extended_property.nil?
1744
+ command.query['showDeleted'] = show_deleted unless show_deleted.nil?
1745
+ command.query['showHiddenInvitations'] = show_hidden_invitations unless show_hidden_invitations.nil?
1746
+ command.query['singleEvents'] = single_events unless single_events.nil?
1747
+ command.query['syncToken'] = sync_token unless sync_token.nil?
1748
+ command.query['timeMax'] = time_max unless time_max.nil?
1749
+ command.query['timeMin'] = time_min unless time_min.nil?
1750
+ command.query['timeZone'] = time_zone unless time_zone.nil?
1751
+ command.query['updatedMin'] = updated_min unless updated_min.nil?
1752
+ command.query['fields'] = fields unless fields.nil?
1753
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1754
+ command.query['userIp'] = user_ip unless user_ip.nil?
1755
+ execute_or_queue_command(command, &block)
1756
+ end
1757
+
1758
+ # Returns free/busy information for a set of calendars.
1759
+ # @param [Google::Apis::CalendarV3::FreeBusyRequest] free_busy_request_object
1760
+ # @param [String] fields
1761
+ # Selector specifying which fields to include in a partial response.
1762
+ # @param [String] quota_user
1763
+ # Available to use for quota purposes for server-side applications. Can be any
1764
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1765
+ # Overrides userIp if both are provided.
1766
+ # @param [String] user_ip
1767
+ # IP address of the site where the request originates. Use this if you want to
1768
+ # enforce per-user limits.
1769
+ # @param [Google::Apis::RequestOptions] options
1770
+ # Request-specific options
1771
+ #
1772
+ # @yield [result, err] Result & error if block supplied
1773
+ # @yieldparam result [Google::Apis::CalendarV3::FreeBusyResponse] parsed result object
1774
+ # @yieldparam err [StandardError] error object if request failed
1775
+ #
1776
+ # @return [Google::Apis::CalendarV3::FreeBusyResponse]
1777
+ #
1778
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1779
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1780
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1781
+ def query_freebusy(free_busy_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1782
+ path = 'freeBusy'
1783
+ command = make_simple_command(:post, path, options)
1784
+ command.request_representation = Google::Apis::CalendarV3::FreeBusyRequest::Representation
1785
+ command.request_object = free_busy_request_object
1786
+ command.response_representation = Google::Apis::CalendarV3::FreeBusyResponse::Representation
1787
+ command.response_class = Google::Apis::CalendarV3::FreeBusyResponse
1788
+ command.query['fields'] = fields unless fields.nil?
1789
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1790
+ command.query['userIp'] = user_ip unless user_ip.nil?
1791
+ execute_or_queue_command(command, &block)
1792
+ end
1793
+
1794
+ # Returns a single user setting.
1795
+ # @param [String] setting
1796
+ # The id of the user setting.
1797
+ # @param [String] fields
1798
+ # Selector specifying which fields to include in a partial response.
1799
+ # @param [String] quota_user
1800
+ # Available to use for quota purposes for server-side applications. Can be any
1801
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1802
+ # Overrides userIp if both are provided.
1803
+ # @param [String] user_ip
1804
+ # IP address of the site where the request originates. Use this if you want to
1805
+ # enforce per-user limits.
1806
+ # @param [Google::Apis::RequestOptions] options
1807
+ # Request-specific options
1808
+ #
1809
+ # @yield [result, err] Result & error if block supplied
1810
+ # @yieldparam result [Google::Apis::CalendarV3::Setting] parsed result object
1811
+ # @yieldparam err [StandardError] error object if request failed
1812
+ #
1813
+ # @return [Google::Apis::CalendarV3::Setting]
1814
+ #
1815
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1816
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1817
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1818
+ def get_setting(setting, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1819
+ path = 'users/me/settings/{setting}'
1820
+ command = make_simple_command(:get, path, options)
1821
+ command.response_representation = Google::Apis::CalendarV3::Setting::Representation
1822
+ command.response_class = Google::Apis::CalendarV3::Setting
1823
+ command.params['setting'] = setting unless setting.nil?
1824
+ command.query['fields'] = fields unless fields.nil?
1825
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1826
+ command.query['userIp'] = user_ip unless user_ip.nil?
1827
+ execute_or_queue_command(command, &block)
1828
+ end
1829
+
1830
+ # Returns all user settings for the authenticated user.
1831
+ # @param [Fixnum] max_results
1832
+ # Maximum number of entries returned on one result page. By default the value is
1833
+ # 100 entries. The page size can never be larger than 250 entries. Optional.
1834
+ # @param [String] page_token
1835
+ # Token specifying which result page to return. Optional.
1836
+ # @param [String] sync_token
1837
+ # Token obtained from the nextSyncToken field returned on the last page of
1838
+ # results from the previous list request. It makes the result of this list
1839
+ # request contain only entries that have changed since then.
1840
+ # If the syncToken expires, the server will respond with a 410 GONE response
1841
+ # code and the client should clear its storage and perform a full
1842
+ # synchronization without any syncToken.
1843
+ # Learn more about incremental synchronization.
1844
+ # Optional. The default is to return all entries.
1845
+ # @param [String] fields
1846
+ # Selector specifying which fields to include in a partial response.
1847
+ # @param [String] quota_user
1848
+ # Available to use for quota purposes for server-side applications. Can be any
1849
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1850
+ # Overrides userIp if both are provided.
1851
+ # @param [String] user_ip
1852
+ # IP address of the site where the request originates. Use this if you want to
1853
+ # enforce per-user limits.
1854
+ # @param [Google::Apis::RequestOptions] options
1855
+ # Request-specific options
1856
+ #
1857
+ # @yield [result, err] Result & error if block supplied
1858
+ # @yieldparam result [Google::Apis::CalendarV3::Settings] parsed result object
1859
+ # @yieldparam err [StandardError] error object if request failed
1860
+ #
1861
+ # @return [Google::Apis::CalendarV3::Settings]
1862
+ #
1863
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1864
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1865
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1866
+ def list_settings(max_results: nil, page_token: nil, sync_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1867
+ path = 'users/me/settings'
1868
+ command = make_simple_command(:get, path, options)
1869
+ command.response_representation = Google::Apis::CalendarV3::Settings::Representation
1870
+ command.response_class = Google::Apis::CalendarV3::Settings
1871
+ command.query['maxResults'] = max_results unless max_results.nil?
1872
+ command.query['pageToken'] = page_token unless page_token.nil?
1873
+ command.query['syncToken'] = sync_token unless sync_token.nil?
1874
+ command.query['fields'] = fields unless fields.nil?
1875
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1876
+ command.query['userIp'] = user_ip unless user_ip.nil?
1877
+ execute_or_queue_command(command, &block)
1878
+ end
1879
+
1880
+ # Watch for changes to Settings resources.
1881
+ # @param [Google::Apis::CalendarV3::Channel] channel_object
1882
+ # @param [Fixnum] max_results
1883
+ # Maximum number of entries returned on one result page. By default the value is
1884
+ # 100 entries. The page size can never be larger than 250 entries. Optional.
1885
+ # @param [String] page_token
1886
+ # Token specifying which result page to return. Optional.
1887
+ # @param [String] sync_token
1888
+ # Token obtained from the nextSyncToken field returned on the last page of
1889
+ # results from the previous list request. It makes the result of this list
1890
+ # request contain only entries that have changed since then.
1891
+ # If the syncToken expires, the server will respond with a 410 GONE response
1892
+ # code and the client should clear its storage and perform a full
1893
+ # synchronization without any syncToken.
1894
+ # Learn more about incremental synchronization.
1895
+ # Optional. The default is to return all entries.
1896
+ # @param [String] fields
1897
+ # Selector specifying which fields to include in a partial response.
1898
+ # @param [String] quota_user
1899
+ # Available to use for quota purposes for server-side applications. Can be any
1900
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1901
+ # Overrides userIp if both are provided.
1902
+ # @param [String] user_ip
1903
+ # IP address of the site where the request originates. Use this if you want to
1904
+ # enforce per-user limits.
1905
+ # @param [Google::Apis::RequestOptions] options
1906
+ # Request-specific options
1907
+ #
1908
+ # @yield [result, err] Result & error if block supplied
1909
+ # @yieldparam result [Google::Apis::CalendarV3::Channel] parsed result object
1910
+ # @yieldparam err [StandardError] error object if request failed
1911
+ #
1912
+ # @return [Google::Apis::CalendarV3::Channel]
1913
+ #
1914
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1915
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1916
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1917
+ def watch_setting(channel_object = nil, max_results: nil, page_token: nil, sync_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1918
+ path = 'users/me/settings/watch'
1919
+ command = make_simple_command(:post, path, options)
1920
+ command.request_representation = Google::Apis::CalendarV3::Channel::Representation
1921
+ command.request_object = channel_object
1922
+ command.response_representation = Google::Apis::CalendarV3::Channel::Representation
1923
+ command.response_class = Google::Apis::CalendarV3::Channel
1924
+ command.query['maxResults'] = max_results unless max_results.nil?
1925
+ command.query['pageToken'] = page_token unless page_token.nil?
1926
+ command.query['syncToken'] = sync_token unless sync_token.nil?
1927
+ command.query['fields'] = fields unless fields.nil?
1928
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1929
+ command.query['userIp'] = user_ip unless user_ip.nil?
1930
+ execute_or_queue_command(command, &block)
1931
+ end
1932
+
1933
+ protected
1934
+
1935
+ def apply_command_defaults(command)
1936
+ command.query['key'] = key unless key.nil?
1937
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1938
+ command.query['userIp'] = user_ip unless user_ip.nil?
1939
+ end
1940
+ end
1941
+ end
1942
+ end
1943
+ end