google-api-client 0.8.3 → 0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (497) 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 +22 -0
  7. data/.yardopts +12 -0
  8. data/CHANGELOG.md +52 -2
  9. data/CONTRIBUTING.md +31 -0
  10. data/Gemfile +35 -1
  11. data/MIGRATING.md +171 -0
  12. data/README.md +181 -148
  13. data/Rakefile +1 -40
  14. data/api_names.yaml +1036 -0
  15. data/api_names_out.yaml +26053 -0
  16. data/bin/generate-api +95 -0
  17. data/generated/google/apis/adexchangebuyer_v1_3/classes.rb +1335 -0
  18. data/generated/google/apis/adexchangebuyer_v1_3/representations.rb +446 -0
  19. data/generated/google/apis/adexchangebuyer_v1_3/service.rb +872 -0
  20. data/generated/google/apis/adexchangebuyer_v1_3.rb +35 -0
  21. data/generated/google/apis/adexchangeseller_v2_0/classes.rb +792 -0
  22. data/generated/google/apis/adexchangeseller_v2_0/representations.rb +309 -0
  23. data/generated/google/apis/adexchangeseller_v2_0/service.rb +668 -0
  24. data/generated/google/apis/adexchangeseller_v2_0.rb +38 -0
  25. data/generated/google/apis/admin_datatransfer_v1/classes.rb +267 -0
  26. data/generated/google/apis/admin_datatransfer_v1/representations.rb +118 -0
  27. data/generated/google/apis/admin_datatransfer_v1/service.rb +262 -0
  28. data/generated/google/apis/admin_datatransfer_v1.rb +37 -0
  29. data/generated/google/apis/admin_directory_v1/classes.rb +3141 -0
  30. data/generated/google/apis/admin_directory_v1/representations.rb +1029 -0
  31. data/generated/google/apis/admin_directory_v1/service.rb +3818 -0
  32. data/generated/google/apis/admin_directory_v1.rb +113 -0
  33. data/generated/google/apis/admin_reports_v1/classes.rb +582 -0
  34. data/generated/google/apis/admin_reports_v1/representations.rb +231 -0
  35. data/generated/google/apis/admin_reports_v1/service.rb +336 -0
  36. data/generated/google/apis/admin_reports_v1.rb +38 -0
  37. data/generated/google/apis/adsense_v1_4/classes.rb +1285 -0
  38. data/generated/google/apis/adsense_v1_4/representations.rb +494 -0
  39. data/generated/google/apis/adsense_v1_4/service.rb +1714 -0
  40. data/generated/google/apis/adsense_v1_4.rb +38 -0
  41. data/generated/google/apis/adsensehost_v4_1/classes.rb +834 -0
  42. data/generated/google/apis/adsensehost_v4_1/representations.rb +327 -0
  43. data/generated/google/apis/adsensehost_v4_1/service.rb +1164 -0
  44. data/generated/google/apis/adsensehost_v4_1.rb +35 -0
  45. data/generated/google/apis/analytics_v3/classes.rb +5118 -0
  46. data/generated/google/apis/analytics_v3/representations.rb +1662 -0
  47. data/generated/google/apis/analytics_v3/service.rb +3568 -0
  48. data/generated/google/apis/analytics_v3.rb +49 -0
  49. data/generated/google/apis/androidenterprise_v1/classes.rb +1443 -0
  50. data/generated/google/apis/androidenterprise_v1/representations.rb +538 -0
  51. data/generated/google/apis/androidenterprise_v1/service.rb +2602 -0
  52. data/generated/google/apis/androidenterprise_v1.rb +35 -0
  53. data/generated/google/apis/androidpublisher_v2/classes.rb +1411 -0
  54. data/generated/google/apis/androidpublisher_v2/representations.rb +646 -0
  55. data/generated/google/apis/androidpublisher_v2/service.rb +2338 -0
  56. data/generated/google/apis/androidpublisher_v2.rb +34 -0
  57. data/generated/google/apis/appengine_v1beta4/classes.rb +1532 -0
  58. data/generated/google/apis/appengine_v1beta4/representations.rb +526 -0
  59. data/generated/google/apis/appengine_v1beta4/service.rb +476 -0
  60. data/generated/google/apis/appengine_v1beta4.rb +35 -0
  61. data/generated/google/apis/appsactivity_v1/classes.rb +392 -0
  62. data/generated/google/apis/appsactivity_v1/representations.rb +184 -0
  63. data/generated/google/apis/appsactivity_v1/service.rb +128 -0
  64. data/generated/google/apis/appsactivity_v1.rb +46 -0
  65. data/generated/google/apis/appstate_v1/classes.rb +154 -0
  66. data/generated/google/apis/appstate_v1/representations.rb +79 -0
  67. data/generated/google/apis/appstate_v1/service.rb +260 -0
  68. data/generated/google/apis/appstate_v1.rb +34 -0
  69. data/generated/google/apis/autoscaler_v1beta2/classes.rb +747 -0
  70. data/generated/google/apis/autoscaler_v1beta2/representations.rb +281 -0
  71. data/generated/google/apis/autoscaler_v1beta2/service.rb +478 -0
  72. data/generated/google/apis/autoscaler_v1beta2.rb +38 -0
  73. data/generated/google/apis/bigquery_v2/classes.rb +2471 -0
  74. data/generated/google/apis/bigquery_v2/representations.rb +816 -0
  75. data/generated/google/apis/bigquery_v2/service.rb +982 -0
  76. data/generated/google/apis/bigquery_v2.rb +52 -0
  77. data/generated/google/apis/blogger_v3/classes.rb +1354 -0
  78. data/generated/google/apis/blogger_v3/representations.rb +562 -0
  79. data/generated/google/apis/blogger_v3/service.rb +1587 -0
  80. data/generated/google/apis/blogger_v3.rb +37 -0
  81. data/generated/google/apis/books_v1/classes.rb +3956 -0
  82. data/generated/google/apis/books_v1/representations.rb +1538 -0
  83. data/generated/google/apis/books_v1/service.rb +2290 -0
  84. data/generated/google/apis/books_v1.rb +34 -0
  85. data/generated/google/apis/calendar_v3/classes.rb +1742 -0
  86. data/generated/google/apis/calendar_v3/representations.rb +567 -0
  87. data/generated/google/apis/calendar_v3/service.rb +1968 -0
  88. data/generated/google/apis/calendar_v3.rb +37 -0
  89. data/generated/google/apis/civicinfo_v2/classes.rb +1127 -0
  90. data/generated/google/apis/civicinfo_v2/representations.rb +383 -0
  91. data/generated/google/apis/civicinfo_v2/service.rb +279 -0
  92. data/{lib/google/api_client/service_account.rb → generated/google/apis/civicinfo_v2.rb} +18 -8
  93. data/generated/google/apis/classroom_v1/classes.rb +512 -0
  94. data/generated/google/apis/classroom_v1/representations.rb +217 -0
  95. data/generated/google/apis/classroom_v1/service.rb +970 -0
  96. data/generated/google/apis/classroom_v1.rb +49 -0
  97. data/generated/google/apis/classroom_v1beta1/classes.rb +447 -0
  98. data/generated/google/apis/classroom_v1beta1/representations.rb +190 -0
  99. data/generated/google/apis/classroom_v1beta1/service.rb +791 -0
  100. data/generated/google/apis/classroom_v1beta1.rb +49 -0
  101. data/generated/google/apis/cloudbilling_v1/classes.rb +169 -0
  102. data/generated/google/apis/cloudbilling_v1/representations.rb +79 -0
  103. data/generated/google/apis/cloudbilling_v1/service.rb +258 -0
  104. data/generated/google/apis/cloudbilling_v1.rb +35 -0
  105. data/generated/google/apis/clouddebugger_v2/classes.rb +1004 -0
  106. data/generated/google/apis/clouddebugger_v2/representations.rb +410 -0
  107. data/generated/google/apis/clouddebugger_v2/service.rb +370 -0
  108. data/generated/google/apis/clouddebugger_v2.rb +41 -0
  109. data/generated/google/apis/cloudmonitoring_v2beta2/classes.rb +679 -0
  110. data/generated/google/apis/cloudmonitoring_v2beta2/representations.rb +311 -0
  111. data/generated/google/apis/cloudmonitoring_v2beta2/service.rb +452 -0
  112. data/generated/google/apis/cloudmonitoring_v2beta2.rb +37 -0
  113. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +437 -0
  114. data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +188 -0
  115. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +623 -0
  116. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +38 -0
  117. data/generated/google/apis/cloudtrace_v1/classes.rb +188 -0
  118. data/generated/google/apis/cloudtrace_v1/representations.rb +92 -0
  119. data/generated/google/apis/cloudtrace_v1/service.rb +190 -0
  120. data/generated/google/apis/cloudtrace_v1.rb +35 -0
  121. data/generated/google/apis/clouduseraccounts_beta/classes.rb +823 -0
  122. data/generated/google/apis/clouduseraccounts_beta/representations.rb +313 -0
  123. data/generated/google/apis/clouduseraccounts_beta/service.rb +854 -0
  124. data/generated/google/apis/clouduseraccounts_beta.rb +43 -0
  125. data/generated/google/apis/compute_beta/classes.rb +9128 -0
  126. data/generated/google/apis/compute_beta/representations.rb +3048 -0
  127. data/generated/google/apis/compute_beta/service.rb +10154 -0
  128. data/generated/google/apis/compute_beta.rb +49 -0
  129. data/generated/google/apis/compute_v1/classes.rb +8681 -0
  130. data/generated/google/apis/compute_v1/representations.rb +2895 -0
  131. data/generated/google/apis/compute_v1/service.rb +9252 -0
  132. data/generated/google/apis/compute_v1.rb +49 -0
  133. data/generated/google/apis/container_v1/classes.rb +463 -0
  134. data/generated/google/apis/container_v1/representations.rb +175 -0
  135. data/generated/google/apis/container_v1/service.rb +367 -0
  136. data/generated/google/apis/container_v1.rb +35 -0
  137. data/generated/google/apis/container_v1beta1/classes.rb +466 -0
  138. data/generated/google/apis/container_v1beta1/representations.rb +177 -0
  139. data/generated/google/apis/container_v1beta1/service.rb +394 -0
  140. data/generated/google/apis/container_v1beta1.rb +35 -0
  141. data/generated/google/apis/content_v2/classes.rb +5986 -0
  142. data/generated/google/apis/content_v2/representations.rb +2288 -0
  143. data/generated/google/apis/content_v2/service.rb +2338 -0
  144. data/generated/google/apis/content_v2.rb +35 -0
  145. data/generated/google/apis/coordinate_v1/classes.rb +669 -0
  146. data/generated/google/apis/coordinate_v1/representations.rb +285 -0
  147. data/generated/google/apis/coordinate_v1/service.rb +678 -0
  148. data/generated/google/apis/coordinate_v1.rb +37 -0
  149. data/generated/google/apis/customsearch_v1/classes.rb +771 -0
  150. data/generated/google/apis/customsearch_v1/representations.rb +276 -0
  151. data/generated/google/apis/customsearch_v1/service.rb +207 -0
  152. data/{lib/google/api_client/auth/compute_service_account.rb → generated/google/apis/customsearch_v1.rb} +13 -10
  153. data/generated/google/apis/datastore_v1beta2/classes.rb +1186 -0
  154. data/generated/google/apis/datastore_v1beta2/representations.rb +526 -0
  155. data/generated/google/apis/datastore_v1beta2/service.rb +294 -0
  156. data/generated/google/apis/datastore_v1beta2.rb +40 -0
  157. data/generated/google/apis/deploymentmanager_v2/classes.rb +1091 -0
  158. data/generated/google/apis/deploymentmanager_v2/representations.rb +422 -0
  159. data/generated/google/apis/deploymentmanager_v2/service.rb +857 -0
  160. data/generated/google/apis/deploymentmanager_v2.rb +44 -0
  161. data/generated/google/apis/deploymentmanager_v2beta2/classes.rb +843 -0
  162. data/generated/google/apis/deploymentmanager_v2beta2/representations.rb +306 -0
  163. data/generated/google/apis/deploymentmanager_v2beta2/service.rb +689 -0
  164. data/generated/google/apis/deploymentmanager_v2beta2.rb +44 -0
  165. data/generated/google/apis/dfareporting_v2_1/classes.rb +10770 -0
  166. data/generated/google/apis/dfareporting_v2_1/representations.rb +3438 -0
  167. data/generated/google/apis/dfareporting_v2_1/service.rb +8585 -0
  168. data/generated/google/apis/dfareporting_v2_1.rb +37 -0
  169. data/generated/google/apis/discovery_v1/classes.rb +961 -0
  170. data/generated/google/apis/discovery_v1/representations.rb +357 -0
  171. data/generated/google/apis/discovery_v1/service.rb +142 -0
  172. data/generated/google/apis/discovery_v1.rb +32 -0
  173. data/generated/google/apis/dns_v1/classes.rb +406 -0
  174. data/generated/google/apis/dns_v1/representations.rb +151 -0
  175. data/generated/google/apis/dns_v1/service.rb +454 -0
  176. data/generated/google/apis/dns_v1.rb +44 -0
  177. data/generated/google/apis/doubleclickbidmanager_v1/classes.rb +716 -0
  178. data/generated/google/apis/doubleclickbidmanager_v1/representations.rb +298 -0
  179. data/generated/google/apis/doubleclickbidmanager_v1/service.rb +341 -0
  180. data/generated/google/apis/doubleclickbidmanager_v1.rb +31 -0
  181. data/generated/google/apis/doubleclicksearch_v2/classes.rb +956 -0
  182. data/generated/google/apis/doubleclicksearch_v2/representations.rb +316 -0
  183. data/generated/google/apis/doubleclicksearch_v2/service.rb +480 -0
  184. data/generated/google/apis/doubleclicksearch_v2.rb +35 -0
  185. data/generated/google/apis/drive_v2/classes.rb +2562 -0
  186. data/generated/google/apis/drive_v2/representations.rb +795 -0
  187. data/generated/google/apis/drive_v2/service.rb +2696 -0
  188. data/generated/google/apis/drive_v2.rb +58 -0
  189. data/generated/google/apis/drive_v3/classes.rb +1534 -0
  190. data/generated/google/apis/drive_v3/representations.rb +497 -0
  191. data/generated/google/apis/drive_v3/service.rb +1541 -0
  192. data/generated/google/apis/drive_v3.rb +55 -0
  193. data/generated/google/apis/fitness_v1/classes.rb +885 -0
  194. data/generated/google/apis/fitness_v1/representations.rb +320 -0
  195. data/generated/google/apis/fitness_v1/service.rb +675 -0
  196. data/generated/google/apis/fitness_v1.rb +49 -0
  197. data/generated/google/apis/fusiontables_v2/classes.rb +1048 -0
  198. data/generated/google/apis/fusiontables_v2/representations.rb +409 -0
  199. data/generated/google/apis/fusiontables_v2/service.rb +1463 -0
  200. data/generated/google/apis/fusiontables_v2.rb +37 -0
  201. data/generated/google/apis/games_configuration_v1configuration/classes.rb +506 -0
  202. data/generated/google/apis/games_configuration_v1configuration/representations.rb +206 -0
  203. data/generated/google/apis/games_configuration_v1configuration/service.rb +565 -0
  204. data/generated/google/apis/games_configuration_v1configuration.rb +34 -0
  205. data/generated/google/apis/games_management_v1management/classes.rb +524 -0
  206. data/generated/google/apis/games_management_v1management/representations.rb +231 -0
  207. data/generated/google/apis/games_management_v1management/service.rb +994 -0
  208. data/generated/google/apis/games_management_v1management.rb +37 -0
  209. data/generated/google/apis/games_v1/classes.rb +4617 -0
  210. data/generated/google/apis/games_v1/representations.rb +1584 -0
  211. data/generated/google/apis/games_v1/service.rb +2290 -0
  212. data/generated/google/apis/games_v1.rb +40 -0
  213. data/generated/google/apis/gan_v1beta1/classes.rb +1428 -0
  214. data/generated/google/apis/gan_v1beta1/representations.rb +428 -0
  215. data/generated/google/apis/gan_v1beta1/service.rb +682 -0
  216. data/generated/google/apis/gan_v1beta1.rb +31 -0
  217. data/generated/google/apis/genomics_v1/classes.rb +2609 -0
  218. data/generated/google/apis/genomics_v1/representations.rb +909 -0
  219. data/generated/google/apis/genomics_v1/service.rb +1676 -0
  220. data/generated/google/apis/genomics_v1.rb +49 -0
  221. data/generated/google/apis/genomics_v1beta2/classes.rb +3288 -0
  222. data/generated/google/apis/genomics_v1beta2/representations.rb +1194 -0
  223. data/generated/google/apis/genomics_v1beta2/service.rb +2392 -0
  224. data/generated/google/apis/genomics_v1beta2.rb +46 -0
  225. data/generated/google/apis/gmail_v1/classes.rb +794 -0
  226. data/generated/google/apis/gmail_v1/representations.rb +339 -0
  227. data/generated/google/apis/gmail_v1/service.rb +1470 -0
  228. data/generated/google/apis/gmail_v1.rb +52 -0
  229. data/generated/google/apis/groupsmigration_v1/classes.rb +51 -0
  230. data/generated/google/apis/groupsmigration_v1/representations.rb +38 -0
  231. data/generated/google/apis/groupsmigration_v1/service.rb +110 -0
  232. data/generated/google/apis/groupsmigration_v1.rb +34 -0
  233. data/generated/google/apis/groupssettings_v1/classes.rb +221 -0
  234. data/generated/google/apis/groupssettings_v1/representations.rb +64 -0
  235. data/generated/google/apis/groupssettings_v1/service.rb +179 -0
  236. data/generated/google/apis/groupssettings_v1.rb +34 -0
  237. data/generated/google/apis/identitytoolkit_v3/classes.rb +1466 -0
  238. data/generated/google/apis/identitytoolkit_v3/representations.rb +509 -0
  239. data/generated/google/apis/identitytoolkit_v3/service.rb +581 -0
  240. data/generated/google/apis/identitytoolkit_v3.rb +31 -0
  241. data/generated/google/apis/kgsearch_v1/classes.rb +59 -0
  242. data/generated/google/apis/kgsearch_v1/representations.rb +39 -0
  243. data/generated/google/apis/kgsearch_v1/service.rb +111 -0
  244. data/{spec/google/api_client/request_spec.rb → generated/google/apis/kgsearch_v1.rb} +16 -13
  245. data/generated/google/apis/licensing_v1/classes.rb +132 -0
  246. data/generated/google/apis/licensing_v1/representations.rb +68 -0
  247. data/generated/google/apis/licensing_v1/service.rb +369 -0
  248. data/generated/google/apis/licensing_v1.rb +34 -0
  249. data/generated/google/apis/logging_v1beta3/classes.rb +1079 -0
  250. data/generated/google/apis/logging_v1beta3/representations.rb +366 -0
  251. data/generated/google/apis/logging_v1beta3/service.rb +1001 -0
  252. data/generated/google/apis/logging_v1beta3.rb +47 -0
  253. data/generated/google/apis/manager_v1beta2/classes.rb +1287 -0
  254. data/generated/google/apis/manager_v1beta2/representations.rb +536 -0
  255. data/generated/google/apis/manager_v1beta2/service.rb +372 -0
  256. data/generated/google/apis/manager_v1beta2.rb +53 -0
  257. data/generated/google/apis/mapsengine_v1/classes.rb +2873 -0
  258. data/generated/google/apis/mapsengine_v1/representations.rb +1235 -0
  259. data/generated/google/apis/mapsengine_v1/service.rb +3388 -0
  260. data/generated/google/apis/mapsengine_v1.rb +38 -0
  261. data/generated/google/apis/mirror_v1/classes.rb +1072 -0
  262. data/generated/google/apis/mirror_v1/representations.rb +350 -0
  263. data/generated/google/apis/mirror_v1/service.rb +977 -0
  264. data/generated/google/apis/mirror_v1.rb +37 -0
  265. data/generated/google/apis/oauth2_v2/classes.rb +245 -0
  266. data/generated/google/apis/oauth2_v2/representations.rb +94 -0
  267. data/generated/google/apis/oauth2_v2/service.rb +199 -0
  268. data/generated/google/apis/oauth2_v2.rb +43 -0
  269. data/generated/google/apis/pagespeedonline_v2/classes.rb +614 -0
  270. data/generated/google/apis/pagespeedonline_v2/representations.rb +244 -0
  271. data/generated/google/apis/pagespeedonline_v2/service.rb +119 -0
  272. data/generated/google/apis/pagespeedonline_v2.rb +32 -0
  273. data/generated/google/apis/partners_v2/classes.rb +942 -0
  274. data/generated/google/apis/partners_v2/representations.rb +402 -0
  275. data/generated/google/apis/partners_v2/service.rb +400 -0
  276. data/generated/google/apis/partners_v2.rb +32 -0
  277. data/generated/google/apis/plus_domains_v1/classes.rb +2609 -0
  278. data/generated/google/apis/plus_domains_v1/representations.rb +987 -0
  279. data/generated/google/apis/plus_domains_v1/service.rb +904 -0
  280. data/generated/google/apis/plus_domains_v1.rb +61 -0
  281. data/generated/google/apis/plus_v1/classes.rb +2094 -0
  282. data/generated/google/apis/plus_v1/representations.rb +805 -0
  283. data/generated/google/apis/plus_v1/service.rb +470 -0
  284. data/generated/google/apis/plus_v1.rb +43 -0
  285. data/generated/google/apis/prediction_v1_6/classes.rb +751 -0
  286. data/generated/google/apis/prediction_v1_6/representations.rb +327 -0
  287. data/generated/google/apis/prediction_v1_6/service.rb +380 -0
  288. data/generated/google/apis/prediction_v1_6.rb +44 -0
  289. data/generated/google/apis/proximitybeacon_v1beta1/classes.rb +639 -0
  290. data/generated/google/apis/proximitybeacon_v1beta1/representations.rb +274 -0
  291. data/generated/google/apis/proximitybeacon_v1beta1/service.rb +591 -0
  292. data/generated/google/apis/proximitybeacon_v1beta1.rb +31 -0
  293. data/generated/google/apis/pubsub_v1/classes.rb +614 -0
  294. data/generated/google/apis/pubsub_v1/representations.rb +281 -0
  295. data/generated/google/apis/pubsub_v1/service.rb +774 -0
  296. data/generated/google/apis/pubsub_v1.rb +37 -0
  297. data/generated/google/apis/pubsub_v1beta2/classes.rb +620 -0
  298. data/generated/google/apis/pubsub_v1beta2/representations.rb +282 -0
  299. data/generated/google/apis/pubsub_v1beta2/service.rb +774 -0
  300. data/generated/google/apis/pubsub_v1beta2.rb +37 -0
  301. data/generated/google/apis/qpx_express_v1/classes.rb +1268 -0
  302. data/generated/google/apis/qpx_express_v1/representations.rb +424 -0
  303. data/generated/google/apis/qpx_express_v1/service.rb +100 -0
  304. data/generated/google/apis/qpx_express_v1.rb +31 -0
  305. data/generated/google/apis/replicapool_v1beta2/classes.rb +631 -0
  306. data/generated/google/apis/replicapool_v1beta2/representations.rb +236 -0
  307. data/generated/google/apis/replicapool_v1beta2/service.rb +608 -0
  308. data/generated/google/apis/replicapool_v1beta2.rb +44 -0
  309. data/generated/google/apis/replicapoolupdater_v1beta1/classes.rb +733 -0
  310. data/generated/google/apis/replicapoolupdater_v1beta1/representations.rb +264 -0
  311. data/generated/google/apis/replicapoolupdater_v1beta1/service.rb +508 -0
  312. data/generated/google/apis/replicapoolupdater_v1beta1.rb +44 -0
  313. data/generated/google/apis/reseller_v1/classes.rb +520 -0
  314. data/generated/google/apis/reseller_v1/representations.rb +200 -0
  315. data/generated/google/apis/reseller_v1/service.rb +623 -0
  316. data/generated/google/apis/reseller_v1.rb +37 -0
  317. data/generated/google/apis/resourceviews_v1beta2/classes.rb +660 -0
  318. data/generated/google/apis/resourceviews_v1beta2/representations.rb +269 -0
  319. data/generated/google/apis/resourceviews_v1beta2/service.rb +563 -0
  320. data/generated/google/apis/resourceviews_v1beta2.rb +50 -0
  321. data/generated/google/apis/script_v1/classes.rb +259 -0
  322. data/generated/google/apis/script_v1/representations.rb +106 -0
  323. data/generated/google/apis/script_v1/service.rb +98 -0
  324. data/generated/google/apis/script_v1.rb +61 -0
  325. data/generated/google/apis/site_verification_v1/classes.rb +185 -0
  326. data/generated/google/apis/site_verification_v1/representations.rb +101 -0
  327. data/generated/google/apis/site_verification_v1/service.rb +315 -0
  328. data/generated/google/apis/site_verification_v1.rb +37 -0
  329. data/generated/google/apis/sqladmin_v1beta4/classes.rb +2001 -0
  330. data/generated/google/apis/sqladmin_v1beta4/representations.rb +758 -0
  331. data/generated/google/apis/sqladmin_v1beta4/service.rb +1625 -0
  332. data/generated/google/apis/sqladmin_v1beta4.rb +37 -0
  333. data/generated/google/apis/storage_v1/classes.rb +1222 -0
  334. data/generated/google/apis/storage_v1/representations.rb +445 -0
  335. data/generated/google/apis/storage_v1/service.rb +1903 -0
  336. data/generated/google/apis/storage_v1.rb +46 -0
  337. data/generated/google/apis/storagetransfer_v1/classes.rb +1046 -0
  338. data/generated/google/apis/storagetransfer_v1/representations.rb +370 -0
  339. data/generated/google/apis/storagetransfer_v1/service.rb +473 -0
  340. data/generated/google/apis/storagetransfer_v1.rb +35 -0
  341. data/generated/google/apis/tagmanager_v1/classes.rb +1384 -0
  342. data/generated/google/apis/tagmanager_v1/representations.rb +515 -0
  343. data/generated/google/apis/tagmanager_v1/service.rb +1817 -0
  344. data/generated/google/apis/tagmanager_v1.rb +52 -0
  345. data/generated/google/apis/taskqueue_v1beta2/classes.rb +254 -0
  346. data/generated/google/apis/taskqueue_v1beta2/representations.rb +114 -0
  347. data/generated/google/apis/taskqueue_v1beta2/service.rb +408 -0
  348. data/generated/google/apis/taskqueue_v1beta2.rb +37 -0
  349. data/generated/google/apis/tasks_v1/classes.rb +296 -0
  350. data/generated/google/apis/tasks_v1/representations.rb +115 -0
  351. data/generated/google/apis/tasks_v1/service.rb +643 -0
  352. data/generated/google/apis/tasks_v1.rb +37 -0
  353. data/generated/google/apis/translate_v2/classes.rb +168 -0
  354. data/generated/google/apis/translate_v2/representations.rb +109 -0
  355. data/generated/google/apis/translate_v2/service.rb +182 -0
  356. data/generated/google/apis/translate_v2.rb +31 -0
  357. data/generated/google/apis/urlshortener_v1/classes.rb +246 -0
  358. data/generated/google/apis/urlshortener_v1/representations.rb +111 -0
  359. data/generated/google/apis/urlshortener_v1/service.rb +176 -0
  360. data/generated/google/apis/urlshortener_v1.rb +34 -0
  361. data/generated/google/apis/webmasters_v3/classes.rb +563 -0
  362. data/generated/google/apis/webmasters_v3/representations.rb +250 -0
  363. data/generated/google/apis/webmasters_v3/service.rb +573 -0
  364. data/generated/google/apis/webmasters_v3.rb +37 -0
  365. data/generated/google/apis/youtube_analytics_v1/classes.rb +546 -0
  366. data/generated/google/apis/youtube_analytics_v1/representations.rb +243 -0
  367. data/generated/google/apis/youtube_analytics_v1/service.rb +562 -0
  368. data/generated/google/apis/youtube_analytics_v1.rb +46 -0
  369. data/generated/google/apis/youtube_v3/classes.rb +8136 -0
  370. data/generated/google/apis/youtube_v3/representations.rb +2838 -0
  371. data/generated/google/apis/youtube_v3/service.rb +4403 -0
  372. data/generated/google/apis/youtube_v3.rb +49 -0
  373. data/generated/google/apis/youtubereporting_v1/classes.rb +258 -0
  374. data/generated/google/apis/youtubereporting_v1/representations.rb +128 -0
  375. data/generated/google/apis/youtubereporting_v1/service.rb +364 -0
  376. data/generated/google/apis/youtubereporting_v1.rb +38 -0
  377. data/google-api-client.gemspec +27 -39
  378. data/lib/google/api_client/auth/installed_app.rb +7 -5
  379. data/lib/google/api_client/auth/key_utils.rb +12 -11
  380. data/lib/google/api_client/auth/storage.rb +5 -2
  381. data/lib/google/api_client/auth/storages/file_store.rb +2 -3
  382. data/lib/google/api_client/auth/storages/redis_store.rb +7 -2
  383. data/lib/google/api_client/client_secrets.rb +4 -5
  384. data/lib/google/apis/core/api_command.rb +135 -0
  385. data/lib/google/apis/core/base_service.rb +317 -0
  386. data/lib/google/apis/core/batch.rb +239 -0
  387. data/lib/google/apis/core/download.rb +94 -0
  388. data/lib/google/apis/core/hashable.rb +44 -0
  389. data/lib/google/apis/core/http_client_adapter.rb +82 -0
  390. data/lib/google/apis/core/http_command.rb +312 -0
  391. data/lib/google/apis/core/json_representation.rb +127 -0
  392. data/lib/google/{api_client/version.rb → apis/core/logging.rb} +12 -8
  393. data/lib/google/apis/core/multipart.rb +187 -0
  394. data/lib/google/apis/core/upload.rb +288 -0
  395. data/lib/google/{api_client → apis}/errors.rb +39 -28
  396. data/lib/google/apis/generator/annotator.rb +295 -0
  397. data/lib/google/apis/generator/helpers.rb +74 -0
  398. data/lib/google/apis/generator/model.rb +143 -0
  399. data/lib/google/apis/generator/template.rb +124 -0
  400. data/lib/google/apis/generator/templates/_class.tmpl +40 -0
  401. data/lib/google/apis/generator/templates/_method.tmpl +92 -0
  402. data/lib/google/apis/generator/templates/_representation.tmpl +51 -0
  403. data/lib/google/apis/generator/templates/_representation_stub.tmpl +15 -0
  404. data/lib/google/apis/generator/templates/_representation_type.tmpl +10 -0
  405. data/lib/google/{api_client/reference.rb → apis/generator/templates/classes.rb.tmpl} +11 -9
  406. data/lib/google/apis/generator/templates/module.rb.tmpl +40 -0
  407. data/lib/google/apis/generator/templates/representations.rb.tmpl +32 -0
  408. data/lib/google/apis/generator/templates/service.rb.tmpl +60 -0
  409. data/lib/google/apis/generator.rb +70 -0
  410. data/lib/google/apis/options.rb +85 -0
  411. data/lib/google/apis/version.rb +39 -0
  412. data/lib/google/apis.rb +48 -0
  413. data/rakelib/metrics.rake +22 -0
  414. data/rakelib/rubocop.rake +10 -0
  415. data/rakelib/spec.rake +11 -0
  416. data/rakelib/yard.rake +11 -0
  417. data/samples/Gemfile +7 -0
  418. data/samples/README.md +51 -0
  419. data/samples/google-api-samples +32 -0
  420. data/samples/lib/base_cli.rb +94 -0
  421. data/samples/lib/samples/analytics.rb +62 -0
  422. data/samples/lib/samples/calendar.rb +83 -0
  423. data/samples/lib/samples/drive.rb +82 -0
  424. data/samples/lib/samples/gmail.rb +50 -0
  425. data/samples/lib/samples/pubsub.rb +114 -0
  426. data/samples/lib/samples/translate.rb +44 -0
  427. data/samples/lib/samples/you_tube.rb +44 -0
  428. data/script/generate +95 -0
  429. data/script/package +8 -0
  430. data/script/release +15 -0
  431. data/spec/fixtures/files/api_names.yaml +3 -0
  432. data/spec/fixtures/files/auth_stored_credentials.json +8 -0
  433. data/spec/fixtures/files/child/.gitignore +0 -0
  434. data/spec/fixtures/files/client_secrets.json +1 -0
  435. data/spec/fixtures/files/invalid.json +1 -0
  436. data/spec/fixtures/files/test.blah +1 -0
  437. data/spec/fixtures/files/test.txt +1 -0
  438. data/spec/fixtures/files/test_api.json +440 -0
  439. data/spec/google/api_client/auth/storage_spec.rb +1 -3
  440. data/spec/google/api_client/auth/storages/file_store_spec.rb +1 -2
  441. data/spec/google/api_client/auth/storages/redis_store_spec.rb +1 -3
  442. data/spec/google/api_client/client_secrets_spec.rb +38 -1
  443. data/spec/google/apis/core/api_command_spec.rb +209 -0
  444. data/spec/google/apis/core/batch_spec.rb +142 -0
  445. data/spec/google/apis/core/download_spec.rb +103 -0
  446. data/spec/google/apis/core/hashable_spec.rb +60 -0
  447. data/spec/google/apis/core/http_command_spec.rb +284 -0
  448. data/spec/google/apis/core/json_representation_spec.rb +192 -0
  449. data/spec/google/apis/core/service_spec.rb +247 -0
  450. data/spec/google/apis/core/upload_spec.rb +300 -0
  451. data/{lib/google/api_client/discovery.rb → spec/google/apis/generated_spec.rb} +13 -5
  452. data/spec/google/apis/generator/generator_spec.rb +272 -0
  453. data/spec/google/apis/logging_spec.rb +45 -0
  454. data/spec/google/apis/options_spec.rb +40 -0
  455. data/spec/integration_tests/adsense_spec.rb +29 -0
  456. data/spec/integration_tests/drive_spec.rb +35 -0
  457. data/spec/integration_tests/pubsub_spec.rb +48 -0
  458. data/spec/integration_tests/url_shortener_spec.rb +45 -0
  459. data/spec/spec_helper/load_path_spec.rb +33 -0
  460. data/spec/spec_helper.rb +131 -44
  461. data/third_party/hurley_patches.rb +103 -0
  462. metadata +533 -170
  463. data/lib/compat/multi_json.rb +0 -19
  464. data/lib/google/api_client/auth/file_storage.rb +0 -59
  465. data/lib/google/api_client/auth/jwt_asserter.rb +0 -126
  466. data/lib/google/api_client/auth/pkcs12.rb +0 -41
  467. data/lib/google/api_client/batch.rb +0 -325
  468. data/lib/google/api_client/charset.rb +0 -33
  469. data/lib/google/api_client/discovery/api.rb +0 -300
  470. data/lib/google/api_client/discovery/media.rb +0 -77
  471. data/lib/google/api_client/discovery/method.rb +0 -363
  472. data/lib/google/api_client/discovery/resource.rb +0 -156
  473. data/lib/google/api_client/discovery/schema.rb +0 -119
  474. data/lib/google/api_client/environment.rb +0 -42
  475. data/lib/google/api_client/gzip.rb +0 -28
  476. data/lib/google/api_client/logging.rb +0 -32
  477. data/lib/google/api_client/media.rb +0 -259
  478. data/lib/google/api_client/railtie.rb +0 -18
  479. data/lib/google/api_client/request.rb +0 -350
  480. data/lib/google/api_client/result.rb +0 -255
  481. data/lib/google/api_client/service/batch.rb +0 -110
  482. data/lib/google/api_client/service/request.rb +0 -144
  483. data/lib/google/api_client/service/resource.rb +0 -40
  484. data/lib/google/api_client/service/result.rb +0 -162
  485. data/lib/google/api_client/service/simple_file_store.rb +0 -151
  486. data/lib/google/api_client/service/stub_generator.rb +0 -61
  487. data/lib/google/api_client/service.rb +0 -233
  488. data/lib/google/api_client.rb +0 -750
  489. data/spec/google/api_client/batch_spec.rb +0 -248
  490. data/spec/google/api_client/discovery_spec.rb +0 -662
  491. data/spec/google/api_client/gzip_spec.rb +0 -98
  492. data/spec/google/api_client/media_spec.rb +0 -178
  493. data/spec/google/api_client/result_spec.rb +0 -207
  494. data/spec/google/api_client/service_account_spec.rb +0 -169
  495. data/spec/google/api_client/service_spec.rb +0 -618
  496. data/spec/google/api_client/simple_file_store_spec.rb +0 -133
  497. data/spec/google/api_client_spec.rb +0 -352
@@ -0,0 +1,1463 @@
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 FusiontablesV2
23
+ # Fusion Tables API
24
+ #
25
+ # API for working with Fusion Tables data.
26
+ #
27
+ # @example
28
+ # require 'google/apis/fusiontables_v2'
29
+ #
30
+ # Fusiontables = Google::Apis::FusiontablesV2 # Alias the module
31
+ # service = Fusiontables::FusiontablesService.new
32
+ #
33
+ # @see https://developers.google.com/fusiontables
34
+ class FusiontablesService < 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/', 'fusiontables/v2/')
53
+ end
54
+
55
+ # Deletes the specified column.
56
+ # @param [String] table_id
57
+ # Table from which the column is being deleted.
58
+ # @param [String] column_id
59
+ # Name or identifier for the column being deleted.
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_column(table_id, column_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
82
+ command = make_simple_command(:delete, 'tables/{tableId}/columns/{columnId}', options)
83
+ command.params['tableId'] = table_id unless table_id.nil?
84
+ command.params['columnId'] = column_id unless column_id.nil?
85
+ command.query['fields'] = fields unless fields.nil?
86
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
87
+ command.query['userIp'] = user_ip unless user_ip.nil?
88
+ execute_or_queue_command(command, &block)
89
+ end
90
+
91
+ # Retrieves a specific column by its ID.
92
+ # @param [String] table_id
93
+ # Table to which the column belongs.
94
+ # @param [String] column_id
95
+ # Name or identifier for the column that is being requested.
96
+ # @param [String] fields
97
+ # Selector specifying which fields to include in a partial response.
98
+ # @param [String] quota_user
99
+ # Available to use for quota purposes for server-side applications. Can be any
100
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
101
+ # Overrides userIp if both are provided.
102
+ # @param [String] user_ip
103
+ # IP address of the site where the request originates. Use this if you want to
104
+ # enforce per-user limits.
105
+ # @param [Google::Apis::RequestOptions] options
106
+ # Request-specific options
107
+ #
108
+ # @yield [result, err] Result & error if block supplied
109
+ # @yieldparam result [Google::Apis::FusiontablesV2::Column] parsed result object
110
+ # @yieldparam err [StandardError] error object if request failed
111
+ #
112
+ # @return [Google::Apis::FusiontablesV2::Column]
113
+ #
114
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
115
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
116
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
117
+ def get_column(table_id, column_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
118
+ command = make_simple_command(:get, 'tables/{tableId}/columns/{columnId}', options)
119
+ command.response_representation = Google::Apis::FusiontablesV2::Column::Representation
120
+ command.response_class = Google::Apis::FusiontablesV2::Column
121
+ command.params['tableId'] = table_id unless table_id.nil?
122
+ command.params['columnId'] = column_id unless column_id.nil?
123
+ command.query['fields'] = fields unless fields.nil?
124
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
125
+ command.query['userIp'] = user_ip unless user_ip.nil?
126
+ execute_or_queue_command(command, &block)
127
+ end
128
+
129
+ # Adds a new column to the table.
130
+ # @param [String] table_id
131
+ # Table for which a new column is being added.
132
+ # @param [Google::Apis::FusiontablesV2::Column] column_object
133
+ # @param [String] fields
134
+ # Selector specifying which fields to include in a partial response.
135
+ # @param [String] quota_user
136
+ # Available to use for quota purposes for server-side applications. Can be any
137
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
138
+ # Overrides userIp if both are provided.
139
+ # @param [String] user_ip
140
+ # IP address of the site where the request originates. Use this if you want to
141
+ # enforce per-user limits.
142
+ # @param [Google::Apis::RequestOptions] options
143
+ # Request-specific options
144
+ #
145
+ # @yield [result, err] Result & error if block supplied
146
+ # @yieldparam result [Google::Apis::FusiontablesV2::Column] parsed result object
147
+ # @yieldparam err [StandardError] error object if request failed
148
+ #
149
+ # @return [Google::Apis::FusiontablesV2::Column]
150
+ #
151
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
152
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
153
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
154
+ def insert_column(table_id, column_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
155
+ command = make_simple_command(:post, 'tables/{tableId}/columns', options)
156
+ command.request_representation = Google::Apis::FusiontablesV2::Column::Representation
157
+ command.request_object = column_object
158
+ command.response_representation = Google::Apis::FusiontablesV2::Column::Representation
159
+ command.response_class = Google::Apis::FusiontablesV2::Column
160
+ command.params['tableId'] = table_id unless table_id.nil?
161
+ command.query['fields'] = fields unless fields.nil?
162
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
163
+ command.query['userIp'] = user_ip unless user_ip.nil?
164
+ execute_or_queue_command(command, &block)
165
+ end
166
+
167
+ # Retrieves a list of columns.
168
+ # @param [String] table_id
169
+ # Table whose columns are being listed.
170
+ # @param [Fixnum] max_results
171
+ # Maximum number of columns to return. Default is 5.
172
+ # @param [String] page_token
173
+ # Continuation token specifying which result page to return.
174
+ # @param [String] fields
175
+ # Selector specifying which fields to include in a partial response.
176
+ # @param [String] quota_user
177
+ # Available to use for quota purposes for server-side applications. Can be any
178
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
179
+ # Overrides userIp if both are provided.
180
+ # @param [String] user_ip
181
+ # IP address of the site where the request originates. Use this if you want to
182
+ # enforce per-user limits.
183
+ # @param [Google::Apis::RequestOptions] options
184
+ # Request-specific options
185
+ #
186
+ # @yield [result, err] Result & error if block supplied
187
+ # @yieldparam result [Google::Apis::FusiontablesV2::ColumnList] parsed result object
188
+ # @yieldparam err [StandardError] error object if request failed
189
+ #
190
+ # @return [Google::Apis::FusiontablesV2::ColumnList]
191
+ #
192
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
193
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
194
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
195
+ def list_columns(table_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
196
+ command = make_simple_command(:get, 'tables/{tableId}/columns', options)
197
+ command.response_representation = Google::Apis::FusiontablesV2::ColumnList::Representation
198
+ command.response_class = Google::Apis::FusiontablesV2::ColumnList
199
+ command.params['tableId'] = table_id unless table_id.nil?
200
+ command.query['maxResults'] = max_results unless max_results.nil?
201
+ command.query['pageToken'] = page_token unless page_token.nil?
202
+ command.query['fields'] = fields unless fields.nil?
203
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
204
+ command.query['userIp'] = user_ip unless user_ip.nil?
205
+ execute_or_queue_command(command, &block)
206
+ end
207
+
208
+ # Updates the name or type of an existing column. This method supports patch
209
+ # semantics.
210
+ # @param [String] table_id
211
+ # Table for which the column is being updated.
212
+ # @param [String] column_id
213
+ # Name or identifier for the column that is being updated.
214
+ # @param [Google::Apis::FusiontablesV2::Column] column_object
215
+ # @param [String] fields
216
+ # Selector specifying which fields to include in a partial response.
217
+ # @param [String] quota_user
218
+ # Available to use for quota purposes for server-side applications. Can be any
219
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
220
+ # Overrides userIp if both are provided.
221
+ # @param [String] user_ip
222
+ # IP address of the site where the request originates. Use this if you want to
223
+ # enforce per-user limits.
224
+ # @param [Google::Apis::RequestOptions] options
225
+ # Request-specific options
226
+ #
227
+ # @yield [result, err] Result & error if block supplied
228
+ # @yieldparam result [Google::Apis::FusiontablesV2::Column] parsed result object
229
+ # @yieldparam err [StandardError] error object if request failed
230
+ #
231
+ # @return [Google::Apis::FusiontablesV2::Column]
232
+ #
233
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
234
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
235
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
236
+ def patch_column(table_id, column_id, column_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
237
+ command = make_simple_command(:patch, 'tables/{tableId}/columns/{columnId}', options)
238
+ command.request_representation = Google::Apis::FusiontablesV2::Column::Representation
239
+ command.request_object = column_object
240
+ command.response_representation = Google::Apis::FusiontablesV2::Column::Representation
241
+ command.response_class = Google::Apis::FusiontablesV2::Column
242
+ command.params['tableId'] = table_id unless table_id.nil?
243
+ command.params['columnId'] = column_id unless column_id.nil?
244
+ command.query['fields'] = fields unless fields.nil?
245
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
246
+ command.query['userIp'] = user_ip unless user_ip.nil?
247
+ execute_or_queue_command(command, &block)
248
+ end
249
+
250
+ # Updates the name or type of an existing column.
251
+ # @param [String] table_id
252
+ # Table for which the column is being updated.
253
+ # @param [String] column_id
254
+ # Name or identifier for the column that is being updated.
255
+ # @param [Google::Apis::FusiontablesV2::Column] column_object
256
+ # @param [String] fields
257
+ # Selector specifying which fields to include in a partial response.
258
+ # @param [String] quota_user
259
+ # Available to use for quota purposes for server-side applications. Can be any
260
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
261
+ # Overrides userIp if both are provided.
262
+ # @param [String] user_ip
263
+ # IP address of the site where the request originates. Use this if you want to
264
+ # enforce per-user limits.
265
+ # @param [Google::Apis::RequestOptions] options
266
+ # Request-specific options
267
+ #
268
+ # @yield [result, err] Result & error if block supplied
269
+ # @yieldparam result [Google::Apis::FusiontablesV2::Column] parsed result object
270
+ # @yieldparam err [StandardError] error object if request failed
271
+ #
272
+ # @return [Google::Apis::FusiontablesV2::Column]
273
+ #
274
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
275
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
276
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
277
+ def update_column(table_id, column_id, column_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
278
+ command = make_simple_command(:put, 'tables/{tableId}/columns/{columnId}', options)
279
+ command.request_representation = Google::Apis::FusiontablesV2::Column::Representation
280
+ command.request_object = column_object
281
+ command.response_representation = Google::Apis::FusiontablesV2::Column::Representation
282
+ command.response_class = Google::Apis::FusiontablesV2::Column
283
+ command.params['tableId'] = table_id unless table_id.nil?
284
+ command.params['columnId'] = column_id unless column_id.nil?
285
+ command.query['fields'] = fields unless fields.nil?
286
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
287
+ command.query['userIp'] = user_ip unless user_ip.nil?
288
+ execute_or_queue_command(command, &block)
289
+ end
290
+
291
+ # Executes a Fusion Tables SQL statement, which can be any of
292
+ # - SELECT
293
+ # - INSERT
294
+ # - UPDATE
295
+ # - DELETE
296
+ # - SHOW
297
+ # - DESCRIBE
298
+ # - CREATE statement.
299
+ # @param [String] sql
300
+ # A Fusion Tables SQL statement, which can be any of
301
+ # - SELECT
302
+ # - INSERT
303
+ # - UPDATE
304
+ # - DELETE
305
+ # - SHOW
306
+ # - DESCRIBE
307
+ # - CREATE
308
+ # @param [Boolean] hdrs
309
+ # Whether column names are included in the first row. Default is true.
310
+ # @param [Boolean] typed
311
+ # Whether typed values are returned in the (JSON) response: numbers for numeric
312
+ # values and parsed geometries for KML values. Default is true.
313
+ # @param [String] fields
314
+ # Selector specifying which fields to include in a partial response.
315
+ # @param [String] quota_user
316
+ # Available to use for quota purposes for server-side applications. Can be any
317
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
318
+ # Overrides userIp if both are provided.
319
+ # @param [String] user_ip
320
+ # IP address of the site where the request originates. Use this if you want to
321
+ # enforce per-user limits.
322
+ # @param [IO, String] download_dest
323
+ # IO stream or filename to receive content download
324
+ # @param [Google::Apis::RequestOptions] options
325
+ # Request-specific options
326
+ #
327
+ # @yield [result, err] Result & error if block supplied
328
+ # @yieldparam result [Google::Apis::FusiontablesV2::Sqlresponse] parsed result object
329
+ # @yieldparam err [StandardError] error object if request failed
330
+ #
331
+ # @return [Google::Apis::FusiontablesV2::Sqlresponse]
332
+ #
333
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
334
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
335
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
336
+ def sql_query(sql, hdrs: nil, typed: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block)
337
+ if download_dest.nil?
338
+ command = make_simple_command(:post, 'query', options)
339
+ else
340
+ command = make_download_command(:post, 'query', options)
341
+ command.download_dest = download_dest
342
+ end
343
+ command.response_representation = Google::Apis::FusiontablesV2::Sqlresponse::Representation
344
+ command.response_class = Google::Apis::FusiontablesV2::Sqlresponse
345
+ command.query['hdrs'] = hdrs unless hdrs.nil?
346
+ command.query['sql'] = sql unless sql.nil?
347
+ command.query['typed'] = typed unless typed.nil?
348
+ command.query['fields'] = fields unless fields.nil?
349
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
350
+ command.query['userIp'] = user_ip unless user_ip.nil?
351
+ execute_or_queue_command(command, &block)
352
+ end
353
+
354
+ # Executes a SQL statement which can be any of
355
+ # - SELECT
356
+ # - SHOW
357
+ # - DESCRIBE
358
+ # @param [String] sql
359
+ # A SQL statement which can be any of
360
+ # - SELECT
361
+ # - SHOW
362
+ # - DESCRIBE
363
+ # @param [Boolean] hdrs
364
+ # Whether column names are included (in the first row). Default is true.
365
+ # @param [Boolean] typed
366
+ # Whether typed values are returned in the (JSON) response: numbers for numeric
367
+ # values and parsed geometries for KML values. Default is true.
368
+ # @param [String] fields
369
+ # Selector specifying which fields to include in a partial response.
370
+ # @param [String] quota_user
371
+ # Available to use for quota purposes for server-side applications. Can be any
372
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
373
+ # Overrides userIp if both are provided.
374
+ # @param [String] user_ip
375
+ # IP address of the site where the request originates. Use this if you want to
376
+ # enforce per-user limits.
377
+ # @param [IO, String] download_dest
378
+ # IO stream or filename to receive content download
379
+ # @param [Google::Apis::RequestOptions] options
380
+ # Request-specific options
381
+ #
382
+ # @yield [result, err] Result & error if block supplied
383
+ # @yieldparam result [Google::Apis::FusiontablesV2::Sqlresponse] parsed result object
384
+ # @yieldparam err [StandardError] error object if request failed
385
+ #
386
+ # @return [Google::Apis::FusiontablesV2::Sqlresponse]
387
+ #
388
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
389
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
390
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
391
+ def sql_query_get(sql, hdrs: nil, typed: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block)
392
+ if download_dest.nil?
393
+ command = make_simple_command(:get, 'query', options)
394
+ else
395
+ command = make_download_command(:get, 'query', options)
396
+ command.download_dest = download_dest
397
+ end
398
+ command.response_representation = Google::Apis::FusiontablesV2::Sqlresponse::Representation
399
+ command.response_class = Google::Apis::FusiontablesV2::Sqlresponse
400
+ command.query['hdrs'] = hdrs unless hdrs.nil?
401
+ command.query['sql'] = sql unless sql.nil?
402
+ command.query['typed'] = typed unless typed.nil?
403
+ command.query['fields'] = fields unless fields.nil?
404
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
405
+ command.query['userIp'] = user_ip unless user_ip.nil?
406
+ execute_or_queue_command(command, &block)
407
+ end
408
+
409
+ # Deletes a style.
410
+ # @param [String] table_id
411
+ # Table from which the style is being deleted
412
+ # @param [Fixnum] style_id
413
+ # Identifier (within a table) for the style being deleted
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 [NilClass] No result returned for this method
428
+ # @yieldparam err [StandardError] error object if request failed
429
+ #
430
+ # @return [void]
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 delete_style(table_id, style_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
436
+ command = make_simple_command(:delete, 'tables/{tableId}/styles/{styleId}', options)
437
+ command.params['tableId'] = table_id unless table_id.nil?
438
+ command.params['styleId'] = style_id unless style_id.nil?
439
+ command.query['fields'] = fields unless fields.nil?
440
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
441
+ command.query['userIp'] = user_ip unless user_ip.nil?
442
+ execute_or_queue_command(command, &block)
443
+ end
444
+
445
+ # Gets a specific style.
446
+ # @param [String] table_id
447
+ # Table to which the requested style belongs
448
+ # @param [Fixnum] style_id
449
+ # Identifier (integer) for a specific style in a table
450
+ # @param [String] fields
451
+ # Selector specifying which fields to include in a partial response.
452
+ # @param [String] quota_user
453
+ # Available to use for quota purposes for server-side applications. Can be any
454
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
455
+ # Overrides userIp if both are provided.
456
+ # @param [String] user_ip
457
+ # IP address of the site where the request originates. Use this if you want to
458
+ # enforce per-user limits.
459
+ # @param [Google::Apis::RequestOptions] options
460
+ # Request-specific options
461
+ #
462
+ # @yield [result, err] Result & error if block supplied
463
+ # @yieldparam result [Google::Apis::FusiontablesV2::StyleSetting] parsed result object
464
+ # @yieldparam err [StandardError] error object if request failed
465
+ #
466
+ # @return [Google::Apis::FusiontablesV2::StyleSetting]
467
+ #
468
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
469
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
470
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
471
+ def get_style(table_id, style_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
472
+ command = make_simple_command(:get, 'tables/{tableId}/styles/{styleId}', options)
473
+ command.response_representation = Google::Apis::FusiontablesV2::StyleSetting::Representation
474
+ command.response_class = Google::Apis::FusiontablesV2::StyleSetting
475
+ command.params['tableId'] = table_id unless table_id.nil?
476
+ command.params['styleId'] = style_id unless style_id.nil?
477
+ command.query['fields'] = fields unless fields.nil?
478
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
479
+ command.query['userIp'] = user_ip unless user_ip.nil?
480
+ execute_or_queue_command(command, &block)
481
+ end
482
+
483
+ # Adds a new style for the table.
484
+ # @param [String] table_id
485
+ # Table for which a new style is being added
486
+ # @param [Google::Apis::FusiontablesV2::StyleSetting] style_setting_object
487
+ # @param [String] fields
488
+ # Selector specifying which fields to include in a partial response.
489
+ # @param [String] quota_user
490
+ # Available to use for quota purposes for server-side applications. Can be any
491
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
492
+ # Overrides userIp if both are provided.
493
+ # @param [String] user_ip
494
+ # IP address of the site where the request originates. Use this if you want to
495
+ # enforce per-user limits.
496
+ # @param [Google::Apis::RequestOptions] options
497
+ # Request-specific options
498
+ #
499
+ # @yield [result, err] Result & error if block supplied
500
+ # @yieldparam result [Google::Apis::FusiontablesV2::StyleSetting] parsed result object
501
+ # @yieldparam err [StandardError] error object if request failed
502
+ #
503
+ # @return [Google::Apis::FusiontablesV2::StyleSetting]
504
+ #
505
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
506
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
507
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
508
+ def insert_style(table_id, style_setting_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
509
+ command = make_simple_command(:post, 'tables/{tableId}/styles', options)
510
+ command.request_representation = Google::Apis::FusiontablesV2::StyleSetting::Representation
511
+ command.request_object = style_setting_object
512
+ command.response_representation = Google::Apis::FusiontablesV2::StyleSetting::Representation
513
+ command.response_class = Google::Apis::FusiontablesV2::StyleSetting
514
+ command.params['tableId'] = table_id unless table_id.nil?
515
+ command.query['fields'] = fields unless fields.nil?
516
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
517
+ command.query['userIp'] = user_ip unless user_ip.nil?
518
+ execute_or_queue_command(command, &block)
519
+ end
520
+
521
+ # Retrieves a list of styles.
522
+ # @param [String] table_id
523
+ # Table whose styles are being listed
524
+ # @param [Fixnum] max_results
525
+ # Maximum number of styles to return. Optional. Default is 5.
526
+ # @param [String] page_token
527
+ # Continuation token specifying which result page to return. Optional.
528
+ # @param [String] fields
529
+ # Selector specifying which fields to include in a partial response.
530
+ # @param [String] quota_user
531
+ # Available to use for quota purposes for server-side applications. Can be any
532
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
533
+ # Overrides userIp if both are provided.
534
+ # @param [String] user_ip
535
+ # IP address of the site where the request originates. Use this if you want to
536
+ # enforce per-user limits.
537
+ # @param [Google::Apis::RequestOptions] options
538
+ # Request-specific options
539
+ #
540
+ # @yield [result, err] Result & error if block supplied
541
+ # @yieldparam result [Google::Apis::FusiontablesV2::StyleSettingList] parsed result object
542
+ # @yieldparam err [StandardError] error object if request failed
543
+ #
544
+ # @return [Google::Apis::FusiontablesV2::StyleSettingList]
545
+ #
546
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
547
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
548
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
549
+ def list_styles(table_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
550
+ command = make_simple_command(:get, 'tables/{tableId}/styles', options)
551
+ command.response_representation = Google::Apis::FusiontablesV2::StyleSettingList::Representation
552
+ command.response_class = Google::Apis::FusiontablesV2::StyleSettingList
553
+ command.params['tableId'] = table_id unless table_id.nil?
554
+ command.query['maxResults'] = max_results unless max_results.nil?
555
+ command.query['pageToken'] = page_token unless page_token.nil?
556
+ command.query['fields'] = fields unless fields.nil?
557
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
558
+ command.query['userIp'] = user_ip unless user_ip.nil?
559
+ execute_or_queue_command(command, &block)
560
+ end
561
+
562
+ # Updates an existing style. This method supports patch semantics.
563
+ # @param [String] table_id
564
+ # Table whose style is being updated.
565
+ # @param [Fixnum] style_id
566
+ # Identifier (within a table) for the style being updated.
567
+ # @param [Google::Apis::FusiontablesV2::StyleSetting] style_setting_object
568
+ # @param [String] fields
569
+ # Selector specifying which fields to include in a partial response.
570
+ # @param [String] quota_user
571
+ # Available to use for quota purposes for server-side applications. Can be any
572
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
573
+ # Overrides userIp if both are provided.
574
+ # @param [String] user_ip
575
+ # IP address of the site where the request originates. Use this if you want to
576
+ # enforce per-user limits.
577
+ # @param [Google::Apis::RequestOptions] options
578
+ # Request-specific options
579
+ #
580
+ # @yield [result, err] Result & error if block supplied
581
+ # @yieldparam result [Google::Apis::FusiontablesV2::StyleSetting] parsed result object
582
+ # @yieldparam err [StandardError] error object if request failed
583
+ #
584
+ # @return [Google::Apis::FusiontablesV2::StyleSetting]
585
+ #
586
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
587
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
588
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
589
+ def patch_style(table_id, style_id, style_setting_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
590
+ command = make_simple_command(:patch, 'tables/{tableId}/styles/{styleId}', options)
591
+ command.request_representation = Google::Apis::FusiontablesV2::StyleSetting::Representation
592
+ command.request_object = style_setting_object
593
+ command.response_representation = Google::Apis::FusiontablesV2::StyleSetting::Representation
594
+ command.response_class = Google::Apis::FusiontablesV2::StyleSetting
595
+ command.params['tableId'] = table_id unless table_id.nil?
596
+ command.params['styleId'] = style_id unless style_id.nil?
597
+ command.query['fields'] = fields unless fields.nil?
598
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
599
+ command.query['userIp'] = user_ip unless user_ip.nil?
600
+ execute_or_queue_command(command, &block)
601
+ end
602
+
603
+ # Updates an existing style.
604
+ # @param [String] table_id
605
+ # Table whose style is being updated.
606
+ # @param [Fixnum] style_id
607
+ # Identifier (within a table) for the style being updated.
608
+ # @param [Google::Apis::FusiontablesV2::StyleSetting] style_setting_object
609
+ # @param [String] fields
610
+ # Selector specifying which fields to include in a partial response.
611
+ # @param [String] quota_user
612
+ # Available to use for quota purposes for server-side applications. Can be any
613
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
614
+ # Overrides userIp if both are provided.
615
+ # @param [String] user_ip
616
+ # IP address of the site where the request originates. Use this if you want to
617
+ # enforce per-user limits.
618
+ # @param [Google::Apis::RequestOptions] options
619
+ # Request-specific options
620
+ #
621
+ # @yield [result, err] Result & error if block supplied
622
+ # @yieldparam result [Google::Apis::FusiontablesV2::StyleSetting] parsed result object
623
+ # @yieldparam err [StandardError] error object if request failed
624
+ #
625
+ # @return [Google::Apis::FusiontablesV2::StyleSetting]
626
+ #
627
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
628
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
629
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
630
+ def update_style(table_id, style_id, style_setting_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
631
+ command = make_simple_command(:put, 'tables/{tableId}/styles/{styleId}', options)
632
+ command.request_representation = Google::Apis::FusiontablesV2::StyleSetting::Representation
633
+ command.request_object = style_setting_object
634
+ command.response_representation = Google::Apis::FusiontablesV2::StyleSetting::Representation
635
+ command.response_class = Google::Apis::FusiontablesV2::StyleSetting
636
+ command.params['tableId'] = table_id unless table_id.nil?
637
+ command.params['styleId'] = style_id unless style_id.nil?
638
+ command.query['fields'] = fields unless fields.nil?
639
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
640
+ command.query['userIp'] = user_ip unless user_ip.nil?
641
+ execute_or_queue_command(command, &block)
642
+ end
643
+
644
+ # Copies a table.
645
+ # @param [String] table_id
646
+ # ID of the table that is being copied.
647
+ # @param [Boolean] copy_presentation
648
+ # Whether to also copy tabs, styles, and templates. Default is false.
649
+ # @param [String] fields
650
+ # Selector specifying which fields to include in a partial response.
651
+ # @param [String] quota_user
652
+ # Available to use for quota purposes for server-side applications. Can be any
653
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
654
+ # Overrides userIp if both are provided.
655
+ # @param [String] user_ip
656
+ # IP address of the site where the request originates. Use this if you want to
657
+ # enforce per-user limits.
658
+ # @param [Google::Apis::RequestOptions] options
659
+ # Request-specific options
660
+ #
661
+ # @yield [result, err] Result & error if block supplied
662
+ # @yieldparam result [Google::Apis::FusiontablesV2::Table] parsed result object
663
+ # @yieldparam err [StandardError] error object if request failed
664
+ #
665
+ # @return [Google::Apis::FusiontablesV2::Table]
666
+ #
667
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
668
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
669
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
670
+ def copy_table(table_id, copy_presentation: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
671
+ command = make_simple_command(:post, 'tables/{tableId}/copy', options)
672
+ command.response_representation = Google::Apis::FusiontablesV2::Table::Representation
673
+ command.response_class = Google::Apis::FusiontablesV2::Table
674
+ command.params['tableId'] = table_id unless table_id.nil?
675
+ command.query['copyPresentation'] = copy_presentation unless copy_presentation.nil?
676
+ command.query['fields'] = fields unless fields.nil?
677
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
678
+ command.query['userIp'] = user_ip unless user_ip.nil?
679
+ execute_or_queue_command(command, &block)
680
+ end
681
+
682
+ # Deletes a table.
683
+ # @param [String] table_id
684
+ # ID of the table to be deleted.
685
+ # @param [String] fields
686
+ # Selector specifying which fields to include in a partial response.
687
+ # @param [String] quota_user
688
+ # Available to use for quota purposes for server-side applications. Can be any
689
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
690
+ # Overrides userIp if both are provided.
691
+ # @param [String] user_ip
692
+ # IP address of the site where the request originates. Use this if you want to
693
+ # enforce per-user limits.
694
+ # @param [Google::Apis::RequestOptions] options
695
+ # Request-specific options
696
+ #
697
+ # @yield [result, err] Result & error if block supplied
698
+ # @yieldparam result [NilClass] No result returned for this method
699
+ # @yieldparam err [StandardError] error object if request failed
700
+ #
701
+ # @return [void]
702
+ #
703
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
704
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
705
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
706
+ def delete_table(table_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
707
+ command = make_simple_command(:delete, 'tables/{tableId}', options)
708
+ command.params['tableId'] = table_id unless table_id.nil?
709
+ command.query['fields'] = fields unless fields.nil?
710
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
711
+ command.query['userIp'] = user_ip unless user_ip.nil?
712
+ execute_or_queue_command(command, &block)
713
+ end
714
+
715
+ # Retrieves a specific table by its ID.
716
+ # @param [String] table_id
717
+ # Identifier for the table being requested.
718
+ # @param [String] fields
719
+ # Selector specifying which fields to include in a partial response.
720
+ # @param [String] quota_user
721
+ # Available to use for quota purposes for server-side applications. Can be any
722
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
723
+ # Overrides userIp if both are provided.
724
+ # @param [String] user_ip
725
+ # IP address of the site where the request originates. Use this if you want to
726
+ # enforce per-user limits.
727
+ # @param [Google::Apis::RequestOptions] options
728
+ # Request-specific options
729
+ #
730
+ # @yield [result, err] Result & error if block supplied
731
+ # @yieldparam result [Google::Apis::FusiontablesV2::Table] parsed result object
732
+ # @yieldparam err [StandardError] error object if request failed
733
+ #
734
+ # @return [Google::Apis::FusiontablesV2::Table]
735
+ #
736
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
737
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
738
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
739
+ def get_table(table_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
740
+ command = make_simple_command(:get, 'tables/{tableId}', options)
741
+ command.response_representation = Google::Apis::FusiontablesV2::Table::Representation
742
+ command.response_class = Google::Apis::FusiontablesV2::Table
743
+ command.params['tableId'] = table_id unless table_id.nil?
744
+ command.query['fields'] = fields unless fields.nil?
745
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
746
+ command.query['userIp'] = user_ip unless user_ip.nil?
747
+ execute_or_queue_command(command, &block)
748
+ end
749
+
750
+ # Imports more rows into a table.
751
+ # @param [String] table_id
752
+ # The table into which new rows are being imported.
753
+ # @param [String] delimiter
754
+ # The delimiter used to separate cell values. This can only consist of a single
755
+ # character. Default is ,.
756
+ # @param [String] encoding
757
+ # The encoding of the content. Default is UTF-8. Use auto-detect if you are
758
+ # unsure of the encoding.
759
+ # @param [Fixnum] end_line
760
+ # The index of the line up to which data will be imported. Default is to import
761
+ # the entire file. If endLine is negative, it is an offset from the end of the
762
+ # file; the imported content will exclude the last endLine lines.
763
+ # @param [Boolean] is_strict
764
+ # Whether the imported CSV must have the same number of values for each row. If
765
+ # false, rows with fewer values will be padded with empty values. Default is
766
+ # true.
767
+ # @param [Fixnum] start_line
768
+ # The index of the first line from which to start importing, inclusive. Default
769
+ # is 0.
770
+ # @param [String] fields
771
+ # Selector specifying which fields to include in a partial response.
772
+ # @param [String] quota_user
773
+ # Available to use for quota purposes for server-side applications. Can be any
774
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
775
+ # Overrides userIp if both are provided.
776
+ # @param [String] user_ip
777
+ # IP address of the site where the request originates. Use this if you want to
778
+ # enforce per-user limits.
779
+ # @param [IO, String] upload_source
780
+ # IO stream or filename containing content to upload
781
+ # @param [String] content_type
782
+ # Content type of the uploaded content.
783
+ # @param [Google::Apis::RequestOptions] options
784
+ # Request-specific options
785
+ #
786
+ # @yield [result, err] Result & error if block supplied
787
+ # @yieldparam result [Google::Apis::FusiontablesV2::Import] parsed result object
788
+ # @yieldparam err [StandardError] error object if request failed
789
+ #
790
+ # @return [Google::Apis::FusiontablesV2::Import]
791
+ #
792
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
793
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
794
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
795
+ def import_rows(table_id, delimiter: nil, encoding: nil, end_line: nil, is_strict: nil, start_line: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block)
796
+ if upload_source.nil?
797
+ command = make_simple_command(:post, 'tables/{tableId}/import', options)
798
+ else
799
+ command = make_upload_command(:post, 'tables/{tableId}/import', options)
800
+ command.upload_source = upload_source
801
+ command.upload_content_type = content_type
802
+ end
803
+ command.response_representation = Google::Apis::FusiontablesV2::Import::Representation
804
+ command.response_class = Google::Apis::FusiontablesV2::Import
805
+ command.params['tableId'] = table_id unless table_id.nil?
806
+ command.query['delimiter'] = delimiter unless delimiter.nil?
807
+ command.query['encoding'] = encoding unless encoding.nil?
808
+ command.query['endLine'] = end_line unless end_line.nil?
809
+ command.query['isStrict'] = is_strict unless is_strict.nil?
810
+ command.query['startLine'] = start_line unless start_line.nil?
811
+ command.query['fields'] = fields unless fields.nil?
812
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
813
+ command.query['userIp'] = user_ip unless user_ip.nil?
814
+ execute_or_queue_command(command, &block)
815
+ end
816
+
817
+ # Imports a new table.
818
+ # @param [String] name
819
+ # The name to be assigned to the new table.
820
+ # @param [String] delimiter
821
+ # The delimiter used to separate cell values. This can only consist of a single
822
+ # character. Default is ,.
823
+ # @param [String] encoding
824
+ # The encoding of the content. Default is UTF-8. Use auto-detect if you are
825
+ # unsure of the encoding.
826
+ # @param [String] fields
827
+ # Selector specifying which fields to include in a partial response.
828
+ # @param [String] quota_user
829
+ # Available to use for quota purposes for server-side applications. Can be any
830
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
831
+ # Overrides userIp if both are provided.
832
+ # @param [String] user_ip
833
+ # IP address of the site where the request originates. Use this if you want to
834
+ # enforce per-user limits.
835
+ # @param [IO, String] upload_source
836
+ # IO stream or filename containing content to upload
837
+ # @param [String] content_type
838
+ # Content type of the uploaded content.
839
+ # @param [Google::Apis::RequestOptions] options
840
+ # Request-specific options
841
+ #
842
+ # @yield [result, err] Result & error if block supplied
843
+ # @yieldparam result [Google::Apis::FusiontablesV2::Table] parsed result object
844
+ # @yieldparam err [StandardError] error object if request failed
845
+ #
846
+ # @return [Google::Apis::FusiontablesV2::Table]
847
+ #
848
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
849
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
850
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
851
+ def import_table(name, delimiter: nil, encoding: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block)
852
+ if upload_source.nil?
853
+ command = make_simple_command(:post, 'tables/import', options)
854
+ else
855
+ command = make_upload_command(:post, 'tables/import', options)
856
+ command.upload_source = upload_source
857
+ command.upload_content_type = content_type
858
+ end
859
+ command.response_representation = Google::Apis::FusiontablesV2::Table::Representation
860
+ command.response_class = Google::Apis::FusiontablesV2::Table
861
+ command.query['delimiter'] = delimiter unless delimiter.nil?
862
+ command.query['encoding'] = encoding unless encoding.nil?
863
+ command.query['name'] = name unless name.nil?
864
+ command.query['fields'] = fields unless fields.nil?
865
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
866
+ command.query['userIp'] = user_ip unless user_ip.nil?
867
+ execute_or_queue_command(command, &block)
868
+ end
869
+
870
+ # Creates a new table.
871
+ # @param [Google::Apis::FusiontablesV2::Table] table_object
872
+ # @param [String] fields
873
+ # Selector specifying which fields to include in a partial response.
874
+ # @param [String] quota_user
875
+ # Available to use for quota purposes for server-side applications. Can be any
876
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
877
+ # Overrides userIp if both are provided.
878
+ # @param [String] user_ip
879
+ # IP address of the site where the request originates. Use this if you want to
880
+ # enforce per-user limits.
881
+ # @param [Google::Apis::RequestOptions] options
882
+ # Request-specific options
883
+ #
884
+ # @yield [result, err] Result & error if block supplied
885
+ # @yieldparam result [Google::Apis::FusiontablesV2::Table] parsed result object
886
+ # @yieldparam err [StandardError] error object if request failed
887
+ #
888
+ # @return [Google::Apis::FusiontablesV2::Table]
889
+ #
890
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
891
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
892
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
893
+ def insert_table(table_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
894
+ command = make_simple_command(:post, 'tables', options)
895
+ command.request_representation = Google::Apis::FusiontablesV2::Table::Representation
896
+ command.request_object = table_object
897
+ command.response_representation = Google::Apis::FusiontablesV2::Table::Representation
898
+ command.response_class = Google::Apis::FusiontablesV2::Table
899
+ command.query['fields'] = fields unless fields.nil?
900
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
901
+ command.query['userIp'] = user_ip unless user_ip.nil?
902
+ execute_or_queue_command(command, &block)
903
+ end
904
+
905
+ # Retrieves a list of tables a user owns.
906
+ # @param [Fixnum] max_results
907
+ # Maximum number of tables to return. Default is 5.
908
+ # @param [String] page_token
909
+ # Continuation token specifying which result page to return.
910
+ # @param [String] fields
911
+ # Selector specifying which fields to include in a partial response.
912
+ # @param [String] quota_user
913
+ # Available to use for quota purposes for server-side applications. Can be any
914
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
915
+ # Overrides userIp if both are provided.
916
+ # @param [String] user_ip
917
+ # IP address of the site where the request originates. Use this if you want to
918
+ # enforce per-user limits.
919
+ # @param [Google::Apis::RequestOptions] options
920
+ # Request-specific options
921
+ #
922
+ # @yield [result, err] Result & error if block supplied
923
+ # @yieldparam result [Google::Apis::FusiontablesV2::TableList] parsed result object
924
+ # @yieldparam err [StandardError] error object if request failed
925
+ #
926
+ # @return [Google::Apis::FusiontablesV2::TableList]
927
+ #
928
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
929
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
930
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
931
+ def list_tables(max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
932
+ command = make_simple_command(:get, 'tables', options)
933
+ command.response_representation = Google::Apis::FusiontablesV2::TableList::Representation
934
+ command.response_class = Google::Apis::FusiontablesV2::TableList
935
+ command.query['maxResults'] = max_results unless max_results.nil?
936
+ command.query['pageToken'] = page_token unless page_token.nil?
937
+ command.query['fields'] = fields unless fields.nil?
938
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
939
+ command.query['userIp'] = user_ip unless user_ip.nil?
940
+ execute_or_queue_command(command, &block)
941
+ end
942
+
943
+ # Updates an existing table. Unless explicitly requested, only the name,
944
+ # description, and attribution will be updated. This method supports patch
945
+ # semantics.
946
+ # @param [String] table_id
947
+ # ID of the table that is being updated.
948
+ # @param [Google::Apis::FusiontablesV2::Table] table_object
949
+ # @param [Boolean] replace_view_definition
950
+ # Whether the view definition is also updated. The specified view definition
951
+ # replaces the existing one. Only a view can be updated with a new definition.
952
+ # @param [String] fields
953
+ # Selector specifying which fields to include in a partial response.
954
+ # @param [String] quota_user
955
+ # Available to use for quota purposes for server-side applications. Can be any
956
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
957
+ # Overrides userIp if both are provided.
958
+ # @param [String] user_ip
959
+ # IP address of the site where the request originates. Use this if you want to
960
+ # enforce per-user limits.
961
+ # @param [Google::Apis::RequestOptions] options
962
+ # Request-specific options
963
+ #
964
+ # @yield [result, err] Result & error if block supplied
965
+ # @yieldparam result [Google::Apis::FusiontablesV2::Table] parsed result object
966
+ # @yieldparam err [StandardError] error object if request failed
967
+ #
968
+ # @return [Google::Apis::FusiontablesV2::Table]
969
+ #
970
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
971
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
972
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
973
+ def patch_table(table_id, table_object = nil, replace_view_definition: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
974
+ command = make_simple_command(:patch, 'tables/{tableId}', options)
975
+ command.request_representation = Google::Apis::FusiontablesV2::Table::Representation
976
+ command.request_object = table_object
977
+ command.response_representation = Google::Apis::FusiontablesV2::Table::Representation
978
+ command.response_class = Google::Apis::FusiontablesV2::Table
979
+ command.params['tableId'] = table_id unless table_id.nil?
980
+ command.query['replaceViewDefinition'] = replace_view_definition unless replace_view_definition.nil?
981
+ command.query['fields'] = fields unless fields.nil?
982
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
983
+ command.query['userIp'] = user_ip unless user_ip.nil?
984
+ execute_or_queue_command(command, &block)
985
+ end
986
+
987
+ # Replaces rows of an existing table. Current rows remain visible until all
988
+ # replacement rows are ready.
989
+ # @param [String] table_id
990
+ # Table whose rows will be replaced.
991
+ # @param [String] delimiter
992
+ # The delimiter used to separate cell values. This can only consist of a single
993
+ # character. Default is ,.
994
+ # @param [String] encoding
995
+ # The encoding of the content. Default is UTF-8. Use 'auto-detect' if you are
996
+ # unsure of the encoding.
997
+ # @param [Fixnum] end_line
998
+ # The index of the line up to which data will be imported. Default is to import
999
+ # the entire file. If endLine is negative, it is an offset from the end of the
1000
+ # file; the imported content will exclude the last endLine lines.
1001
+ # @param [Boolean] is_strict
1002
+ # Whether the imported CSV must have the same number of column values for each
1003
+ # row. If true, throws an exception if the CSV does not have the same number of
1004
+ # columns. If false, rows with fewer column values will be padded with empty
1005
+ # values. Default is true.
1006
+ # @param [Fixnum] start_line
1007
+ # The index of the first line from which to start importing, inclusive. Default
1008
+ # is 0.
1009
+ # @param [String] fields
1010
+ # Selector specifying which fields to include in a partial response.
1011
+ # @param [String] quota_user
1012
+ # Available to use for quota purposes for server-side applications. Can be any
1013
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1014
+ # Overrides userIp if both are provided.
1015
+ # @param [String] user_ip
1016
+ # IP address of the site where the request originates. Use this if you want to
1017
+ # enforce per-user limits.
1018
+ # @param [IO, String] upload_source
1019
+ # IO stream or filename containing content to upload
1020
+ # @param [String] content_type
1021
+ # Content type of the uploaded content.
1022
+ # @param [Google::Apis::RequestOptions] options
1023
+ # Request-specific options
1024
+ #
1025
+ # @yield [result, err] Result & error if block supplied
1026
+ # @yieldparam result [Google::Apis::FusiontablesV2::Task] parsed result object
1027
+ # @yieldparam err [StandardError] error object if request failed
1028
+ #
1029
+ # @return [Google::Apis::FusiontablesV2::Task]
1030
+ #
1031
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1032
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1033
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1034
+ def replace_table_rows(table_id, delimiter: nil, encoding: nil, end_line: nil, is_strict: nil, start_line: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block)
1035
+ if upload_source.nil?
1036
+ command = make_simple_command(:post, 'tables/{tableId}/replace', options)
1037
+ else
1038
+ command = make_upload_command(:post, 'tables/{tableId}/replace', options)
1039
+ command.upload_source = upload_source
1040
+ command.upload_content_type = content_type
1041
+ end
1042
+ command.response_representation = Google::Apis::FusiontablesV2::Task::Representation
1043
+ command.response_class = Google::Apis::FusiontablesV2::Task
1044
+ command.params['tableId'] = table_id unless table_id.nil?
1045
+ command.query['delimiter'] = delimiter unless delimiter.nil?
1046
+ command.query['encoding'] = encoding unless encoding.nil?
1047
+ command.query['endLine'] = end_line unless end_line.nil?
1048
+ command.query['isStrict'] = is_strict unless is_strict.nil?
1049
+ command.query['startLine'] = start_line unless start_line.nil?
1050
+ command.query['fields'] = fields unless fields.nil?
1051
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1052
+ command.query['userIp'] = user_ip unless user_ip.nil?
1053
+ execute_or_queue_command(command, &block)
1054
+ end
1055
+
1056
+ # Updates an existing table. Unless explicitly requested, only the name,
1057
+ # description, and attribution will be updated.
1058
+ # @param [String] table_id
1059
+ # ID of the table that is being updated.
1060
+ # @param [Google::Apis::FusiontablesV2::Table] table_object
1061
+ # @param [Boolean] replace_view_definition
1062
+ # Whether the view definition is also updated. The specified view definition
1063
+ # replaces the existing one. Only a view can be updated with a new definition.
1064
+ # @param [String] fields
1065
+ # Selector specifying which fields to include in a partial response.
1066
+ # @param [String] quota_user
1067
+ # Available to use for quota purposes for server-side applications. Can be any
1068
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1069
+ # Overrides userIp if both are provided.
1070
+ # @param [String] user_ip
1071
+ # IP address of the site where the request originates. Use this if you want to
1072
+ # enforce per-user limits.
1073
+ # @param [Google::Apis::RequestOptions] options
1074
+ # Request-specific options
1075
+ #
1076
+ # @yield [result, err] Result & error if block supplied
1077
+ # @yieldparam result [Google::Apis::FusiontablesV2::Table] parsed result object
1078
+ # @yieldparam err [StandardError] error object if request failed
1079
+ #
1080
+ # @return [Google::Apis::FusiontablesV2::Table]
1081
+ #
1082
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1083
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1084
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1085
+ def update_table(table_id, table_object = nil, replace_view_definition: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1086
+ command = make_simple_command(:put, 'tables/{tableId}', options)
1087
+ command.request_representation = Google::Apis::FusiontablesV2::Table::Representation
1088
+ command.request_object = table_object
1089
+ command.response_representation = Google::Apis::FusiontablesV2::Table::Representation
1090
+ command.response_class = Google::Apis::FusiontablesV2::Table
1091
+ command.params['tableId'] = table_id unless table_id.nil?
1092
+ command.query['replaceViewDefinition'] = replace_view_definition unless replace_view_definition.nil?
1093
+ command.query['fields'] = fields unless fields.nil?
1094
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1095
+ command.query['userIp'] = user_ip unless user_ip.nil?
1096
+ execute_or_queue_command(command, &block)
1097
+ end
1098
+
1099
+ # Deletes a specific task by its ID, unless that task has already started
1100
+ # running.
1101
+ # @param [String] table_id
1102
+ # Table from which the task is being deleted.
1103
+ # @param [String] task_id
1104
+ # The identifier of the task to delete.
1105
+ # @param [String] fields
1106
+ # Selector specifying which fields to include in a partial response.
1107
+ # @param [String] quota_user
1108
+ # Available to use for quota purposes for server-side applications. Can be any
1109
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1110
+ # Overrides userIp if both are provided.
1111
+ # @param [String] user_ip
1112
+ # IP address of the site where the request originates. Use this if you want to
1113
+ # enforce per-user limits.
1114
+ # @param [Google::Apis::RequestOptions] options
1115
+ # Request-specific options
1116
+ #
1117
+ # @yield [result, err] Result & error if block supplied
1118
+ # @yieldparam result [NilClass] No result returned for this method
1119
+ # @yieldparam err [StandardError] error object if request failed
1120
+ #
1121
+ # @return [void]
1122
+ #
1123
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1124
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1125
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1126
+ def delete_task(table_id, task_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1127
+ command = make_simple_command(:delete, 'tables/{tableId}/tasks/{taskId}', options)
1128
+ command.params['tableId'] = table_id unless table_id.nil?
1129
+ command.params['taskId'] = task_id unless task_id.nil?
1130
+ command.query['fields'] = fields unless fields.nil?
1131
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1132
+ command.query['userIp'] = user_ip unless user_ip.nil?
1133
+ execute_or_queue_command(command, &block)
1134
+ end
1135
+
1136
+ # Retrieves a specific task by its ID.
1137
+ # @param [String] table_id
1138
+ # Table to which the task belongs.
1139
+ # @param [String] task_id
1140
+ # The identifier of the task to get.
1141
+ # @param [String] fields
1142
+ # Selector specifying which fields to include in a partial response.
1143
+ # @param [String] quota_user
1144
+ # Available to use for quota purposes for server-side applications. Can be any
1145
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1146
+ # Overrides userIp if both are provided.
1147
+ # @param [String] user_ip
1148
+ # IP address of the site where the request originates. Use this if you want to
1149
+ # enforce per-user limits.
1150
+ # @param [Google::Apis::RequestOptions] options
1151
+ # Request-specific options
1152
+ #
1153
+ # @yield [result, err] Result & error if block supplied
1154
+ # @yieldparam result [Google::Apis::FusiontablesV2::Task] parsed result object
1155
+ # @yieldparam err [StandardError] error object if request failed
1156
+ #
1157
+ # @return [Google::Apis::FusiontablesV2::Task]
1158
+ #
1159
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1160
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1161
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1162
+ def get_task(table_id, task_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1163
+ command = make_simple_command(:get, 'tables/{tableId}/tasks/{taskId}', options)
1164
+ command.response_representation = Google::Apis::FusiontablesV2::Task::Representation
1165
+ command.response_class = Google::Apis::FusiontablesV2::Task
1166
+ command.params['tableId'] = table_id unless table_id.nil?
1167
+ command.params['taskId'] = task_id unless task_id.nil?
1168
+ command.query['fields'] = fields unless fields.nil?
1169
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1170
+ command.query['userIp'] = user_ip unless user_ip.nil?
1171
+ execute_or_queue_command(command, &block)
1172
+ end
1173
+
1174
+ # Retrieves a list of tasks.
1175
+ # @param [String] table_id
1176
+ # Table whose tasks are being listed.
1177
+ # @param [Fixnum] max_results
1178
+ # Maximum number of tasks to return. Default is 5.
1179
+ # @param [String] page_token
1180
+ # Continuation token specifying which result page to return.
1181
+ # @param [Fixnum] start_index
1182
+ # Index of the first result returned in the current page.
1183
+ # @param [String] fields
1184
+ # Selector specifying which fields to include in a partial response.
1185
+ # @param [String] quota_user
1186
+ # Available to use for quota purposes for server-side applications. Can be any
1187
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1188
+ # Overrides userIp if both are provided.
1189
+ # @param [String] user_ip
1190
+ # IP address of the site where the request originates. Use this if you want to
1191
+ # enforce per-user limits.
1192
+ # @param [Google::Apis::RequestOptions] options
1193
+ # Request-specific options
1194
+ #
1195
+ # @yield [result, err] Result & error if block supplied
1196
+ # @yieldparam result [Google::Apis::FusiontablesV2::TaskList] parsed result object
1197
+ # @yieldparam err [StandardError] error object if request failed
1198
+ #
1199
+ # @return [Google::Apis::FusiontablesV2::TaskList]
1200
+ #
1201
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1202
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1203
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1204
+ def list_tasks(table_id, max_results: nil, page_token: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1205
+ command = make_simple_command(:get, 'tables/{tableId}/tasks', options)
1206
+ command.response_representation = Google::Apis::FusiontablesV2::TaskList::Representation
1207
+ command.response_class = Google::Apis::FusiontablesV2::TaskList
1208
+ command.params['tableId'] = table_id unless table_id.nil?
1209
+ command.query['maxResults'] = max_results unless max_results.nil?
1210
+ command.query['pageToken'] = page_token unless page_token.nil?
1211
+ command.query['startIndex'] = start_index unless start_index.nil?
1212
+ command.query['fields'] = fields unless fields.nil?
1213
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1214
+ command.query['userIp'] = user_ip unless user_ip.nil?
1215
+ execute_or_queue_command(command, &block)
1216
+ end
1217
+
1218
+ # Deletes a template
1219
+ # @param [String] table_id
1220
+ # Table from which the template is being deleted
1221
+ # @param [Fixnum] template_id
1222
+ # Identifier for the template which is being deleted
1223
+ # @param [String] fields
1224
+ # Selector specifying which fields to include in a partial response.
1225
+ # @param [String] quota_user
1226
+ # Available to use for quota purposes for server-side applications. Can be any
1227
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1228
+ # Overrides userIp if both are provided.
1229
+ # @param [String] user_ip
1230
+ # IP address of the site where the request originates. Use this if you want to
1231
+ # enforce per-user limits.
1232
+ # @param [Google::Apis::RequestOptions] options
1233
+ # Request-specific options
1234
+ #
1235
+ # @yield [result, err] Result & error if block supplied
1236
+ # @yieldparam result [NilClass] No result returned for this method
1237
+ # @yieldparam err [StandardError] error object if request failed
1238
+ #
1239
+ # @return [void]
1240
+ #
1241
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1242
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1243
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1244
+ def delete_template(table_id, template_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1245
+ command = make_simple_command(:delete, 'tables/{tableId}/templates/{templateId}', options)
1246
+ command.params['tableId'] = table_id unless table_id.nil?
1247
+ command.params['templateId'] = template_id unless template_id.nil?
1248
+ command.query['fields'] = fields unless fields.nil?
1249
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1250
+ command.query['userIp'] = user_ip unless user_ip.nil?
1251
+ execute_or_queue_command(command, &block)
1252
+ end
1253
+
1254
+ # Retrieves a specific template by its id
1255
+ # @param [String] table_id
1256
+ # Table to which the template belongs
1257
+ # @param [Fixnum] template_id
1258
+ # Identifier for the template that is being requested
1259
+ # @param [String] fields
1260
+ # Selector specifying which fields to include in a partial response.
1261
+ # @param [String] quota_user
1262
+ # Available to use for quota purposes for server-side applications. Can be any
1263
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1264
+ # Overrides userIp if both are provided.
1265
+ # @param [String] user_ip
1266
+ # IP address of the site where the request originates. Use this if you want to
1267
+ # enforce per-user limits.
1268
+ # @param [Google::Apis::RequestOptions] options
1269
+ # Request-specific options
1270
+ #
1271
+ # @yield [result, err] Result & error if block supplied
1272
+ # @yieldparam result [Google::Apis::FusiontablesV2::Template] parsed result object
1273
+ # @yieldparam err [StandardError] error object if request failed
1274
+ #
1275
+ # @return [Google::Apis::FusiontablesV2::Template]
1276
+ #
1277
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1278
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1279
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1280
+ def get_template(table_id, template_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1281
+ command = make_simple_command(:get, 'tables/{tableId}/templates/{templateId}', options)
1282
+ command.response_representation = Google::Apis::FusiontablesV2::Template::Representation
1283
+ command.response_class = Google::Apis::FusiontablesV2::Template
1284
+ command.params['tableId'] = table_id unless table_id.nil?
1285
+ command.params['templateId'] = template_id unless template_id.nil?
1286
+ command.query['fields'] = fields unless fields.nil?
1287
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1288
+ command.query['userIp'] = user_ip unless user_ip.nil?
1289
+ execute_or_queue_command(command, &block)
1290
+ end
1291
+
1292
+ # Creates a new template for the table.
1293
+ # @param [String] table_id
1294
+ # Table for which a new template is being created
1295
+ # @param [Google::Apis::FusiontablesV2::Template] template_object
1296
+ # @param [String] fields
1297
+ # Selector specifying which fields to include in a partial response.
1298
+ # @param [String] quota_user
1299
+ # Available to use for quota purposes for server-side applications. Can be any
1300
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1301
+ # Overrides userIp if both are provided.
1302
+ # @param [String] user_ip
1303
+ # IP address of the site where the request originates. Use this if you want to
1304
+ # enforce per-user limits.
1305
+ # @param [Google::Apis::RequestOptions] options
1306
+ # Request-specific options
1307
+ #
1308
+ # @yield [result, err] Result & error if block supplied
1309
+ # @yieldparam result [Google::Apis::FusiontablesV2::Template] parsed result object
1310
+ # @yieldparam err [StandardError] error object if request failed
1311
+ #
1312
+ # @return [Google::Apis::FusiontablesV2::Template]
1313
+ #
1314
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1315
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1316
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1317
+ def insert_template(table_id, template_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1318
+ command = make_simple_command(:post, 'tables/{tableId}/templates', options)
1319
+ command.request_representation = Google::Apis::FusiontablesV2::Template::Representation
1320
+ command.request_object = template_object
1321
+ command.response_representation = Google::Apis::FusiontablesV2::Template::Representation
1322
+ command.response_class = Google::Apis::FusiontablesV2::Template
1323
+ command.params['tableId'] = table_id unless table_id.nil?
1324
+ command.query['fields'] = fields unless fields.nil?
1325
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1326
+ command.query['userIp'] = user_ip unless user_ip.nil?
1327
+ execute_or_queue_command(command, &block)
1328
+ end
1329
+
1330
+ # Retrieves a list of templates.
1331
+ # @param [String] table_id
1332
+ # Identifier for the table whose templates are being requested
1333
+ # @param [Fixnum] max_results
1334
+ # Maximum number of templates to return. Optional. Default is 5.
1335
+ # @param [String] page_token
1336
+ # Continuation token specifying which results page to return. Optional.
1337
+ # @param [String] fields
1338
+ # Selector specifying which fields to include in a partial response.
1339
+ # @param [String] quota_user
1340
+ # Available to use for quota purposes for server-side applications. Can be any
1341
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1342
+ # Overrides userIp if both are provided.
1343
+ # @param [String] user_ip
1344
+ # IP address of the site where the request originates. Use this if you want to
1345
+ # enforce per-user limits.
1346
+ # @param [Google::Apis::RequestOptions] options
1347
+ # Request-specific options
1348
+ #
1349
+ # @yield [result, err] Result & error if block supplied
1350
+ # @yieldparam result [Google::Apis::FusiontablesV2::TemplateList] parsed result object
1351
+ # @yieldparam err [StandardError] error object if request failed
1352
+ #
1353
+ # @return [Google::Apis::FusiontablesV2::TemplateList]
1354
+ #
1355
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1356
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1357
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1358
+ def list_templates(table_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1359
+ command = make_simple_command(:get, 'tables/{tableId}/templates', options)
1360
+ command.response_representation = Google::Apis::FusiontablesV2::TemplateList::Representation
1361
+ command.response_class = Google::Apis::FusiontablesV2::TemplateList
1362
+ command.params['tableId'] = table_id unless table_id.nil?
1363
+ command.query['maxResults'] = max_results unless max_results.nil?
1364
+ command.query['pageToken'] = page_token unless page_token.nil?
1365
+ command.query['fields'] = fields unless fields.nil?
1366
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1367
+ command.query['userIp'] = user_ip unless user_ip.nil?
1368
+ execute_or_queue_command(command, &block)
1369
+ end
1370
+
1371
+ # Updates an existing template. This method supports patch semantics.
1372
+ # @param [String] table_id
1373
+ # Table to which the updated template belongs
1374
+ # @param [Fixnum] template_id
1375
+ # Identifier for the template that is being updated
1376
+ # @param [Google::Apis::FusiontablesV2::Template] template_object
1377
+ # @param [String] fields
1378
+ # Selector specifying which fields to include in a partial response.
1379
+ # @param [String] quota_user
1380
+ # Available to use for quota purposes for server-side applications. Can be any
1381
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1382
+ # Overrides userIp if both are provided.
1383
+ # @param [String] user_ip
1384
+ # IP address of the site where the request originates. Use this if you want to
1385
+ # enforce per-user limits.
1386
+ # @param [Google::Apis::RequestOptions] options
1387
+ # Request-specific options
1388
+ #
1389
+ # @yield [result, err] Result & error if block supplied
1390
+ # @yieldparam result [Google::Apis::FusiontablesV2::Template] parsed result object
1391
+ # @yieldparam err [StandardError] error object if request failed
1392
+ #
1393
+ # @return [Google::Apis::FusiontablesV2::Template]
1394
+ #
1395
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1396
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1397
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1398
+ def patch_template(table_id, template_id, template_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1399
+ command = make_simple_command(:patch, 'tables/{tableId}/templates/{templateId}', options)
1400
+ command.request_representation = Google::Apis::FusiontablesV2::Template::Representation
1401
+ command.request_object = template_object
1402
+ command.response_representation = Google::Apis::FusiontablesV2::Template::Representation
1403
+ command.response_class = Google::Apis::FusiontablesV2::Template
1404
+ command.params['tableId'] = table_id unless table_id.nil?
1405
+ command.params['templateId'] = template_id unless template_id.nil?
1406
+ command.query['fields'] = fields unless fields.nil?
1407
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1408
+ command.query['userIp'] = user_ip unless user_ip.nil?
1409
+ execute_or_queue_command(command, &block)
1410
+ end
1411
+
1412
+ # Updates an existing template
1413
+ # @param [String] table_id
1414
+ # Table to which the updated template belongs
1415
+ # @param [Fixnum] template_id
1416
+ # Identifier for the template that is being updated
1417
+ # @param [Google::Apis::FusiontablesV2::Template] template_object
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::FusiontablesV2::Template] parsed result object
1432
+ # @yieldparam err [StandardError] error object if request failed
1433
+ #
1434
+ # @return [Google::Apis::FusiontablesV2::Template]
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 update_template(table_id, template_id, template_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1440
+ command = make_simple_command(:put, 'tables/{tableId}/templates/{templateId}', options)
1441
+ command.request_representation = Google::Apis::FusiontablesV2::Template::Representation
1442
+ command.request_object = template_object
1443
+ command.response_representation = Google::Apis::FusiontablesV2::Template::Representation
1444
+ command.response_class = Google::Apis::FusiontablesV2::Template
1445
+ command.params['tableId'] = table_id unless table_id.nil?
1446
+ command.params['templateId'] = template_id unless template_id.nil?
1447
+ command.query['fields'] = fields unless fields.nil?
1448
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1449
+ command.query['userIp'] = user_ip unless user_ip.nil?
1450
+ execute_or_queue_command(command, &block)
1451
+ end
1452
+
1453
+ protected
1454
+
1455
+ def apply_command_defaults(command)
1456
+ command.query['key'] = key unless key.nil?
1457
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1458
+ command.query['userIp'] = user_ip unless user_ip.nil?
1459
+ end
1460
+ end
1461
+ end
1462
+ end
1463
+ end