google-api-client 0.8.7 → 0.9.pre1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (397) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +20 -0
  3. data/.rspec +2 -0
  4. data/.rubocop.yml +7 -0
  5. data/.rubocop_todo.yml +63 -0
  6. data/.travis.yml +21 -0
  7. data/.yardopts +12 -0
  8. data/CHANGELOG.md +6 -3
  9. data/CONTRIBUTING.md +31 -0
  10. data/Gemfile +28 -2
  11. data/MIGRATING.md +171 -0
  12. data/README.md +158 -150
  13. data/Rakefile +1 -40
  14. data/api_names.yaml +872 -0
  15. data/api_names_out.yaml +20843 -0
  16. data/bin/generate-api +93 -0
  17. data/generated/google/apis/adexchangebuyer_v1_3.rb +35 -0
  18. data/generated/google/apis/adexchangebuyer_v1_3/classes.rb +1124 -0
  19. data/generated/google/apis/adexchangebuyer_v1_3/representations.rb +375 -0
  20. data/generated/google/apis/adexchangebuyer_v1_3/service.rb +893 -0
  21. data/generated/google/apis/adexchangeseller_v2_0.rb +38 -0
  22. data/generated/google/apis/adexchangeseller_v2_0/classes.rb +792 -0
  23. data/generated/google/apis/adexchangeseller_v2_0/representations.rb +309 -0
  24. data/generated/google/apis/adexchangeseller_v2_0/service.rb +682 -0
  25. data/generated/google/apis/admin_directory_v1.rb +89 -0
  26. data/generated/google/apis/admin_directory_v1/classes.rb +2389 -0
  27. data/generated/google/apis/admin_directory_v1/representations.rb +780 -0
  28. data/generated/google/apis/admin_directory_v1/service.rb +2805 -0
  29. data/generated/google/apis/admin_reports_v1.rb +38 -0
  30. data/generated/google/apis/admin_reports_v1/classes.rb +582 -0
  31. data/generated/google/apis/admin_reports_v1/representations.rb +231 -0
  32. data/generated/google/apis/admin_reports_v1/service.rb +341 -0
  33. data/generated/google/apis/adsense_v1_4.rb +38 -0
  34. data/generated/google/apis/adsense_v1_4/classes.rb +1279 -0
  35. data/generated/google/apis/adsense_v1_4/representations.rb +493 -0
  36. data/generated/google/apis/adsense_v1_4/service.rb +1752 -0
  37. data/generated/google/apis/adsensehost_v4_1.rb +35 -0
  38. data/generated/google/apis/adsensehost_v4_1/classes.rb +834 -0
  39. data/generated/google/apis/adsensehost_v4_1/representations.rb +327 -0
  40. data/generated/google/apis/adsensehost_v4_1/service.rb +1190 -0
  41. data/generated/google/apis/analytics_v3.rb +49 -0
  42. data/generated/google/apis/analytics_v3/classes.rb +5113 -0
  43. data/generated/google/apis/analytics_v3/representations.rb +1661 -0
  44. data/generated/google/apis/analytics_v3/service.rb +3600 -0
  45. data/generated/google/apis/androidenterprise_v1.rb +34 -0
  46. data/generated/google/apis/androidenterprise_v1/classes.rb +1162 -0
  47. data/generated/google/apis/androidenterprise_v1/representations.rb +431 -0
  48. data/generated/google/apis/androidenterprise_v1/service.rb +1979 -0
  49. data/generated/google/apis/androidpublisher_v2.rb +34 -0
  50. data/generated/google/apis/androidpublisher_v2/classes.rb +1374 -0
  51. data/generated/google/apis/androidpublisher_v2/representations.rb +630 -0
  52. data/generated/google/apis/androidpublisher_v2/service.rb +2390 -0
  53. data/generated/google/apis/appsactivity_v1.rb +46 -0
  54. data/generated/google/apis/appsactivity_v1/classes.rb +392 -0
  55. data/generated/google/apis/appsactivity_v1/representations.rb +184 -0
  56. data/generated/google/apis/appsactivity_v1/service.rb +129 -0
  57. data/generated/google/apis/appstate_v1.rb +34 -0
  58. data/generated/google/apis/appstate_v1/classes.rb +154 -0
  59. data/generated/google/apis/appstate_v1/representations.rb +79 -0
  60. data/generated/google/apis/appstate_v1/service.rb +265 -0
  61. data/generated/google/apis/autoscaler_v1beta2.rb +38 -0
  62. data/generated/google/apis/autoscaler_v1beta2/classes.rb +747 -0
  63. data/generated/google/apis/autoscaler_v1beta2/representations.rb +281 -0
  64. data/generated/google/apis/autoscaler_v1beta2/service.rb +488 -0
  65. data/generated/google/apis/bigquery_v2.rb +49 -0
  66. data/generated/google/apis/bigquery_v2/classes.rb +2255 -0
  67. data/generated/google/apis/bigquery_v2/representations.rb +754 -0
  68. data/generated/google/apis/bigquery_v2/service.rb +1003 -0
  69. data/generated/google/apis/blogger_v3.rb +37 -0
  70. data/generated/google/apis/blogger_v3/classes.rb +1354 -0
  71. data/generated/google/apis/blogger_v3/representations.rb +562 -0
  72. data/generated/google/apis/blogger_v3/service.rb +1620 -0
  73. data/generated/google/apis/books_v1.rb +34 -0
  74. data/generated/google/apis/books_v1/classes.rb +3515 -0
  75. data/generated/google/apis/books_v1/representations.rb +1361 -0
  76. data/generated/google/apis/books_v1/service.rb +2170 -0
  77. data/generated/google/apis/calendar_v3.rb +37 -0
  78. data/generated/google/apis/calendar_v3/classes.rb +1702 -0
  79. data/generated/google/apis/calendar_v3/representations.rb +566 -0
  80. data/generated/google/apis/calendar_v3/service.rb +1943 -0
  81. data/generated/google/apis/civicinfo_v2.rb +31 -0
  82. data/generated/google/apis/civicinfo_v2/classes.rb +1057 -0
  83. data/generated/google/apis/civicinfo_v2/representations.rb +374 -0
  84. data/generated/google/apis/civicinfo_v2/service.rb +284 -0
  85. data/generated/google/apis/cloudmonitoring_v2beta2.rb +34 -0
  86. data/generated/google/apis/cloudmonitoring_v2beta2/classes.rb +679 -0
  87. data/generated/google/apis/cloudmonitoring_v2beta2/representations.rb +311 -0
  88. data/generated/google/apis/cloudmonitoring_v2beta2/service.rb +458 -0
  89. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +38 -0
  90. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +139 -0
  91. data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +65 -0
  92. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +301 -0
  93. data/generated/google/apis/compute_v1.rb +49 -0
  94. data/generated/google/apis/compute_v1/classes.rb +6391 -0
  95. data/generated/google/apis/compute_v1/representations.rb +2209 -0
  96. data/generated/google/apis/compute_v1/service.rb +6352 -0
  97. data/generated/google/apis/container_v1beta1.rb +35 -0
  98. data/generated/google/apis/container_v1beta1/classes.rb +466 -0
  99. data/generated/google/apis/container_v1beta1/representations.rb +177 -0
  100. data/generated/google/apis/container_v1beta1/service.rb +394 -0
  101. data/generated/google/apis/content_v2.rb +35 -0
  102. data/generated/google/apis/content_v2/classes.rb +3780 -0
  103. data/generated/google/apis/content_v2/representations.rb +1456 -0
  104. data/generated/google/apis/content_v2/service.rb +1706 -0
  105. data/generated/google/apis/coordinate_v1.rb +37 -0
  106. data/generated/google/apis/coordinate_v1/classes.rb +669 -0
  107. data/generated/google/apis/coordinate_v1/representations.rb +285 -0
  108. data/generated/google/apis/coordinate_v1/service.rb +687 -0
  109. data/{lib/google/api_client/auth/compute_service_account.rb → generated/google/apis/customsearch_v1.rb} +13 -10
  110. data/generated/google/apis/customsearch_v1/classes.rb +771 -0
  111. data/generated/google/apis/customsearch_v1/representations.rb +276 -0
  112. data/generated/google/apis/customsearch_v1/service.rb +208 -0
  113. data/generated/google/apis/datastore_v1beta2.rb +40 -0
  114. data/generated/google/apis/datastore_v1beta2/classes.rb +1186 -0
  115. data/generated/google/apis/datastore_v1beta2/representations.rb +526 -0
  116. data/generated/google/apis/datastore_v1beta2/service.rb +300 -0
  117. data/generated/google/apis/deploymentmanager_v2beta2.rb +41 -0
  118. data/generated/google/apis/deploymentmanager_v2beta2/classes.rb +820 -0
  119. data/generated/google/apis/deploymentmanager_v2beta2/representations.rb +303 -0
  120. data/generated/google/apis/deploymentmanager_v2beta2/service.rb +647 -0
  121. data/generated/google/apis/dfareporting_v2_1.rb +37 -0
  122. data/generated/google/apis/dfareporting_v2_1/classes.rb +10755 -0
  123. data/generated/google/apis/dfareporting_v2_1/representations.rb +3438 -0
  124. data/generated/google/apis/dfareporting_v2_1/service.rb +8775 -0
  125. data/generated/google/apis/discovery_v1.rb +32 -0
  126. data/generated/google/apis/discovery_v1/classes.rb +947 -0
  127. data/generated/google/apis/discovery_v1/representations.rb +355 -0
  128. data/generated/google/apis/discovery_v1/service.rb +144 -0
  129. data/generated/google/apis/dns_v1.rb +41 -0
  130. data/generated/google/apis/dns_v1/classes.rb +406 -0
  131. data/generated/google/apis/dns_v1/representations.rb +151 -0
  132. data/generated/google/apis/dns_v1/service.rb +460 -0
  133. data/{spec/google/api_client/request_spec.rb → generated/google/apis/doubleclickbidmanager_v1.rb} +15 -13
  134. data/generated/google/apis/doubleclickbidmanager_v1/classes.rb +709 -0
  135. data/generated/google/apis/doubleclickbidmanager_v1/representations.rb +297 -0
  136. data/generated/google/apis/doubleclickbidmanager_v1/service.rb +349 -0
  137. data/generated/google/apis/doubleclicksearch_v2.rb +35 -0
  138. data/generated/google/apis/doubleclicksearch_v2/classes.rb +947 -0
  139. data/generated/google/apis/doubleclicksearch_v2/representations.rb +315 -0
  140. data/generated/google/apis/doubleclicksearch_v2/service.rb +490 -0
  141. data/generated/google/apis/drive_v2.rb +55 -0
  142. data/generated/google/apis/drive_v2/classes.rb +2519 -0
  143. data/generated/google/apis/drive_v2/representations.rb +781 -0
  144. data/generated/google/apis/drive_v2/service.rb +2685 -0
  145. data/generated/google/apis/fitness_v1.rb +49 -0
  146. data/generated/google/apis/fitness_v1/classes.rb +809 -0
  147. data/generated/google/apis/fitness_v1/representations.rb +295 -0
  148. data/generated/google/apis/fitness_v1/service.rb +684 -0
  149. data/generated/google/apis/fusiontables_v2.rb +37 -0
  150. data/generated/google/apis/fusiontables_v2/classes.rb +1048 -0
  151. data/generated/google/apis/fusiontables_v2/representations.rb +409 -0
  152. data/generated/google/apis/fusiontables_v2/service.rb +1496 -0
  153. data/generated/google/apis/games_configuration_v1configuration.rb +34 -0
  154. data/generated/google/apis/games_configuration_v1configuration/classes.rb +506 -0
  155. data/generated/google/apis/games_configuration_v1configuration/representations.rb +206 -0
  156. data/generated/google/apis/games_configuration_v1configuration/service.rb +578 -0
  157. data/generated/google/apis/games_v1.rb +40 -0
  158. data/generated/google/apis/games_v1/classes.rb +4578 -0
  159. data/generated/google/apis/games_v1/representations.rb +1570 -0
  160. data/generated/google/apis/games_v1/service.rb +2306 -0
  161. data/generated/google/apis/gan_v1beta1.rb +31 -0
  162. data/generated/google/apis/gan_v1beta1/classes.rb +1428 -0
  163. data/generated/google/apis/gan_v1beta1/representations.rb +428 -0
  164. data/generated/google/apis/gan_v1beta1/service.rb +692 -0
  165. data/generated/google/apis/genomics_v1beta2.rb +46 -0
  166. data/generated/google/apis/genomics_v1beta2/classes.rb +3288 -0
  167. data/generated/google/apis/genomics_v1beta2/representations.rb +1194 -0
  168. data/generated/google/apis/genomics_v1beta2/service.rb +2356 -0
  169. data/generated/google/apis/gmail_v1.rb +49 -0
  170. data/generated/google/apis/gmail_v1/classes.rb +794 -0
  171. data/generated/google/apis/gmail_v1/representations.rb +339 -0
  172. data/generated/google/apis/gmail_v1/service.rb +1502 -0
  173. data/generated/google/apis/groupsmigration_v1.rb +34 -0
  174. data/generated/google/apis/groupsmigration_v1/classes.rb +51 -0
  175. data/generated/google/apis/groupsmigration_v1/representations.rb +38 -0
  176. data/generated/google/apis/groupsmigration_v1/service.rb +111 -0
  177. data/generated/google/apis/groupssettings_v1.rb +34 -0
  178. data/generated/google/apis/groupssettings_v1/classes.rb +221 -0
  179. data/generated/google/apis/groupssettings_v1/representations.rb +64 -0
  180. data/generated/google/apis/groupssettings_v1/service.rb +179 -0
  181. data/generated/google/apis/identitytoolkit_v3.rb +31 -0
  182. data/generated/google/apis/identitytoolkit_v3/classes.rb +1229 -0
  183. data/generated/google/apis/identitytoolkit_v3/representations.rb +422 -0
  184. data/generated/google/apis/identitytoolkit_v3/service.rb +491 -0
  185. data/generated/google/apis/licensing_v1.rb +34 -0
  186. data/generated/google/apis/licensing_v1/classes.rb +132 -0
  187. data/generated/google/apis/licensing_v1/representations.rb +68 -0
  188. data/generated/google/apis/licensing_v1/service.rb +376 -0
  189. data/generated/google/apis/logging_v1beta3.rb +35 -0
  190. data/generated/google/apis/logging_v1beta3/classes.rb +505 -0
  191. data/generated/google/apis/logging_v1beta3/representations.rb +222 -0
  192. data/generated/google/apis/logging_v1beta3/service.rb +670 -0
  193. data/generated/google/apis/manager_v1beta2.rb +50 -0
  194. data/generated/google/apis/manager_v1beta2/classes.rb +1287 -0
  195. data/generated/google/apis/manager_v1beta2/representations.rb +536 -0
  196. data/generated/google/apis/manager_v1beta2/service.rb +380 -0
  197. data/generated/google/apis/mapsengine_v1.rb +38 -0
  198. data/generated/google/apis/mapsengine_v1/classes.rb +2873 -0
  199. data/generated/google/apis/mapsengine_v1/representations.rb +1235 -0
  200. data/generated/google/apis/mapsengine_v1/service.rb +3465 -0
  201. data/generated/google/apis/mirror_v1.rb +37 -0
  202. data/generated/google/apis/mirror_v1/classes.rb +1072 -0
  203. data/generated/google/apis/mirror_v1/representations.rb +350 -0
  204. data/generated/google/apis/mirror_v1/service.rb +1001 -0
  205. data/generated/google/apis/oauth2_v2.rb +43 -0
  206. data/generated/google/apis/oauth2_v2/classes.rb +245 -0
  207. data/generated/google/apis/oauth2_v2/representations.rb +94 -0
  208. data/generated/google/apis/oauth2_v2/service.rb +203 -0
  209. data/generated/google/apis/pagespeedonline_v2.rb +32 -0
  210. data/generated/google/apis/pagespeedonline_v2/classes.rb +614 -0
  211. data/generated/google/apis/pagespeedonline_v2/representations.rb +244 -0
  212. data/generated/google/apis/pagespeedonline_v2/service.rb +120 -0
  213. data/generated/google/apis/plus_domains_v1.rb +61 -0
  214. data/generated/google/apis/plus_domains_v1/classes.rb +2402 -0
  215. data/generated/google/apis/plus_domains_v1/representations.rb +873 -0
  216. data/generated/google/apis/plus_domains_v1/service.rb +924 -0
  217. data/generated/google/apis/plus_v1.rb +43 -0
  218. data/generated/google/apis/plus_v1/classes.rb +2384 -0
  219. data/generated/google/apis/plus_v1/representations.rb +812 -0
  220. data/generated/google/apis/plus_v1/service.rb +616 -0
  221. data/generated/google/apis/prediction_v1_6.rb +44 -0
  222. data/generated/google/apis/prediction_v1_6/classes.rb +751 -0
  223. data/generated/google/apis/prediction_v1_6/representations.rb +327 -0
  224. data/generated/google/apis/prediction_v1_6/service.rb +388 -0
  225. data/generated/google/apis/pubsub_v1beta2.rb +37 -0
  226. data/generated/google/apis/pubsub_v1beta2/classes.rb +824 -0
  227. data/generated/google/apis/pubsub_v1beta2/representations.rb +366 -0
  228. data/generated/google/apis/pubsub_v1beta2/service.rb +778 -0
  229. data/generated/google/apis/qpx_express_v1.rb +31 -0
  230. data/generated/google/apis/qpx_express_v1/classes.rb +1268 -0
  231. data/generated/google/apis/qpx_express_v1/representations.rb +424 -0
  232. data/generated/google/apis/qpx_express_v1/service.rb +101 -0
  233. data/generated/google/apis/replicapool_v1beta2.rb +41 -0
  234. data/generated/google/apis/replicapool_v1beta2/classes.rb +621 -0
  235. data/generated/google/apis/replicapool_v1beta2/representations.rb +235 -0
  236. data/generated/google/apis/replicapool_v1beta2/service.rb +620 -0
  237. data/generated/google/apis/replicapoolupdater_v1beta1.rb +41 -0
  238. data/generated/google/apis/replicapoolupdater_v1beta1/classes.rb +682 -0
  239. data/generated/google/apis/replicapoolupdater_v1beta1/representations.rb +247 -0
  240. data/generated/google/apis/replicapoolupdater_v1beta1/service.rb +472 -0
  241. data/generated/google/apis/reseller_v1.rb +37 -0
  242. data/generated/google/apis/reseller_v1/classes.rb +502 -0
  243. data/generated/google/apis/reseller_v1/representations.rb +199 -0
  244. data/generated/google/apis/reseller_v1/service.rb +637 -0
  245. data/generated/google/apis/resourceviews_v1beta2.rb +47 -0
  246. data/generated/google/apis/resourceviews_v1beta2/classes.rb +660 -0
  247. data/generated/google/apis/resourceviews_v1beta2/representations.rb +269 -0
  248. data/generated/google/apis/resourceviews_v1beta2/service.rb +574 -0
  249. data/generated/google/apis/site_verification_v1.rb +37 -0
  250. data/generated/google/apis/site_verification_v1/classes.rb +185 -0
  251. data/generated/google/apis/site_verification_v1/representations.rb +101 -0
  252. data/generated/google/apis/site_verification_v1/service.rb +322 -0
  253. data/generated/google/apis/sqladmin_v1beta4.rb +37 -0
  254. data/generated/google/apis/sqladmin_v1beta4/classes.rb +1817 -0
  255. data/generated/google/apis/sqladmin_v1beta4/representations.rb +688 -0
  256. data/generated/google/apis/sqladmin_v1beta4/service.rb +1534 -0
  257. data/generated/google/apis/storage_v1.rb +43 -0
  258. data/generated/google/apis/storage_v1/classes.rb +1177 -0
  259. data/generated/google/apis/storage_v1/representations.rb +427 -0
  260. data/generated/google/apis/storage_v1/service.rb +1920 -0
  261. data/generated/google/apis/tagmanager_v1.rb +52 -0
  262. data/generated/google/apis/tagmanager_v1/classes.rb +1226 -0
  263. data/generated/google/apis/tagmanager_v1/representations.rb +461 -0
  264. data/generated/google/apis/tagmanager_v1/service.rb +1978 -0
  265. data/generated/google/apis/taskqueue_v1beta2.rb +37 -0
  266. data/generated/google/apis/taskqueue_v1beta2/classes.rb +254 -0
  267. data/generated/google/apis/taskqueue_v1beta2/representations.rb +114 -0
  268. data/generated/google/apis/taskqueue_v1beta2/service.rb +416 -0
  269. data/generated/google/apis/tasks_v1.rb +37 -0
  270. data/generated/google/apis/tasks_v1/classes.rb +296 -0
  271. data/generated/google/apis/tasks_v1/representations.rb +115 -0
  272. data/generated/google/apis/tasks_v1/service.rb +657 -0
  273. data/generated/google/apis/translate_v2.rb +31 -0
  274. data/generated/google/apis/translate_v2/classes.rb +168 -0
  275. data/generated/google/apis/translate_v2/representations.rb +109 -0
  276. data/generated/google/apis/translate_v2/service.rb +185 -0
  277. data/generated/google/apis/urlshortener_v1.rb +34 -0
  278. data/generated/google/apis/urlshortener_v1/classes.rb +246 -0
  279. data/generated/google/apis/urlshortener_v1/representations.rb +111 -0
  280. data/generated/google/apis/urlshortener_v1/service.rb +179 -0
  281. data/generated/google/apis/webmasters_v3.rb +37 -0
  282. data/generated/google/apis/webmasters_v3/classes.rb +563 -0
  283. data/generated/google/apis/webmasters_v3/representations.rb +250 -0
  284. data/generated/google/apis/webmasters_v3/service.rb +587 -0
  285. data/generated/google/apis/youtube_analytics_v1.rb +46 -0
  286. data/generated/google/apis/youtube_analytics_v1/classes.rb +540 -0
  287. data/generated/google/apis/youtube_analytics_v1/representations.rb +242 -0
  288. data/generated/google/apis/youtube_analytics_v1/service.rb +567 -0
  289. data/generated/google/apis/youtube_v3.rb +49 -0
  290. data/generated/google/apis/youtube_v3/classes.rb +7225 -0
  291. data/generated/google/apis/youtube_v3/representations.rb +2529 -0
  292. data/generated/google/apis/youtube_v3/service.rb +4051 -0
  293. data/google-api-client.gemspec +27 -39
  294. data/lib/google/api_client/auth/storage.rb +3 -2
  295. data/lib/google/api_client/auth/storages/file_store.rb +1 -3
  296. data/lib/google/api_client/auth/storages/redis_store.rb +6 -2
  297. data/lib/google/apis.rb +48 -0
  298. data/lib/google/apis/core/api_command.rb +128 -0
  299. data/lib/google/apis/core/base_service.rb +314 -0
  300. data/lib/google/apis/core/batch.rb +222 -0
  301. data/lib/google/apis/core/download.rb +94 -0
  302. data/lib/google/apis/core/hashable.rb +44 -0
  303. data/lib/google/apis/core/http_command.rb +275 -0
  304. data/lib/google/apis/core/json_representation.rb +122 -0
  305. data/lib/google/{api_client/version.rb → apis/core/logging.rb} +12 -8
  306. data/lib/google/apis/core/multipart.rb +173 -0
  307. data/lib/google/apis/core/upload.rb +275 -0
  308. data/lib/google/{api_client → apis}/errors.rb +32 -28
  309. data/lib/google/apis/generator.rb +70 -0
  310. data/lib/google/apis/generator/annotator.rb +271 -0
  311. data/lib/google/apis/generator/helpers.rb +74 -0
  312. data/lib/google/apis/generator/model.rb +130 -0
  313. data/lib/google/apis/generator/template.rb +124 -0
  314. data/lib/google/apis/generator/templates/_class.tmpl +40 -0
  315. data/lib/google/apis/generator/templates/_method.tmpl +90 -0
  316. data/lib/google/apis/generator/templates/_representation.tmpl +51 -0
  317. data/lib/google/apis/generator/templates/_representation_stub.tmpl +15 -0
  318. data/lib/google/apis/generator/templates/_representation_type.tmpl +10 -0
  319. data/lib/google/{api_client/reference.rb → apis/generator/templates/classes.rb.tmpl} +11 -9
  320. data/lib/google/apis/generator/templates/module.rb.tmpl +40 -0
  321. data/lib/google/apis/generator/templates/representations.rb.tmpl +32 -0
  322. data/lib/google/apis/generator/templates/service.rb.tmpl +60 -0
  323. data/lib/google/apis/options.rb +79 -0
  324. data/lib/google/apis/version.rb +39 -0
  325. data/rakelib/metrics.rake +22 -0
  326. data/rakelib/rubocop.rake +10 -0
  327. data/rakelib/spec.rake +11 -0
  328. data/rakelib/yard.rake +11 -0
  329. data/samples/calendar/calendar.rb +43 -0
  330. data/samples/drive/drive.rb +40 -0
  331. data/samples/pubsub/pubsub.rb +52 -0
  332. data/{lib/google/api_client/discovery.rb → samples/translate/translate.rb} +14 -5
  333. data/script/generate +79 -0
  334. data/script/package +8 -0
  335. data/script/release +15 -0
  336. data/spec/fixtures/files/api_names.yaml +3 -0
  337. data/spec/fixtures/files/auth_stored_credentials.json +8 -0
  338. data/spec/fixtures/files/client_secrets.json +1 -0
  339. data/spec/fixtures/files/test.blah +1 -0
  340. data/spec/fixtures/files/test.txt +1 -0
  341. data/spec/fixtures/files/test_api.json +440 -0
  342. data/spec/google/api_client/auth/storage_spec.rb +1 -3
  343. data/spec/google/api_client/auth/storages/file_store_spec.rb +1 -2
  344. data/spec/google/api_client/auth/storages/redis_store_spec.rb +1 -3
  345. data/spec/google/apis/core/api_command_spec.rb +170 -0
  346. data/spec/google/apis/core/batch_spec.rb +128 -0
  347. data/spec/google/apis/core/download_spec.rb +90 -0
  348. data/spec/google/apis/core/hashable_spec.rb +60 -0
  349. data/spec/google/apis/core/http_command_spec.rb +238 -0
  350. data/spec/google/apis/core/json_representation_spec.rb +192 -0
  351. data/spec/google/apis/core/service_spec.rb +247 -0
  352. data/spec/google/apis/core/upload_spec.rb +238 -0
  353. data/{lib/google/api_client/service_account.rb → spec/google/apis/generated_spec.rb} +14 -8
  354. data/spec/google/apis/generator/generator_spec.rb +272 -0
  355. data/spec/google/apis/logging_spec.rb +45 -0
  356. data/spec/google/apis/options_spec.rb +40 -0
  357. data/spec/integration_tests/drive_spec.rb +35 -0
  358. data/spec/integration_tests/pubsub_spec.rb +48 -0
  359. data/spec/integration_tests/url_shortener_spec.rb +31 -0
  360. data/spec/spec_helper.rb +102 -46
  361. metadata +433 -178
  362. data/lib/compat/multi_json.rb +0 -19
  363. data/lib/google/api_client.rb +0 -750
  364. data/lib/google/api_client/auth/file_storage.rb +0 -59
  365. data/lib/google/api_client/auth/jwt_asserter.rb +0 -126
  366. data/lib/google/api_client/auth/key_utils.rb +0 -93
  367. data/lib/google/api_client/auth/pkcs12.rb +0 -41
  368. data/lib/google/api_client/batch.rb +0 -326
  369. data/lib/google/api_client/charset.rb +0 -33
  370. data/lib/google/api_client/discovery/api.rb +0 -310
  371. data/lib/google/api_client/discovery/media.rb +0 -77
  372. data/lib/google/api_client/discovery/method.rb +0 -363
  373. data/lib/google/api_client/discovery/resource.rb +0 -156
  374. data/lib/google/api_client/discovery/schema.rb +0 -117
  375. data/lib/google/api_client/environment.rb +0 -42
  376. data/lib/google/api_client/gzip.rb +0 -28
  377. data/lib/google/api_client/logging.rb +0 -32
  378. data/lib/google/api_client/media.rb +0 -259
  379. data/lib/google/api_client/railtie.rb +0 -18
  380. data/lib/google/api_client/request.rb +0 -350
  381. data/lib/google/api_client/result.rb +0 -255
  382. data/lib/google/api_client/service.rb +0 -233
  383. data/lib/google/api_client/service/batch.rb +0 -110
  384. data/lib/google/api_client/service/request.rb +0 -144
  385. data/lib/google/api_client/service/resource.rb +0 -40
  386. data/lib/google/api_client/service/result.rb +0 -162
  387. data/lib/google/api_client/service/simple_file_store.rb +0 -151
  388. data/lib/google/api_client/service/stub_generator.rb +0 -61
  389. data/spec/google/api_client/batch_spec.rb +0 -248
  390. data/spec/google/api_client/discovery_spec.rb +0 -708
  391. data/spec/google/api_client/gzip_spec.rb +0 -98
  392. data/spec/google/api_client/media_spec.rb +0 -178
  393. data/spec/google/api_client/result_spec.rb +0 -207
  394. data/spec/google/api_client/service_account_spec.rb +0 -169
  395. data/spec/google/api_client/service_spec.rb +0 -618
  396. data/spec/google/api_client/simple_file_store_spec.rb +0 -133
  397. data/spec/google/api_client_spec.rb +0 -352
@@ -0,0 +1,49 @@
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/bigquery_v2/service.rb'
16
+ require 'google/apis/bigquery_v2/classes.rb'
17
+ require 'google/apis/bigquery_v2/representations.rb'
18
+
19
+ module Google
20
+ module Apis
21
+ # BigQuery API
22
+ #
23
+ # A data platform for customers to create, manage, share and query data.
24
+ #
25
+ # @see https://cloud.google.com/bigquery/
26
+ module BigqueryV2
27
+ VERSION = 'V2'
28
+ REVISION = '20150623'
29
+
30
+ # View and manage your data in Google BigQuery
31
+ AUTH_BIGQUERY = 'https://www.googleapis.com/auth/bigquery'
32
+
33
+ # Insert data into Google BigQuery
34
+ AUTH_BIGQUERY_INSERTDATA = 'https://www.googleapis.com/auth/bigquery.insertdata'
35
+
36
+ # View and manage your data across Google Cloud Platform services
37
+ AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
38
+
39
+ # Manage your data and permissions in Google Cloud Storage
40
+ AUTH_DEVSTORAGE_FULL_CONTROL = 'https://www.googleapis.com/auth/devstorage.full_control'
41
+
42
+ # View your data in Google Cloud Storage
43
+ AUTH_DEVSTORAGE_READ_ONLY = 'https://www.googleapis.com/auth/devstorage.read_only'
44
+
45
+ # Manage your data in Google Cloud Storage
46
+ AUTH_DEVSTORAGE_READ_WRITE = 'https://www.googleapis.com/auth/devstorage.read_write'
47
+ end
48
+ end
49
+ end
@@ -0,0 +1,2255 @@
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 'date'
16
+ require 'google/apis/core/base_service'
17
+ require 'google/apis/core/json_representation'
18
+ require 'google/apis/core/hashable'
19
+ require 'google/apis/errors'
20
+
21
+ module Google
22
+ module Apis
23
+ module BigqueryV2
24
+
25
+ #
26
+ class CsvOptions
27
+ include Google::Apis::Core::Hashable
28
+
29
+ # [Optional] Indicates if BigQuery should accept rows that are missing trailing
30
+ # optional columns. If true, BigQuery treats missing trailing columns as null
31
+ # values. If false, records with missing trailing columns are treated as bad
32
+ # records, and if there are too many bad records, an invalid error is returned
33
+ # in the job result. The default value is false.
34
+ # Corresponds to the JSON property `allowJaggedRows`
35
+ # @return [Boolean]
36
+ attr_accessor :allow_jagged_rows
37
+ alias_method :allow_jagged_rows?, :allow_jagged_rows
38
+
39
+ # [Optional] Indicates if BigQuery should allow quoted data sections that
40
+ # contain newline characters in a CSV file. The default value is false.
41
+ # Corresponds to the JSON property `allowQuotedNewlines`
42
+ # @return [Boolean]
43
+ attr_accessor :allow_quoted_newlines
44
+ alias_method :allow_quoted_newlines?, :allow_quoted_newlines
45
+
46
+ # [Optional] The character encoding of the data. The supported values are UTF-8
47
+ # or ISO-8859-1. The default value is UTF-8. BigQuery decodes the data after the
48
+ # raw, binary data has been split using the values of the quote and
49
+ # fieldDelimiter properties.
50
+ # Corresponds to the JSON property `encoding`
51
+ # @return [String]
52
+ attr_accessor :encoding
53
+
54
+ # [Optional] The separator for fields in a CSV file. BigQuery converts the
55
+ # string to ISO-8859-1 encoding, and then uses the first byte of the encoded
56
+ # string to split the data in its raw, binary state. BigQuery also supports the
57
+ # escape sequence "\t" to specify a tab separator. The default value is a comma (
58
+ # ',').
59
+ # Corresponds to the JSON property `fieldDelimiter`
60
+ # @return [String]
61
+ attr_accessor :field_delimiter
62
+
63
+ # [Optional] The value that is used to quote data sections in a CSV file.
64
+ # BigQuery converts the string to ISO-8859-1 encoding, and then uses the first
65
+ # byte of the encoded string to split the data in its raw, binary state. The
66
+ # default value is a double-quote ('"'). If your data does not contain quoted
67
+ # sections, set the property value to an empty string. If your data contains
68
+ # quoted newline characters, you must also set the allowQuotedNewlines property
69
+ # to true.
70
+ # Corresponds to the JSON property `quote`
71
+ # @return [String]
72
+ attr_accessor :quote
73
+
74
+ # [Optional] The number of rows at the top of a CSV file that BigQuery will skip
75
+ # when reading the data. The default value is 0. This property is useful if you
76
+ # have header rows in the file that should be skipped.
77
+ # Corresponds to the JSON property `skipLeadingRows`
78
+ # @return [Fixnum]
79
+ attr_accessor :skip_leading_rows
80
+
81
+ def initialize(**args)
82
+ update!(**args)
83
+ end
84
+
85
+ # Update properties of this object
86
+ def update!(**args)
87
+ @allow_jagged_rows = args[:allow_jagged_rows] unless args[:allow_jagged_rows].nil?
88
+ @allow_quoted_newlines = args[:allow_quoted_newlines] unless args[:allow_quoted_newlines].nil?
89
+ @encoding = args[:encoding] unless args[:encoding].nil?
90
+ @field_delimiter = args[:field_delimiter] unless args[:field_delimiter].nil?
91
+ @quote = args[:quote] unless args[:quote].nil?
92
+ @skip_leading_rows = args[:skip_leading_rows] unless args[:skip_leading_rows].nil?
93
+ end
94
+ end
95
+
96
+ #
97
+ class Dataset
98
+ include Google::Apis::Core::Hashable
99
+
100
+ # [Optional] An array of objects that define dataset access for one or more
101
+ # entities. You can set this property when inserting or updating a dataset in
102
+ # order to control who is allowed to access the data. If unspecified at dataset
103
+ # creation time, BigQuery adds default dataset access for the following entities:
104
+ # access.specialGroup: projectReaders; access.role: READER; access.specialGroup:
105
+ # projectWriters; access.role: WRITER; access.specialGroup: projectOwners;
106
+ # access.role: OWNER; access.userByEmail: [dataset creator email]; access.role:
107
+ # OWNER;
108
+ # Corresponds to the JSON property `access`
109
+ # @return [Array<Google::Apis::BigqueryV2::Dataset::Access>]
110
+ attr_accessor :access
111
+
112
+ # [Output-only] The time when this dataset was created, in milliseconds since
113
+ # the epoch.
114
+ # Corresponds to the JSON property `creationTime`
115
+ # @return [String]
116
+ attr_accessor :creation_time
117
+
118
+ # [Required] A reference that identifies the dataset.
119
+ # Corresponds to the JSON property `datasetReference`
120
+ # @return [Google::Apis::BigqueryV2::DatasetReference]
121
+ attr_accessor :dataset_reference
122
+
123
+ # [Experimental] The default lifetime of all tables in the dataset, in
124
+ # milliseconds. The minimum value is 3600000 milliseconds (one hour). Once this
125
+ # property is set, all newly-created tables in the dataset will have an
126
+ # expirationTime property set to the creation time plus the value in this
127
+ # property, and changing the value will only affect new tables, not existing
128
+ # ones. When the expirationTime for a given table is reached, that table will be
129
+ # deleted automatically. If a table's expirationTime is modified or removed
130
+ # before the table expires, or if you provide an explicit expirationTime when
131
+ # creating a table, that value takes precedence over the default expiration time
132
+ # indicated by this property.
133
+ # Corresponds to the JSON property `defaultTableExpirationMs`
134
+ # @return [String]
135
+ attr_accessor :default_table_expiration_ms
136
+
137
+ # [Optional] A user-friendly description of the dataset.
138
+ # Corresponds to the JSON property `description`
139
+ # @return [String]
140
+ attr_accessor :description
141
+
142
+ # [Output-only] A hash of the resource.
143
+ # Corresponds to the JSON property `etag`
144
+ # @return [String]
145
+ attr_accessor :etag
146
+
147
+ # [Optional] A descriptive name for the dataset.
148
+ # Corresponds to the JSON property `friendlyName`
149
+ # @return [String]
150
+ attr_accessor :friendly_name
151
+
152
+ # [Output-only] The fully-qualified unique name of the dataset in the format
153
+ # projectId:datasetId. The dataset name without the project name is given in the
154
+ # datasetId field. When creating a new dataset, leave this field blank, and
155
+ # instead specify the datasetId field.
156
+ # Corresponds to the JSON property `id`
157
+ # @return [String]
158
+ attr_accessor :id
159
+
160
+ # [Output-only] The resource type.
161
+ # Corresponds to the JSON property `kind`
162
+ # @return [String]
163
+ attr_accessor :kind
164
+
165
+ # [Output-only] The date when this dataset or any of its tables was last
166
+ # modified, in milliseconds since the epoch.
167
+ # Corresponds to the JSON property `lastModifiedTime`
168
+ # @return [String]
169
+ attr_accessor :last_modified_time
170
+
171
+ # [Experimental] The location where the data resides. If not present, the data
172
+ # will be stored in the US.
173
+ # Corresponds to the JSON property `location`
174
+ # @return [String]
175
+ attr_accessor :location
176
+
177
+ # [Output-only] A URL that can be used to access the resource again. You can use
178
+ # this URL in Get or Update requests to the resource.
179
+ # Corresponds to the JSON property `selfLink`
180
+ # @return [String]
181
+ attr_accessor :self_link
182
+
183
+ def initialize(**args)
184
+ update!(**args)
185
+ end
186
+
187
+ # Update properties of this object
188
+ def update!(**args)
189
+ @access = args[:access] unless args[:access].nil?
190
+ @creation_time = args[:creation_time] unless args[:creation_time].nil?
191
+ @dataset_reference = args[:dataset_reference] unless args[:dataset_reference].nil?
192
+ @default_table_expiration_ms = args[:default_table_expiration_ms] unless args[:default_table_expiration_ms].nil?
193
+ @description = args[:description] unless args[:description].nil?
194
+ @etag = args[:etag] unless args[:etag].nil?
195
+ @friendly_name = args[:friendly_name] unless args[:friendly_name].nil?
196
+ @id = args[:id] unless args[:id].nil?
197
+ @kind = args[:kind] unless args[:kind].nil?
198
+ @last_modified_time = args[:last_modified_time] unless args[:last_modified_time].nil?
199
+ @location = args[:location] unless args[:location].nil?
200
+ @self_link = args[:self_link] unless args[:self_link].nil?
201
+ end
202
+
203
+ #
204
+ class Access
205
+ include Google::Apis::Core::Hashable
206
+
207
+ # [Pick one] A domain to grant access to. Any users signed in with the domain
208
+ # specified will be granted the specified access. Example: "example.com".
209
+ # Corresponds to the JSON property `domain`
210
+ # @return [String]
211
+ attr_accessor :domain
212
+
213
+ # [Pick one] An email address of a Google Group to grant access to.
214
+ # Corresponds to the JSON property `groupByEmail`
215
+ # @return [String]
216
+ attr_accessor :group_by_email
217
+
218
+ # [Required] Describes the rights granted to the user specified by the other
219
+ # member of the access object. The following string values are supported: READER,
220
+ # WRITER, OWNER.
221
+ # Corresponds to the JSON property `role`
222
+ # @return [String]
223
+ attr_accessor :role
224
+
225
+ # [Pick one] A special group to grant access to. Possible values include:
226
+ # projectOwners: Owners of the enclosing project. projectReaders: Readers of the
227
+ # enclosing project. projectWriters: Writers of the enclosing project.
228
+ # allAuthenticatedUsers: All authenticated BigQuery users.
229
+ # Corresponds to the JSON property `specialGroup`
230
+ # @return [String]
231
+ attr_accessor :special_group
232
+
233
+ # [Pick one] An email address of a user to grant access to. For example: fred@
234
+ # example.com.
235
+ # Corresponds to the JSON property `userByEmail`
236
+ # @return [String]
237
+ attr_accessor :user_by_email
238
+
239
+ # [Pick one] A view from a different dataset to grant access to. Queries
240
+ # executed against that view will have read access to tables in this dataset.
241
+ # The role field is not required when this field is set. If that view is updated
242
+ # by any user, access to the view needs to be granted again via an update
243
+ # operation.
244
+ # Corresponds to the JSON property `view`
245
+ # @return [Google::Apis::BigqueryV2::TableReference]
246
+ attr_accessor :view
247
+
248
+ def initialize(**args)
249
+ update!(**args)
250
+ end
251
+
252
+ # Update properties of this object
253
+ def update!(**args)
254
+ @domain = args[:domain] unless args[:domain].nil?
255
+ @group_by_email = args[:group_by_email] unless args[:group_by_email].nil?
256
+ @role = args[:role] unless args[:role].nil?
257
+ @special_group = args[:special_group] unless args[:special_group].nil?
258
+ @user_by_email = args[:user_by_email] unless args[:user_by_email].nil?
259
+ @view = args[:view] unless args[:view].nil?
260
+ end
261
+ end
262
+ end
263
+
264
+ #
265
+ class DatasetList
266
+ include Google::Apis::Core::Hashable
267
+
268
+ # An array of the dataset resources in the project. Each resource contains basic
269
+ # information. For full information about a particular dataset resource, use the
270
+ # Datasets: get method. This property is omitted when there are no datasets in
271
+ # the project.
272
+ # Corresponds to the JSON property `datasets`
273
+ # @return [Array<Google::Apis::BigqueryV2::DatasetList::Dataset>]
274
+ attr_accessor :datasets
275
+
276
+ # A hash value of the results page. You can use this property to determine if
277
+ # the page has changed since the last request.
278
+ # Corresponds to the JSON property `etag`
279
+ # @return [String]
280
+ attr_accessor :etag
281
+
282
+ # The list type. This property always returns the value "bigquery#datasetList".
283
+ # Corresponds to the JSON property `kind`
284
+ # @return [String]
285
+ attr_accessor :kind
286
+
287
+ # A token that can be used to request the next results page. This property is
288
+ # omitted on the final results page.
289
+ # Corresponds to the JSON property `nextPageToken`
290
+ # @return [String]
291
+ attr_accessor :next_page_token
292
+
293
+ def initialize(**args)
294
+ update!(**args)
295
+ end
296
+
297
+ # Update properties of this object
298
+ def update!(**args)
299
+ @datasets = args[:datasets] unless args[:datasets].nil?
300
+ @etag = args[:etag] unless args[:etag].nil?
301
+ @kind = args[:kind] unless args[:kind].nil?
302
+ @next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
303
+ end
304
+
305
+ #
306
+ class Dataset
307
+ include Google::Apis::Core::Hashable
308
+
309
+ # The dataset reference. Use this property to access specific parts of the
310
+ # dataset's ID, such as project ID or dataset ID.
311
+ # Corresponds to the JSON property `datasetReference`
312
+ # @return [Google::Apis::BigqueryV2::DatasetReference]
313
+ attr_accessor :dataset_reference
314
+
315
+ # A descriptive name for the dataset, if one exists.
316
+ # Corresponds to the JSON property `friendlyName`
317
+ # @return [String]
318
+ attr_accessor :friendly_name
319
+
320
+ # The fully-qualified, unique, opaque ID of the dataset.
321
+ # Corresponds to the JSON property `id`
322
+ # @return [String]
323
+ attr_accessor :id
324
+
325
+ # The resource type. This property always returns the value "bigquery#dataset".
326
+ # Corresponds to the JSON property `kind`
327
+ # @return [String]
328
+ attr_accessor :kind
329
+
330
+ def initialize(**args)
331
+ update!(**args)
332
+ end
333
+
334
+ # Update properties of this object
335
+ def update!(**args)
336
+ @dataset_reference = args[:dataset_reference] unless args[:dataset_reference].nil?
337
+ @friendly_name = args[:friendly_name] unless args[:friendly_name].nil?
338
+ @id = args[:id] unless args[:id].nil?
339
+ @kind = args[:kind] unless args[:kind].nil?
340
+ end
341
+ end
342
+ end
343
+
344
+ #
345
+ class DatasetReference
346
+ include Google::Apis::Core::Hashable
347
+
348
+ # [Required] A unique ID for this dataset, without the project name. The ID must
349
+ # contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The
350
+ # maximum length is 1,024 characters.
351
+ # Corresponds to the JSON property `datasetId`
352
+ # @return [String]
353
+ attr_accessor :dataset_id
354
+
355
+ # [Optional] The ID of the project containing this dataset.
356
+ # Corresponds to the JSON property `projectId`
357
+ # @return [String]
358
+ attr_accessor :project_id
359
+
360
+ def initialize(**args)
361
+ update!(**args)
362
+ end
363
+
364
+ # Update properties of this object
365
+ def update!(**args)
366
+ @dataset_id = args[:dataset_id] unless args[:dataset_id].nil?
367
+ @project_id = args[:project_id] unless args[:project_id].nil?
368
+ end
369
+ end
370
+
371
+ #
372
+ class ErrorProto
373
+ include Google::Apis::Core::Hashable
374
+
375
+ # Debugging information. This property is internal to Google and should not be
376
+ # used.
377
+ # Corresponds to the JSON property `debugInfo`
378
+ # @return [String]
379
+ attr_accessor :debug_info
380
+
381
+ # Specifies where the error occurred, if present.
382
+ # Corresponds to the JSON property `location`
383
+ # @return [String]
384
+ attr_accessor :location
385
+
386
+ # A human-readable description of the error.
387
+ # Corresponds to the JSON property `message`
388
+ # @return [String]
389
+ attr_accessor :message
390
+
391
+ # A short error code that summarizes the error.
392
+ # Corresponds to the JSON property `reason`
393
+ # @return [String]
394
+ attr_accessor :reason
395
+
396
+ def initialize(**args)
397
+ update!(**args)
398
+ end
399
+
400
+ # Update properties of this object
401
+ def update!(**args)
402
+ @debug_info = args[:debug_info] unless args[:debug_info].nil?
403
+ @location = args[:location] unless args[:location].nil?
404
+ @message = args[:message] unless args[:message].nil?
405
+ @reason = args[:reason] unless args[:reason].nil?
406
+ end
407
+ end
408
+
409
+ #
410
+ class ExternalDataConfiguration
411
+ include Google::Apis::Core::Hashable
412
+
413
+ # [Optional] The compression type of the data source. Possible values include
414
+ # GZIP and NONE. The default value is NONE.
415
+ # Corresponds to the JSON property `compression`
416
+ # @return [String]
417
+ attr_accessor :compression
418
+
419
+ # Additional properties to set if sourceFormat is set to CSV.
420
+ # Corresponds to the JSON property `csvOptions`
421
+ # @return [Google::Apis::BigqueryV2::CsvOptions]
422
+ attr_accessor :csv_options
423
+
424
+ # [Optional] Indicates if BigQuery should allow extra values that are not
425
+ # represented in the table schema. If true, the extra values are ignored. If
426
+ # false, records with extra columns are treated as bad records, and if there are
427
+ # too many bad records, an invalid error is returned in the job result. The
428
+ # default value is false. The sourceFormat property determines what BigQuery
429
+ # treats as an extra value: CSV: Trailing columns
430
+ # Corresponds to the JSON property `ignoreUnknownValues`
431
+ # @return [Boolean]
432
+ attr_accessor :ignore_unknown_values
433
+ alias_method :ignore_unknown_values?, :ignore_unknown_values
434
+
435
+ # [Optional] The maximum number of bad records that BigQuery can ignore when
436
+ # reading data. If the number of bad records exceeds this value, an invalid
437
+ # error is returned in the job result. The default value is 0, which requires
438
+ # that all records are valid.
439
+ # Corresponds to the JSON property `maxBadRecords`
440
+ # @return [Fixnum]
441
+ attr_accessor :max_bad_records
442
+
443
+ # [Required] The schema for the data.
444
+ # Corresponds to the JSON property `schema`
445
+ # @return [Google::Apis::BigqueryV2::TableSchema]
446
+ attr_accessor :schema
447
+
448
+ # [Optional] The data format. External data sources must be in CSV format. The
449
+ # default value is CSV.
450
+ # Corresponds to the JSON property `sourceFormat`
451
+ # @return [String]
452
+ attr_accessor :source_format
453
+
454
+ # [Required] The fully-qualified URIs that point to your data in Google Cloud
455
+ # Storage. Each URI can contain one '*' wildcard character and it must come
456
+ # after the 'bucket' name. CSV limits related to load jobs apply to external
457
+ # data sources, plus an additional limit of 10 GB maximum size across all URIs.
458
+ # Corresponds to the JSON property `sourceUris`
459
+ # @return [Array<String>]
460
+ attr_accessor :source_uris
461
+
462
+ def initialize(**args)
463
+ update!(**args)
464
+ end
465
+
466
+ # Update properties of this object
467
+ def update!(**args)
468
+ @compression = args[:compression] unless args[:compression].nil?
469
+ @csv_options = args[:csv_options] unless args[:csv_options].nil?
470
+ @ignore_unknown_values = args[:ignore_unknown_values] unless args[:ignore_unknown_values].nil?
471
+ @max_bad_records = args[:max_bad_records] unless args[:max_bad_records].nil?
472
+ @schema = args[:schema] unless args[:schema].nil?
473
+ @source_format = args[:source_format] unless args[:source_format].nil?
474
+ @source_uris = args[:source_uris] unless args[:source_uris].nil?
475
+ end
476
+ end
477
+
478
+ #
479
+ class GetQueryResultsResponse
480
+ include Google::Apis::Core::Hashable
481
+
482
+ # Whether the query result was fetched from the query cache.
483
+ # Corresponds to the JSON property `cacheHit`
484
+ # @return [Boolean]
485
+ attr_accessor :cache_hit
486
+ alias_method :cache_hit?, :cache_hit
487
+
488
+ # A hash of this response.
489
+ # Corresponds to the JSON property `etag`
490
+ # @return [String]
491
+ attr_accessor :etag
492
+
493
+ # Whether the query has completed or not. If rows or totalRows are present, this
494
+ # will always be true. If this is false, totalRows will not be available.
495
+ # Corresponds to the JSON property `jobComplete`
496
+ # @return [Boolean]
497
+ attr_accessor :job_complete
498
+ alias_method :job_complete?, :job_complete
499
+
500
+ # Reference to the BigQuery Job that was created to run the query. This field
501
+ # will be present even if the original request timed out, in which case
502
+ # GetQueryResults can be used to read the results once the query has completed.
503
+ # Since this API only returns the first page of results, subsequent pages can be
504
+ # fetched via the same mechanism (GetQueryResults).
505
+ # Corresponds to the JSON property `jobReference`
506
+ # @return [Google::Apis::BigqueryV2::JobReference]
507
+ attr_accessor :job_reference
508
+
509
+ # The resource type of the response.
510
+ # Corresponds to the JSON property `kind`
511
+ # @return [String]
512
+ attr_accessor :kind
513
+
514
+ # A token used for paging results.
515
+ # Corresponds to the JSON property `pageToken`
516
+ # @return [String]
517
+ attr_accessor :page_token
518
+
519
+ # An object with as many results as can be contained within the maximum
520
+ # permitted reply size. To get any additional rows, you can call GetQueryResults
521
+ # and specify the jobReference returned above. Present only when the query
522
+ # completes successfully.
523
+ # Corresponds to the JSON property `rows`
524
+ # @return [Array<Google::Apis::BigqueryV2::TableRow>]
525
+ attr_accessor :rows
526
+
527
+ # The schema of the results. Present only when the query completes successfully.
528
+ # Corresponds to the JSON property `schema`
529
+ # @return [Google::Apis::BigqueryV2::TableSchema]
530
+ attr_accessor :schema
531
+
532
+ # The total number of bytes processed for this query.
533
+ # Corresponds to the JSON property `totalBytesProcessed`
534
+ # @return [String]
535
+ attr_accessor :total_bytes_processed
536
+
537
+ # The total number of rows in the complete query result set, which can be more
538
+ # than the number of rows in this single page of results. Present only when the
539
+ # query completes successfully.
540
+ # Corresponds to the JSON property `totalRows`
541
+ # @return [String]
542
+ attr_accessor :total_rows
543
+
544
+ def initialize(**args)
545
+ update!(**args)
546
+ end
547
+
548
+ # Update properties of this object
549
+ def update!(**args)
550
+ @cache_hit = args[:cache_hit] unless args[:cache_hit].nil?
551
+ @etag = args[:etag] unless args[:etag].nil?
552
+ @job_complete = args[:job_complete] unless args[:job_complete].nil?
553
+ @job_reference = args[:job_reference] unless args[:job_reference].nil?
554
+ @kind = args[:kind] unless args[:kind].nil?
555
+ @page_token = args[:page_token] unless args[:page_token].nil?
556
+ @rows = args[:rows] unless args[:rows].nil?
557
+ @schema = args[:schema] unless args[:schema].nil?
558
+ @total_bytes_processed = args[:total_bytes_processed] unless args[:total_bytes_processed].nil?
559
+ @total_rows = args[:total_rows] unless args[:total_rows].nil?
560
+ end
561
+ end
562
+
563
+ #
564
+ class Job
565
+ include Google::Apis::Core::Hashable
566
+
567
+ # [Required] Describes the job configuration.
568
+ # Corresponds to the JSON property `configuration`
569
+ # @return [Google::Apis::BigqueryV2::JobConfiguration]
570
+ attr_accessor :configuration
571
+
572
+ # [Output-only] A hash of this resource.
573
+ # Corresponds to the JSON property `etag`
574
+ # @return [String]
575
+ attr_accessor :etag
576
+
577
+ # [Output-only] Opaque ID field of the job
578
+ # Corresponds to the JSON property `id`
579
+ # @return [String]
580
+ attr_accessor :id
581
+
582
+ # [Optional] Reference describing the unique-per-user name of the job.
583
+ # Corresponds to the JSON property `jobReference`
584
+ # @return [Google::Apis::BigqueryV2::JobReference]
585
+ attr_accessor :job_reference
586
+
587
+ # [Output-only] The type of the resource.
588
+ # Corresponds to the JSON property `kind`
589
+ # @return [String]
590
+ attr_accessor :kind
591
+
592
+ # [Output-only] A URL that can be used to access this resource again.
593
+ # Corresponds to the JSON property `selfLink`
594
+ # @return [String]
595
+ attr_accessor :self_link
596
+
597
+ # [Output-only] Information about the job, including starting time and ending
598
+ # time of the job.
599
+ # Corresponds to the JSON property `statistics`
600
+ # @return [Google::Apis::BigqueryV2::JobStatistics]
601
+ attr_accessor :statistics
602
+
603
+ # [Output-only] The status of this job. Examine this value when polling an
604
+ # asynchronous job to see if the job is complete.
605
+ # Corresponds to the JSON property `status`
606
+ # @return [Google::Apis::BigqueryV2::JobStatus]
607
+ attr_accessor :status
608
+
609
+ # [Output-only] Email address of the user who ran the job.
610
+ # Corresponds to the JSON property `user_email`
611
+ # @return [String]
612
+ attr_accessor :user_email
613
+
614
+ def initialize(**args)
615
+ update!(**args)
616
+ end
617
+
618
+ # Update properties of this object
619
+ def update!(**args)
620
+ @configuration = args[:configuration] unless args[:configuration].nil?
621
+ @etag = args[:etag] unless args[:etag].nil?
622
+ @id = args[:id] unless args[:id].nil?
623
+ @job_reference = args[:job_reference] unless args[:job_reference].nil?
624
+ @kind = args[:kind] unless args[:kind].nil?
625
+ @self_link = args[:self_link] unless args[:self_link].nil?
626
+ @statistics = args[:statistics] unless args[:statistics].nil?
627
+ @status = args[:status] unless args[:status].nil?
628
+ @user_email = args[:user_email] unless args[:user_email].nil?
629
+ end
630
+ end
631
+
632
+ #
633
+ class CancelJobResponse
634
+ include Google::Apis::Core::Hashable
635
+
636
+ # The final state of the job.
637
+ # Corresponds to the JSON property `job`
638
+ # @return [Google::Apis::BigqueryV2::Job]
639
+ attr_accessor :job
640
+
641
+ # The resource type of the response.
642
+ # Corresponds to the JSON property `kind`
643
+ # @return [String]
644
+ attr_accessor :kind
645
+
646
+ def initialize(**args)
647
+ update!(**args)
648
+ end
649
+
650
+ # Update properties of this object
651
+ def update!(**args)
652
+ @job = args[:job] unless args[:job].nil?
653
+ @kind = args[:kind] unless args[:kind].nil?
654
+ end
655
+ end
656
+
657
+ #
658
+ class JobConfiguration
659
+ include Google::Apis::Core::Hashable
660
+
661
+ # [Pick one] Copies a table.
662
+ # Corresponds to the JSON property `copy`
663
+ # @return [Google::Apis::BigqueryV2::JobConfigurationTableCopy]
664
+ attr_accessor :copy
665
+
666
+ # [Optional] If set, don't actually run this job. A valid query will return a
667
+ # mostly empty response with some processing statistics, while an invalid query
668
+ # will return the same error it would if it wasn't a dry run. Behavior of non-
669
+ # query jobs is undefined.
670
+ # Corresponds to the JSON property `dryRun`
671
+ # @return [Boolean]
672
+ attr_accessor :dry_run
673
+ alias_method :dry_run?, :dry_run
674
+
675
+ # [Pick one] Configures an extract job.
676
+ # Corresponds to the JSON property `extract`
677
+ # @return [Google::Apis::BigqueryV2::JobConfigurationExtract]
678
+ attr_accessor :extract
679
+
680
+ # [Pick one] Configures a link job.
681
+ # Corresponds to the JSON property `link`
682
+ # @return [Google::Apis::BigqueryV2::JobConfigurationLink]
683
+ attr_accessor :link
684
+
685
+ # [Pick one] Configures a load job.
686
+ # Corresponds to the JSON property `load`
687
+ # @return [Google::Apis::BigqueryV2::JobConfigurationLoad]
688
+ attr_accessor :load
689
+
690
+ # [Pick one] Configures a query job.
691
+ # Corresponds to the JSON property `query`
692
+ # @return [Google::Apis::BigqueryV2::JobConfigurationQuery]
693
+ attr_accessor :query
694
+
695
+ def initialize(**args)
696
+ update!(**args)
697
+ end
698
+
699
+ # Update properties of this object
700
+ def update!(**args)
701
+ @copy = args[:copy] unless args[:copy].nil?
702
+ @dry_run = args[:dry_run] unless args[:dry_run].nil?
703
+ @extract = args[:extract] unless args[:extract].nil?
704
+ @link = args[:link] unless args[:link].nil?
705
+ @load = args[:load] unless args[:load].nil?
706
+ @query = args[:query] unless args[:query].nil?
707
+ end
708
+ end
709
+
710
+ #
711
+ class JobConfigurationExtract
712
+ include Google::Apis::Core::Hashable
713
+
714
+ # [Optional] The compression type to use for exported files. Possible values
715
+ # include GZIP and NONE. The default value is NONE.
716
+ # Corresponds to the JSON property `compression`
717
+ # @return [String]
718
+ attr_accessor :compression
719
+
720
+ # [Optional] The exported file format. Possible values include CSV,
721
+ # NEWLINE_DELIMITED_JSON and AVRO. The default value is CSV. Tables with nested
722
+ # or repeated fields cannot be exported as CSV.
723
+ # Corresponds to the JSON property `destinationFormat`
724
+ # @return [String]
725
+ attr_accessor :destination_format
726
+
727
+ # [Pick one] DEPRECATED: Use destinationUris instead, passing only one URI as
728
+ # necessary. The fully-qualified Google Cloud Storage URI where the extracted
729
+ # table should be written.
730
+ # Corresponds to the JSON property `destinationUri`
731
+ # @return [String]
732
+ attr_accessor :destination_uri
733
+
734
+ # [Pick one] A list of fully-qualified Google Cloud Storage URIs where the
735
+ # extracted table should be written.
736
+ # Corresponds to the JSON property `destinationUris`
737
+ # @return [Array<String>]
738
+ attr_accessor :destination_uris
739
+
740
+ # [Optional] Delimiter to use between fields in the exported data. Default is ','
741
+ # Corresponds to the JSON property `fieldDelimiter`
742
+ # @return [String]
743
+ attr_accessor :field_delimiter
744
+
745
+ # [Optional] Whether to print out a header row in the results. Default is true.
746
+ # Corresponds to the JSON property `printHeader`
747
+ # @return [Boolean]
748
+ attr_accessor :print_header
749
+ alias_method :print_header?, :print_header
750
+
751
+ # [Required] A reference to the table being exported.
752
+ # Corresponds to the JSON property `sourceTable`
753
+ # @return [Google::Apis::BigqueryV2::TableReference]
754
+ attr_accessor :source_table
755
+
756
+ def initialize(**args)
757
+ update!(**args)
758
+ end
759
+
760
+ # Update properties of this object
761
+ def update!(**args)
762
+ @compression = args[:compression] unless args[:compression].nil?
763
+ @destination_format = args[:destination_format] unless args[:destination_format].nil?
764
+ @destination_uri = args[:destination_uri] unless args[:destination_uri].nil?
765
+ @destination_uris = args[:destination_uris] unless args[:destination_uris].nil?
766
+ @field_delimiter = args[:field_delimiter] unless args[:field_delimiter].nil?
767
+ @print_header = args[:print_header] unless args[:print_header].nil?
768
+ @source_table = args[:source_table] unless args[:source_table].nil?
769
+ end
770
+ end
771
+
772
+ #
773
+ class JobConfigurationLink
774
+ include Google::Apis::Core::Hashable
775
+
776
+ # [Optional] Specifies whether the job is allowed to create new tables. The
777
+ # following values are supported: CREATE_IF_NEEDED: If the table does not exist,
778
+ # BigQuery creates the table. CREATE_NEVER: The table must already exist. If it
779
+ # does not, a 'notFound' error is returned in the job result. The default value
780
+ # is CREATE_IF_NEEDED. Creation, truncation and append actions occur as one
781
+ # atomic update upon job completion.
782
+ # Corresponds to the JSON property `createDisposition`
783
+ # @return [String]
784
+ attr_accessor :create_disposition
785
+
786
+ # [Required] The destination table of the link job.
787
+ # Corresponds to the JSON property `destinationTable`
788
+ # @return [Google::Apis::BigqueryV2::TableReference]
789
+ attr_accessor :destination_table
790
+
791
+ # [Required] URI of source table to link.
792
+ # Corresponds to the JSON property `sourceUri`
793
+ # @return [Array<String>]
794
+ attr_accessor :source_uri
795
+
796
+ # [Optional] Specifies the action that occurs if the destination table already
797
+ # exists. The following values are supported: WRITE_TRUNCATE: If the table
798
+ # already exists, BigQuery overwrites the table data. WRITE_APPEND: If the table
799
+ # already exists, BigQuery appends the data to the table. WRITE_EMPTY: If the
800
+ # table already exists and contains data, a 'duplicate' error is returned in the
801
+ # job result. The default value is WRITE_EMPTY. Each action is atomic and only
802
+ # occurs if BigQuery is able to complete the job successfully. Creation,
803
+ # truncation and append actions occur as one atomic update upon job completion.
804
+ # Corresponds to the JSON property `writeDisposition`
805
+ # @return [String]
806
+ attr_accessor :write_disposition
807
+
808
+ def initialize(**args)
809
+ update!(**args)
810
+ end
811
+
812
+ # Update properties of this object
813
+ def update!(**args)
814
+ @create_disposition = args[:create_disposition] unless args[:create_disposition].nil?
815
+ @destination_table = args[:destination_table] unless args[:destination_table].nil?
816
+ @source_uri = args[:source_uri] unless args[:source_uri].nil?
817
+ @write_disposition = args[:write_disposition] unless args[:write_disposition].nil?
818
+ end
819
+ end
820
+
821
+ #
822
+ class JobConfigurationLoad
823
+ include Google::Apis::Core::Hashable
824
+
825
+ # [Optional] Accept rows that are missing trailing optional columns. The missing
826
+ # values are treated as nulls. If false, records with missing trailing columns
827
+ # are treated as bad records, and if there are too many bad records, an invalid
828
+ # error is returned in the job result. The default value is false. Only
829
+ # applicable to CSV, ignored for other formats.
830
+ # Corresponds to the JSON property `allowJaggedRows`
831
+ # @return [Boolean]
832
+ attr_accessor :allow_jagged_rows
833
+ alias_method :allow_jagged_rows?, :allow_jagged_rows
834
+
835
+ # Indicates if BigQuery should allow quoted data sections that contain newline
836
+ # characters in a CSV file. The default value is false.
837
+ # Corresponds to the JSON property `allowQuotedNewlines`
838
+ # @return [Boolean]
839
+ attr_accessor :allow_quoted_newlines
840
+ alias_method :allow_quoted_newlines?, :allow_quoted_newlines
841
+
842
+ # [Optional] Specifies whether the job is allowed to create new tables. The
843
+ # following values are supported: CREATE_IF_NEEDED: If the table does not exist,
844
+ # BigQuery creates the table. CREATE_NEVER: The table must already exist. If it
845
+ # does not, a 'notFound' error is returned in the job result. The default value
846
+ # is CREATE_IF_NEEDED. Creation, truncation and append actions occur as one
847
+ # atomic update upon job completion.
848
+ # Corresponds to the JSON property `createDisposition`
849
+ # @return [String]
850
+ attr_accessor :create_disposition
851
+
852
+ # [Required] The destination table to load the data into.
853
+ # Corresponds to the JSON property `destinationTable`
854
+ # @return [Google::Apis::BigqueryV2::TableReference]
855
+ attr_accessor :destination_table
856
+
857
+ # [Optional] The character encoding of the data. The supported values are UTF-8
858
+ # or ISO-8859-1. The default value is UTF-8. BigQuery decodes the data after the
859
+ # raw, binary data has been split using the values of the quote and
860
+ # fieldDelimiter properties.
861
+ # Corresponds to the JSON property `encoding`
862
+ # @return [String]
863
+ attr_accessor :encoding
864
+
865
+ # [Optional] The separator for fields in a CSV file. BigQuery converts the
866
+ # string to ISO-8859-1 encoding, and then uses the first byte of the encoded
867
+ # string to split the data in its raw, binary state. BigQuery also supports the
868
+ # escape sequence "\t" to specify a tab separator. The default value is a comma (
869
+ # ',').
870
+ # Corresponds to the JSON property `fieldDelimiter`
871
+ # @return [String]
872
+ attr_accessor :field_delimiter
873
+
874
+ # [Optional] Indicates if BigQuery should allow extra values that are not
875
+ # represented in the table schema. If true, the extra values are ignored. If
876
+ # false, records with extra columns are treated as bad records, and if there are
877
+ # too many bad records, an invalid error is returned in the job result. The
878
+ # default value is false. The sourceFormat property determines what BigQuery
879
+ # treats as an extra value: CSV: Trailing columns JSON: Named values that don't
880
+ # match any column names
881
+ # Corresponds to the JSON property `ignoreUnknownValues`
882
+ # @return [Boolean]
883
+ attr_accessor :ignore_unknown_values
884
+ alias_method :ignore_unknown_values?, :ignore_unknown_values
885
+
886
+ # [Optional] The maximum number of bad records that BigQuery can ignore when
887
+ # running the job. If the number of bad records exceeds this value, an invalid
888
+ # error is returned in the job result. The default value is 0, which requires
889
+ # that all records are valid.
890
+ # Corresponds to the JSON property `maxBadRecords`
891
+ # @return [Fixnum]
892
+ attr_accessor :max_bad_records
893
+
894
+ # [Experimental] If sourceFormat is set to "DATASTORE_BACKUP", indicates which
895
+ # entity properties to load into BigQuery from a Cloud Datastore backup.
896
+ # Property names are case sensitive and must be top-level properties. If no
897
+ # properties are specified, BigQuery loads all properties. If any named property
898
+ # isn't found in the Cloud Datastore backup, an invalid error is returned in the
899
+ # job result.
900
+ # Corresponds to the JSON property `projectionFields`
901
+ # @return [Array<String>]
902
+ attr_accessor :projection_fields
903
+
904
+ # [Optional] The value that is used to quote data sections in a CSV file.
905
+ # BigQuery converts the string to ISO-8859-1 encoding, and then uses the first
906
+ # byte of the encoded string to split the data in its raw, binary state. The
907
+ # default value is a double-quote ('"'). If your data does not contain quoted
908
+ # sections, set the property value to an empty string. If your data contains
909
+ # quoted newline characters, you must also set the allowQuotedNewlines property
910
+ # to true.
911
+ # Corresponds to the JSON property `quote`
912
+ # @return [String]
913
+ attr_accessor :quote
914
+
915
+ # [Optional] The schema for the destination table. The schema can be omitted if
916
+ # the destination table already exists or if the schema can be inferred from the
917
+ # loaded data.
918
+ # Corresponds to the JSON property `schema`
919
+ # @return [Google::Apis::BigqueryV2::TableSchema]
920
+ attr_accessor :schema
921
+
922
+ # [Deprecated] The inline schema. For CSV schemas, specify as "Field1:Type1[,
923
+ # Field2:Type2]*". For example, "foo:STRING, bar:INTEGER, baz:FLOAT".
924
+ # Corresponds to the JSON property `schemaInline`
925
+ # @return [String]
926
+ attr_accessor :schema_inline
927
+
928
+ # [Deprecated] The format of the schemaInline property.
929
+ # Corresponds to the JSON property `schemaInlineFormat`
930
+ # @return [String]
931
+ attr_accessor :schema_inline_format
932
+
933
+ # [Optional] The number of rows at the top of a CSV file that BigQuery will skip
934
+ # when loading the data. The default value is 0. This property is useful if you
935
+ # have header rows in the file that should be skipped.
936
+ # Corresponds to the JSON property `skipLeadingRows`
937
+ # @return [Fixnum]
938
+ attr_accessor :skip_leading_rows
939
+
940
+ # [Optional] The format of the data files. For CSV files, specify "CSV". For
941
+ # datastore backups, specify "DATASTORE_BACKUP". For newline-delimited JSON,
942
+ # specify "NEWLINE_DELIMITED_JSON". The default value is CSV.
943
+ # Corresponds to the JSON property `sourceFormat`
944
+ # @return [String]
945
+ attr_accessor :source_format
946
+
947
+ # [Required] The fully-qualified URIs that point to your data in Google Cloud
948
+ # Storage. Each URI can contain one '*' wildcard character and it must come
949
+ # after the 'bucket' name.
950
+ # Corresponds to the JSON property `sourceUris`
951
+ # @return [Array<String>]
952
+ attr_accessor :source_uris
953
+
954
+ # [Optional] Specifies the action that occurs if the destination table already
955
+ # exists. The following values are supported: WRITE_TRUNCATE: If the table
956
+ # already exists, BigQuery overwrites the table data. WRITE_APPEND: If the table
957
+ # already exists, BigQuery appends the data to the table. WRITE_EMPTY: If the
958
+ # table already exists and contains data, a 'duplicate' error is returned in the
959
+ # job result. The default value is WRITE_APPEND. Each action is atomic and only
960
+ # occurs if BigQuery is able to complete the job successfully. Creation,
961
+ # truncation and append actions occur as one atomic update upon job completion.
962
+ # Corresponds to the JSON property `writeDisposition`
963
+ # @return [String]
964
+ attr_accessor :write_disposition
965
+
966
+ def initialize(**args)
967
+ update!(**args)
968
+ end
969
+
970
+ # Update properties of this object
971
+ def update!(**args)
972
+ @allow_jagged_rows = args[:allow_jagged_rows] unless args[:allow_jagged_rows].nil?
973
+ @allow_quoted_newlines = args[:allow_quoted_newlines] unless args[:allow_quoted_newlines].nil?
974
+ @create_disposition = args[:create_disposition] unless args[:create_disposition].nil?
975
+ @destination_table = args[:destination_table] unless args[:destination_table].nil?
976
+ @encoding = args[:encoding] unless args[:encoding].nil?
977
+ @field_delimiter = args[:field_delimiter] unless args[:field_delimiter].nil?
978
+ @ignore_unknown_values = args[:ignore_unknown_values] unless args[:ignore_unknown_values].nil?
979
+ @max_bad_records = args[:max_bad_records] unless args[:max_bad_records].nil?
980
+ @projection_fields = args[:projection_fields] unless args[:projection_fields].nil?
981
+ @quote = args[:quote] unless args[:quote].nil?
982
+ @schema = args[:schema] unless args[:schema].nil?
983
+ @schema_inline = args[:schema_inline] unless args[:schema_inline].nil?
984
+ @schema_inline_format = args[:schema_inline_format] unless args[:schema_inline_format].nil?
985
+ @skip_leading_rows = args[:skip_leading_rows] unless args[:skip_leading_rows].nil?
986
+ @source_format = args[:source_format] unless args[:source_format].nil?
987
+ @source_uris = args[:source_uris] unless args[:source_uris].nil?
988
+ @write_disposition = args[:write_disposition] unless args[:write_disposition].nil?
989
+ end
990
+ end
991
+
992
+ #
993
+ class JobConfigurationQuery
994
+ include Google::Apis::Core::Hashable
995
+
996
+ # If true, allows the query to produce arbitrarily large result tables at a
997
+ # slight cost in performance. Requires destinationTable to be set.
998
+ # Corresponds to the JSON property `allowLargeResults`
999
+ # @return [Boolean]
1000
+ attr_accessor :allow_large_results
1001
+ alias_method :allow_large_results?, :allow_large_results
1002
+
1003
+ # [Optional] Specifies whether the job is allowed to create new tables. The
1004
+ # following values are supported: CREATE_IF_NEEDED: If the table does not exist,
1005
+ # BigQuery creates the table. CREATE_NEVER: The table must already exist. If it
1006
+ # does not, a 'notFound' error is returned in the job result. The default value
1007
+ # is CREATE_IF_NEEDED. Creation, truncation and append actions occur as one
1008
+ # atomic update upon job completion.
1009
+ # Corresponds to the JSON property `createDisposition`
1010
+ # @return [String]
1011
+ attr_accessor :create_disposition
1012
+
1013
+ # [Optional] Specifies the default dataset to use for unqualified table names in
1014
+ # the query.
1015
+ # Corresponds to the JSON property `defaultDataset`
1016
+ # @return [Google::Apis::BigqueryV2::DatasetReference]
1017
+ attr_accessor :default_dataset
1018
+
1019
+ # [Optional] Describes the table where the query results should be stored. If
1020
+ # not present, a new table will be created to store the results.
1021
+ # Corresponds to the JSON property `destinationTable`
1022
+ # @return [Google::Apis::BigqueryV2::TableReference]
1023
+ attr_accessor :destination_table
1024
+
1025
+ # [Optional] Flattens all nested and repeated fields in the query results. The
1026
+ # default value is true. allowLargeResults must be true if this is set to false.
1027
+ # Corresponds to the JSON property `flattenResults`
1028
+ # @return [Boolean]
1029
+ attr_accessor :flatten_results
1030
+ alias_method :flatten_results?, :flatten_results
1031
+
1032
+ # [Deprecated] This property is deprecated.
1033
+ # Corresponds to the JSON property `preserveNulls`
1034
+ # @return [Boolean]
1035
+ attr_accessor :preserve_nulls
1036
+ alias_method :preserve_nulls?, :preserve_nulls
1037
+
1038
+ # [Optional] Specifies a priority for the query. Possible values include
1039
+ # INTERACTIVE and BATCH. The default value is INTERACTIVE.
1040
+ # Corresponds to the JSON property `priority`
1041
+ # @return [String]
1042
+ attr_accessor :priority
1043
+
1044
+ # [Required] BigQuery SQL query to execute.
1045
+ # Corresponds to the JSON property `query`
1046
+ # @return [String]
1047
+ attr_accessor :query
1048
+
1049
+ # [Experimental] If querying an external data source outside of BigQuery,
1050
+ # describes the data format, location and other properties of the data source.
1051
+ # By defining these properties, the data source can then be queried as if it
1052
+ # were a standard BigQuery table.
1053
+ # Corresponds to the JSON property `tableDefinitions`
1054
+ # @return [Hash<String,Google::Apis::BigqueryV2::ExternalDataConfiguration>]
1055
+ attr_accessor :table_definitions
1056
+
1057
+ # [Optional] Whether to look for the result in the query cache. The query cache
1058
+ # is a best-effort cache that will be flushed whenever tables in the query are
1059
+ # modified. Moreover, the query cache is only available when a query does not
1060
+ # have a destination table specified. The default value is true.
1061
+ # Corresponds to the JSON property `useQueryCache`
1062
+ # @return [Boolean]
1063
+ attr_accessor :use_query_cache
1064
+ alias_method :use_query_cache?, :use_query_cache
1065
+
1066
+ # [Optional] Specifies the action that occurs if the destination table already
1067
+ # exists. The following values are supported: WRITE_TRUNCATE: If the table
1068
+ # already exists, BigQuery overwrites the table data. WRITE_APPEND: If the table
1069
+ # already exists, BigQuery appends the data to the table. WRITE_EMPTY: If the
1070
+ # table already exists and contains data, a 'duplicate' error is returned in the
1071
+ # job result. The default value is WRITE_EMPTY. Each action is atomic and only
1072
+ # occurs if BigQuery is able to complete the job successfully. Creation,
1073
+ # truncation and append actions occur as one atomic update upon job completion.
1074
+ # Corresponds to the JSON property `writeDisposition`
1075
+ # @return [String]
1076
+ attr_accessor :write_disposition
1077
+
1078
+ def initialize(**args)
1079
+ update!(**args)
1080
+ end
1081
+
1082
+ # Update properties of this object
1083
+ def update!(**args)
1084
+ @allow_large_results = args[:allow_large_results] unless args[:allow_large_results].nil?
1085
+ @create_disposition = args[:create_disposition] unless args[:create_disposition].nil?
1086
+ @default_dataset = args[:default_dataset] unless args[:default_dataset].nil?
1087
+ @destination_table = args[:destination_table] unless args[:destination_table].nil?
1088
+ @flatten_results = args[:flatten_results] unless args[:flatten_results].nil?
1089
+ @preserve_nulls = args[:preserve_nulls] unless args[:preserve_nulls].nil?
1090
+ @priority = args[:priority] unless args[:priority].nil?
1091
+ @query = args[:query] unless args[:query].nil?
1092
+ @table_definitions = args[:table_definitions] unless args[:table_definitions].nil?
1093
+ @use_query_cache = args[:use_query_cache] unless args[:use_query_cache].nil?
1094
+ @write_disposition = args[:write_disposition] unless args[:write_disposition].nil?
1095
+ end
1096
+ end
1097
+
1098
+ #
1099
+ class JobConfigurationTableCopy
1100
+ include Google::Apis::Core::Hashable
1101
+
1102
+ # [Optional] Specifies whether the job is allowed to create new tables. The
1103
+ # following values are supported: CREATE_IF_NEEDED: If the table does not exist,
1104
+ # BigQuery creates the table. CREATE_NEVER: The table must already exist. If it
1105
+ # does not, a 'notFound' error is returned in the job result. The default value
1106
+ # is CREATE_IF_NEEDED. Creation, truncation and append actions occur as one
1107
+ # atomic update upon job completion.
1108
+ # Corresponds to the JSON property `createDisposition`
1109
+ # @return [String]
1110
+ attr_accessor :create_disposition
1111
+
1112
+ # [Required] The destination table
1113
+ # Corresponds to the JSON property `destinationTable`
1114
+ # @return [Google::Apis::BigqueryV2::TableReference]
1115
+ attr_accessor :destination_table
1116
+
1117
+ # [Pick one] Source table to copy.
1118
+ # Corresponds to the JSON property `sourceTable`
1119
+ # @return [Google::Apis::BigqueryV2::TableReference]
1120
+ attr_accessor :source_table
1121
+
1122
+ # [Pick one] Source tables to copy.
1123
+ # Corresponds to the JSON property `sourceTables`
1124
+ # @return [Array<Google::Apis::BigqueryV2::TableReference>]
1125
+ attr_accessor :source_tables
1126
+
1127
+ # [Optional] Specifies the action that occurs if the destination table already
1128
+ # exists. The following values are supported: WRITE_TRUNCATE: If the table
1129
+ # already exists, BigQuery overwrites the table data. WRITE_APPEND: If the table
1130
+ # already exists, BigQuery appends the data to the table. WRITE_EMPTY: If the
1131
+ # table already exists and contains data, a 'duplicate' error is returned in the
1132
+ # job result. The default value is WRITE_EMPTY. Each action is atomic and only
1133
+ # occurs if BigQuery is able to complete the job successfully. Creation,
1134
+ # truncation and append actions occur as one atomic update upon job completion.
1135
+ # Corresponds to the JSON property `writeDisposition`
1136
+ # @return [String]
1137
+ attr_accessor :write_disposition
1138
+
1139
+ def initialize(**args)
1140
+ update!(**args)
1141
+ end
1142
+
1143
+ # Update properties of this object
1144
+ def update!(**args)
1145
+ @create_disposition = args[:create_disposition] unless args[:create_disposition].nil?
1146
+ @destination_table = args[:destination_table] unless args[:destination_table].nil?
1147
+ @source_table = args[:source_table] unless args[:source_table].nil?
1148
+ @source_tables = args[:source_tables] unless args[:source_tables].nil?
1149
+ @write_disposition = args[:write_disposition] unless args[:write_disposition].nil?
1150
+ end
1151
+ end
1152
+
1153
+ #
1154
+ class JobList
1155
+ include Google::Apis::Core::Hashable
1156
+
1157
+ # A hash of this page of results.
1158
+ # Corresponds to the JSON property `etag`
1159
+ # @return [String]
1160
+ attr_accessor :etag
1161
+
1162
+ # List of jobs that were requested.
1163
+ # Corresponds to the JSON property `jobs`
1164
+ # @return [Array<Google::Apis::BigqueryV2::JobList::Job>]
1165
+ attr_accessor :jobs
1166
+
1167
+ # The resource type of the response.
1168
+ # Corresponds to the JSON property `kind`
1169
+ # @return [String]
1170
+ attr_accessor :kind
1171
+
1172
+ # A token to request the next page of results.
1173
+ # Corresponds to the JSON property `nextPageToken`
1174
+ # @return [String]
1175
+ attr_accessor :next_page_token
1176
+
1177
+ def initialize(**args)
1178
+ update!(**args)
1179
+ end
1180
+
1181
+ # Update properties of this object
1182
+ def update!(**args)
1183
+ @etag = args[:etag] unless args[:etag].nil?
1184
+ @jobs = args[:jobs] unless args[:jobs].nil?
1185
+ @kind = args[:kind] unless args[:kind].nil?
1186
+ @next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
1187
+ end
1188
+
1189
+ #
1190
+ class Job
1191
+ include Google::Apis::Core::Hashable
1192
+
1193
+ # [Full-projection-only] Specifies the job configuration.
1194
+ # Corresponds to the JSON property `configuration`
1195
+ # @return [Google::Apis::BigqueryV2::JobConfiguration]
1196
+ attr_accessor :configuration
1197
+
1198
+ # A result object that will be present only if the job has failed.
1199
+ # Corresponds to the JSON property `errorResult`
1200
+ # @return [Google::Apis::BigqueryV2::ErrorProto]
1201
+ attr_accessor :error_result
1202
+
1203
+ # Unique opaque ID of the job.
1204
+ # Corresponds to the JSON property `id`
1205
+ # @return [String]
1206
+ attr_accessor :id
1207
+
1208
+ # Job reference uniquely identifying the job.
1209
+ # Corresponds to the JSON property `jobReference`
1210
+ # @return [Google::Apis::BigqueryV2::JobReference]
1211
+ attr_accessor :job_reference
1212
+
1213
+ # The resource type.
1214
+ # Corresponds to the JSON property `kind`
1215
+ # @return [String]
1216
+ attr_accessor :kind
1217
+
1218
+ # Running state of the job. When the state is DONE, errorResult can be checked
1219
+ # to determine whether the job succeeded or failed.
1220
+ # Corresponds to the JSON property `state`
1221
+ # @return [String]
1222
+ attr_accessor :state
1223
+
1224
+ # [Output-only] Information about the job, including starting time and ending
1225
+ # time of the job.
1226
+ # Corresponds to the JSON property `statistics`
1227
+ # @return [Google::Apis::BigqueryV2::JobStatistics]
1228
+ attr_accessor :statistics
1229
+
1230
+ # [Full-projection-only] Describes the state of the job.
1231
+ # Corresponds to the JSON property `status`
1232
+ # @return [Google::Apis::BigqueryV2::JobStatus]
1233
+ attr_accessor :status
1234
+
1235
+ # [Full-projection-only] Email address of the user who ran the job.
1236
+ # Corresponds to the JSON property `user_email`
1237
+ # @return [String]
1238
+ attr_accessor :user_email
1239
+
1240
+ def initialize(**args)
1241
+ update!(**args)
1242
+ end
1243
+
1244
+ # Update properties of this object
1245
+ def update!(**args)
1246
+ @configuration = args[:configuration] unless args[:configuration].nil?
1247
+ @error_result = args[:error_result] unless args[:error_result].nil?
1248
+ @id = args[:id] unless args[:id].nil?
1249
+ @job_reference = args[:job_reference] unless args[:job_reference].nil?
1250
+ @kind = args[:kind] unless args[:kind].nil?
1251
+ @state = args[:state] unless args[:state].nil?
1252
+ @statistics = args[:statistics] unless args[:statistics].nil?
1253
+ @status = args[:status] unless args[:status].nil?
1254
+ @user_email = args[:user_email] unless args[:user_email].nil?
1255
+ end
1256
+ end
1257
+ end
1258
+
1259
+ #
1260
+ class JobReference
1261
+ include Google::Apis::Core::Hashable
1262
+
1263
+ # [Required] The ID of the job. The ID must contain only letters (a-z, A-Z),
1264
+ # numbers (0-9), underscores (_), or dashes (-). The maximum length is 1,024
1265
+ # characters.
1266
+ # Corresponds to the JSON property `jobId`
1267
+ # @return [String]
1268
+ attr_accessor :job_id
1269
+
1270
+ # [Required] The ID of the project containing this job.
1271
+ # Corresponds to the JSON property `projectId`
1272
+ # @return [String]
1273
+ attr_accessor :project_id
1274
+
1275
+ def initialize(**args)
1276
+ update!(**args)
1277
+ end
1278
+
1279
+ # Update properties of this object
1280
+ def update!(**args)
1281
+ @job_id = args[:job_id] unless args[:job_id].nil?
1282
+ @project_id = args[:project_id] unless args[:project_id].nil?
1283
+ end
1284
+ end
1285
+
1286
+ #
1287
+ class JobStatistics
1288
+ include Google::Apis::Core::Hashable
1289
+
1290
+ # [Output-only] Creation time of this job, in milliseconds since the epoch. This
1291
+ # field will be present on all jobs.
1292
+ # Corresponds to the JSON property `creationTime`
1293
+ # @return [String]
1294
+ attr_accessor :creation_time
1295
+
1296
+ # [Output-only] End time of this job, in milliseconds since the epoch. This
1297
+ # field will be present whenever a job is in the DONE state.
1298
+ # Corresponds to the JSON property `endTime`
1299
+ # @return [String]
1300
+ attr_accessor :end_time
1301
+
1302
+ # [Output-only] Statistics for an extract job.
1303
+ # Corresponds to the JSON property `extract`
1304
+ # @return [Google::Apis::BigqueryV2::JobStatistics4]
1305
+ attr_accessor :extract
1306
+
1307
+ # [Output-only] Statistics for a load job.
1308
+ # Corresponds to the JSON property `load`
1309
+ # @return [Google::Apis::BigqueryV2::JobStatistics3]
1310
+ attr_accessor :load
1311
+
1312
+ # [Output-only] Statistics for a query job.
1313
+ # Corresponds to the JSON property `query`
1314
+ # @return [Google::Apis::BigqueryV2::JobStatistics2]
1315
+ attr_accessor :query
1316
+
1317
+ # [Output-only] Start time of this job, in milliseconds since the epoch. This
1318
+ # field will be present when the job transitions from the PENDING state to
1319
+ # either RUNNING or DONE.
1320
+ # Corresponds to the JSON property `startTime`
1321
+ # @return [String]
1322
+ attr_accessor :start_time
1323
+
1324
+ # [Output-only] [Deprecated] Use the bytes processed in the query statistics
1325
+ # instead.
1326
+ # Corresponds to the JSON property `totalBytesProcessed`
1327
+ # @return [String]
1328
+ attr_accessor :total_bytes_processed
1329
+
1330
+ def initialize(**args)
1331
+ update!(**args)
1332
+ end
1333
+
1334
+ # Update properties of this object
1335
+ def update!(**args)
1336
+ @creation_time = args[:creation_time] unless args[:creation_time].nil?
1337
+ @end_time = args[:end_time] unless args[:end_time].nil?
1338
+ @extract = args[:extract] unless args[:extract].nil?
1339
+ @load = args[:load] unless args[:load].nil?
1340
+ @query = args[:query] unless args[:query].nil?
1341
+ @start_time = args[:start_time] unless args[:start_time].nil?
1342
+ @total_bytes_processed = args[:total_bytes_processed] unless args[:total_bytes_processed].nil?
1343
+ end
1344
+ end
1345
+
1346
+ #
1347
+ class JobStatistics2
1348
+ include Google::Apis::Core::Hashable
1349
+
1350
+ # [Output-only] Whether the query result was fetched from the query cache.
1351
+ # Corresponds to the JSON property `cacheHit`
1352
+ # @return [Boolean]
1353
+ attr_accessor :cache_hit
1354
+ alias_method :cache_hit?, :cache_hit
1355
+
1356
+ # [Output-only] Total bytes processed for this job.
1357
+ # Corresponds to the JSON property `totalBytesProcessed`
1358
+ # @return [String]
1359
+ attr_accessor :total_bytes_processed
1360
+
1361
+ def initialize(**args)
1362
+ update!(**args)
1363
+ end
1364
+
1365
+ # Update properties of this object
1366
+ def update!(**args)
1367
+ @cache_hit = args[:cache_hit] unless args[:cache_hit].nil?
1368
+ @total_bytes_processed = args[:total_bytes_processed] unless args[:total_bytes_processed].nil?
1369
+ end
1370
+ end
1371
+
1372
+ #
1373
+ class JobStatistics3
1374
+ include Google::Apis::Core::Hashable
1375
+
1376
+ # [Output-only] Number of bytes of source data in a joad job.
1377
+ # Corresponds to the JSON property `inputFileBytes`
1378
+ # @return [String]
1379
+ attr_accessor :input_file_bytes
1380
+
1381
+ # [Output-only] Number of source files in a load job.
1382
+ # Corresponds to the JSON property `inputFiles`
1383
+ # @return [String]
1384
+ attr_accessor :input_files
1385
+
1386
+ # [Output-only] Size of the loaded data in bytes. Note that while an import job
1387
+ # is in the running state, this value may change.
1388
+ # Corresponds to the JSON property `outputBytes`
1389
+ # @return [String]
1390
+ attr_accessor :output_bytes
1391
+
1392
+ # [Output-only] Number of rows imported in a load job. Note that while an import
1393
+ # job is in the running state, this value may change.
1394
+ # Corresponds to the JSON property `outputRows`
1395
+ # @return [String]
1396
+ attr_accessor :output_rows
1397
+
1398
+ def initialize(**args)
1399
+ update!(**args)
1400
+ end
1401
+
1402
+ # Update properties of this object
1403
+ def update!(**args)
1404
+ @input_file_bytes = args[:input_file_bytes] unless args[:input_file_bytes].nil?
1405
+ @input_files = args[:input_files] unless args[:input_files].nil?
1406
+ @output_bytes = args[:output_bytes] unless args[:output_bytes].nil?
1407
+ @output_rows = args[:output_rows] unless args[:output_rows].nil?
1408
+ end
1409
+ end
1410
+
1411
+ #
1412
+ class JobStatistics4
1413
+ include Google::Apis::Core::Hashable
1414
+
1415
+ # [Experimental] Number of files per destination URI or URI pattern specified in
1416
+ # the extract configuration. These values will be in the same order as the URIs
1417
+ # specified in the 'destinationUris' field.
1418
+ # Corresponds to the JSON property `destinationUriFileCounts`
1419
+ # @return [Array<String>]
1420
+ attr_accessor :destination_uri_file_counts
1421
+
1422
+ def initialize(**args)
1423
+ update!(**args)
1424
+ end
1425
+
1426
+ # Update properties of this object
1427
+ def update!(**args)
1428
+ @destination_uri_file_counts = args[:destination_uri_file_counts] unless args[:destination_uri_file_counts].nil?
1429
+ end
1430
+ end
1431
+
1432
+ #
1433
+ class JobStatus
1434
+ include Google::Apis::Core::Hashable
1435
+
1436
+ # [Output-only] Final error result of the job. If present, indicates that the
1437
+ # job has completed and was unsuccessful.
1438
+ # Corresponds to the JSON property `errorResult`
1439
+ # @return [Google::Apis::BigqueryV2::ErrorProto]
1440
+ attr_accessor :error_result
1441
+
1442
+ # [Output-only] All errors encountered during the running of the job. Errors
1443
+ # here do not necessarily mean that the job has completed or was unsuccessful.
1444
+ # Corresponds to the JSON property `errors`
1445
+ # @return [Array<Google::Apis::BigqueryV2::ErrorProto>]
1446
+ attr_accessor :errors
1447
+
1448
+ # [Output-only] Running state of the job.
1449
+ # Corresponds to the JSON property `state`
1450
+ # @return [String]
1451
+ attr_accessor :state
1452
+
1453
+ def initialize(**args)
1454
+ update!(**args)
1455
+ end
1456
+
1457
+ # Update properties of this object
1458
+ def update!(**args)
1459
+ @error_result = args[:error_result] unless args[:error_result].nil?
1460
+ @errors = args[:errors] unless args[:errors].nil?
1461
+ @state = args[:state] unless args[:state].nil?
1462
+ end
1463
+ end
1464
+
1465
+ #
1466
+ class ProjectList
1467
+ include Google::Apis::Core::Hashable
1468
+
1469
+ # A hash of the page of results
1470
+ # Corresponds to the JSON property `etag`
1471
+ # @return [String]
1472
+ attr_accessor :etag
1473
+
1474
+ # The type of list.
1475
+ # Corresponds to the JSON property `kind`
1476
+ # @return [String]
1477
+ attr_accessor :kind
1478
+
1479
+ # A token to request the next page of results.
1480
+ # Corresponds to the JSON property `nextPageToken`
1481
+ # @return [String]
1482
+ attr_accessor :next_page_token
1483
+
1484
+ # Projects to which you have at least READ access.
1485
+ # Corresponds to the JSON property `projects`
1486
+ # @return [Array<Google::Apis::BigqueryV2::ProjectList::Project>]
1487
+ attr_accessor :projects
1488
+
1489
+ # The total number of projects in the list.
1490
+ # Corresponds to the JSON property `totalItems`
1491
+ # @return [Fixnum]
1492
+ attr_accessor :total_items
1493
+
1494
+ def initialize(**args)
1495
+ update!(**args)
1496
+ end
1497
+
1498
+ # Update properties of this object
1499
+ def update!(**args)
1500
+ @etag = args[:etag] unless args[:etag].nil?
1501
+ @kind = args[:kind] unless args[:kind].nil?
1502
+ @next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
1503
+ @projects = args[:projects] unless args[:projects].nil?
1504
+ @total_items = args[:total_items] unless args[:total_items].nil?
1505
+ end
1506
+
1507
+ #
1508
+ class Project
1509
+ include Google::Apis::Core::Hashable
1510
+
1511
+ # A descriptive name for this project.
1512
+ # Corresponds to the JSON property `friendlyName`
1513
+ # @return [String]
1514
+ attr_accessor :friendly_name
1515
+
1516
+ # An opaque ID of this project.
1517
+ # Corresponds to the JSON property `id`
1518
+ # @return [String]
1519
+ attr_accessor :id
1520
+
1521
+ # The resource type.
1522
+ # Corresponds to the JSON property `kind`
1523
+ # @return [String]
1524
+ attr_accessor :kind
1525
+
1526
+ # The numeric ID of this project.
1527
+ # Corresponds to the JSON property `numericId`
1528
+ # @return [String]
1529
+ attr_accessor :numeric_id
1530
+
1531
+ # A unique reference to this project.
1532
+ # Corresponds to the JSON property `projectReference`
1533
+ # @return [Google::Apis::BigqueryV2::ProjectReference]
1534
+ attr_accessor :project_reference
1535
+
1536
+ def initialize(**args)
1537
+ update!(**args)
1538
+ end
1539
+
1540
+ # Update properties of this object
1541
+ def update!(**args)
1542
+ @friendly_name = args[:friendly_name] unless args[:friendly_name].nil?
1543
+ @id = args[:id] unless args[:id].nil?
1544
+ @kind = args[:kind] unless args[:kind].nil?
1545
+ @numeric_id = args[:numeric_id] unless args[:numeric_id].nil?
1546
+ @project_reference = args[:project_reference] unless args[:project_reference].nil?
1547
+ end
1548
+ end
1549
+ end
1550
+
1551
+ #
1552
+ class ProjectReference
1553
+ include Google::Apis::Core::Hashable
1554
+
1555
+ # [Required] ID of the project. Can be either the numeric ID or the assigned ID
1556
+ # of the project.
1557
+ # Corresponds to the JSON property `projectId`
1558
+ # @return [String]
1559
+ attr_accessor :project_id
1560
+
1561
+ def initialize(**args)
1562
+ update!(**args)
1563
+ end
1564
+
1565
+ # Update properties of this object
1566
+ def update!(**args)
1567
+ @project_id = args[:project_id] unless args[:project_id].nil?
1568
+ end
1569
+ end
1570
+
1571
+ #
1572
+ class QueryRequest
1573
+ include Google::Apis::Core::Hashable
1574
+
1575
+ # [Optional] Specifies the default datasetId and projectId to assume for any
1576
+ # unqualified table names in the query. If not set, all table names in the query
1577
+ # string must be qualified in the format 'datasetId.tableId'.
1578
+ # Corresponds to the JSON property `defaultDataset`
1579
+ # @return [Google::Apis::BigqueryV2::DatasetReference]
1580
+ attr_accessor :default_dataset
1581
+
1582
+ # [Optional] If set, don't actually run this job. A valid query will return a
1583
+ # mostly empty response with some processing statistics, while an invalid query
1584
+ # will return the same error it would if it wasn't a dry run.
1585
+ # Corresponds to the JSON property `dryRun`
1586
+ # @return [Boolean]
1587
+ attr_accessor :dry_run
1588
+ alias_method :dry_run?, :dry_run
1589
+
1590
+ # The resource type of the request.
1591
+ # Corresponds to the JSON property `kind`
1592
+ # @return [String]
1593
+ attr_accessor :kind
1594
+
1595
+ # [Optional] The maximum number of rows of data to return per page of results.
1596
+ # Setting this flag to a small value such as 1000 and then paging through
1597
+ # results might improve reliability when the query result set is large. In
1598
+ # addition to this limit, responses are also limited to 10 MB. By default, there
1599
+ # is no maximum row count, and only the byte limit applies.
1600
+ # Corresponds to the JSON property `maxResults`
1601
+ # @return [Fixnum]
1602
+ attr_accessor :max_results
1603
+
1604
+ # [Deprecated] This property is deprecated.
1605
+ # Corresponds to the JSON property `preserveNulls`
1606
+ # @return [Boolean]
1607
+ attr_accessor :preserve_nulls
1608
+ alias_method :preserve_nulls?, :preserve_nulls
1609
+
1610
+ # [Required] A query string, following the BigQuery query syntax, of the query
1611
+ # to execute. Example: "SELECT count(f1) FROM [myProjectId:myDatasetId.myTableId]
1612
+ # ".
1613
+ # Corresponds to the JSON property `query`
1614
+ # @return [String]
1615
+ attr_accessor :query
1616
+
1617
+ # [Optional] How long to wait for the query to complete, in milliseconds, before
1618
+ # the request times out and returns. Note that this is only a timeout for the
1619
+ # request, not the query. If the query takes longer to run than the timeout
1620
+ # value, the call returns without any results and with the 'jobComplete' flag
1621
+ # set to false. You can call GetQueryResults() to wait for the query to complete
1622
+ # and read the results. The default value is 10000 milliseconds (10 seconds).
1623
+ # Corresponds to the JSON property `timeoutMs`
1624
+ # @return [Fixnum]
1625
+ attr_accessor :timeout_ms
1626
+
1627
+ # [Optional] Whether to look for the result in the query cache. The query cache
1628
+ # is a best-effort cache that will be flushed whenever tables in the query are
1629
+ # modified. The default value is true.
1630
+ # Corresponds to the JSON property `useQueryCache`
1631
+ # @return [Boolean]
1632
+ attr_accessor :use_query_cache
1633
+ alias_method :use_query_cache?, :use_query_cache
1634
+
1635
+ def initialize(**args)
1636
+ update!(**args)
1637
+ end
1638
+
1639
+ # Update properties of this object
1640
+ def update!(**args)
1641
+ @default_dataset = args[:default_dataset] unless args[:default_dataset].nil?
1642
+ @dry_run = args[:dry_run] unless args[:dry_run].nil?
1643
+ @kind = args[:kind] unless args[:kind].nil?
1644
+ @max_results = args[:max_results] unless args[:max_results].nil?
1645
+ @preserve_nulls = args[:preserve_nulls] unless args[:preserve_nulls].nil?
1646
+ @query = args[:query] unless args[:query].nil?
1647
+ @timeout_ms = args[:timeout_ms] unless args[:timeout_ms].nil?
1648
+ @use_query_cache = args[:use_query_cache] unless args[:use_query_cache].nil?
1649
+ end
1650
+ end
1651
+
1652
+ #
1653
+ class QueryResponse
1654
+ include Google::Apis::Core::Hashable
1655
+
1656
+ # Whether the query result was fetched from the query cache.
1657
+ # Corresponds to the JSON property `cacheHit`
1658
+ # @return [Boolean]
1659
+ attr_accessor :cache_hit
1660
+ alias_method :cache_hit?, :cache_hit
1661
+
1662
+ # Whether the query has completed or not. If rows or totalRows are present, this
1663
+ # will always be true. If this is false, totalRows will not be available.
1664
+ # Corresponds to the JSON property `jobComplete`
1665
+ # @return [Boolean]
1666
+ attr_accessor :job_complete
1667
+ alias_method :job_complete?, :job_complete
1668
+
1669
+ # Reference to the Job that was created to run the query. This field will be
1670
+ # present even if the original request timed out, in which case GetQueryResults
1671
+ # can be used to read the results once the query has completed. Since this API
1672
+ # only returns the first page of results, subsequent pages can be fetched via
1673
+ # the same mechanism (GetQueryResults).
1674
+ # Corresponds to the JSON property `jobReference`
1675
+ # @return [Google::Apis::BigqueryV2::JobReference]
1676
+ attr_accessor :job_reference
1677
+
1678
+ # The resource type.
1679
+ # Corresponds to the JSON property `kind`
1680
+ # @return [String]
1681
+ attr_accessor :kind
1682
+
1683
+ # A token used for paging results.
1684
+ # Corresponds to the JSON property `pageToken`
1685
+ # @return [String]
1686
+ attr_accessor :page_token
1687
+
1688
+ # An object with as many results as can be contained within the maximum
1689
+ # permitted reply size. To get any additional rows, you can call GetQueryResults
1690
+ # and specify the jobReference returned above.
1691
+ # Corresponds to the JSON property `rows`
1692
+ # @return [Array<Google::Apis::BigqueryV2::TableRow>]
1693
+ attr_accessor :rows
1694
+
1695
+ # The schema of the results. Present only when the query completes successfully.
1696
+ # Corresponds to the JSON property `schema`
1697
+ # @return [Google::Apis::BigqueryV2::TableSchema]
1698
+ attr_accessor :schema
1699
+
1700
+ # The total number of bytes processed for this query. If this query was a dry
1701
+ # run, this is the number of bytes that would be processed if the query were run.
1702
+ # Corresponds to the JSON property `totalBytesProcessed`
1703
+ # @return [String]
1704
+ attr_accessor :total_bytes_processed
1705
+
1706
+ # The total number of rows in the complete query result set, which can be more
1707
+ # than the number of rows in this single page of results.
1708
+ # Corresponds to the JSON property `totalRows`
1709
+ # @return [String]
1710
+ attr_accessor :total_rows
1711
+
1712
+ def initialize(**args)
1713
+ update!(**args)
1714
+ end
1715
+
1716
+ # Update properties of this object
1717
+ def update!(**args)
1718
+ @cache_hit = args[:cache_hit] unless args[:cache_hit].nil?
1719
+ @job_complete = args[:job_complete] unless args[:job_complete].nil?
1720
+ @job_reference = args[:job_reference] unless args[:job_reference].nil?
1721
+ @kind = args[:kind] unless args[:kind].nil?
1722
+ @page_token = args[:page_token] unless args[:page_token].nil?
1723
+ @rows = args[:rows] unless args[:rows].nil?
1724
+ @schema = args[:schema] unless args[:schema].nil?
1725
+ @total_bytes_processed = args[:total_bytes_processed] unless args[:total_bytes_processed].nil?
1726
+ @total_rows = args[:total_rows] unless args[:total_rows].nil?
1727
+ end
1728
+ end
1729
+
1730
+ #
1731
+ class Table
1732
+ include Google::Apis::Core::Hashable
1733
+
1734
+ # [Output-only] The time when this table was created, in milliseconds since the
1735
+ # epoch.
1736
+ # Corresponds to the JSON property `creationTime`
1737
+ # @return [String]
1738
+ attr_accessor :creation_time
1739
+
1740
+ # [Optional] A user-friendly description of this table.
1741
+ # Corresponds to the JSON property `description`
1742
+ # @return [String]
1743
+ attr_accessor :description
1744
+
1745
+ # [Output-only] A hash of this resource.
1746
+ # Corresponds to the JSON property `etag`
1747
+ # @return [String]
1748
+ attr_accessor :etag
1749
+
1750
+ # [Optional] The time when this table expires, in milliseconds since the epoch.
1751
+ # If not present, the table will persist indefinitely. Expired tables will be
1752
+ # deleted and their storage reclaimed.
1753
+ # Corresponds to the JSON property `expirationTime`
1754
+ # @return [String]
1755
+ attr_accessor :expiration_time
1756
+
1757
+ # [Optional] A descriptive name for this table.
1758
+ # Corresponds to the JSON property `friendlyName`
1759
+ # @return [String]
1760
+ attr_accessor :friendly_name
1761
+
1762
+ # [Output-only] An opaque ID uniquely identifying the table.
1763
+ # Corresponds to the JSON property `id`
1764
+ # @return [String]
1765
+ attr_accessor :id
1766
+
1767
+ # [Output-only] The type of the resource.
1768
+ # Corresponds to the JSON property `kind`
1769
+ # @return [String]
1770
+ attr_accessor :kind
1771
+
1772
+ # [Output-only] The time when this table was last modified, in milliseconds
1773
+ # since the epoch.
1774
+ # Corresponds to the JSON property `lastModifiedTime`
1775
+ # @return [String]
1776
+ attr_accessor :last_modified_time
1777
+
1778
+ # [Optional] The backing storage location.
1779
+ # Corresponds to the JSON property `location`
1780
+ # @return [String]
1781
+ attr_accessor :location
1782
+
1783
+ # [Output-only] The size of the table in bytes. This property is unavailable for
1784
+ # tables that are actively receiving streaming inserts.
1785
+ # Corresponds to the JSON property `numBytes`
1786
+ # @return [String]
1787
+ attr_accessor :num_bytes
1788
+
1789
+ # [Output-only] The number of rows of data in this table. This property is
1790
+ # unavailable for tables that are actively receiving streaming inserts.
1791
+ # Corresponds to the JSON property `numRows`
1792
+ # @return [String]
1793
+ attr_accessor :num_rows
1794
+
1795
+ # [Optional] Describes the schema of this table.
1796
+ # Corresponds to the JSON property `schema`
1797
+ # @return [Google::Apis::BigqueryV2::TableSchema]
1798
+ attr_accessor :schema
1799
+
1800
+ # [Output-only] A URL that can be used to access this resource again.
1801
+ # Corresponds to the JSON property `selfLink`
1802
+ # @return [String]
1803
+ attr_accessor :self_link
1804
+
1805
+ # [Required] Reference describing the ID of this table.
1806
+ # Corresponds to the JSON property `tableReference`
1807
+ # @return [Google::Apis::BigqueryV2::TableReference]
1808
+ attr_accessor :table_reference
1809
+
1810
+ # [Output-only] Describes the table type. The following values are supported:
1811
+ # TABLE: A normal BigQuery table. VIEW: A virtual table defined by a SQL query.
1812
+ # The default value is TABLE.
1813
+ # Corresponds to the JSON property `type`
1814
+ # @return [String]
1815
+ attr_accessor :type
1816
+
1817
+ # [Optional] The view definition.
1818
+ # Corresponds to the JSON property `view`
1819
+ # @return [Google::Apis::BigqueryV2::ViewDefinition]
1820
+ attr_accessor :view
1821
+
1822
+ def initialize(**args)
1823
+ update!(**args)
1824
+ end
1825
+
1826
+ # Update properties of this object
1827
+ def update!(**args)
1828
+ @creation_time = args[:creation_time] unless args[:creation_time].nil?
1829
+ @description = args[:description] unless args[:description].nil?
1830
+ @etag = args[:etag] unless args[:etag].nil?
1831
+ @expiration_time = args[:expiration_time] unless args[:expiration_time].nil?
1832
+ @friendly_name = args[:friendly_name] unless args[:friendly_name].nil?
1833
+ @id = args[:id] unless args[:id].nil?
1834
+ @kind = args[:kind] unless args[:kind].nil?
1835
+ @last_modified_time = args[:last_modified_time] unless args[:last_modified_time].nil?
1836
+ @location = args[:location] unless args[:location].nil?
1837
+ @num_bytes = args[:num_bytes] unless args[:num_bytes].nil?
1838
+ @num_rows = args[:num_rows] unless args[:num_rows].nil?
1839
+ @schema = args[:schema] unless args[:schema].nil?
1840
+ @self_link = args[:self_link] unless args[:self_link].nil?
1841
+ @table_reference = args[:table_reference] unless args[:table_reference].nil?
1842
+ @type = args[:type] unless args[:type].nil?
1843
+ @view = args[:view] unless args[:view].nil?
1844
+ end
1845
+ end
1846
+
1847
+ #
1848
+ class TableCell
1849
+ include Google::Apis::Core::Hashable
1850
+
1851
+ #
1852
+ # Corresponds to the JSON property `v`
1853
+ # @return [Object]
1854
+ attr_accessor :v
1855
+
1856
+ def initialize(**args)
1857
+ update!(**args)
1858
+ end
1859
+
1860
+ # Update properties of this object
1861
+ def update!(**args)
1862
+ @v = args[:v] unless args[:v].nil?
1863
+ end
1864
+ end
1865
+
1866
+ #
1867
+ class InsertAllTableDataRequest
1868
+ include Google::Apis::Core::Hashable
1869
+
1870
+ # [Optional] Accept rows that contain values that do not match the schema. The
1871
+ # unknown values are ignored. Default is false, which treats unknown values as
1872
+ # errors.
1873
+ # Corresponds to the JSON property `ignoreUnknownValues`
1874
+ # @return [Boolean]
1875
+ attr_accessor :ignore_unknown_values
1876
+ alias_method :ignore_unknown_values?, :ignore_unknown_values
1877
+
1878
+ # The resource type of the response.
1879
+ # Corresponds to the JSON property `kind`
1880
+ # @return [String]
1881
+ attr_accessor :kind
1882
+
1883
+ # The rows to insert.
1884
+ # Corresponds to the JSON property `rows`
1885
+ # @return [Array<Google::Apis::BigqueryV2::InsertAllTableDataRequest::Row>]
1886
+ attr_accessor :rows
1887
+
1888
+ # [Optional] Insert all valid rows of a request, even if invalid rows exist. The
1889
+ # default value is false, which causes the entire request to fail if any invalid
1890
+ # rows exist.
1891
+ # Corresponds to the JSON property `skipInvalidRows`
1892
+ # @return [Boolean]
1893
+ attr_accessor :skip_invalid_rows
1894
+ alias_method :skip_invalid_rows?, :skip_invalid_rows
1895
+
1896
+ def initialize(**args)
1897
+ update!(**args)
1898
+ end
1899
+
1900
+ # Update properties of this object
1901
+ def update!(**args)
1902
+ @ignore_unknown_values = args[:ignore_unknown_values] unless args[:ignore_unknown_values].nil?
1903
+ @kind = args[:kind] unless args[:kind].nil?
1904
+ @rows = args[:rows] unless args[:rows].nil?
1905
+ @skip_invalid_rows = args[:skip_invalid_rows] unless args[:skip_invalid_rows].nil?
1906
+ end
1907
+
1908
+ #
1909
+ class Row
1910
+ include Google::Apis::Core::Hashable
1911
+
1912
+ # [Optional] A unique ID for each row. BigQuery uses this property to detect
1913
+ # duplicate insertion requests on a best-effort basis.
1914
+ # Corresponds to the JSON property `insertId`
1915
+ # @return [String]
1916
+ attr_accessor :insert_id
1917
+
1918
+ # Represents a single JSON object.
1919
+ # Corresponds to the JSON property `json`
1920
+ # @return [Hash<String,Object>]
1921
+ attr_accessor :json
1922
+
1923
+ def initialize(**args)
1924
+ update!(**args)
1925
+ end
1926
+
1927
+ # Update properties of this object
1928
+ def update!(**args)
1929
+ @insert_id = args[:insert_id] unless args[:insert_id].nil?
1930
+ @json = args[:json] unless args[:json].nil?
1931
+ end
1932
+ end
1933
+ end
1934
+
1935
+ #
1936
+ class InsertAllTableDataResponse
1937
+ include Google::Apis::Core::Hashable
1938
+
1939
+ # An array of errors for rows that were not inserted.
1940
+ # Corresponds to the JSON property `insertErrors`
1941
+ # @return [Array<Google::Apis::BigqueryV2::InsertAllTableDataResponse::InsertError>]
1942
+ attr_accessor :insert_errors
1943
+
1944
+ # The resource type of the response.
1945
+ # Corresponds to the JSON property `kind`
1946
+ # @return [String]
1947
+ attr_accessor :kind
1948
+
1949
+ def initialize(**args)
1950
+ update!(**args)
1951
+ end
1952
+
1953
+ # Update properties of this object
1954
+ def update!(**args)
1955
+ @insert_errors = args[:insert_errors] unless args[:insert_errors].nil?
1956
+ @kind = args[:kind] unless args[:kind].nil?
1957
+ end
1958
+
1959
+ #
1960
+ class InsertError
1961
+ include Google::Apis::Core::Hashable
1962
+
1963
+ # Error information for the row indicated by the index property.
1964
+ # Corresponds to the JSON property `errors`
1965
+ # @return [Array<Google::Apis::BigqueryV2::ErrorProto>]
1966
+ attr_accessor :errors
1967
+
1968
+ # The index of the row that error applies to.
1969
+ # Corresponds to the JSON property `index`
1970
+ # @return [Fixnum]
1971
+ attr_accessor :index
1972
+
1973
+ def initialize(**args)
1974
+ update!(**args)
1975
+ end
1976
+
1977
+ # Update properties of this object
1978
+ def update!(**args)
1979
+ @errors = args[:errors] unless args[:errors].nil?
1980
+ @index = args[:index] unless args[:index].nil?
1981
+ end
1982
+ end
1983
+ end
1984
+
1985
+ #
1986
+ class TableDataList
1987
+ include Google::Apis::Core::Hashable
1988
+
1989
+ # A hash of this page of results.
1990
+ # Corresponds to the JSON property `etag`
1991
+ # @return [String]
1992
+ attr_accessor :etag
1993
+
1994
+ # The resource type of the response.
1995
+ # Corresponds to the JSON property `kind`
1996
+ # @return [String]
1997
+ attr_accessor :kind
1998
+
1999
+ # A token used for paging results. Providing this token instead of the
2000
+ # startIndex parameter can help you retrieve stable results when an underlying
2001
+ # table is changing.
2002
+ # Corresponds to the JSON property `pageToken`
2003
+ # @return [String]
2004
+ attr_accessor :page_token
2005
+
2006
+ # Rows of results.
2007
+ # Corresponds to the JSON property `rows`
2008
+ # @return [Array<Google::Apis::BigqueryV2::TableRow>]
2009
+ attr_accessor :rows
2010
+
2011
+ # The total number of rows in the complete table.
2012
+ # Corresponds to the JSON property `totalRows`
2013
+ # @return [String]
2014
+ attr_accessor :total_rows
2015
+
2016
+ def initialize(**args)
2017
+ update!(**args)
2018
+ end
2019
+
2020
+ # Update properties of this object
2021
+ def update!(**args)
2022
+ @etag = args[:etag] unless args[:etag].nil?
2023
+ @kind = args[:kind] unless args[:kind].nil?
2024
+ @page_token = args[:page_token] unless args[:page_token].nil?
2025
+ @rows = args[:rows] unless args[:rows].nil?
2026
+ @total_rows = args[:total_rows] unless args[:total_rows].nil?
2027
+ end
2028
+ end
2029
+
2030
+ #
2031
+ class TableFieldSchema
2032
+ include Google::Apis::Core::Hashable
2033
+
2034
+ # [Optional] The field description. The maximum length is 16K characters.
2035
+ # Corresponds to the JSON property `description`
2036
+ # @return [String]
2037
+ attr_accessor :description
2038
+
2039
+ # [Optional] Describes the nested schema fields if the type property is set to
2040
+ # RECORD.
2041
+ # Corresponds to the JSON property `fields`
2042
+ # @return [Array<Google::Apis::BigqueryV2::TableFieldSchema>]
2043
+ attr_accessor :fields
2044
+
2045
+ # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and
2046
+ # REPEATED. The default value is NULLABLE.
2047
+ # Corresponds to the JSON property `mode`
2048
+ # @return [String]
2049
+ attr_accessor :mode
2050
+
2051
+ # [Required] The field name. The name must contain only letters (a-z, A-Z),
2052
+ # numbers (0-9), or underscores (_), and must start with a letter or underscore.
2053
+ # The maximum length is 128 characters.
2054
+ # Corresponds to the JSON property `name`
2055
+ # @return [String]
2056
+ attr_accessor :name
2057
+
2058
+ # [Required] The field data type. Possible values include STRING, INTEGER, FLOAT,
2059
+ # BOOLEAN, TIMESTAMP or RECORD (where RECORD indicates that the field contains
2060
+ # a nested schema).
2061
+ # Corresponds to the JSON property `type`
2062
+ # @return [String]
2063
+ attr_accessor :type
2064
+
2065
+ def initialize(**args)
2066
+ update!(**args)
2067
+ end
2068
+
2069
+ # Update properties of this object
2070
+ def update!(**args)
2071
+ @description = args[:description] unless args[:description].nil?
2072
+ @fields = args[:fields] unless args[:fields].nil?
2073
+ @mode = args[:mode] unless args[:mode].nil?
2074
+ @name = args[:name] unless args[:name].nil?
2075
+ @type = args[:type] unless args[:type].nil?
2076
+ end
2077
+ end
2078
+
2079
+ #
2080
+ class TableList
2081
+ include Google::Apis::Core::Hashable
2082
+
2083
+ # A hash of this page of results.
2084
+ # Corresponds to the JSON property `etag`
2085
+ # @return [String]
2086
+ attr_accessor :etag
2087
+
2088
+ # The type of list.
2089
+ # Corresponds to the JSON property `kind`
2090
+ # @return [String]
2091
+ attr_accessor :kind
2092
+
2093
+ # A token to request the next page of results.
2094
+ # Corresponds to the JSON property `nextPageToken`
2095
+ # @return [String]
2096
+ attr_accessor :next_page_token
2097
+
2098
+ # Tables in the requested dataset.
2099
+ # Corresponds to the JSON property `tables`
2100
+ # @return [Array<Google::Apis::BigqueryV2::TableList::Table>]
2101
+ attr_accessor :tables
2102
+
2103
+ # The total number of tables in the dataset.
2104
+ # Corresponds to the JSON property `totalItems`
2105
+ # @return [Fixnum]
2106
+ attr_accessor :total_items
2107
+
2108
+ def initialize(**args)
2109
+ update!(**args)
2110
+ end
2111
+
2112
+ # Update properties of this object
2113
+ def update!(**args)
2114
+ @etag = args[:etag] unless args[:etag].nil?
2115
+ @kind = args[:kind] unless args[:kind].nil?
2116
+ @next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
2117
+ @tables = args[:tables] unless args[:tables].nil?
2118
+ @total_items = args[:total_items] unless args[:total_items].nil?
2119
+ end
2120
+
2121
+ #
2122
+ class Table
2123
+ include Google::Apis::Core::Hashable
2124
+
2125
+ # The user-friendly name for this table.
2126
+ # Corresponds to the JSON property `friendlyName`
2127
+ # @return [String]
2128
+ attr_accessor :friendly_name
2129
+
2130
+ # An opaque ID of the table
2131
+ # Corresponds to the JSON property `id`
2132
+ # @return [String]
2133
+ attr_accessor :id
2134
+
2135
+ # The resource type.
2136
+ # Corresponds to the JSON property `kind`
2137
+ # @return [String]
2138
+ attr_accessor :kind
2139
+
2140
+ # A reference uniquely identifying the table.
2141
+ # Corresponds to the JSON property `tableReference`
2142
+ # @return [Google::Apis::BigqueryV2::TableReference]
2143
+ attr_accessor :table_reference
2144
+
2145
+ # The type of table. Possible values are: TABLE, VIEW.
2146
+ # Corresponds to the JSON property `type`
2147
+ # @return [String]
2148
+ attr_accessor :type
2149
+
2150
+ def initialize(**args)
2151
+ update!(**args)
2152
+ end
2153
+
2154
+ # Update properties of this object
2155
+ def update!(**args)
2156
+ @friendly_name = args[:friendly_name] unless args[:friendly_name].nil?
2157
+ @id = args[:id] unless args[:id].nil?
2158
+ @kind = args[:kind] unless args[:kind].nil?
2159
+ @table_reference = args[:table_reference] unless args[:table_reference].nil?
2160
+ @type = args[:type] unless args[:type].nil?
2161
+ end
2162
+ end
2163
+ end
2164
+
2165
+ #
2166
+ class TableReference
2167
+ include Google::Apis::Core::Hashable
2168
+
2169
+ # [Required] The ID of the dataset containing this table.
2170
+ # Corresponds to the JSON property `datasetId`
2171
+ # @return [String]
2172
+ attr_accessor :dataset_id
2173
+
2174
+ # [Required] The ID of the project containing this table.
2175
+ # Corresponds to the JSON property `projectId`
2176
+ # @return [String]
2177
+ attr_accessor :project_id
2178
+
2179
+ # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z),
2180
+ # numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
2181
+ # Corresponds to the JSON property `tableId`
2182
+ # @return [String]
2183
+ attr_accessor :table_id
2184
+
2185
+ def initialize(**args)
2186
+ update!(**args)
2187
+ end
2188
+
2189
+ # Update properties of this object
2190
+ def update!(**args)
2191
+ @dataset_id = args[:dataset_id] unless args[:dataset_id].nil?
2192
+ @project_id = args[:project_id] unless args[:project_id].nil?
2193
+ @table_id = args[:table_id] unless args[:table_id].nil?
2194
+ end
2195
+ end
2196
+
2197
+ #
2198
+ class TableRow
2199
+ include Google::Apis::Core::Hashable
2200
+
2201
+ # Represents a single row in the result set, consisting of one or more fields.
2202
+ # Corresponds to the JSON property `f`
2203
+ # @return [Array<Google::Apis::BigqueryV2::TableCell>]
2204
+ attr_accessor :f
2205
+
2206
+ def initialize(**args)
2207
+ update!(**args)
2208
+ end
2209
+
2210
+ # Update properties of this object
2211
+ def update!(**args)
2212
+ @f = args[:f] unless args[:f].nil?
2213
+ end
2214
+ end
2215
+
2216
+ #
2217
+ class TableSchema
2218
+ include Google::Apis::Core::Hashable
2219
+
2220
+ # Describes the fields in a table.
2221
+ # Corresponds to the JSON property `fields`
2222
+ # @return [Array<Google::Apis::BigqueryV2::TableFieldSchema>]
2223
+ attr_accessor :fields
2224
+
2225
+ def initialize(**args)
2226
+ update!(**args)
2227
+ end
2228
+
2229
+ # Update properties of this object
2230
+ def update!(**args)
2231
+ @fields = args[:fields] unless args[:fields].nil?
2232
+ end
2233
+ end
2234
+
2235
+ #
2236
+ class ViewDefinition
2237
+ include Google::Apis::Core::Hashable
2238
+
2239
+ # [Required] A query that BigQuery executes when the view is referenced.
2240
+ # Corresponds to the JSON property `query`
2241
+ # @return [String]
2242
+ attr_accessor :query
2243
+
2244
+ def initialize(**args)
2245
+ update!(**args)
2246
+ end
2247
+
2248
+ # Update properties of this object
2249
+ def update!(**args)
2250
+ @query = args[:query] unless args[:query].nil?
2251
+ end
2252
+ end
2253
+ end
2254
+ end
2255
+ end