lemboy-google-api-client 0.9.26

Sign up to get free protection for your applications and to get access to all the features.
Files changed (555) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +20 -0
  3. data/.rspec +2 -0
  4. data/.rubocop.yml +7 -0
  5. data/.rubocop_todo.yml +63 -0
  6. data/.travis.yml +27 -0
  7. data/.yardopts +12 -0
  8. data/CHANGELOG.md +309 -0
  9. data/CONTRIBUTING.md +31 -0
  10. data/Gemfile +53 -0
  11. data/LICENSE +202 -0
  12. data/MIGRATING.md +171 -0
  13. data/README.md +327 -0
  14. data/Rakefile +2 -0
  15. data/api_names.yaml +36215 -0
  16. data/bin/generate-api +109 -0
  17. data/generated/google/apis/adexchangebuyer2_v2beta1.rb +35 -0
  18. data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +298 -0
  19. data/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +122 -0
  20. data/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +458 -0
  21. data/generated/google/apis/adexchangebuyer_v1_3.rb +35 -0
  22. data/generated/google/apis/adexchangebuyer_v1_3/classes.rb +1335 -0
  23. data/generated/google/apis/adexchangebuyer_v1_3/representations.rb +446 -0
  24. data/generated/google/apis/adexchangebuyer_v1_3/service.rb +872 -0
  25. data/generated/google/apis/adexchangebuyer_v1_4.rb +35 -0
  26. data/generated/google/apis/adexchangebuyer_v1_4/classes.rb +3550 -0
  27. data/generated/google/apis/adexchangebuyer_v1_4/representations.rb +1421 -0
  28. data/generated/google/apis/adexchangebuyer_v1_4/service.rb +1538 -0
  29. data/generated/google/apis/adexchangeseller_v2_0.rb +37 -0
  30. data/generated/google/apis/adexchangeseller_v2_0/classes.rb +792 -0
  31. data/generated/google/apis/adexchangeseller_v2_0/representations.rb +347 -0
  32. data/generated/google/apis/adexchangeseller_v2_0/service.rb +667 -0
  33. data/generated/google/apis/admin_datatransfer_v1.rb +37 -0
  34. data/generated/google/apis/admin_datatransfer_v1/classes.rb +267 -0
  35. data/generated/google/apis/admin_datatransfer_v1/representations.rb +130 -0
  36. data/generated/google/apis/admin_datatransfer_v1/service.rb +262 -0
  37. data/generated/google/apis/admin_directory_v1.rb +113 -0
  38. data/generated/google/apis/admin_directory_v1/classes.rb +3241 -0
  39. data/generated/google/apis/admin_directory_v1/representations.rb +1172 -0
  40. data/generated/google/apis/admin_directory_v1/service.rb +3857 -0
  41. data/generated/google/apis/admin_reports_v1.rb +38 -0
  42. data/generated/google/apis/admin_reports_v1/classes.rb +582 -0
  43. data/generated/google/apis/admin_reports_v1/representations.rb +257 -0
  44. data/generated/google/apis/admin_reports_v1/service.rb +336 -0
  45. data/generated/google/apis/adsense_v1_4.rb +37 -0
  46. data/generated/google/apis/adsense_v1_4/classes.rb +1280 -0
  47. data/generated/google/apis/adsense_v1_4/representations.rb +555 -0
  48. data/generated/google/apis/adsense_v1_4/service.rb +1713 -0
  49. data/generated/google/apis/adsensehost_v4_1.rb +35 -0
  50. data/generated/google/apis/adsensehost_v4_1/classes.rb +836 -0
  51. data/generated/google/apis/adsensehost_v4_1/representations.rb +367 -0
  52. data/generated/google/apis/adsensehost_v4_1/service.rb +1164 -0
  53. data/generated/google/apis/analytics_v3.rb +49 -0
  54. data/generated/google/apis/analytics_v3/classes.rb +5536 -0
  55. data/generated/google/apis/analytics_v3/representations.rb +1992 -0
  56. data/generated/google/apis/analytics_v3/service.rb +3785 -0
  57. data/generated/google/apis/analyticsreporting_v4.rb +37 -0
  58. data/generated/google/apis/analyticsreporting_v4/classes.rb +1420 -0
  59. data/generated/google/apis/analyticsreporting_v4/representations.rb +598 -0
  60. data/generated/google/apis/analyticsreporting_v4/service.rb +88 -0
  61. data/generated/google/apis/androidenterprise_v1.rb +34 -0
  62. data/generated/google/apis/androidenterprise_v1/classes.rb +2250 -0
  63. data/generated/google/apis/androidenterprise_v1/representations.rb +970 -0
  64. data/generated/google/apis/androidenterprise_v1/service.rb +3267 -0
  65. data/generated/google/apis/androidpublisher_v2.rb +34 -0
  66. data/generated/google/apis/androidpublisher_v2/classes.rb +1941 -0
  67. data/generated/google/apis/androidpublisher_v2/representations.rb +975 -0
  68. data/generated/google/apis/androidpublisher_v2/service.rb +2572 -0
  69. data/generated/google/apis/appengine_v1beta4.rb +35 -0
  70. data/generated/google/apis/appengine_v1beta4/classes.rb +1585 -0
  71. data/generated/google/apis/appengine_v1beta4/representations.rb +542 -0
  72. data/generated/google/apis/appengine_v1beta4/service.rb +477 -0
  73. data/generated/google/apis/appengine_v1beta5.rb +40 -0
  74. data/generated/google/apis/appengine_v1beta5/classes.rb +1984 -0
  75. data/generated/google/apis/appengine_v1beta5/representations.rb +765 -0
  76. data/generated/google/apis/appengine_v1beta5/service.rb +864 -0
  77. data/generated/google/apis/appsactivity_v1.rb +46 -0
  78. data/generated/google/apis/appsactivity_v1/classes.rb +415 -0
  79. data/generated/google/apis/appsactivity_v1/representations.rb +209 -0
  80. data/generated/google/apis/appsactivity_v1/service.rb +128 -0
  81. data/generated/google/apis/appstate_v1.rb +34 -0
  82. data/generated/google/apis/appstate_v1/classes.rb +154 -0
  83. data/generated/google/apis/appstate_v1/representations.rb +87 -0
  84. data/generated/google/apis/appstate_v1/service.rb +260 -0
  85. data/generated/google/apis/autoscaler_v1beta2.rb +38 -0
  86. data/generated/google/apis/autoscaler_v1beta2/classes.rb +710 -0
  87. data/generated/google/apis/autoscaler_v1beta2/representations.rb +296 -0
  88. data/generated/google/apis/autoscaler_v1beta2/service.rb +478 -0
  89. data/generated/google/apis/bigquery_v2.rb +52 -0
  90. data/generated/google/apis/bigquery_v2/classes.rb +3081 -0
  91. data/generated/google/apis/bigquery_v2/representations.rb +1094 -0
  92. data/generated/google/apis/bigquery_v2/service.rb +988 -0
  93. data/generated/google/apis/blogger_v3.rb +37 -0
  94. data/generated/google/apis/blogger_v3/classes.rb +1354 -0
  95. data/generated/google/apis/blogger_v3/representations.rb +632 -0
  96. data/generated/google/apis/blogger_v3/service.rb +1587 -0
  97. data/generated/google/apis/books_v1.rb +34 -0
  98. data/generated/google/apis/books_v1/classes.rb +4160 -0
  99. data/generated/google/apis/books_v1/representations.rb +1799 -0
  100. data/generated/google/apis/books_v1/service.rb +2300 -0
  101. data/generated/google/apis/calendar_v3.rb +37 -0
  102. data/generated/google/apis/calendar_v3/classes.rb +1742 -0
  103. data/generated/google/apis/calendar_v3/representations.rb +631 -0
  104. data/generated/google/apis/calendar_v3/service.rb +1968 -0
  105. data/generated/google/apis/civicinfo_v2.rb +32 -0
  106. data/generated/google/apis/civicinfo_v2/classes.rb +1499 -0
  107. data/generated/google/apis/civicinfo_v2/representations.rb +572 -0
  108. data/generated/google/apis/civicinfo_v2/service.rb +300 -0
  109. data/generated/google/apis/classroom_v1.rb +70 -0
  110. data/generated/google/apis/classroom_v1/classes.rb +1572 -0
  111. data/generated/google/apis/classroom_v1/representations.rb +729 -0
  112. data/generated/google/apis/classroom_v1/service.rb +1945 -0
  113. data/generated/google/apis/classroom_v1beta1.rb +49 -0
  114. data/generated/google/apis/classroom_v1beta1/classes.rb +447 -0
  115. data/generated/google/apis/classroom_v1beta1/representations.rb +190 -0
  116. data/generated/google/apis/classroom_v1beta1/service.rb +791 -0
  117. data/generated/google/apis/cloudbilling_v1.rb +35 -0
  118. data/generated/google/apis/cloudbilling_v1/classes.rb +169 -0
  119. data/generated/google/apis/cloudbilling_v1/representations.rb +87 -0
  120. data/generated/google/apis/cloudbilling_v1/service.rb +258 -0
  121. data/generated/google/apis/cloudbuild_v1.rb +34 -0
  122. data/generated/google/apis/cloudbuild_v1/classes.rb +919 -0
  123. data/generated/google/apis/cloudbuild_v1/representations.rb +364 -0
  124. data/generated/google/apis/cloudbuild_v1/service.rb +492 -0
  125. data/generated/google/apis/clouddebugger_v2.rb +38 -0
  126. data/generated/google/apis/clouddebugger_v2/classes.rb +1081 -0
  127. data/generated/google/apis/clouddebugger_v2/representations.rb +465 -0
  128. data/generated/google/apis/clouddebugger_v2/service.rb +396 -0
  129. data/generated/google/apis/cloudkms_v1beta1.rb +34 -0
  130. data/generated/google/apis/cloudkms_v1beta1/classes.rb +999 -0
  131. data/generated/google/apis/cloudkms_v1beta1/representations.rb +448 -0
  132. data/generated/google/apis/cloudkms_v1beta1/service.rb +932 -0
  133. data/generated/google/apis/cloudlatencytest_v2.rb +34 -0
  134. data/generated/google/apis/cloudlatencytest_v2/classes.rb +195 -0
  135. data/generated/google/apis/cloudlatencytest_v2/representations.rb +127 -0
  136. data/generated/google/apis/cloudlatencytest_v2/service.rb +135 -0
  137. data/generated/google/apis/cloudmonitoring_v2beta2.rb +37 -0
  138. data/generated/google/apis/cloudmonitoring_v2beta2/classes.rb +679 -0
  139. data/generated/google/apis/cloudmonitoring_v2beta2/representations.rb +353 -0
  140. data/generated/google/apis/cloudmonitoring_v2beta2/service.rb +452 -0
  141. data/generated/google/apis/cloudresourcemanager_v1.rb +38 -0
  142. data/generated/google/apis/cloudresourcemanager_v1/classes.rb +886 -0
  143. data/generated/google/apis/cloudresourcemanager_v1/representations.rb +359 -0
  144. data/generated/google/apis/cloudresourcemanager_v1/service.rb +686 -0
  145. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +38 -0
  146. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +682 -0
  147. data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +312 -0
  148. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +710 -0
  149. data/generated/google/apis/cloudtrace_v1.rb +43 -0
  150. data/generated/google/apis/cloudtrace_v1/classes.rb +188 -0
  151. data/generated/google/apis/cloudtrace_v1/representations.rb +102 -0
  152. data/generated/google/apis/cloudtrace_v1/service.rb +192 -0
  153. data/generated/google/apis/clouduseraccounts_beta.rb +44 -0
  154. data/generated/google/apis/clouduseraccounts_beta/classes.rb +845 -0
  155. data/generated/google/apis/clouduseraccounts_beta/representations.rb +352 -0
  156. data/generated/google/apis/clouduseraccounts_beta/service.rb +907 -0
  157. data/generated/google/apis/compute_beta.rb +49 -0
  158. data/generated/google/apis/compute_beta/classes.rb +12261 -0
  159. data/generated/google/apis/compute_beta/representations.rb +4615 -0
  160. data/generated/google/apis/compute_beta/service.rb +15330 -0
  161. data/generated/google/apis/compute_v1.rb +49 -0
  162. data/generated/google/apis/compute_v1/classes.rb +11179 -0
  163. data/generated/google/apis/compute_v1/representations.rb +4203 -0
  164. data/generated/google/apis/compute_v1/service.rb +12937 -0
  165. data/generated/google/apis/container_v1.rb +35 -0
  166. data/generated/google/apis/container_v1/classes.rb +1040 -0
  167. data/generated/google/apis/container_v1/representations.rb +415 -0
  168. data/generated/google/apis/container_v1/service.rb +659 -0
  169. data/generated/google/apis/container_v1beta1.rb +35 -0
  170. data/generated/google/apis/container_v1beta1/classes.rb +466 -0
  171. data/generated/google/apis/container_v1beta1/representations.rb +177 -0
  172. data/generated/google/apis/container_v1beta1/service.rb +394 -0
  173. data/generated/google/apis/content_v2.rb +35 -0
  174. data/generated/google/apis/content_v2/classes.rb +6887 -0
  175. data/generated/google/apis/content_v2/representations.rb +2963 -0
  176. data/generated/google/apis/content_v2/service.rb +2653 -0
  177. data/generated/google/apis/coordinate_v1.rb +37 -0
  178. data/generated/google/apis/coordinate_v1/classes.rb +669 -0
  179. data/generated/google/apis/coordinate_v1/representations.rb +321 -0
  180. data/generated/google/apis/coordinate_v1/service.rb +678 -0
  181. data/generated/google/apis/customsearch_v1.rb +31 -0
  182. data/generated/google/apis/customsearch_v1/classes.rb +771 -0
  183. data/generated/google/apis/customsearch_v1/representations.rb +302 -0
  184. data/generated/google/apis/customsearch_v1/service.rb +207 -0
  185. data/generated/google/apis/dataflow_v1b3.rb +37 -0
  186. data/generated/google/apis/dataflow_v1b3/classes.rb +4225 -0
  187. data/generated/google/apis/dataflow_v1b3/representations.rb +1809 -0
  188. data/generated/google/apis/dataflow_v1b3/service.rb +874 -0
  189. data/generated/google/apis/dataproc_v1.rb +34 -0
  190. data/generated/google/apis/dataproc_v1/classes.rb +1716 -0
  191. data/generated/google/apis/dataproc_v1/representations.rb +678 -0
  192. data/generated/google/apis/dataproc_v1/service.rb +670 -0
  193. data/generated/google/apis/datastore_v1.rb +38 -0
  194. data/generated/google/apis/datastore_v1/classes.rb +1289 -0
  195. data/generated/google/apis/datastore_v1/representations.rb +572 -0
  196. data/generated/google/apis/datastore_v1/service.rb +259 -0
  197. data/generated/google/apis/datastore_v1beta2.rb +40 -0
  198. data/generated/google/apis/datastore_v1beta2/classes.rb +1186 -0
  199. data/generated/google/apis/datastore_v1beta2/representations.rb +594 -0
  200. data/generated/google/apis/datastore_v1beta2/service.rb +294 -0
  201. data/generated/google/apis/datastore_v1beta3.rb +38 -0
  202. data/generated/google/apis/datastore_v1beta3/classes.rb +1284 -0
  203. data/generated/google/apis/datastore_v1beta3/representations.rb +572 -0
  204. data/generated/google/apis/datastore_v1beta3/service.rb +259 -0
  205. data/generated/google/apis/deploymentmanager_v2.rb +43 -0
  206. data/generated/google/apis/deploymentmanager_v2/classes.rb +1582 -0
  207. data/generated/google/apis/deploymentmanager_v2/representations.rb +686 -0
  208. data/generated/google/apis/deploymentmanager_v2/service.rb +1026 -0
  209. data/generated/google/apis/deploymentmanager_v2beta2.rb +44 -0
  210. data/generated/google/apis/deploymentmanager_v2beta2/classes.rb +843 -0
  211. data/generated/google/apis/deploymentmanager_v2beta2/representations.rb +306 -0
  212. data/generated/google/apis/deploymentmanager_v2beta2/service.rb +689 -0
  213. data/generated/google/apis/dfareporting_v2_1.rb +37 -0
  214. data/generated/google/apis/dfareporting_v2_1/classes.rb +10770 -0
  215. data/generated/google/apis/dfareporting_v2_1/representations.rb +3438 -0
  216. data/generated/google/apis/dfareporting_v2_1/service.rb +8585 -0
  217. data/generated/google/apis/dfareporting_v2_3.rb +37 -0
  218. data/generated/google/apis/dfareporting_v2_3/classes.rb +10839 -0
  219. data/generated/google/apis/dfareporting_v2_3/representations.rb +3829 -0
  220. data/generated/google/apis/dfareporting_v2_3/service.rb +8581 -0
  221. data/generated/google/apis/dfareporting_v2_5.rb +40 -0
  222. data/generated/google/apis/dfareporting_v2_5/classes.rb +11225 -0
  223. data/generated/google/apis/dfareporting_v2_5/representations.rb +3982 -0
  224. data/generated/google/apis/dfareporting_v2_5/service.rb +8755 -0
  225. data/generated/google/apis/dfareporting_v2_6.rb +40 -0
  226. data/generated/google/apis/dfareporting_v2_6/classes.rb +11586 -0
  227. data/generated/google/apis/dfareporting_v2_6/representations.rb +4119 -0
  228. data/generated/google/apis/dfareporting_v2_6/service.rb +9025 -0
  229. data/generated/google/apis/dfareporting_v2_7.rb +40 -0
  230. data/generated/google/apis/dfareporting_v2_7/classes.rb +11876 -0
  231. data/generated/google/apis/dfareporting_v2_7/representations.rb +4243 -0
  232. data/generated/google/apis/dfareporting_v2_7/service.rb +9095 -0
  233. data/generated/google/apis/discovery_v1.rb +32 -0
  234. data/generated/google/apis/discovery_v1/classes.rb +961 -0
  235. data/generated/google/apis/discovery_v1/representations.rb +397 -0
  236. data/generated/google/apis/discovery_v1/service.rb +142 -0
  237. data/generated/google/apis/dns_v1.rb +43 -0
  238. data/generated/google/apis/dns_v1/classes.rb +406 -0
  239. data/generated/google/apis/dns_v1/representations.rb +167 -0
  240. data/generated/google/apis/dns_v1/service.rb +453 -0
  241. data/generated/google/apis/dns_v2beta1.rb +43 -0
  242. data/generated/google/apis/dns_v2beta1/classes.rb +915 -0
  243. data/generated/google/apis/dns_v2beta1/representations.rb +368 -0
  244. data/generated/google/apis/dns_v2beta1/service.rb +768 -0
  245. data/generated/google/apis/doubleclickbidmanager_v1.rb +31 -0
  246. data/generated/google/apis/doubleclickbidmanager_v1/classes.rb +795 -0
  247. data/generated/google/apis/doubleclickbidmanager_v1/representations.rb +368 -0
  248. data/generated/google/apis/doubleclickbidmanager_v1/service.rb +376 -0
  249. data/generated/google/apis/doubleclicksearch_v2.rb +35 -0
  250. data/generated/google/apis/doubleclicksearch_v2/classes.rb +960 -0
  251. data/generated/google/apis/doubleclicksearch_v2/representations.rb +350 -0
  252. data/generated/google/apis/doubleclicksearch_v2/service.rb +480 -0
  253. data/generated/google/apis/drive_v2.rb +59 -0
  254. data/generated/google/apis/drive_v2/classes.rb +2633 -0
  255. data/generated/google/apis/drive_v2/representations.rb +885 -0
  256. data/generated/google/apis/drive_v2/service.rb +2754 -0
  257. data/generated/google/apis/drive_v3.rb +56 -0
  258. data/generated/google/apis/drive_v3/classes.rb +1611 -0
  259. data/generated/google/apis/drive_v3/representations.rb +555 -0
  260. data/generated/google/apis/drive_v3/service.rb +1553 -0
  261. data/generated/google/apis/fitness_v1.rb +85 -0
  262. data/generated/google/apis/fitness_v1/classes.rb +943 -0
  263. data/generated/google/apis/fitness_v1/representations.rb +380 -0
  264. data/generated/google/apis/fitness_v1/service.rb +674 -0
  265. data/generated/google/apis/fusiontables_v2.rb +37 -0
  266. data/generated/google/apis/fusiontables_v2/classes.rb +1049 -0
  267. data/generated/google/apis/fusiontables_v2/representations.rb +457 -0
  268. data/generated/google/apis/fusiontables_v2/service.rb +1463 -0
  269. data/generated/google/apis/games_configuration_v1configuration.rb +34 -0
  270. data/generated/google/apis/games_configuration_v1configuration/classes.rb +506 -0
  271. data/generated/google/apis/games_configuration_v1configuration/representations.rb +228 -0
  272. data/generated/google/apis/games_configuration_v1configuration/service.rb +565 -0
  273. data/generated/google/apis/games_management_v1management.rb +37 -0
  274. data/generated/google/apis/games_management_v1management/classes.rb +567 -0
  275. data/generated/google/apis/games_management_v1management/representations.rb +278 -0
  276. data/generated/google/apis/games_management_v1management/service.rb +994 -0
  277. data/generated/google/apis/games_v1.rb +40 -0
  278. data/generated/google/apis/games_v1/classes.rb +4667 -0
  279. data/generated/google/apis/games_v1/representations.rb +1800 -0
  280. data/generated/google/apis/games_v1/service.rb +2449 -0
  281. data/generated/google/apis/gan_v1beta1.rb +31 -0
  282. data/generated/google/apis/gan_v1beta1/classes.rb +1428 -0
  283. data/generated/google/apis/gan_v1beta1/representations.rb +462 -0
  284. data/generated/google/apis/gan_v1beta1/service.rb +682 -0
  285. data/generated/google/apis/genomics_v1.rb +46 -0
  286. data/generated/google/apis/genomics_v1/classes.rb +3477 -0
  287. data/generated/google/apis/genomics_v1/representations.rb +1284 -0
  288. data/generated/google/apis/genomics_v1/service.rb +2207 -0
  289. data/generated/google/apis/genomics_v1beta2.rb +46 -0
  290. data/generated/google/apis/genomics_v1beta2/classes.rb +3288 -0
  291. data/generated/google/apis/genomics_v1beta2/representations.rb +1194 -0
  292. data/generated/google/apis/genomics_v1beta2/service.rb +2392 -0
  293. data/generated/google/apis/gmail_v1.rb +61 -0
  294. data/generated/google/apis/gmail_v1/classes.rb +1382 -0
  295. data/generated/google/apis/gmail_v1/representations.rb +624 -0
  296. data/generated/google/apis/gmail_v1/service.rb +2447 -0
  297. data/generated/google/apis/groupsmigration_v1.rb +34 -0
  298. data/generated/google/apis/groupsmigration_v1/classes.rb +51 -0
  299. data/generated/google/apis/groupsmigration_v1/representations.rb +40 -0
  300. data/generated/google/apis/groupsmigration_v1/service.rb +110 -0
  301. data/generated/google/apis/groupssettings_v1.rb +34 -0
  302. data/generated/google/apis/groupssettings_v1/classes.rb +240 -0
  303. data/generated/google/apis/groupssettings_v1/representations.rb +69 -0
  304. data/generated/google/apis/groupssettings_v1/service.rb +179 -0
  305. data/generated/google/apis/iam_v1.rb +36 -0
  306. data/generated/google/apis/iam_v1/classes.rb +640 -0
  307. data/generated/google/apis/iam_v1/representations.rb +316 -0
  308. data/generated/google/apis/iam_v1/service.rb +554 -0
  309. data/generated/google/apis/identitytoolkit_v3.rb +37 -0
  310. data/generated/google/apis/identitytoolkit_v3/classes.rb +2182 -0
  311. data/generated/google/apis/identitytoolkit_v3/representations.rb +742 -0
  312. data/generated/google/apis/identitytoolkit_v3/service.rb +657 -0
  313. data/generated/google/apis/kgsearch_v1.rb +31 -0
  314. data/generated/google/apis/kgsearch_v1/classes.rb +59 -0
  315. data/generated/google/apis/kgsearch_v1/representations.rb +41 -0
  316. data/generated/google/apis/kgsearch_v1/service.rb +113 -0
  317. data/generated/google/apis/language_v1beta1.rb +36 -0
  318. data/generated/google/apis/language_v1beta1/classes.rb +757 -0
  319. data/generated/google/apis/language_v1beta1/representations.rb +339 -0
  320. data/generated/google/apis/language_v1beta1/service.rb +184 -0
  321. data/generated/google/apis/licensing_v1.rb +34 -0
  322. data/generated/google/apis/licensing_v1/classes.rb +132 -0
  323. data/generated/google/apis/licensing_v1/representations.rb +74 -0
  324. data/generated/google/apis/licensing_v1/service.rb +369 -0
  325. data/generated/google/apis/logging_v1beta3.rb +47 -0
  326. data/generated/google/apis/logging_v1beta3/classes.rb +1079 -0
  327. data/generated/google/apis/logging_v1beta3/representations.rb +366 -0
  328. data/generated/google/apis/logging_v1beta3/service.rb +1001 -0
  329. data/generated/google/apis/logging_v2beta1.rb +46 -0
  330. data/generated/google/apis/logging_v2beta1/classes.rb +1254 -0
  331. data/generated/google/apis/logging_v2beta1/representations.rb +421 -0
  332. data/generated/google/apis/logging_v2beta1/service.rb +788 -0
  333. data/generated/google/apis/manager_v1beta2.rb +53 -0
  334. data/generated/google/apis/manager_v1beta2/classes.rb +1287 -0
  335. data/generated/google/apis/manager_v1beta2/representations.rb +606 -0
  336. data/generated/google/apis/manager_v1beta2/service.rb +372 -0
  337. data/generated/google/apis/manufacturers_v1.rb +34 -0
  338. data/generated/google/apis/manufacturers_v1/classes.rb +258 -0
  339. data/generated/google/apis/manufacturers_v1/representations.rb +103 -0
  340. data/generated/google/apis/manufacturers_v1/service.rb +138 -0
  341. data/generated/google/apis/mirror_v1.rb +37 -0
  342. data/generated/google/apis/mirror_v1/classes.rb +1072 -0
  343. data/generated/google/apis/mirror_v1/representations.rb +390 -0
  344. data/generated/google/apis/mirror_v1/service.rb +977 -0
  345. data/generated/google/apis/monitoring_v3.rb +45 -0
  346. data/generated/google/apis/monitoring_v3/classes.rb +1335 -0
  347. data/generated/google/apis/monitoring_v3/representations.rb +516 -0
  348. data/generated/google/apis/monitoring_v3/service.rb +706 -0
  349. data/generated/google/apis/mybusiness_v3.rb +32 -0
  350. data/generated/google/apis/mybusiness_v3/classes.rb +1864 -0
  351. data/generated/google/apis/mybusiness_v3/representations.rb +741 -0
  352. data/generated/google/apis/mybusiness_v3/service.rb +960 -0
  353. data/generated/google/apis/oauth2_v2.rb +43 -0
  354. data/generated/google/apis/oauth2_v2/classes.rb +245 -0
  355. data/generated/google/apis/oauth2_v2/representations.rb +102 -0
  356. data/generated/google/apis/oauth2_v2/service.rb +199 -0
  357. data/generated/google/apis/pagespeedonline_v2.rb +32 -0
  358. data/generated/google/apis/pagespeedonline_v2/classes.rb +614 -0
  359. data/generated/google/apis/pagespeedonline_v2/representations.rb +272 -0
  360. data/generated/google/apis/pagespeedonline_v2/service.rb +119 -0
  361. data/generated/google/apis/partners_v2.rb +32 -0
  362. data/generated/google/apis/partners_v2/classes.rb +942 -0
  363. data/generated/google/apis/partners_v2/representations.rb +454 -0
  364. data/generated/google/apis/partners_v2/service.rb +400 -0
  365. data/generated/google/apis/people_v1.rb +59 -0
  366. data/generated/google/apis/people_v1/classes.rb +1521 -0
  367. data/generated/google/apis/people_v1/representations.rb +663 -0
  368. data/generated/google/apis/people_v1/service.rb +189 -0
  369. data/generated/google/apis/plus_domains_v1.rb +61 -0
  370. data/generated/google/apis/plus_domains_v1/classes.rb +2609 -0
  371. data/generated/google/apis/plus_domains_v1/representations.rb +1111 -0
  372. data/generated/google/apis/plus_domains_v1/service.rb +904 -0
  373. data/generated/google/apis/plus_v1.rb +43 -0
  374. data/generated/google/apis/plus_v1/classes.rb +2094 -0
  375. data/generated/google/apis/plus_v1/representations.rb +907 -0
  376. data/generated/google/apis/plus_v1/service.rb +470 -0
  377. data/generated/google/apis/prediction_v1_6.rb +47 -0
  378. data/generated/google/apis/prediction_v1_6/classes.rb +751 -0
  379. data/generated/google/apis/prediction_v1_6/representations.rb +369 -0
  380. data/generated/google/apis/prediction_v1_6/service.rb +380 -0
  381. data/generated/google/apis/proximitybeacon_v1beta1.rb +34 -0
  382. data/generated/google/apis/proximitybeacon_v1beta1/classes.rb +786 -0
  383. data/generated/google/apis/proximitybeacon_v1beta1/representations.rb +347 -0
  384. data/generated/google/apis/proximitybeacon_v1beta1/service.rb +806 -0
  385. data/generated/google/apis/pubsub_v1.rb +37 -0
  386. data/generated/google/apis/pubsub_v1/classes.rb +676 -0
  387. data/generated/google/apis/pubsub_v1/representations.rb +323 -0
  388. data/generated/google/apis/pubsub_v1/service.rb +900 -0
  389. data/generated/google/apis/pubsub_v1beta2.rb +37 -0
  390. data/generated/google/apis/pubsub_v1beta2/classes.rb +620 -0
  391. data/generated/google/apis/pubsub_v1beta2/representations.rb +282 -0
  392. data/generated/google/apis/pubsub_v1beta2/service.rb +774 -0
  393. data/generated/google/apis/qpx_express_v1.rb +31 -0
  394. data/generated/google/apis/qpx_express_v1/classes.rb +1274 -0
  395. data/generated/google/apis/qpx_express_v1/representations.rb +473 -0
  396. data/generated/google/apis/qpx_express_v1/service.rb +100 -0
  397. data/generated/google/apis/replicapool_v1beta2.rb +44 -0
  398. data/generated/google/apis/replicapool_v1beta2/classes.rb +631 -0
  399. data/generated/google/apis/replicapool_v1beta2/representations.rb +264 -0
  400. data/generated/google/apis/replicapool_v1beta2/service.rb +608 -0
  401. data/generated/google/apis/replicapoolupdater_v1beta1.rb +45 -0
  402. data/generated/google/apis/replicapoolupdater_v1beta1/classes.rb +733 -0
  403. data/generated/google/apis/replicapoolupdater_v1beta1/representations.rb +294 -0
  404. data/generated/google/apis/replicapoolupdater_v1beta1/service.rb +509 -0
  405. data/generated/google/apis/reseller_v1.rb +37 -0
  406. data/generated/google/apis/reseller_v1/classes.rb +540 -0
  407. data/generated/google/apis/reseller_v1/representations.rb +225 -0
  408. data/generated/google/apis/reseller_v1/service.rb +623 -0
  409. data/generated/google/apis/resourceviews_v1beta2.rb +50 -0
  410. data/generated/google/apis/resourceviews_v1beta2/classes.rb +660 -0
  411. data/generated/google/apis/resourceviews_v1beta2/representations.rb +301 -0
  412. data/generated/google/apis/resourceviews_v1beta2/service.rb +563 -0
  413. data/generated/google/apis/script_v1.rb +64 -0
  414. data/generated/google/apis/script_v1/classes.rb +265 -0
  415. data/generated/google/apis/script_v1/representations.rb +119 -0
  416. data/generated/google/apis/script_v1/service.rb +98 -0
  417. data/generated/google/apis/sheets_v4.rb +43 -0
  418. data/generated/google/apis/sheets_v4/classes.rb +6368 -0
  419. data/generated/google/apis/sheets_v4/representations.rb +2289 -0
  420. data/generated/google/apis/sheets_v4/service.rb +569 -0
  421. data/generated/google/apis/site_verification_v1.rb +37 -0
  422. data/generated/google/apis/site_verification_v1/classes.rb +185 -0
  423. data/generated/google/apis/site_verification_v1/representations.rb +113 -0
  424. data/generated/google/apis/site_verification_v1/service.rb +315 -0
  425. data/generated/google/apis/slides_v1.rb +49 -0
  426. data/generated/google/apis/slides_v1/classes.rb +4044 -0
  427. data/generated/google/apis/slides_v1/representations.rb +1765 -0
  428. data/generated/google/apis/slides_v1/service.rb +202 -0
  429. data/generated/google/apis/speech_v1beta1.rb +34 -0
  430. data/generated/google/apis/speech_v1beta1/classes.rb +513 -0
  431. data/generated/google/apis/speech_v1beta1/representations.rb +218 -0
  432. data/generated/google/apis/speech_v1beta1/service.rb +273 -0
  433. data/generated/google/apis/sqladmin_v1beta4.rb +38 -0
  434. data/generated/google/apis/sqladmin_v1beta4/classes.rb +2142 -0
  435. data/generated/google/apis/sqladmin_v1beta4/representations.rb +893 -0
  436. data/generated/google/apis/sqladmin_v1beta4/service.rb +1709 -0
  437. data/generated/google/apis/storage_v1.rb +46 -0
  438. data/generated/google/apis/storage_v1/classes.rb +1255 -0
  439. data/generated/google/apis/storage_v1/representations.rb +502 -0
  440. data/generated/google/apis/storage_v1/service.rb +1906 -0
  441. data/generated/google/apis/storagetransfer_v1.rb +35 -0
  442. data/generated/google/apis/storagetransfer_v1/classes.rb +1046 -0
  443. data/generated/google/apis/storagetransfer_v1/representations.rb +418 -0
  444. data/generated/google/apis/storagetransfer_v1/service.rb +473 -0
  445. data/generated/google/apis/tagmanager_v1.rb +52 -0
  446. data/generated/google/apis/tagmanager_v1/classes.rb +1494 -0
  447. data/generated/google/apis/tagmanager_v1/representations.rb +611 -0
  448. data/generated/google/apis/tagmanager_v1/service.rb +2119 -0
  449. data/generated/google/apis/taskqueue_v1beta2.rb +37 -0
  450. data/generated/google/apis/taskqueue_v1beta2/classes.rb +254 -0
  451. data/generated/google/apis/taskqueue_v1beta2/representations.rb +126 -0
  452. data/generated/google/apis/taskqueue_v1beta2/service.rb +408 -0
  453. data/generated/google/apis/tasks_v1.rb +37 -0
  454. data/generated/google/apis/tasks_v1/classes.rb +296 -0
  455. data/generated/google/apis/tasks_v1/representations.rb +125 -0
  456. data/generated/google/apis/tasks_v1/service.rb +643 -0
  457. data/generated/google/apis/translate_v2.rb +31 -0
  458. data/generated/google/apis/translate_v2/classes.rb +168 -0
  459. data/generated/google/apis/translate_v2/representations.rb +121 -0
  460. data/generated/google/apis/translate_v2/service.rb +182 -0
  461. data/generated/google/apis/urlshortener_v1.rb +34 -0
  462. data/generated/google/apis/urlshortener_v1/classes.rb +246 -0
  463. data/generated/google/apis/urlshortener_v1/representations.rb +121 -0
  464. data/generated/google/apis/urlshortener_v1/service.rb +176 -0
  465. data/generated/google/apis/vision_v1.rb +36 -0
  466. data/generated/google/apis/vision_v1/classes.rb +1267 -0
  467. data/generated/google/apis/vision_v1/representations.rb +418 -0
  468. data/generated/google/apis/vision_v1/service.rb +90 -0
  469. data/generated/google/apis/webmasters_v3.rb +37 -0
  470. data/generated/google/apis/webmasters_v3/classes.rb +570 -0
  471. data/generated/google/apis/webmasters_v3/representations.rb +283 -0
  472. data/generated/google/apis/webmasters_v3/service.rb +573 -0
  473. data/generated/google/apis/youtube_analytics_v1.rb +46 -0
  474. data/generated/google/apis/youtube_analytics_v1/classes.rb +337 -0
  475. data/generated/google/apis/youtube_analytics_v1/representations.rb +174 -0
  476. data/generated/google/apis/youtube_analytics_v1/service.rb +486 -0
  477. data/generated/google/apis/youtube_partner_v1.rb +37 -0
  478. data/generated/google/apis/youtube_partner_v1/classes.rb +3854 -0
  479. data/generated/google/apis/youtube_partner_v1/representations.rb +1537 -0
  480. data/generated/google/apis/youtube_partner_v1/service.rb +3269 -0
  481. data/generated/google/apis/youtube_v3.rb +50 -0
  482. data/generated/google/apis/youtube_v3/classes.rb +8375 -0
  483. data/generated/google/apis/youtube_v3/representations.rb +3273 -0
  484. data/generated/google/apis/youtube_v3/service.rb +4440 -0
  485. data/generated/google/apis/youtubereporting_v1.rb +38 -0
  486. data/generated/google/apis/youtubereporting_v1/classes.rb +302 -0
  487. data/generated/google/apis/youtubereporting_v1/representations.rb +149 -0
  488. data/generated/google/apis/youtubereporting_v1/service.rb +385 -0
  489. data/google-api-client.gemspec +33 -0
  490. data/lib/cacerts.pem +2183 -0
  491. data/lib/google/api_client/auth/installed_app.rb +128 -0
  492. data/lib/google/api_client/auth/key_utils.rb +94 -0
  493. data/lib/google/api_client/auth/storage.rb +104 -0
  494. data/lib/google/api_client/auth/storages/file_store.rb +57 -0
  495. data/lib/google/api_client/auth/storages/redis_store.rb +59 -0
  496. data/lib/google/api_client/client_secrets.rb +177 -0
  497. data/lib/google/apis.rb +58 -0
  498. data/lib/google/apis/core/api_command.rb +146 -0
  499. data/lib/google/apis/core/base_service.rb +401 -0
  500. data/lib/google/apis/core/batch.rb +239 -0
  501. data/lib/google/apis/core/download.rb +108 -0
  502. data/lib/google/apis/core/hashable.rb +44 -0
  503. data/lib/google/apis/core/http_client_adapter.rb +82 -0
  504. data/lib/google/apis/core/http_command.rb +332 -0
  505. data/lib/google/apis/core/json_representation.rb +145 -0
  506. data/lib/google/apis/core/logging.rb +30 -0
  507. data/lib/google/apis/core/multipart.rb +187 -0
  508. data/lib/google/apis/core/upload.rb +295 -0
  509. data/lib/google/apis/errors.rb +80 -0
  510. data/lib/google/apis/generator.rb +70 -0
  511. data/lib/google/apis/generator/annotator.rb +301 -0
  512. data/lib/google/apis/generator/helpers.rb +74 -0
  513. data/lib/google/apis/generator/model.rb +143 -0
  514. data/lib/google/apis/generator/template.rb +124 -0
  515. data/lib/google/apis/generator/templates/_class.tmpl +40 -0
  516. data/lib/google/apis/generator/templates/_method.tmpl +92 -0
  517. data/lib/google/apis/generator/templates/_representation.tmpl +51 -0
  518. data/lib/google/apis/generator/templates/_representation_stub.tmpl +17 -0
  519. data/lib/google/apis/generator/templates/_representation_type.tmpl +10 -0
  520. data/lib/google/apis/generator/templates/classes.rb.tmpl +29 -0
  521. data/lib/google/apis/generator/templates/module.rb.tmpl +40 -0
  522. data/lib/google/apis/generator/templates/representations.rb.tmpl +32 -0
  523. data/lib/google/apis/generator/templates/service.rb.tmpl +60 -0
  524. data/lib/google/apis/options.rb +85 -0
  525. data/lib/google/apis/version.rb +39 -0
  526. data/rakelib/metrics.rake +22 -0
  527. data/rakelib/rubocop.rake +10 -0
  528. data/rakelib/spec.rake +11 -0
  529. data/rakelib/yard.rake +11 -0
  530. data/samples/cli/.env +4 -0
  531. data/samples/cli/Gemfile +7 -0
  532. data/samples/cli/README.md +51 -0
  533. data/samples/cli/google-api-samples +32 -0
  534. data/samples/cli/lib/base_cli.rb +95 -0
  535. data/samples/cli/lib/samples/analytics.rb +62 -0
  536. data/samples/cli/lib/samples/androidpublisher.rb +47 -0
  537. data/samples/cli/lib/samples/bigquery.rb +101 -0
  538. data/samples/cli/lib/samples/calendar.rb +83 -0
  539. data/samples/cli/lib/samples/drive.rb +82 -0
  540. data/samples/cli/lib/samples/gmail.rb +124 -0
  541. data/samples/cli/lib/samples/pubsub.rb +114 -0
  542. data/samples/cli/lib/samples/sheets.rb +61 -0
  543. data/samples/cli/lib/samples/translate.rb +44 -0
  544. data/samples/cli/lib/samples/you_tube.rb +44 -0
  545. data/samples/web/.env +2 -0
  546. data/samples/web/Gemfile +7 -0
  547. data/samples/web/README.md +44 -0
  548. data/samples/web/app.rb +120 -0
  549. data/samples/web/views/calendar.erb +34 -0
  550. data/samples/web/views/drive.erb +33 -0
  551. data/samples/web/views/home.erb +34 -0
  552. data/samples/web/views/layout.erb +40 -0
  553. data/sync.rb +71 -0
  554. data/third_party/hurley_patches.rb +103 -0
  555. metadata +735 -0
@@ -0,0 +1,52 @@
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 = '20170114'
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
+ # View your data across Google Cloud Platform services
40
+ AUTH_CLOUD_PLATFORM_READ_ONLY = 'https://www.googleapis.com/auth/cloud-platform.read-only'
41
+
42
+ # Manage your data and permissions in Google Cloud Storage
43
+ AUTH_DEVSTORAGE_FULL_CONTROL = 'https://www.googleapis.com/auth/devstorage.full_control'
44
+
45
+ # View your data in Google Cloud Storage
46
+ AUTH_DEVSTORAGE_READ_ONLY = 'https://www.googleapis.com/auth/devstorage.read_only'
47
+
48
+ # Manage your data in Google Cloud Storage
49
+ AUTH_DEVSTORAGE_READ_WRITE = 'https://www.googleapis.com/auth/devstorage.read_write'
50
+ end
51
+ end
52
+ end
@@ -0,0 +1,3081 @@
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 BigtableColumn
27
+ include Google::Apis::Core::Hashable
28
+
29
+ # [Optional] The encoding of the values when the type is not STRING. Acceptable
30
+ # encoding values are: TEXT - indicates values are alphanumeric text strings.
31
+ # BINARY - indicates values are encoded using HBase Bytes.toBytes family of
32
+ # functions. 'encoding' can also be set at the column family level. However, the
33
+ # setting at this level takes precedence if 'encoding' is set at both levels.
34
+ # Corresponds to the JSON property `encoding`
35
+ # @return [String]
36
+ attr_accessor :encoding
37
+
38
+ # [Optional] If the qualifier is not a valid BigQuery field identifier i.e. does
39
+ # not match [a-zA-Z][a-zA-Z0-9_]*, a valid identifier must be provided as the
40
+ # column field name and is used as field name in queries.
41
+ # Corresponds to the JSON property `fieldName`
42
+ # @return [String]
43
+ attr_accessor :field_name
44
+
45
+ # [Optional] If this is set, only the latest version of value in this column are
46
+ # exposed. 'onlyReadLatest' can also be set at the column family level. However,
47
+ # the setting at this level takes precedence if 'onlyReadLatest' is set at both
48
+ # levels.
49
+ # Corresponds to the JSON property `onlyReadLatest`
50
+ # @return [Boolean]
51
+ attr_accessor :only_read_latest
52
+ alias_method :only_read_latest?, :only_read_latest
53
+
54
+ # [Required] Qualifier of the column. Columns in the parent column family that
55
+ # has this exact qualifier are exposed as . field. If the qualifier is valid UTF-
56
+ # 8 string, it can be specified in the qualifier_string field. Otherwise, a base-
57
+ # 64 encoded value must be set to qualifier_encoded. The column field name is
58
+ # the same as the column qualifier. However, if the qualifier is not a valid
59
+ # BigQuery field identifier i.e. does not match [a-zA-Z][a-zA-Z0-9_]*, a valid
60
+ # identifier must be provided as field_name.
61
+ # Corresponds to the JSON property `qualifierEncoded`
62
+ # @return [String]
63
+ attr_accessor :qualifier_encoded
64
+
65
+ #
66
+ # Corresponds to the JSON property `qualifierString`
67
+ # @return [String]
68
+ attr_accessor :qualifier_string
69
+
70
+ # [Optional] The type to convert the value in cells of this column. The values
71
+ # are expected to be encoded using HBase Bytes.toBytes function when using the
72
+ # BINARY encoding value. Following BigQuery types are allowed (case-sensitive) -
73
+ # BYTES STRING INTEGER FLOAT BOOLEAN Default type is BYTES. 'type' can also be
74
+ # set at the column family level. However, the setting at this level takes
75
+ # precedence if 'type' is set at both levels.
76
+ # Corresponds to the JSON property `type`
77
+ # @return [String]
78
+ attr_accessor :type
79
+
80
+ def initialize(**args)
81
+ update!(**args)
82
+ end
83
+
84
+ # Update properties of this object
85
+ def update!(**args)
86
+ @encoding = args[:encoding] if args.key?(:encoding)
87
+ @field_name = args[:field_name] if args.key?(:field_name)
88
+ @only_read_latest = args[:only_read_latest] if args.key?(:only_read_latest)
89
+ @qualifier_encoded = args[:qualifier_encoded] if args.key?(:qualifier_encoded)
90
+ @qualifier_string = args[:qualifier_string] if args.key?(:qualifier_string)
91
+ @type = args[:type] if args.key?(:type)
92
+ end
93
+ end
94
+
95
+ #
96
+ class BigtableColumnFamily
97
+ include Google::Apis::Core::Hashable
98
+
99
+ # [Optional] Lists of columns that should be exposed as individual fields as
100
+ # opposed to a list of (column name, value) pairs. All columns whose qualifier
101
+ # matches a qualifier in this list can be accessed as .. Other columns can be
102
+ # accessed as a list through .Column field.
103
+ # Corresponds to the JSON property `columns`
104
+ # @return [Array<Google::Apis::BigqueryV2::BigtableColumn>]
105
+ attr_accessor :columns
106
+
107
+ # [Optional] The encoding of the values when the type is not STRING. Acceptable
108
+ # encoding values are: TEXT - indicates values are alphanumeric text strings.
109
+ # BINARY - indicates values are encoded using HBase Bytes.toBytes family of
110
+ # functions. This can be overridden for a specific column by listing that column
111
+ # in 'columns' and specifying an encoding for it.
112
+ # Corresponds to the JSON property `encoding`
113
+ # @return [String]
114
+ attr_accessor :encoding
115
+
116
+ # Identifier of the column family.
117
+ # Corresponds to the JSON property `familyId`
118
+ # @return [String]
119
+ attr_accessor :family_id
120
+
121
+ # [Optional] If this is set only the latest version of value are exposed for all
122
+ # columns in this column family. This can be overridden for a specific column by
123
+ # listing that column in 'columns' and specifying a different setting for that
124
+ # column.
125
+ # Corresponds to the JSON property `onlyReadLatest`
126
+ # @return [Boolean]
127
+ attr_accessor :only_read_latest
128
+ alias_method :only_read_latest?, :only_read_latest
129
+
130
+ # [Optional] The type to convert the value in cells of this column family. The
131
+ # values are expected to be encoded using HBase Bytes.toBytes function when
132
+ # using the BINARY encoding value. Following BigQuery types are allowed (case-
133
+ # sensitive) - BYTES STRING INTEGER FLOAT BOOLEAN Default type is BYTES. This
134
+ # can be overridden for a specific column by listing that column in 'columns'
135
+ # and specifying a type for it.
136
+ # Corresponds to the JSON property `type`
137
+ # @return [String]
138
+ attr_accessor :type
139
+
140
+ def initialize(**args)
141
+ update!(**args)
142
+ end
143
+
144
+ # Update properties of this object
145
+ def update!(**args)
146
+ @columns = args[:columns] if args.key?(:columns)
147
+ @encoding = args[:encoding] if args.key?(:encoding)
148
+ @family_id = args[:family_id] if args.key?(:family_id)
149
+ @only_read_latest = args[:only_read_latest] if args.key?(:only_read_latest)
150
+ @type = args[:type] if args.key?(:type)
151
+ end
152
+ end
153
+
154
+ #
155
+ class BigtableOptions
156
+ include Google::Apis::Core::Hashable
157
+
158
+ # [Optional] List of column families to expose in the table schema along with
159
+ # their types. This list restricts the column families that can be referenced in
160
+ # queries and specifies their value types. You can use this list to do type
161
+ # conversions - see the 'type' field for more details. If you leave this list
162
+ # empty, all column families are present in the table schema and their values
163
+ # are read as BYTES. During a query only the column families referenced in that
164
+ # query are read from Bigtable.
165
+ # Corresponds to the JSON property `columnFamilies`
166
+ # @return [Array<Google::Apis::BigqueryV2::BigtableColumnFamily>]
167
+ attr_accessor :column_families
168
+
169
+ # [Optional] If field is true, then the column families that are not specified
170
+ # in columnFamilies list are not exposed in the table schema. Otherwise, they
171
+ # are read with BYTES type values. The default value is false.
172
+ # Corresponds to the JSON property `ignoreUnspecifiedColumnFamilies`
173
+ # @return [Boolean]
174
+ attr_accessor :ignore_unspecified_column_families
175
+ alias_method :ignore_unspecified_column_families?, :ignore_unspecified_column_families
176
+
177
+ # [Optional] If field is true, then the rowkey column families will be read and
178
+ # converted to string. Otherwise they are read with BYTES type values and users
179
+ # need to manually cast them with CAST if necessary. The default value is false.
180
+ # Corresponds to the JSON property `readRowkeyAsString`
181
+ # @return [Boolean]
182
+ attr_accessor :read_rowkey_as_string
183
+ alias_method :read_rowkey_as_string?, :read_rowkey_as_string
184
+
185
+ def initialize(**args)
186
+ update!(**args)
187
+ end
188
+
189
+ # Update properties of this object
190
+ def update!(**args)
191
+ @column_families = args[:column_families] if args.key?(:column_families)
192
+ @ignore_unspecified_column_families = args[:ignore_unspecified_column_families] if args.key?(:ignore_unspecified_column_families)
193
+ @read_rowkey_as_string = args[:read_rowkey_as_string] if args.key?(:read_rowkey_as_string)
194
+ end
195
+ end
196
+
197
+ #
198
+ class CsvOptions
199
+ include Google::Apis::Core::Hashable
200
+
201
+ # [Optional] Indicates if BigQuery should accept rows that are missing trailing
202
+ # optional columns. If true, BigQuery treats missing trailing columns as null
203
+ # values. If false, records with missing trailing columns are treated as bad
204
+ # records, and if there are too many bad records, an invalid error is returned
205
+ # in the job result. The default value is false.
206
+ # Corresponds to the JSON property `allowJaggedRows`
207
+ # @return [Boolean]
208
+ attr_accessor :allow_jagged_rows
209
+ alias_method :allow_jagged_rows?, :allow_jagged_rows
210
+
211
+ # [Optional] Indicates if BigQuery should allow quoted data sections that
212
+ # contain newline characters in a CSV file. The default value is false.
213
+ # Corresponds to the JSON property `allowQuotedNewlines`
214
+ # @return [Boolean]
215
+ attr_accessor :allow_quoted_newlines
216
+ alias_method :allow_quoted_newlines?, :allow_quoted_newlines
217
+
218
+ # [Optional] The character encoding of the data. The supported values are UTF-8
219
+ # or ISO-8859-1. The default value is UTF-8. BigQuery decodes the data after the
220
+ # raw, binary data has been split using the values of the quote and
221
+ # fieldDelimiter properties.
222
+ # Corresponds to the JSON property `encoding`
223
+ # @return [String]
224
+ attr_accessor :encoding
225
+
226
+ # [Optional] The separator for fields in a CSV file. BigQuery converts the
227
+ # string to ISO-8859-1 encoding, and then uses the first byte of the encoded
228
+ # string to split the data in its raw, binary state. BigQuery also supports the
229
+ # escape sequence "\t" to specify a tab separator. The default value is a comma (
230
+ # ',').
231
+ # Corresponds to the JSON property `fieldDelimiter`
232
+ # @return [String]
233
+ attr_accessor :field_delimiter
234
+
235
+ # [Optional] The value that is used to quote data sections in a CSV file.
236
+ # BigQuery converts the string to ISO-8859-1 encoding, and then uses the first
237
+ # byte of the encoded string to split the data in its raw, binary state. The
238
+ # default value is a double-quote ('"'). If your data does not contain quoted
239
+ # sections, set the property value to an empty string. If your data contains
240
+ # quoted newline characters, you must also set the allowQuotedNewlines property
241
+ # to true.
242
+ # Corresponds to the JSON property `quote`
243
+ # @return [String]
244
+ attr_accessor :quote
245
+
246
+ # [Optional] The number of rows at the top of a CSV file that BigQuery will skip
247
+ # when reading the data. The default value is 0. This property is useful if you
248
+ # have header rows in the file that should be skipped.
249
+ # Corresponds to the JSON property `skipLeadingRows`
250
+ # @return [String]
251
+ attr_accessor :skip_leading_rows
252
+
253
+ def initialize(**args)
254
+ update!(**args)
255
+ end
256
+
257
+ # Update properties of this object
258
+ def update!(**args)
259
+ @allow_jagged_rows = args[:allow_jagged_rows] if args.key?(:allow_jagged_rows)
260
+ @allow_quoted_newlines = args[:allow_quoted_newlines] if args.key?(:allow_quoted_newlines)
261
+ @encoding = args[:encoding] if args.key?(:encoding)
262
+ @field_delimiter = args[:field_delimiter] if args.key?(:field_delimiter)
263
+ @quote = args[:quote] if args.key?(:quote)
264
+ @skip_leading_rows = args[:skip_leading_rows] if args.key?(:skip_leading_rows)
265
+ end
266
+ end
267
+
268
+ #
269
+ class Dataset
270
+ include Google::Apis::Core::Hashable
271
+
272
+ # [Optional] An array of objects that define dataset access for one or more
273
+ # entities. You can set this property when inserting or updating a dataset in
274
+ # order to control who is allowed to access the data. If unspecified at dataset
275
+ # creation time, BigQuery adds default dataset access for the following entities:
276
+ # access.specialGroup: projectReaders; access.role: READER; access.specialGroup:
277
+ # projectWriters; access.role: WRITER; access.specialGroup: projectOwners;
278
+ # access.role: OWNER; access.userByEmail: [dataset creator email]; access.role:
279
+ # OWNER;
280
+ # Corresponds to the JSON property `access`
281
+ # @return [Array<Google::Apis::BigqueryV2::Dataset::Access>]
282
+ attr_accessor :access
283
+
284
+ # [Output-only] The time when this dataset was created, in milliseconds since
285
+ # the epoch.
286
+ # Corresponds to the JSON property `creationTime`
287
+ # @return [String]
288
+ attr_accessor :creation_time
289
+
290
+ # [Required] A reference that identifies the dataset.
291
+ # Corresponds to the JSON property `datasetReference`
292
+ # @return [Google::Apis::BigqueryV2::DatasetReference]
293
+ attr_accessor :dataset_reference
294
+
295
+ # [Optional] The default lifetime of all tables in the dataset, in milliseconds.
296
+ # The minimum value is 3600000 milliseconds (one hour). Once this property is
297
+ # set, all newly-created tables in the dataset will have an expirationTime
298
+ # property set to the creation time plus the value in this property, and
299
+ # changing the value will only affect new tables, not existing ones. When the
300
+ # expirationTime for a given table is reached, that table will be deleted
301
+ # automatically. If a table's expirationTime is modified or removed before the
302
+ # table expires, or if you provide an explicit expirationTime when creating a
303
+ # table, that value takes precedence over the default expiration time indicated
304
+ # by this property.
305
+ # Corresponds to the JSON property `defaultTableExpirationMs`
306
+ # @return [String]
307
+ attr_accessor :default_table_expiration_ms
308
+
309
+ # [Optional] A user-friendly description of the dataset.
310
+ # Corresponds to the JSON property `description`
311
+ # @return [String]
312
+ attr_accessor :description
313
+
314
+ # [Output-only] A hash of the resource.
315
+ # Corresponds to the JSON property `etag`
316
+ # @return [String]
317
+ attr_accessor :etag
318
+
319
+ # [Optional] A descriptive name for the dataset.
320
+ # Corresponds to the JSON property `friendlyName`
321
+ # @return [String]
322
+ attr_accessor :friendly_name
323
+
324
+ # [Output-only] The fully-qualified unique name of the dataset in the format
325
+ # projectId:datasetId. The dataset name without the project name is given in the
326
+ # datasetId field. When creating a new dataset, leave this field blank, and
327
+ # instead specify the datasetId field.
328
+ # Corresponds to the JSON property `id`
329
+ # @return [String]
330
+ attr_accessor :id
331
+
332
+ # [Output-only] The resource type.
333
+ # Corresponds to the JSON property `kind`
334
+ # @return [String]
335
+ attr_accessor :kind
336
+
337
+ # [Experimental] The labels associated with this dataset. You can use these to
338
+ # organize and group your datasets. You can set this property when inserting or
339
+ # updating a dataset. See Labeling Datasets for more information.
340
+ # Corresponds to the JSON property `labels`
341
+ # @return [Hash<String,String>]
342
+ attr_accessor :labels
343
+
344
+ # [Output-only] The date when this dataset or any of its tables was last
345
+ # modified, in milliseconds since the epoch.
346
+ # Corresponds to the JSON property `lastModifiedTime`
347
+ # @return [String]
348
+ attr_accessor :last_modified_time
349
+
350
+ # [Experimental] The geographic location where the dataset should reside.
351
+ # Possible values include EU and US. The default value is US.
352
+ # Corresponds to the JSON property `location`
353
+ # @return [String]
354
+ attr_accessor :location
355
+
356
+ # [Output-only] A URL that can be used to access the resource again. You can use
357
+ # this URL in Get or Update requests to the resource.
358
+ # Corresponds to the JSON property `selfLink`
359
+ # @return [String]
360
+ attr_accessor :self_link
361
+
362
+ def initialize(**args)
363
+ update!(**args)
364
+ end
365
+
366
+ # Update properties of this object
367
+ def update!(**args)
368
+ @access = args[:access] if args.key?(:access)
369
+ @creation_time = args[:creation_time] if args.key?(:creation_time)
370
+ @dataset_reference = args[:dataset_reference] if args.key?(:dataset_reference)
371
+ @default_table_expiration_ms = args[:default_table_expiration_ms] if args.key?(:default_table_expiration_ms)
372
+ @description = args[:description] if args.key?(:description)
373
+ @etag = args[:etag] if args.key?(:etag)
374
+ @friendly_name = args[:friendly_name] if args.key?(:friendly_name)
375
+ @id = args[:id] if args.key?(:id)
376
+ @kind = args[:kind] if args.key?(:kind)
377
+ @labels = args[:labels] if args.key?(:labels)
378
+ @last_modified_time = args[:last_modified_time] if args.key?(:last_modified_time)
379
+ @location = args[:location] if args.key?(:location)
380
+ @self_link = args[:self_link] if args.key?(:self_link)
381
+ end
382
+
383
+ #
384
+ class Access
385
+ include Google::Apis::Core::Hashable
386
+
387
+ # [Pick one] A domain to grant access to. Any users signed in with the domain
388
+ # specified will be granted the specified access. Example: "example.com".
389
+ # Corresponds to the JSON property `domain`
390
+ # @return [String]
391
+ attr_accessor :domain
392
+
393
+ # [Pick one] An email address of a Google Group to grant access to.
394
+ # Corresponds to the JSON property `groupByEmail`
395
+ # @return [String]
396
+ attr_accessor :group_by_email
397
+
398
+ # [Required] Describes the rights granted to the user specified by the other
399
+ # member of the access object. The following string values are supported: READER,
400
+ # WRITER, OWNER.
401
+ # Corresponds to the JSON property `role`
402
+ # @return [String]
403
+ attr_accessor :role
404
+
405
+ # [Pick one] A special group to grant access to. Possible values include:
406
+ # projectOwners: Owners of the enclosing project. projectReaders: Readers of the
407
+ # enclosing project. projectWriters: Writers of the enclosing project.
408
+ # allAuthenticatedUsers: All authenticated BigQuery users.
409
+ # Corresponds to the JSON property `specialGroup`
410
+ # @return [String]
411
+ attr_accessor :special_group
412
+
413
+ # [Pick one] An email address of a user to grant access to. For example: fred@
414
+ # example.com.
415
+ # Corresponds to the JSON property `userByEmail`
416
+ # @return [String]
417
+ attr_accessor :user_by_email
418
+
419
+ # [Pick one] A view from a different dataset to grant access to. Queries
420
+ # executed against that view will have read access to tables in this dataset.
421
+ # The role field is not required when this field is set. If that view is updated
422
+ # by any user, access to the view needs to be granted again via an update
423
+ # operation.
424
+ # Corresponds to the JSON property `view`
425
+ # @return [Google::Apis::BigqueryV2::TableReference]
426
+ attr_accessor :view
427
+
428
+ def initialize(**args)
429
+ update!(**args)
430
+ end
431
+
432
+ # Update properties of this object
433
+ def update!(**args)
434
+ @domain = args[:domain] if args.key?(:domain)
435
+ @group_by_email = args[:group_by_email] if args.key?(:group_by_email)
436
+ @role = args[:role] if args.key?(:role)
437
+ @special_group = args[:special_group] if args.key?(:special_group)
438
+ @user_by_email = args[:user_by_email] if args.key?(:user_by_email)
439
+ @view = args[:view] if args.key?(:view)
440
+ end
441
+ end
442
+ end
443
+
444
+ #
445
+ class DatasetList
446
+ include Google::Apis::Core::Hashable
447
+
448
+ # An array of the dataset resources in the project. Each resource contains basic
449
+ # information. For full information about a particular dataset resource, use the
450
+ # Datasets: get method. This property is omitted when there are no datasets in
451
+ # the project.
452
+ # Corresponds to the JSON property `datasets`
453
+ # @return [Array<Google::Apis::BigqueryV2::DatasetList::Dataset>]
454
+ attr_accessor :datasets
455
+
456
+ # A hash value of the results page. You can use this property to determine if
457
+ # the page has changed since the last request.
458
+ # Corresponds to the JSON property `etag`
459
+ # @return [String]
460
+ attr_accessor :etag
461
+
462
+ # The list type. This property always returns the value "bigquery#datasetList".
463
+ # Corresponds to the JSON property `kind`
464
+ # @return [String]
465
+ attr_accessor :kind
466
+
467
+ # A token that can be used to request the next results page. This property is
468
+ # omitted on the final results page.
469
+ # Corresponds to the JSON property `nextPageToken`
470
+ # @return [String]
471
+ attr_accessor :next_page_token
472
+
473
+ def initialize(**args)
474
+ update!(**args)
475
+ end
476
+
477
+ # Update properties of this object
478
+ def update!(**args)
479
+ @datasets = args[:datasets] if args.key?(:datasets)
480
+ @etag = args[:etag] if args.key?(:etag)
481
+ @kind = args[:kind] if args.key?(:kind)
482
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
483
+ end
484
+
485
+ #
486
+ class Dataset
487
+ include Google::Apis::Core::Hashable
488
+
489
+ # The dataset reference. Use this property to access specific parts of the
490
+ # dataset's ID, such as project ID or dataset ID.
491
+ # Corresponds to the JSON property `datasetReference`
492
+ # @return [Google::Apis::BigqueryV2::DatasetReference]
493
+ attr_accessor :dataset_reference
494
+
495
+ # A descriptive name for the dataset, if one exists.
496
+ # Corresponds to the JSON property `friendlyName`
497
+ # @return [String]
498
+ attr_accessor :friendly_name
499
+
500
+ # The fully-qualified, unique, opaque ID of the dataset.
501
+ # Corresponds to the JSON property `id`
502
+ # @return [String]
503
+ attr_accessor :id
504
+
505
+ # The resource type. This property always returns the value "bigquery#dataset".
506
+ # Corresponds to the JSON property `kind`
507
+ # @return [String]
508
+ attr_accessor :kind
509
+
510
+ # [Experimental] The labels associated with this dataset. You can use these to
511
+ # organize and group your datasets.
512
+ # Corresponds to the JSON property `labels`
513
+ # @return [Hash<String,String>]
514
+ attr_accessor :labels
515
+
516
+ def initialize(**args)
517
+ update!(**args)
518
+ end
519
+
520
+ # Update properties of this object
521
+ def update!(**args)
522
+ @dataset_reference = args[:dataset_reference] if args.key?(:dataset_reference)
523
+ @friendly_name = args[:friendly_name] if args.key?(:friendly_name)
524
+ @id = args[:id] if args.key?(:id)
525
+ @kind = args[:kind] if args.key?(:kind)
526
+ @labels = args[:labels] if args.key?(:labels)
527
+ end
528
+ end
529
+ end
530
+
531
+ #
532
+ class DatasetReference
533
+ include Google::Apis::Core::Hashable
534
+
535
+ # [Required] A unique ID for this dataset, without the project name. The ID must
536
+ # contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The
537
+ # maximum length is 1,024 characters.
538
+ # Corresponds to the JSON property `datasetId`
539
+ # @return [String]
540
+ attr_accessor :dataset_id
541
+
542
+ # [Optional] The ID of the project containing this dataset.
543
+ # Corresponds to the JSON property `projectId`
544
+ # @return [String]
545
+ attr_accessor :project_id
546
+
547
+ def initialize(**args)
548
+ update!(**args)
549
+ end
550
+
551
+ # Update properties of this object
552
+ def update!(**args)
553
+ @dataset_id = args[:dataset_id] if args.key?(:dataset_id)
554
+ @project_id = args[:project_id] if args.key?(:project_id)
555
+ end
556
+ end
557
+
558
+ #
559
+ class ErrorProto
560
+ include Google::Apis::Core::Hashable
561
+
562
+ # Debugging information. This property is internal to Google and should not be
563
+ # used.
564
+ # Corresponds to the JSON property `debugInfo`
565
+ # @return [String]
566
+ attr_accessor :debug_info
567
+
568
+ # Specifies where the error occurred, if present.
569
+ # Corresponds to the JSON property `location`
570
+ # @return [String]
571
+ attr_accessor :location
572
+
573
+ # A human-readable description of the error.
574
+ # Corresponds to the JSON property `message`
575
+ # @return [String]
576
+ attr_accessor :message
577
+
578
+ # A short error code that summarizes the error.
579
+ # Corresponds to the JSON property `reason`
580
+ # @return [String]
581
+ attr_accessor :reason
582
+
583
+ def initialize(**args)
584
+ update!(**args)
585
+ end
586
+
587
+ # Update properties of this object
588
+ def update!(**args)
589
+ @debug_info = args[:debug_info] if args.key?(:debug_info)
590
+ @location = args[:location] if args.key?(:location)
591
+ @message = args[:message] if args.key?(:message)
592
+ @reason = args[:reason] if args.key?(:reason)
593
+ end
594
+ end
595
+
596
+ #
597
+ class ExplainQueryStage
598
+ include Google::Apis::Core::Hashable
599
+
600
+ # Relative amount of time the average shard spent on CPU-bound tasks.
601
+ # Corresponds to the JSON property `computeRatioAvg`
602
+ # @return [Float]
603
+ attr_accessor :compute_ratio_avg
604
+
605
+ # Relative amount of time the slowest shard spent on CPU-bound tasks.
606
+ # Corresponds to the JSON property `computeRatioMax`
607
+ # @return [Float]
608
+ attr_accessor :compute_ratio_max
609
+
610
+ # Unique ID for stage within plan.
611
+ # Corresponds to the JSON property `id`
612
+ # @return [String]
613
+ attr_accessor :id
614
+
615
+ # Human-readable name for stage.
616
+ # Corresponds to the JSON property `name`
617
+ # @return [String]
618
+ attr_accessor :name
619
+
620
+ # Relative amount of time the average shard spent reading input.
621
+ # Corresponds to the JSON property `readRatioAvg`
622
+ # @return [Float]
623
+ attr_accessor :read_ratio_avg
624
+
625
+ # Relative amount of time the slowest shard spent reading input.
626
+ # Corresponds to the JSON property `readRatioMax`
627
+ # @return [Float]
628
+ attr_accessor :read_ratio_max
629
+
630
+ # Number of records read into the stage.
631
+ # Corresponds to the JSON property `recordsRead`
632
+ # @return [String]
633
+ attr_accessor :records_read
634
+
635
+ # Number of records written by the stage.
636
+ # Corresponds to the JSON property `recordsWritten`
637
+ # @return [String]
638
+ attr_accessor :records_written
639
+
640
+ # Current status for the stage.
641
+ # Corresponds to the JSON property `status`
642
+ # @return [String]
643
+ attr_accessor :status
644
+
645
+ # List of operations within the stage in dependency order (approximately
646
+ # chronological).
647
+ # Corresponds to the JSON property `steps`
648
+ # @return [Array<Google::Apis::BigqueryV2::ExplainQueryStep>]
649
+ attr_accessor :steps
650
+
651
+ # Relative amount of time the average shard spent waiting to be scheduled.
652
+ # Corresponds to the JSON property `waitRatioAvg`
653
+ # @return [Float]
654
+ attr_accessor :wait_ratio_avg
655
+
656
+ # Relative amount of time the slowest shard spent waiting to be scheduled.
657
+ # Corresponds to the JSON property `waitRatioMax`
658
+ # @return [Float]
659
+ attr_accessor :wait_ratio_max
660
+
661
+ # Relative amount of time the average shard spent on writing output.
662
+ # Corresponds to the JSON property `writeRatioAvg`
663
+ # @return [Float]
664
+ attr_accessor :write_ratio_avg
665
+
666
+ # Relative amount of time the slowest shard spent on writing output.
667
+ # Corresponds to the JSON property `writeRatioMax`
668
+ # @return [Float]
669
+ attr_accessor :write_ratio_max
670
+
671
+ def initialize(**args)
672
+ update!(**args)
673
+ end
674
+
675
+ # Update properties of this object
676
+ def update!(**args)
677
+ @compute_ratio_avg = args[:compute_ratio_avg] if args.key?(:compute_ratio_avg)
678
+ @compute_ratio_max = args[:compute_ratio_max] if args.key?(:compute_ratio_max)
679
+ @id = args[:id] if args.key?(:id)
680
+ @name = args[:name] if args.key?(:name)
681
+ @read_ratio_avg = args[:read_ratio_avg] if args.key?(:read_ratio_avg)
682
+ @read_ratio_max = args[:read_ratio_max] if args.key?(:read_ratio_max)
683
+ @records_read = args[:records_read] if args.key?(:records_read)
684
+ @records_written = args[:records_written] if args.key?(:records_written)
685
+ @status = args[:status] if args.key?(:status)
686
+ @steps = args[:steps] if args.key?(:steps)
687
+ @wait_ratio_avg = args[:wait_ratio_avg] if args.key?(:wait_ratio_avg)
688
+ @wait_ratio_max = args[:wait_ratio_max] if args.key?(:wait_ratio_max)
689
+ @write_ratio_avg = args[:write_ratio_avg] if args.key?(:write_ratio_avg)
690
+ @write_ratio_max = args[:write_ratio_max] if args.key?(:write_ratio_max)
691
+ end
692
+ end
693
+
694
+ #
695
+ class ExplainQueryStep
696
+ include Google::Apis::Core::Hashable
697
+
698
+ # Machine-readable operation type.
699
+ # Corresponds to the JSON property `kind`
700
+ # @return [String]
701
+ attr_accessor :kind
702
+
703
+ # Human-readable stage descriptions.
704
+ # Corresponds to the JSON property `substeps`
705
+ # @return [Array<String>]
706
+ attr_accessor :substeps
707
+
708
+ def initialize(**args)
709
+ update!(**args)
710
+ end
711
+
712
+ # Update properties of this object
713
+ def update!(**args)
714
+ @kind = args[:kind] if args.key?(:kind)
715
+ @substeps = args[:substeps] if args.key?(:substeps)
716
+ end
717
+ end
718
+
719
+ #
720
+ class ExternalDataConfiguration
721
+ include Google::Apis::Core::Hashable
722
+
723
+ # [Experimental] Try to detect schema and format options automatically. Any
724
+ # option specified explicitly will be honored.
725
+ # Corresponds to the JSON property `autodetect`
726
+ # @return [Boolean]
727
+ attr_accessor :autodetect
728
+ alias_method :autodetect?, :autodetect
729
+
730
+ # [Optional] Additional options if sourceFormat is set to BIGTABLE.
731
+ # Corresponds to the JSON property `bigtableOptions`
732
+ # @return [Google::Apis::BigqueryV2::BigtableOptions]
733
+ attr_accessor :bigtable_options
734
+
735
+ # [Optional] The compression type of the data source. Possible values include
736
+ # GZIP and NONE. The default value is NONE. This setting is ignored for Google
737
+ # Cloud Bigtable, Google Cloud Datastore backups and Avro formats.
738
+ # Corresponds to the JSON property `compression`
739
+ # @return [String]
740
+ attr_accessor :compression
741
+
742
+ # Additional properties to set if sourceFormat is set to CSV.
743
+ # Corresponds to the JSON property `csvOptions`
744
+ # @return [Google::Apis::BigqueryV2::CsvOptions]
745
+ attr_accessor :csv_options
746
+
747
+ # [Optional] Additional options if sourceFormat is set to GOOGLE_SHEETS.
748
+ # Corresponds to the JSON property `googleSheetsOptions`
749
+ # @return [Google::Apis::BigqueryV2::GoogleSheetsOptions]
750
+ attr_accessor :google_sheets_options
751
+
752
+ # [Optional] Indicates if BigQuery should allow extra values that are not
753
+ # represented in the table schema. If true, the extra values are ignored. If
754
+ # false, records with extra columns are treated as bad records, and if there are
755
+ # too many bad records, an invalid error is returned in the job result. The
756
+ # default value is false. The sourceFormat property determines what BigQuery
757
+ # treats as an extra value: CSV: Trailing columns JSON: Named values that don't
758
+ # match any column names Google Cloud Bigtable: This setting is ignored. Google
759
+ # Cloud Datastore backups: This setting is ignored. Avro: This setting is
760
+ # ignored.
761
+ # Corresponds to the JSON property `ignoreUnknownValues`
762
+ # @return [Boolean]
763
+ attr_accessor :ignore_unknown_values
764
+ alias_method :ignore_unknown_values?, :ignore_unknown_values
765
+
766
+ # [Optional] The maximum number of bad records that BigQuery can ignore when
767
+ # reading data. If the number of bad records exceeds this value, an invalid
768
+ # error is returned in the job result. The default value is 0, which requires
769
+ # that all records are valid. This setting is ignored for Google Cloud Bigtable,
770
+ # Google Cloud Datastore backups and Avro formats.
771
+ # Corresponds to the JSON property `maxBadRecords`
772
+ # @return [Fixnum]
773
+ attr_accessor :max_bad_records
774
+
775
+ # [Optional] The schema for the data. Schema is required for CSV and JSON
776
+ # formats. Schema is disallowed for Google Cloud Bigtable, Cloud Datastore
777
+ # backups, and Avro formats.
778
+ # Corresponds to the JSON property `schema`
779
+ # @return [Google::Apis::BigqueryV2::TableSchema]
780
+ attr_accessor :schema
781
+
782
+ # [Required] The data format. For CSV files, specify "CSV". For Google sheets,
783
+ # specify "GOOGLE_SHEETS". For newline-delimited JSON, specify "
784
+ # NEWLINE_DELIMITED_JSON". For Avro files, specify "AVRO". For Google Cloud
785
+ # Datastore backups, specify "DATASTORE_BACKUP". [Experimental] For Google Cloud
786
+ # Bigtable, specify "BIGTABLE". Please note that reading from Google Cloud
787
+ # Bigtable is experimental and has to be enabled for your project. Please
788
+ # contact Google Cloud Support to enable this for your project.
789
+ # Corresponds to the JSON property `sourceFormat`
790
+ # @return [String]
791
+ attr_accessor :source_format
792
+
793
+ # [Required] The fully-qualified URIs that point to your data in Google Cloud.
794
+ # For Google Cloud Storage URIs: Each URI can contain one '*' wildcard character
795
+ # and it must come after the 'bucket' name. Size limits related to load jobs
796
+ # apply to external data sources. For Google Cloud Bigtable URIs: Exactly one
797
+ # URI can be specified and it has be a fully specified and valid HTTPS URL for a
798
+ # Google Cloud Bigtable table. For Google Cloud Datastore backups, exactly one
799
+ # URI can be specified, and it must end with '.backup_info'. Also, the '*'
800
+ # wildcard character is not allowed.
801
+ # Corresponds to the JSON property `sourceUris`
802
+ # @return [Array<String>]
803
+ attr_accessor :source_uris
804
+
805
+ def initialize(**args)
806
+ update!(**args)
807
+ end
808
+
809
+ # Update properties of this object
810
+ def update!(**args)
811
+ @autodetect = args[:autodetect] if args.key?(:autodetect)
812
+ @bigtable_options = args[:bigtable_options] if args.key?(:bigtable_options)
813
+ @compression = args[:compression] if args.key?(:compression)
814
+ @csv_options = args[:csv_options] if args.key?(:csv_options)
815
+ @google_sheets_options = args[:google_sheets_options] if args.key?(:google_sheets_options)
816
+ @ignore_unknown_values = args[:ignore_unknown_values] if args.key?(:ignore_unknown_values)
817
+ @max_bad_records = args[:max_bad_records] if args.key?(:max_bad_records)
818
+ @schema = args[:schema] if args.key?(:schema)
819
+ @source_format = args[:source_format] if args.key?(:source_format)
820
+ @source_uris = args[:source_uris] if args.key?(:source_uris)
821
+ end
822
+ end
823
+
824
+ #
825
+ class GetQueryResultsResponse
826
+ include Google::Apis::Core::Hashable
827
+
828
+ # Whether the query result was fetched from the query cache.
829
+ # Corresponds to the JSON property `cacheHit`
830
+ # @return [Boolean]
831
+ attr_accessor :cache_hit
832
+ alias_method :cache_hit?, :cache_hit
833
+
834
+ # [Output-only] All errors and warnings encountered during the running of the
835
+ # job. Errors here do not necessarily mean that the job has completed or was
836
+ # unsuccessful.
837
+ # Corresponds to the JSON property `errors`
838
+ # @return [Array<Google::Apis::BigqueryV2::ErrorProto>]
839
+ attr_accessor :errors
840
+
841
+ # A hash of this response.
842
+ # Corresponds to the JSON property `etag`
843
+ # @return [String]
844
+ attr_accessor :etag
845
+
846
+ # Whether the query has completed or not. If rows or totalRows are present, this
847
+ # will always be true. If this is false, totalRows will not be available.
848
+ # Corresponds to the JSON property `jobComplete`
849
+ # @return [Boolean]
850
+ attr_accessor :job_complete
851
+ alias_method :job_complete?, :job_complete
852
+
853
+ # Reference to the BigQuery Job that was created to run the query. This field
854
+ # will be present even if the original request timed out, in which case
855
+ # GetQueryResults can be used to read the results once the query has completed.
856
+ # Since this API only returns the first page of results, subsequent pages can be
857
+ # fetched via the same mechanism (GetQueryResults).
858
+ # Corresponds to the JSON property `jobReference`
859
+ # @return [Google::Apis::BigqueryV2::JobReference]
860
+ attr_accessor :job_reference
861
+
862
+ # The resource type of the response.
863
+ # Corresponds to the JSON property `kind`
864
+ # @return [String]
865
+ attr_accessor :kind
866
+
867
+ # [Output-only, Experimental] The number of rows affected by a DML statement.
868
+ # Present only for DML statements INSERT, UPDATE or DELETE.
869
+ # Corresponds to the JSON property `numDmlAffectedRows`
870
+ # @return [String]
871
+ attr_accessor :num_dml_affected_rows
872
+
873
+ # A token used for paging results.
874
+ # Corresponds to the JSON property `pageToken`
875
+ # @return [String]
876
+ attr_accessor :page_token
877
+
878
+ # An object with as many results as can be contained within the maximum
879
+ # permitted reply size. To get any additional rows, you can call GetQueryResults
880
+ # and specify the jobReference returned above. Present only when the query
881
+ # completes successfully.
882
+ # Corresponds to the JSON property `rows`
883
+ # @return [Array<Google::Apis::BigqueryV2::TableRow>]
884
+ attr_accessor :rows
885
+
886
+ # The schema of the results. Present only when the query completes successfully.
887
+ # Corresponds to the JSON property `schema`
888
+ # @return [Google::Apis::BigqueryV2::TableSchema]
889
+ attr_accessor :schema
890
+
891
+ # The total number of bytes processed for this query.
892
+ # Corresponds to the JSON property `totalBytesProcessed`
893
+ # @return [String]
894
+ attr_accessor :total_bytes_processed
895
+
896
+ # The total number of rows in the complete query result set, which can be more
897
+ # than the number of rows in this single page of results. Present only when the
898
+ # query completes successfully.
899
+ # Corresponds to the JSON property `totalRows`
900
+ # @return [String]
901
+ attr_accessor :total_rows
902
+
903
+ def initialize(**args)
904
+ update!(**args)
905
+ end
906
+
907
+ # Update properties of this object
908
+ def update!(**args)
909
+ @cache_hit = args[:cache_hit] if args.key?(:cache_hit)
910
+ @errors = args[:errors] if args.key?(:errors)
911
+ @etag = args[:etag] if args.key?(:etag)
912
+ @job_complete = args[:job_complete] if args.key?(:job_complete)
913
+ @job_reference = args[:job_reference] if args.key?(:job_reference)
914
+ @kind = args[:kind] if args.key?(:kind)
915
+ @num_dml_affected_rows = args[:num_dml_affected_rows] if args.key?(:num_dml_affected_rows)
916
+ @page_token = args[:page_token] if args.key?(:page_token)
917
+ @rows = args[:rows] if args.key?(:rows)
918
+ @schema = args[:schema] if args.key?(:schema)
919
+ @total_bytes_processed = args[:total_bytes_processed] if args.key?(:total_bytes_processed)
920
+ @total_rows = args[:total_rows] if args.key?(:total_rows)
921
+ end
922
+ end
923
+
924
+ #
925
+ class GoogleSheetsOptions
926
+ include Google::Apis::Core::Hashable
927
+
928
+ # [Optional] The number of rows at the top of a sheet that BigQuery will skip
929
+ # when reading the data. The default value is 0. This property is useful if you
930
+ # have header rows that should be skipped. When autodetect is on, behavior is
931
+ # the following: * skipLeadingRows unspecified - Autodetect tries to detect
932
+ # headers in the first row. If they are not detected, the row is read as data.
933
+ # Otherwise data is read starting from the second row. * skipLeadingRows is 0 -
934
+ # Instructs autodetect that there are no headers and data should be read
935
+ # starting from the first row. * skipLeadingRows = N > 0 - Autodetect skips N-1
936
+ # rows and tries to detect headers in row N. If headers are not detected, row N
937
+ # is just skipped. Otherwise row N is used to extract column names for the
938
+ # detected schema.
939
+ # Corresponds to the JSON property `skipLeadingRows`
940
+ # @return [String]
941
+ attr_accessor :skip_leading_rows
942
+
943
+ def initialize(**args)
944
+ update!(**args)
945
+ end
946
+
947
+ # Update properties of this object
948
+ def update!(**args)
949
+ @skip_leading_rows = args[:skip_leading_rows] if args.key?(:skip_leading_rows)
950
+ end
951
+ end
952
+
953
+ #
954
+ class Job
955
+ include Google::Apis::Core::Hashable
956
+
957
+ # [Required] Describes the job configuration.
958
+ # Corresponds to the JSON property `configuration`
959
+ # @return [Google::Apis::BigqueryV2::JobConfiguration]
960
+ attr_accessor :configuration
961
+
962
+ # [Output-only] A hash of this resource.
963
+ # Corresponds to the JSON property `etag`
964
+ # @return [String]
965
+ attr_accessor :etag
966
+
967
+ # [Output-only] Opaque ID field of the job
968
+ # Corresponds to the JSON property `id`
969
+ # @return [String]
970
+ attr_accessor :id
971
+
972
+ # [Optional] Reference describing the unique-per-user name of the job.
973
+ # Corresponds to the JSON property `jobReference`
974
+ # @return [Google::Apis::BigqueryV2::JobReference]
975
+ attr_accessor :job_reference
976
+
977
+ # [Output-only] The type of the resource.
978
+ # Corresponds to the JSON property `kind`
979
+ # @return [String]
980
+ attr_accessor :kind
981
+
982
+ # [Output-only] A URL that can be used to access this resource again.
983
+ # Corresponds to the JSON property `selfLink`
984
+ # @return [String]
985
+ attr_accessor :self_link
986
+
987
+ # [Output-only] Information about the job, including starting time and ending
988
+ # time of the job.
989
+ # Corresponds to the JSON property `statistics`
990
+ # @return [Google::Apis::BigqueryV2::JobStatistics]
991
+ attr_accessor :statistics
992
+
993
+ # [Output-only] The status of this job. Examine this value when polling an
994
+ # asynchronous job to see if the job is complete.
995
+ # Corresponds to the JSON property `status`
996
+ # @return [Google::Apis::BigqueryV2::JobStatus]
997
+ attr_accessor :status
998
+
999
+ # [Output-only] Email address of the user who ran the job.
1000
+ # Corresponds to the JSON property `user_email`
1001
+ # @return [String]
1002
+ attr_accessor :user_email
1003
+
1004
+ def initialize(**args)
1005
+ update!(**args)
1006
+ end
1007
+
1008
+ # Update properties of this object
1009
+ def update!(**args)
1010
+ @configuration = args[:configuration] if args.key?(:configuration)
1011
+ @etag = args[:etag] if args.key?(:etag)
1012
+ @id = args[:id] if args.key?(:id)
1013
+ @job_reference = args[:job_reference] if args.key?(:job_reference)
1014
+ @kind = args[:kind] if args.key?(:kind)
1015
+ @self_link = args[:self_link] if args.key?(:self_link)
1016
+ @statistics = args[:statistics] if args.key?(:statistics)
1017
+ @status = args[:status] if args.key?(:status)
1018
+ @user_email = args[:user_email] if args.key?(:user_email)
1019
+ end
1020
+ end
1021
+
1022
+ #
1023
+ class CancelJobResponse
1024
+ include Google::Apis::Core::Hashable
1025
+
1026
+ # The final state of the job.
1027
+ # Corresponds to the JSON property `job`
1028
+ # @return [Google::Apis::BigqueryV2::Job]
1029
+ attr_accessor :job
1030
+
1031
+ # The resource type of the response.
1032
+ # Corresponds to the JSON property `kind`
1033
+ # @return [String]
1034
+ attr_accessor :kind
1035
+
1036
+ def initialize(**args)
1037
+ update!(**args)
1038
+ end
1039
+
1040
+ # Update properties of this object
1041
+ def update!(**args)
1042
+ @job = args[:job] if args.key?(:job)
1043
+ @kind = args[:kind] if args.key?(:kind)
1044
+ end
1045
+ end
1046
+
1047
+ #
1048
+ class JobConfiguration
1049
+ include Google::Apis::Core::Hashable
1050
+
1051
+ # [Pick one] Copies a table.
1052
+ # Corresponds to the JSON property `copy`
1053
+ # @return [Google::Apis::BigqueryV2::JobConfigurationTableCopy]
1054
+ attr_accessor :copy
1055
+
1056
+ # [Optional] If set, don't actually run this job. A valid query will return a
1057
+ # mostly empty response with some processing statistics, while an invalid query
1058
+ # will return the same error it would if it wasn't a dry run. Behavior of non-
1059
+ # query jobs is undefined.
1060
+ # Corresponds to the JSON property `dryRun`
1061
+ # @return [Boolean]
1062
+ attr_accessor :dry_run
1063
+ alias_method :dry_run?, :dry_run
1064
+
1065
+ # [Pick one] Configures an extract job.
1066
+ # Corresponds to the JSON property `extract`
1067
+ # @return [Google::Apis::BigqueryV2::JobConfigurationExtract]
1068
+ attr_accessor :extract
1069
+
1070
+ # [Experimental] The labels associated with this job. You can use these to
1071
+ # organize and group your jobs. Label keys and values can be no longer than 63
1072
+ # characters, can only contain letters, numeric characters, underscores and
1073
+ # dashes. International characters are allowed. Label values are optional. Label
1074
+ # keys must start with a letter and must be unique within a dataset. Both keys
1075
+ # and values are additionally constrained to be <= 128 bytes in size.
1076
+ # Corresponds to the JSON property `labels`
1077
+ # @return [Hash<String,String>]
1078
+ attr_accessor :labels
1079
+
1080
+ # [Pick one] Configures a load job.
1081
+ # Corresponds to the JSON property `load`
1082
+ # @return [Google::Apis::BigqueryV2::JobConfigurationLoad]
1083
+ attr_accessor :load
1084
+
1085
+ # [Pick one] Configures a query job.
1086
+ # Corresponds to the JSON property `query`
1087
+ # @return [Google::Apis::BigqueryV2::JobConfigurationQuery]
1088
+ attr_accessor :query
1089
+
1090
+ def initialize(**args)
1091
+ update!(**args)
1092
+ end
1093
+
1094
+ # Update properties of this object
1095
+ def update!(**args)
1096
+ @copy = args[:copy] if args.key?(:copy)
1097
+ @dry_run = args[:dry_run] if args.key?(:dry_run)
1098
+ @extract = args[:extract] if args.key?(:extract)
1099
+ @labels = args[:labels] if args.key?(:labels)
1100
+ @load = args[:load] if args.key?(:load)
1101
+ @query = args[:query] if args.key?(:query)
1102
+ end
1103
+ end
1104
+
1105
+ #
1106
+ class JobConfigurationExtract
1107
+ include Google::Apis::Core::Hashable
1108
+
1109
+ # [Optional] The compression type to use for exported files. Possible values
1110
+ # include GZIP and NONE. The default value is NONE.
1111
+ # Corresponds to the JSON property `compression`
1112
+ # @return [String]
1113
+ attr_accessor :compression
1114
+
1115
+ # [Optional] The exported file format. Possible values include CSV,
1116
+ # NEWLINE_DELIMITED_JSON and AVRO. The default value is CSV. Tables with nested
1117
+ # or repeated fields cannot be exported as CSV.
1118
+ # Corresponds to the JSON property `destinationFormat`
1119
+ # @return [String]
1120
+ attr_accessor :destination_format
1121
+
1122
+ # [Pick one] DEPRECATED: Use destinationUris instead, passing only one URI as
1123
+ # necessary. The fully-qualified Google Cloud Storage URI where the extracted
1124
+ # table should be written.
1125
+ # Corresponds to the JSON property `destinationUri`
1126
+ # @return [String]
1127
+ attr_accessor :destination_uri
1128
+
1129
+ # [Pick one] A list of fully-qualified Google Cloud Storage URIs where the
1130
+ # extracted table should be written.
1131
+ # Corresponds to the JSON property `destinationUris`
1132
+ # @return [Array<String>]
1133
+ attr_accessor :destination_uris
1134
+
1135
+ # [Optional] Delimiter to use between fields in the exported data. Default is ','
1136
+ # Corresponds to the JSON property `fieldDelimiter`
1137
+ # @return [String]
1138
+ attr_accessor :field_delimiter
1139
+
1140
+ # [Optional] Whether to print out a header row in the results. Default is true.
1141
+ # Corresponds to the JSON property `printHeader`
1142
+ # @return [Boolean]
1143
+ attr_accessor :print_header
1144
+ alias_method :print_header?, :print_header
1145
+
1146
+ # [Required] A reference to the table being exported.
1147
+ # Corresponds to the JSON property `sourceTable`
1148
+ # @return [Google::Apis::BigqueryV2::TableReference]
1149
+ attr_accessor :source_table
1150
+
1151
+ def initialize(**args)
1152
+ update!(**args)
1153
+ end
1154
+
1155
+ # Update properties of this object
1156
+ def update!(**args)
1157
+ @compression = args[:compression] if args.key?(:compression)
1158
+ @destination_format = args[:destination_format] if args.key?(:destination_format)
1159
+ @destination_uri = args[:destination_uri] if args.key?(:destination_uri)
1160
+ @destination_uris = args[:destination_uris] if args.key?(:destination_uris)
1161
+ @field_delimiter = args[:field_delimiter] if args.key?(:field_delimiter)
1162
+ @print_header = args[:print_header] if args.key?(:print_header)
1163
+ @source_table = args[:source_table] if args.key?(:source_table)
1164
+ end
1165
+ end
1166
+
1167
+ #
1168
+ class JobConfigurationLoad
1169
+ include Google::Apis::Core::Hashable
1170
+
1171
+ # [Optional] Accept rows that are missing trailing optional columns. The missing
1172
+ # values are treated as nulls. If false, records with missing trailing columns
1173
+ # are treated as bad records, and if there are too many bad records, an invalid
1174
+ # error is returned in the job result. The default value is false. Only
1175
+ # applicable to CSV, ignored for other formats.
1176
+ # Corresponds to the JSON property `allowJaggedRows`
1177
+ # @return [Boolean]
1178
+ attr_accessor :allow_jagged_rows
1179
+ alias_method :allow_jagged_rows?, :allow_jagged_rows
1180
+
1181
+ # Indicates if BigQuery should allow quoted data sections that contain newline
1182
+ # characters in a CSV file. The default value is false.
1183
+ # Corresponds to the JSON property `allowQuotedNewlines`
1184
+ # @return [Boolean]
1185
+ attr_accessor :allow_quoted_newlines
1186
+ alias_method :allow_quoted_newlines?, :allow_quoted_newlines
1187
+
1188
+ # [Experimental] Indicates if we should automatically infer the options and
1189
+ # schema for CSV and JSON sources.
1190
+ # Corresponds to the JSON property `autodetect`
1191
+ # @return [Boolean]
1192
+ attr_accessor :autodetect
1193
+ alias_method :autodetect?, :autodetect
1194
+
1195
+ # [Optional] Specifies whether the job is allowed to create new tables. The
1196
+ # following values are supported: CREATE_IF_NEEDED: If the table does not exist,
1197
+ # BigQuery creates the table. CREATE_NEVER: The table must already exist. If it
1198
+ # does not, a 'notFound' error is returned in the job result. The default value
1199
+ # is CREATE_IF_NEEDED. Creation, truncation and append actions occur as one
1200
+ # atomic update upon job completion.
1201
+ # Corresponds to the JSON property `createDisposition`
1202
+ # @return [String]
1203
+ attr_accessor :create_disposition
1204
+
1205
+ # [Required] The destination table to load the data into.
1206
+ # Corresponds to the JSON property `destinationTable`
1207
+ # @return [Google::Apis::BigqueryV2::TableReference]
1208
+ attr_accessor :destination_table
1209
+
1210
+ # [Optional] The character encoding of the data. The supported values are UTF-8
1211
+ # or ISO-8859-1. The default value is UTF-8. BigQuery decodes the data after the
1212
+ # raw, binary data has been split using the values of the quote and
1213
+ # fieldDelimiter properties.
1214
+ # Corresponds to the JSON property `encoding`
1215
+ # @return [String]
1216
+ attr_accessor :encoding
1217
+
1218
+ # [Optional] The separator for fields in a CSV file. The separator can be any
1219
+ # ISO-8859-1 single-byte character. To use a character in the range 128-255, you
1220
+ # must encode the character as UTF8. BigQuery converts the string to ISO-8859-1
1221
+ # encoding, and then uses the first byte of the encoded string to split the data
1222
+ # in its raw, binary state. BigQuery also supports the escape sequence "\t" to
1223
+ # specify a tab separator. The default value is a comma (',').
1224
+ # Corresponds to the JSON property `fieldDelimiter`
1225
+ # @return [String]
1226
+ attr_accessor :field_delimiter
1227
+
1228
+ # [Optional] Indicates if BigQuery should allow extra values that are not
1229
+ # represented in the table schema. If true, the extra values are ignored. If
1230
+ # false, records with extra columns are treated as bad records, and if there are
1231
+ # too many bad records, an invalid error is returned in the job result. The
1232
+ # default value is false. The sourceFormat property determines what BigQuery
1233
+ # treats as an extra value: CSV: Trailing columns JSON: Named values that don't
1234
+ # match any column names
1235
+ # Corresponds to the JSON property `ignoreUnknownValues`
1236
+ # @return [Boolean]
1237
+ attr_accessor :ignore_unknown_values
1238
+ alias_method :ignore_unknown_values?, :ignore_unknown_values
1239
+
1240
+ # [Optional] The maximum number of bad records that BigQuery can ignore when
1241
+ # running the job. If the number of bad records exceeds this value, an invalid
1242
+ # error is returned in the job result. The default value is 0, which requires
1243
+ # that all records are valid.
1244
+ # Corresponds to the JSON property `maxBadRecords`
1245
+ # @return [Fixnum]
1246
+ attr_accessor :max_bad_records
1247
+
1248
+ # [Optional] Specifies a string that represents a null value in a CSV file. For
1249
+ # example, if you specify "\N", BigQuery interprets "\N" as a null value when
1250
+ # loading a CSV file. The default value is the empty string. If you set this
1251
+ # property to a custom value, BigQuery still interprets the empty string as a
1252
+ # null value for all data types except for STRING and BYTE. For STRING and BYTE
1253
+ # columns, BigQuery interprets the empty string as an empty value.
1254
+ # Corresponds to the JSON property `nullMarker`
1255
+ # @return [String]
1256
+ attr_accessor :null_marker
1257
+
1258
+ # [Experimental] If sourceFormat is set to "DATASTORE_BACKUP", indicates which
1259
+ # entity properties to load into BigQuery from a Cloud Datastore backup.
1260
+ # Property names are case sensitive and must be top-level properties. If no
1261
+ # properties are specified, BigQuery loads all properties. If any named property
1262
+ # isn't found in the Cloud Datastore backup, an invalid error is returned in the
1263
+ # job result.
1264
+ # Corresponds to the JSON property `projectionFields`
1265
+ # @return [Array<String>]
1266
+ attr_accessor :projection_fields
1267
+
1268
+ # [Optional] The value that is used to quote data sections in a CSV file.
1269
+ # BigQuery converts the string to ISO-8859-1 encoding, and then uses the first
1270
+ # byte of the encoded string to split the data in its raw, binary state. The
1271
+ # default value is a double-quote ('"'). If your data does not contain quoted
1272
+ # sections, set the property value to an empty string. If your data contains
1273
+ # quoted newline characters, you must also set the allowQuotedNewlines property
1274
+ # to true.
1275
+ # Corresponds to the JSON property `quote`
1276
+ # @return [String]
1277
+ attr_accessor :quote
1278
+
1279
+ # [Optional] The schema for the destination table. The schema can be omitted if
1280
+ # the destination table already exists, or if you're loading data from Google
1281
+ # Cloud Datastore.
1282
+ # Corresponds to the JSON property `schema`
1283
+ # @return [Google::Apis::BigqueryV2::TableSchema]
1284
+ attr_accessor :schema
1285
+
1286
+ # [Deprecated] The inline schema. For CSV schemas, specify as "Field1:Type1[,
1287
+ # Field2:Type2]*". For example, "foo:STRING, bar:INTEGER, baz:FLOAT".
1288
+ # Corresponds to the JSON property `schemaInline`
1289
+ # @return [String]
1290
+ attr_accessor :schema_inline
1291
+
1292
+ # [Deprecated] The format of the schemaInline property.
1293
+ # Corresponds to the JSON property `schemaInlineFormat`
1294
+ # @return [String]
1295
+ attr_accessor :schema_inline_format
1296
+
1297
+ # [Experimental] Allows the schema of the desitination table to be updated as a
1298
+ # side effect of the load job. Schema update options are supported in two cases:
1299
+ # when writeDisposition is WRITE_APPEND; when writeDisposition is WRITE_TRUNCATE
1300
+ # and the destination table is a partition of a table, specified by partition
1301
+ # decorators. For normal tables, WRITE_TRUNCATE will always overwrite the schema.
1302
+ # One or more of the following values are specified: ALLOW_FIELD_ADDITION:
1303
+ # allow adding a nullable field to the schema. ALLOW_FIELD_RELAXATION: allow
1304
+ # relaxing a required field in the original schema to nullable.
1305
+ # Corresponds to the JSON property `schemaUpdateOptions`
1306
+ # @return [Array<String>]
1307
+ attr_accessor :schema_update_options
1308
+
1309
+ # [Optional] The number of rows at the top of a CSV file that BigQuery will skip
1310
+ # when loading the data. The default value is 0. This property is useful if you
1311
+ # have header rows in the file that should be skipped.
1312
+ # Corresponds to the JSON property `skipLeadingRows`
1313
+ # @return [Fixnum]
1314
+ attr_accessor :skip_leading_rows
1315
+
1316
+ # [Optional] The format of the data files. For CSV files, specify "CSV". For
1317
+ # datastore backups, specify "DATASTORE_BACKUP". For newline-delimited JSON,
1318
+ # specify "NEWLINE_DELIMITED_JSON". For Avro, specify "AVRO". The default value
1319
+ # is CSV.
1320
+ # Corresponds to the JSON property `sourceFormat`
1321
+ # @return [String]
1322
+ attr_accessor :source_format
1323
+
1324
+ # [Required] The fully-qualified URIs that point to your data in Google Cloud
1325
+ # Storage. Each URI can contain one '*' wildcard character and it must come
1326
+ # after the 'bucket' name.
1327
+ # Corresponds to the JSON property `sourceUris`
1328
+ # @return [Array<String>]
1329
+ attr_accessor :source_uris
1330
+
1331
+ # [Optional] Specifies the action that occurs if the destination table already
1332
+ # exists. The following values are supported: WRITE_TRUNCATE: If the table
1333
+ # already exists, BigQuery overwrites the table data. WRITE_APPEND: If the table
1334
+ # already exists, BigQuery appends the data to the table. WRITE_EMPTY: If the
1335
+ # table already exists and contains data, a 'duplicate' error is returned in the
1336
+ # job result. The default value is WRITE_APPEND. Each action is atomic and only
1337
+ # occurs if BigQuery is able to complete the job successfully. Creation,
1338
+ # truncation and append actions occur as one atomic update upon job completion.
1339
+ # Corresponds to the JSON property `writeDisposition`
1340
+ # @return [String]
1341
+ attr_accessor :write_disposition
1342
+
1343
+ def initialize(**args)
1344
+ update!(**args)
1345
+ end
1346
+
1347
+ # Update properties of this object
1348
+ def update!(**args)
1349
+ @allow_jagged_rows = args[:allow_jagged_rows] if args.key?(:allow_jagged_rows)
1350
+ @allow_quoted_newlines = args[:allow_quoted_newlines] if args.key?(:allow_quoted_newlines)
1351
+ @autodetect = args[:autodetect] if args.key?(:autodetect)
1352
+ @create_disposition = args[:create_disposition] if args.key?(:create_disposition)
1353
+ @destination_table = args[:destination_table] if args.key?(:destination_table)
1354
+ @encoding = args[:encoding] if args.key?(:encoding)
1355
+ @field_delimiter = args[:field_delimiter] if args.key?(:field_delimiter)
1356
+ @ignore_unknown_values = args[:ignore_unknown_values] if args.key?(:ignore_unknown_values)
1357
+ @max_bad_records = args[:max_bad_records] if args.key?(:max_bad_records)
1358
+ @null_marker = args[:null_marker] if args.key?(:null_marker)
1359
+ @projection_fields = args[:projection_fields] if args.key?(:projection_fields)
1360
+ @quote = args[:quote] if args.key?(:quote)
1361
+ @schema = args[:schema] if args.key?(:schema)
1362
+ @schema_inline = args[:schema_inline] if args.key?(:schema_inline)
1363
+ @schema_inline_format = args[:schema_inline_format] if args.key?(:schema_inline_format)
1364
+ @schema_update_options = args[:schema_update_options] if args.key?(:schema_update_options)
1365
+ @skip_leading_rows = args[:skip_leading_rows] if args.key?(:skip_leading_rows)
1366
+ @source_format = args[:source_format] if args.key?(:source_format)
1367
+ @source_uris = args[:source_uris] if args.key?(:source_uris)
1368
+ @write_disposition = args[:write_disposition] if args.key?(:write_disposition)
1369
+ end
1370
+ end
1371
+
1372
+ #
1373
+ class JobConfigurationQuery
1374
+ include Google::Apis::Core::Hashable
1375
+
1376
+ # If true, allows the query to produce arbitrarily large result tables at a
1377
+ # slight cost in performance. Requires destinationTable to be set.
1378
+ # Corresponds to the JSON property `allowLargeResults`
1379
+ # @return [Boolean]
1380
+ attr_accessor :allow_large_results
1381
+ alias_method :allow_large_results?, :allow_large_results
1382
+
1383
+ # [Optional] Specifies whether the job is allowed to create new tables. The
1384
+ # following values are supported: CREATE_IF_NEEDED: If the table does not exist,
1385
+ # BigQuery creates the table. CREATE_NEVER: The table must already exist. If it
1386
+ # does not, a 'notFound' error is returned in the job result. The default value
1387
+ # is CREATE_IF_NEEDED. Creation, truncation and append actions occur as one
1388
+ # atomic update upon job completion.
1389
+ # Corresponds to the JSON property `createDisposition`
1390
+ # @return [String]
1391
+ attr_accessor :create_disposition
1392
+
1393
+ # [Optional] Specifies the default dataset to use for unqualified table names in
1394
+ # the query.
1395
+ # Corresponds to the JSON property `defaultDataset`
1396
+ # @return [Google::Apis::BigqueryV2::DatasetReference]
1397
+ attr_accessor :default_dataset
1398
+
1399
+ # [Optional] Describes the table where the query results should be stored. If
1400
+ # not present, a new table will be created to store the results.
1401
+ # Corresponds to the JSON property `destinationTable`
1402
+ # @return [Google::Apis::BigqueryV2::TableReference]
1403
+ attr_accessor :destination_table
1404
+
1405
+ # [Optional] Flattens all nested and repeated fields in the query results. The
1406
+ # default value is true. allowLargeResults must be true if this is set to false.
1407
+ # Corresponds to the JSON property `flattenResults`
1408
+ # @return [Boolean]
1409
+ attr_accessor :flatten_results
1410
+ alias_method :flatten_results?, :flatten_results
1411
+
1412
+ # [Optional] Limits the billing tier for this job. Queries that have resource
1413
+ # usage beyond this tier will fail (without incurring a charge). If unspecified,
1414
+ # this will be set to your project default.
1415
+ # Corresponds to the JSON property `maximumBillingTier`
1416
+ # @return [Fixnum]
1417
+ attr_accessor :maximum_billing_tier
1418
+
1419
+ # [Optional] Limits the bytes billed for this job. Queries that will have bytes
1420
+ # billed beyond this limit will fail (without incurring a charge). If
1421
+ # unspecified, this will be set to your project default.
1422
+ # Corresponds to the JSON property `maximumBytesBilled`
1423
+ # @return [String]
1424
+ attr_accessor :maximum_bytes_billed
1425
+
1426
+ # [Experimental] Standard SQL only. Set to POSITIONAL to use positional (?)
1427
+ # query parameters or to NAMED to use named (@myparam) query parameters in this
1428
+ # query.
1429
+ # Corresponds to the JSON property `parameterMode`
1430
+ # @return [String]
1431
+ attr_accessor :parameter_mode
1432
+
1433
+ # [Deprecated] This property is deprecated.
1434
+ # Corresponds to the JSON property `preserveNulls`
1435
+ # @return [Boolean]
1436
+ attr_accessor :preserve_nulls
1437
+ alias_method :preserve_nulls?, :preserve_nulls
1438
+
1439
+ # [Optional] Specifies a priority for the query. Possible values include
1440
+ # INTERACTIVE and BATCH. The default value is INTERACTIVE.
1441
+ # Corresponds to the JSON property `priority`
1442
+ # @return [String]
1443
+ attr_accessor :priority
1444
+
1445
+ # [Required] BigQuery SQL query to execute.
1446
+ # Corresponds to the JSON property `query`
1447
+ # @return [String]
1448
+ attr_accessor :query
1449
+
1450
+ # Query parameters for standard SQL queries.
1451
+ # Corresponds to the JSON property `queryParameters`
1452
+ # @return [Array<Google::Apis::BigqueryV2::QueryParameter>]
1453
+ attr_accessor :query_parameters
1454
+
1455
+ # [Experimental] Allows the schema of the destination table to be updated as a
1456
+ # side effect of the query job. Schema update options are supported in two cases:
1457
+ # when writeDisposition is WRITE_APPEND; when writeDisposition is
1458
+ # WRITE_TRUNCATE and the destination table is a partition of a table, specified
1459
+ # by partition decorators. For normal tables, WRITE_TRUNCATE will always
1460
+ # overwrite the schema. One or more of the following values are specified:
1461
+ # ALLOW_FIELD_ADDITION: allow adding a nullable field to the schema.
1462
+ # ALLOW_FIELD_RELAXATION: allow relaxing a required field in the original schema
1463
+ # to nullable.
1464
+ # Corresponds to the JSON property `schemaUpdateOptions`
1465
+ # @return [Array<String>]
1466
+ attr_accessor :schema_update_options
1467
+
1468
+ # [Optional] If querying an external data source outside of BigQuery, describes
1469
+ # the data format, location and other properties of the data source. By defining
1470
+ # these properties, the data source can then be queried as if it were a standard
1471
+ # BigQuery table.
1472
+ # Corresponds to the JSON property `tableDefinitions`
1473
+ # @return [Hash<String,Google::Apis::BigqueryV2::ExternalDataConfiguration>]
1474
+ attr_accessor :table_definitions
1475
+
1476
+ # Specifies whether to use BigQuery's legacy SQL dialect for this query. The
1477
+ # default value is true. If set to false, the query will use BigQuery's standard
1478
+ # SQL: https://cloud.google.com/bigquery/sql-reference/ When useLegacySql is set
1479
+ # to false, the values of allowLargeResults and flattenResults are ignored;
1480
+ # query will be run as if allowLargeResults is true and flattenResults is false.
1481
+ # Corresponds to the JSON property `useLegacySql`
1482
+ # @return [Boolean]
1483
+ attr_accessor :use_legacy_sql
1484
+ alias_method :use_legacy_sql?, :use_legacy_sql
1485
+
1486
+ # [Optional] Whether to look for the result in the query cache. The query cache
1487
+ # is a best-effort cache that will be flushed whenever tables in the query are
1488
+ # modified. Moreover, the query cache is only available when a query does not
1489
+ # have a destination table specified. The default value is true.
1490
+ # Corresponds to the JSON property `useQueryCache`
1491
+ # @return [Boolean]
1492
+ attr_accessor :use_query_cache
1493
+ alias_method :use_query_cache?, :use_query_cache
1494
+
1495
+ # [Experimental] Describes user-defined function resources used in the query.
1496
+ # Corresponds to the JSON property `userDefinedFunctionResources`
1497
+ # @return [Array<Google::Apis::BigqueryV2::UserDefinedFunctionResource>]
1498
+ attr_accessor :user_defined_function_resources
1499
+
1500
+ # [Optional] Specifies the action that occurs if the destination table already
1501
+ # exists. The following values are supported: WRITE_TRUNCATE: If the table
1502
+ # already exists, BigQuery overwrites the table data. WRITE_APPEND: If the table
1503
+ # already exists, BigQuery appends the data to the table. WRITE_EMPTY: If the
1504
+ # table already exists and contains data, a 'duplicate' error is returned in the
1505
+ # job result. The default value is WRITE_EMPTY. Each action is atomic and only
1506
+ # occurs if BigQuery is able to complete the job successfully. Creation,
1507
+ # truncation and append actions occur as one atomic update upon job completion.
1508
+ # Corresponds to the JSON property `writeDisposition`
1509
+ # @return [String]
1510
+ attr_accessor :write_disposition
1511
+
1512
+ def initialize(**args)
1513
+ update!(**args)
1514
+ end
1515
+
1516
+ # Update properties of this object
1517
+ def update!(**args)
1518
+ @allow_large_results = args[:allow_large_results] if args.key?(:allow_large_results)
1519
+ @create_disposition = args[:create_disposition] if args.key?(:create_disposition)
1520
+ @default_dataset = args[:default_dataset] if args.key?(:default_dataset)
1521
+ @destination_table = args[:destination_table] if args.key?(:destination_table)
1522
+ @flatten_results = args[:flatten_results] if args.key?(:flatten_results)
1523
+ @maximum_billing_tier = args[:maximum_billing_tier] if args.key?(:maximum_billing_tier)
1524
+ @maximum_bytes_billed = args[:maximum_bytes_billed] if args.key?(:maximum_bytes_billed)
1525
+ @parameter_mode = args[:parameter_mode] if args.key?(:parameter_mode)
1526
+ @preserve_nulls = args[:preserve_nulls] if args.key?(:preserve_nulls)
1527
+ @priority = args[:priority] if args.key?(:priority)
1528
+ @query = args[:query] if args.key?(:query)
1529
+ @query_parameters = args[:query_parameters] if args.key?(:query_parameters)
1530
+ @schema_update_options = args[:schema_update_options] if args.key?(:schema_update_options)
1531
+ @table_definitions = args[:table_definitions] if args.key?(:table_definitions)
1532
+ @use_legacy_sql = args[:use_legacy_sql] if args.key?(:use_legacy_sql)
1533
+ @use_query_cache = args[:use_query_cache] if args.key?(:use_query_cache)
1534
+ @user_defined_function_resources = args[:user_defined_function_resources] if args.key?(:user_defined_function_resources)
1535
+ @write_disposition = args[:write_disposition] if args.key?(:write_disposition)
1536
+ end
1537
+ end
1538
+
1539
+ #
1540
+ class JobConfigurationTableCopy
1541
+ include Google::Apis::Core::Hashable
1542
+
1543
+ # [Optional] Specifies whether the job is allowed to create new tables. The
1544
+ # following values are supported: CREATE_IF_NEEDED: If the table does not exist,
1545
+ # BigQuery creates the table. CREATE_NEVER: The table must already exist. If it
1546
+ # does not, a 'notFound' error is returned in the job result. The default value
1547
+ # is CREATE_IF_NEEDED. Creation, truncation and append actions occur as one
1548
+ # atomic update upon job completion.
1549
+ # Corresponds to the JSON property `createDisposition`
1550
+ # @return [String]
1551
+ attr_accessor :create_disposition
1552
+
1553
+ # [Required] The destination table
1554
+ # Corresponds to the JSON property `destinationTable`
1555
+ # @return [Google::Apis::BigqueryV2::TableReference]
1556
+ attr_accessor :destination_table
1557
+
1558
+ # [Pick one] Source table to copy.
1559
+ # Corresponds to the JSON property `sourceTable`
1560
+ # @return [Google::Apis::BigqueryV2::TableReference]
1561
+ attr_accessor :source_table
1562
+
1563
+ # [Pick one] Source tables to copy.
1564
+ # Corresponds to the JSON property `sourceTables`
1565
+ # @return [Array<Google::Apis::BigqueryV2::TableReference>]
1566
+ attr_accessor :source_tables
1567
+
1568
+ # [Optional] Specifies the action that occurs if the destination table already
1569
+ # exists. The following values are supported: WRITE_TRUNCATE: If the table
1570
+ # already exists, BigQuery overwrites the table data. WRITE_APPEND: If the table
1571
+ # already exists, BigQuery appends the data to the table. WRITE_EMPTY: If the
1572
+ # table already exists and contains data, a 'duplicate' error is returned in the
1573
+ # job result. The default value is WRITE_EMPTY. Each action is atomic and only
1574
+ # occurs if BigQuery is able to complete the job successfully. Creation,
1575
+ # truncation and append actions occur as one atomic update upon job completion.
1576
+ # Corresponds to the JSON property `writeDisposition`
1577
+ # @return [String]
1578
+ attr_accessor :write_disposition
1579
+
1580
+ def initialize(**args)
1581
+ update!(**args)
1582
+ end
1583
+
1584
+ # Update properties of this object
1585
+ def update!(**args)
1586
+ @create_disposition = args[:create_disposition] if args.key?(:create_disposition)
1587
+ @destination_table = args[:destination_table] if args.key?(:destination_table)
1588
+ @source_table = args[:source_table] if args.key?(:source_table)
1589
+ @source_tables = args[:source_tables] if args.key?(:source_tables)
1590
+ @write_disposition = args[:write_disposition] if args.key?(:write_disposition)
1591
+ end
1592
+ end
1593
+
1594
+ #
1595
+ class JobList
1596
+ include Google::Apis::Core::Hashable
1597
+
1598
+ # A hash of this page of results.
1599
+ # Corresponds to the JSON property `etag`
1600
+ # @return [String]
1601
+ attr_accessor :etag
1602
+
1603
+ # List of jobs that were requested.
1604
+ # Corresponds to the JSON property `jobs`
1605
+ # @return [Array<Google::Apis::BigqueryV2::JobList::Job>]
1606
+ attr_accessor :jobs
1607
+
1608
+ # The resource type of the response.
1609
+ # Corresponds to the JSON property `kind`
1610
+ # @return [String]
1611
+ attr_accessor :kind
1612
+
1613
+ # A token to request the next page of results.
1614
+ # Corresponds to the JSON property `nextPageToken`
1615
+ # @return [String]
1616
+ attr_accessor :next_page_token
1617
+
1618
+ def initialize(**args)
1619
+ update!(**args)
1620
+ end
1621
+
1622
+ # Update properties of this object
1623
+ def update!(**args)
1624
+ @etag = args[:etag] if args.key?(:etag)
1625
+ @jobs = args[:jobs] if args.key?(:jobs)
1626
+ @kind = args[:kind] if args.key?(:kind)
1627
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1628
+ end
1629
+
1630
+ #
1631
+ class Job
1632
+ include Google::Apis::Core::Hashable
1633
+
1634
+ # [Full-projection-only] Specifies the job configuration.
1635
+ # Corresponds to the JSON property `configuration`
1636
+ # @return [Google::Apis::BigqueryV2::JobConfiguration]
1637
+ attr_accessor :configuration
1638
+
1639
+ # A result object that will be present only if the job has failed.
1640
+ # Corresponds to the JSON property `errorResult`
1641
+ # @return [Google::Apis::BigqueryV2::ErrorProto]
1642
+ attr_accessor :error_result
1643
+
1644
+ # Unique opaque ID of the job.
1645
+ # Corresponds to the JSON property `id`
1646
+ # @return [String]
1647
+ attr_accessor :id
1648
+
1649
+ # Job reference uniquely identifying the job.
1650
+ # Corresponds to the JSON property `jobReference`
1651
+ # @return [Google::Apis::BigqueryV2::JobReference]
1652
+ attr_accessor :job_reference
1653
+
1654
+ # The resource type.
1655
+ # Corresponds to the JSON property `kind`
1656
+ # @return [String]
1657
+ attr_accessor :kind
1658
+
1659
+ # Running state of the job. When the state is DONE, errorResult can be checked
1660
+ # to determine whether the job succeeded or failed.
1661
+ # Corresponds to the JSON property `state`
1662
+ # @return [String]
1663
+ attr_accessor :state
1664
+
1665
+ # [Output-only] Information about the job, including starting time and ending
1666
+ # time of the job.
1667
+ # Corresponds to the JSON property `statistics`
1668
+ # @return [Google::Apis::BigqueryV2::JobStatistics]
1669
+ attr_accessor :statistics
1670
+
1671
+ # [Full-projection-only] Describes the state of the job.
1672
+ # Corresponds to the JSON property `status`
1673
+ # @return [Google::Apis::BigqueryV2::JobStatus]
1674
+ attr_accessor :status
1675
+
1676
+ # [Full-projection-only] Email address of the user who ran the job.
1677
+ # Corresponds to the JSON property `user_email`
1678
+ # @return [String]
1679
+ attr_accessor :user_email
1680
+
1681
+ def initialize(**args)
1682
+ update!(**args)
1683
+ end
1684
+
1685
+ # Update properties of this object
1686
+ def update!(**args)
1687
+ @configuration = args[:configuration] if args.key?(:configuration)
1688
+ @error_result = args[:error_result] if args.key?(:error_result)
1689
+ @id = args[:id] if args.key?(:id)
1690
+ @job_reference = args[:job_reference] if args.key?(:job_reference)
1691
+ @kind = args[:kind] if args.key?(:kind)
1692
+ @state = args[:state] if args.key?(:state)
1693
+ @statistics = args[:statistics] if args.key?(:statistics)
1694
+ @status = args[:status] if args.key?(:status)
1695
+ @user_email = args[:user_email] if args.key?(:user_email)
1696
+ end
1697
+ end
1698
+ end
1699
+
1700
+ #
1701
+ class JobReference
1702
+ include Google::Apis::Core::Hashable
1703
+
1704
+ # [Required] The ID of the job. The ID must contain only letters (a-z, A-Z),
1705
+ # numbers (0-9), underscores (_), or dashes (-). The maximum length is 1,024
1706
+ # characters.
1707
+ # Corresponds to the JSON property `jobId`
1708
+ # @return [String]
1709
+ attr_accessor :job_id
1710
+
1711
+ # [Required] The ID of the project containing this job.
1712
+ # Corresponds to the JSON property `projectId`
1713
+ # @return [String]
1714
+ attr_accessor :project_id
1715
+
1716
+ def initialize(**args)
1717
+ update!(**args)
1718
+ end
1719
+
1720
+ # Update properties of this object
1721
+ def update!(**args)
1722
+ @job_id = args[:job_id] if args.key?(:job_id)
1723
+ @project_id = args[:project_id] if args.key?(:project_id)
1724
+ end
1725
+ end
1726
+
1727
+ #
1728
+ class JobStatistics
1729
+ include Google::Apis::Core::Hashable
1730
+
1731
+ # [Output-only] Creation time of this job, in milliseconds since the epoch. This
1732
+ # field will be present on all jobs.
1733
+ # Corresponds to the JSON property `creationTime`
1734
+ # @return [String]
1735
+ attr_accessor :creation_time
1736
+
1737
+ # [Output-only] End time of this job, in milliseconds since the epoch. This
1738
+ # field will be present whenever a job is in the DONE state.
1739
+ # Corresponds to the JSON property `endTime`
1740
+ # @return [String]
1741
+ attr_accessor :end_time
1742
+
1743
+ # [Output-only] Statistics for an extract job.
1744
+ # Corresponds to the JSON property `extract`
1745
+ # @return [Google::Apis::BigqueryV2::JobStatistics4]
1746
+ attr_accessor :extract
1747
+
1748
+ # [Output-only] Statistics for a load job.
1749
+ # Corresponds to the JSON property `load`
1750
+ # @return [Google::Apis::BigqueryV2::JobStatistics3]
1751
+ attr_accessor :load
1752
+
1753
+ # [Output-only] Statistics for a query job.
1754
+ # Corresponds to the JSON property `query`
1755
+ # @return [Google::Apis::BigqueryV2::JobStatistics2]
1756
+ attr_accessor :query
1757
+
1758
+ # [Output-only] Start time of this job, in milliseconds since the epoch. This
1759
+ # field will be present when the job transitions from the PENDING state to
1760
+ # either RUNNING or DONE.
1761
+ # Corresponds to the JSON property `startTime`
1762
+ # @return [String]
1763
+ attr_accessor :start_time
1764
+
1765
+ # [Output-only] [Deprecated] Use the bytes processed in the query statistics
1766
+ # instead.
1767
+ # Corresponds to the JSON property `totalBytesProcessed`
1768
+ # @return [String]
1769
+ attr_accessor :total_bytes_processed
1770
+
1771
+ def initialize(**args)
1772
+ update!(**args)
1773
+ end
1774
+
1775
+ # Update properties of this object
1776
+ def update!(**args)
1777
+ @creation_time = args[:creation_time] if args.key?(:creation_time)
1778
+ @end_time = args[:end_time] if args.key?(:end_time)
1779
+ @extract = args[:extract] if args.key?(:extract)
1780
+ @load = args[:load] if args.key?(:load)
1781
+ @query = args[:query] if args.key?(:query)
1782
+ @start_time = args[:start_time] if args.key?(:start_time)
1783
+ @total_bytes_processed = args[:total_bytes_processed] if args.key?(:total_bytes_processed)
1784
+ end
1785
+ end
1786
+
1787
+ #
1788
+ class JobStatistics2
1789
+ include Google::Apis::Core::Hashable
1790
+
1791
+ # [Output-only] Billing tier for the job.
1792
+ # Corresponds to the JSON property `billingTier`
1793
+ # @return [Fixnum]
1794
+ attr_accessor :billing_tier
1795
+
1796
+ # [Output-only] Whether the query result was fetched from the query cache.
1797
+ # Corresponds to the JSON property `cacheHit`
1798
+ # @return [Boolean]
1799
+ attr_accessor :cache_hit
1800
+ alias_method :cache_hit?, :cache_hit
1801
+
1802
+ # [Output-only, Experimental] The number of rows affected by a DML statement.
1803
+ # Present only for DML statements INSERT, UPDATE or DELETE.
1804
+ # Corresponds to the JSON property `numDmlAffectedRows`
1805
+ # @return [String]
1806
+ attr_accessor :num_dml_affected_rows
1807
+
1808
+ # [Output-only, Experimental] Describes execution plan for the query.
1809
+ # Corresponds to the JSON property `queryPlan`
1810
+ # @return [Array<Google::Apis::BigqueryV2::ExplainQueryStage>]
1811
+ attr_accessor :query_plan
1812
+
1813
+ # [Output-only, Experimental] Referenced tables for the job. Queries that
1814
+ # reference more than 50 tables will not have a complete list.
1815
+ # Corresponds to the JSON property `referencedTables`
1816
+ # @return [Array<Google::Apis::BigqueryV2::TableReference>]
1817
+ attr_accessor :referenced_tables
1818
+
1819
+ # [Output-only, Experimental] The schema of the results. Present only for
1820
+ # successful dry run of non-legacy SQL queries.
1821
+ # Corresponds to the JSON property `schema`
1822
+ # @return [Google::Apis::BigqueryV2::TableSchema]
1823
+ attr_accessor :schema
1824
+
1825
+ # [Output-only, Experimental] The type of query statement, if valid.
1826
+ # Corresponds to the JSON property `statementType`
1827
+ # @return [String]
1828
+ attr_accessor :statement_type
1829
+
1830
+ # [Output-only] Total bytes billed for the job.
1831
+ # Corresponds to the JSON property `totalBytesBilled`
1832
+ # @return [String]
1833
+ attr_accessor :total_bytes_billed
1834
+
1835
+ # [Output-only] Total bytes processed for the job.
1836
+ # Corresponds to the JSON property `totalBytesProcessed`
1837
+ # @return [String]
1838
+ attr_accessor :total_bytes_processed
1839
+
1840
+ # [Output-only, Experimental] Standard SQL only: list of undeclared query
1841
+ # parameters detected during a dry run validation.
1842
+ # Corresponds to the JSON property `undeclaredQueryParameters`
1843
+ # @return [Array<Google::Apis::BigqueryV2::QueryParameter>]
1844
+ attr_accessor :undeclared_query_parameters
1845
+
1846
+ def initialize(**args)
1847
+ update!(**args)
1848
+ end
1849
+
1850
+ # Update properties of this object
1851
+ def update!(**args)
1852
+ @billing_tier = args[:billing_tier] if args.key?(:billing_tier)
1853
+ @cache_hit = args[:cache_hit] if args.key?(:cache_hit)
1854
+ @num_dml_affected_rows = args[:num_dml_affected_rows] if args.key?(:num_dml_affected_rows)
1855
+ @query_plan = args[:query_plan] if args.key?(:query_plan)
1856
+ @referenced_tables = args[:referenced_tables] if args.key?(:referenced_tables)
1857
+ @schema = args[:schema] if args.key?(:schema)
1858
+ @statement_type = args[:statement_type] if args.key?(:statement_type)
1859
+ @total_bytes_billed = args[:total_bytes_billed] if args.key?(:total_bytes_billed)
1860
+ @total_bytes_processed = args[:total_bytes_processed] if args.key?(:total_bytes_processed)
1861
+ @undeclared_query_parameters = args[:undeclared_query_parameters] if args.key?(:undeclared_query_parameters)
1862
+ end
1863
+ end
1864
+
1865
+ #
1866
+ class JobStatistics3
1867
+ include Google::Apis::Core::Hashable
1868
+
1869
+ # [Output-only] Number of bytes of source data in a load job.
1870
+ # Corresponds to the JSON property `inputFileBytes`
1871
+ # @return [String]
1872
+ attr_accessor :input_file_bytes
1873
+
1874
+ # [Output-only] Number of source files in a load job.
1875
+ # Corresponds to the JSON property `inputFiles`
1876
+ # @return [String]
1877
+ attr_accessor :input_files
1878
+
1879
+ # [Output-only] Size of the loaded data in bytes. Note that while a load job is
1880
+ # in the running state, this value may change.
1881
+ # Corresponds to the JSON property `outputBytes`
1882
+ # @return [String]
1883
+ attr_accessor :output_bytes
1884
+
1885
+ # [Output-only] Number of rows imported in a load job. Note that while an import
1886
+ # job is in the running state, this value may change.
1887
+ # Corresponds to the JSON property `outputRows`
1888
+ # @return [String]
1889
+ attr_accessor :output_rows
1890
+
1891
+ def initialize(**args)
1892
+ update!(**args)
1893
+ end
1894
+
1895
+ # Update properties of this object
1896
+ def update!(**args)
1897
+ @input_file_bytes = args[:input_file_bytes] if args.key?(:input_file_bytes)
1898
+ @input_files = args[:input_files] if args.key?(:input_files)
1899
+ @output_bytes = args[:output_bytes] if args.key?(:output_bytes)
1900
+ @output_rows = args[:output_rows] if args.key?(:output_rows)
1901
+ end
1902
+ end
1903
+
1904
+ #
1905
+ class JobStatistics4
1906
+ include Google::Apis::Core::Hashable
1907
+
1908
+ # [Output-only] Number of files per destination URI or URI pattern specified in
1909
+ # the extract configuration. These values will be in the same order as the URIs
1910
+ # specified in the 'destinationUris' field.
1911
+ # Corresponds to the JSON property `destinationUriFileCounts`
1912
+ # @return [Array<String>]
1913
+ attr_accessor :destination_uri_file_counts
1914
+
1915
+ def initialize(**args)
1916
+ update!(**args)
1917
+ end
1918
+
1919
+ # Update properties of this object
1920
+ def update!(**args)
1921
+ @destination_uri_file_counts = args[:destination_uri_file_counts] if args.key?(:destination_uri_file_counts)
1922
+ end
1923
+ end
1924
+
1925
+ #
1926
+ class JobStatus
1927
+ include Google::Apis::Core::Hashable
1928
+
1929
+ # [Output-only] Final error result of the job. If present, indicates that the
1930
+ # job has completed and was unsuccessful.
1931
+ # Corresponds to the JSON property `errorResult`
1932
+ # @return [Google::Apis::BigqueryV2::ErrorProto]
1933
+ attr_accessor :error_result
1934
+
1935
+ # [Output-only] All errors encountered during the running of the job. Errors
1936
+ # here do not necessarily mean that the job has completed or was unsuccessful.
1937
+ # Corresponds to the JSON property `errors`
1938
+ # @return [Array<Google::Apis::BigqueryV2::ErrorProto>]
1939
+ attr_accessor :errors
1940
+
1941
+ # [Output-only] Running state of the job.
1942
+ # Corresponds to the JSON property `state`
1943
+ # @return [String]
1944
+ attr_accessor :state
1945
+
1946
+ def initialize(**args)
1947
+ update!(**args)
1948
+ end
1949
+
1950
+ # Update properties of this object
1951
+ def update!(**args)
1952
+ @error_result = args[:error_result] if args.key?(:error_result)
1953
+ @errors = args[:errors] if args.key?(:errors)
1954
+ @state = args[:state] if args.key?(:state)
1955
+ end
1956
+ end
1957
+
1958
+ #
1959
+ class ProjectList
1960
+ include Google::Apis::Core::Hashable
1961
+
1962
+ # A hash of the page of results
1963
+ # Corresponds to the JSON property `etag`
1964
+ # @return [String]
1965
+ attr_accessor :etag
1966
+
1967
+ # The type of list.
1968
+ # Corresponds to the JSON property `kind`
1969
+ # @return [String]
1970
+ attr_accessor :kind
1971
+
1972
+ # A token to request the next page of results.
1973
+ # Corresponds to the JSON property `nextPageToken`
1974
+ # @return [String]
1975
+ attr_accessor :next_page_token
1976
+
1977
+ # Projects to which you have at least READ access.
1978
+ # Corresponds to the JSON property `projects`
1979
+ # @return [Array<Google::Apis::BigqueryV2::ProjectList::Project>]
1980
+ attr_accessor :projects
1981
+
1982
+ # The total number of projects in the list.
1983
+ # Corresponds to the JSON property `totalItems`
1984
+ # @return [Fixnum]
1985
+ attr_accessor :total_items
1986
+
1987
+ def initialize(**args)
1988
+ update!(**args)
1989
+ end
1990
+
1991
+ # Update properties of this object
1992
+ def update!(**args)
1993
+ @etag = args[:etag] if args.key?(:etag)
1994
+ @kind = args[:kind] if args.key?(:kind)
1995
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1996
+ @projects = args[:projects] if args.key?(:projects)
1997
+ @total_items = args[:total_items] if args.key?(:total_items)
1998
+ end
1999
+
2000
+ #
2001
+ class Project
2002
+ include Google::Apis::Core::Hashable
2003
+
2004
+ # A descriptive name for this project.
2005
+ # Corresponds to the JSON property `friendlyName`
2006
+ # @return [String]
2007
+ attr_accessor :friendly_name
2008
+
2009
+ # An opaque ID of this project.
2010
+ # Corresponds to the JSON property `id`
2011
+ # @return [String]
2012
+ attr_accessor :id
2013
+
2014
+ # The resource type.
2015
+ # Corresponds to the JSON property `kind`
2016
+ # @return [String]
2017
+ attr_accessor :kind
2018
+
2019
+ # The numeric ID of this project.
2020
+ # Corresponds to the JSON property `numericId`
2021
+ # @return [String]
2022
+ attr_accessor :numeric_id
2023
+
2024
+ # A unique reference to this project.
2025
+ # Corresponds to the JSON property `projectReference`
2026
+ # @return [Google::Apis::BigqueryV2::ProjectReference]
2027
+ attr_accessor :project_reference
2028
+
2029
+ def initialize(**args)
2030
+ update!(**args)
2031
+ end
2032
+
2033
+ # Update properties of this object
2034
+ def update!(**args)
2035
+ @friendly_name = args[:friendly_name] if args.key?(:friendly_name)
2036
+ @id = args[:id] if args.key?(:id)
2037
+ @kind = args[:kind] if args.key?(:kind)
2038
+ @numeric_id = args[:numeric_id] if args.key?(:numeric_id)
2039
+ @project_reference = args[:project_reference] if args.key?(:project_reference)
2040
+ end
2041
+ end
2042
+ end
2043
+
2044
+ #
2045
+ class ProjectReference
2046
+ include Google::Apis::Core::Hashable
2047
+
2048
+ # [Required] ID of the project. Can be either the numeric ID or the assigned ID
2049
+ # of the project.
2050
+ # Corresponds to the JSON property `projectId`
2051
+ # @return [String]
2052
+ attr_accessor :project_id
2053
+
2054
+ def initialize(**args)
2055
+ update!(**args)
2056
+ end
2057
+
2058
+ # Update properties of this object
2059
+ def update!(**args)
2060
+ @project_id = args[:project_id] if args.key?(:project_id)
2061
+ end
2062
+ end
2063
+
2064
+ #
2065
+ class QueryParameter
2066
+ include Google::Apis::Core::Hashable
2067
+
2068
+ # [Optional] If unset, this is a positional parameter. Otherwise, should be
2069
+ # unique within a query.
2070
+ # Corresponds to the JSON property `name`
2071
+ # @return [String]
2072
+ attr_accessor :name
2073
+
2074
+ # [Required] The type of this parameter.
2075
+ # Corresponds to the JSON property `parameterType`
2076
+ # @return [Google::Apis::BigqueryV2::QueryParameterType]
2077
+ attr_accessor :parameter_type
2078
+
2079
+ # [Required] The value of this parameter.
2080
+ # Corresponds to the JSON property `parameterValue`
2081
+ # @return [Google::Apis::BigqueryV2::QueryParameterValue]
2082
+ attr_accessor :parameter_value
2083
+
2084
+ def initialize(**args)
2085
+ update!(**args)
2086
+ end
2087
+
2088
+ # Update properties of this object
2089
+ def update!(**args)
2090
+ @name = args[:name] if args.key?(:name)
2091
+ @parameter_type = args[:parameter_type] if args.key?(:parameter_type)
2092
+ @parameter_value = args[:parameter_value] if args.key?(:parameter_value)
2093
+ end
2094
+ end
2095
+
2096
+ #
2097
+ class QueryParameterType
2098
+ include Google::Apis::Core::Hashable
2099
+
2100
+ # [Optional] The type of the array's elements, if this is an array.
2101
+ # Corresponds to the JSON property `arrayType`
2102
+ # @return [Google::Apis::BigqueryV2::QueryParameterType]
2103
+ attr_accessor :array_type
2104
+
2105
+ # [Optional] The types of the fields of this struct, in order, if this is a
2106
+ # struct.
2107
+ # Corresponds to the JSON property `structTypes`
2108
+ # @return [Array<Google::Apis::BigqueryV2::QueryParameterType::StructType>]
2109
+ attr_accessor :struct_types
2110
+
2111
+ # [Required] The top level type of this field.
2112
+ # Corresponds to the JSON property `type`
2113
+ # @return [String]
2114
+ attr_accessor :type
2115
+
2116
+ def initialize(**args)
2117
+ update!(**args)
2118
+ end
2119
+
2120
+ # Update properties of this object
2121
+ def update!(**args)
2122
+ @array_type = args[:array_type] if args.key?(:array_type)
2123
+ @struct_types = args[:struct_types] if args.key?(:struct_types)
2124
+ @type = args[:type] if args.key?(:type)
2125
+ end
2126
+
2127
+ #
2128
+ class StructType
2129
+ include Google::Apis::Core::Hashable
2130
+
2131
+ # [Optional] Human-oriented description of the field.
2132
+ # Corresponds to the JSON property `description`
2133
+ # @return [String]
2134
+ attr_accessor :description
2135
+
2136
+ # [Optional] The name of this field.
2137
+ # Corresponds to the JSON property `name`
2138
+ # @return [String]
2139
+ attr_accessor :name
2140
+
2141
+ # [Required] The type of this field.
2142
+ # Corresponds to the JSON property `type`
2143
+ # @return [Google::Apis::BigqueryV2::QueryParameterType]
2144
+ attr_accessor :type
2145
+
2146
+ def initialize(**args)
2147
+ update!(**args)
2148
+ end
2149
+
2150
+ # Update properties of this object
2151
+ def update!(**args)
2152
+ @description = args[:description] if args.key?(:description)
2153
+ @name = args[:name] if args.key?(:name)
2154
+ @type = args[:type] if args.key?(:type)
2155
+ end
2156
+ end
2157
+ end
2158
+
2159
+ #
2160
+ class QueryParameterValue
2161
+ include Google::Apis::Core::Hashable
2162
+
2163
+ # [Optional] The array values, if this is an array type.
2164
+ # Corresponds to the JSON property `arrayValues`
2165
+ # @return [Array<Google::Apis::BigqueryV2::QueryParameterValue>]
2166
+ attr_accessor :array_values
2167
+
2168
+ # [Optional] The struct field values, in order of the struct type's declaration.
2169
+ # Corresponds to the JSON property `structValues`
2170
+ # @return [Hash<String,Google::Apis::BigqueryV2::QueryParameterValue>]
2171
+ attr_accessor :struct_values
2172
+
2173
+ # [Optional] The value of this value, if a simple scalar type.
2174
+ # Corresponds to the JSON property `value`
2175
+ # @return [String]
2176
+ attr_accessor :value
2177
+
2178
+ def initialize(**args)
2179
+ update!(**args)
2180
+ end
2181
+
2182
+ # Update properties of this object
2183
+ def update!(**args)
2184
+ @array_values = args[:array_values] if args.key?(:array_values)
2185
+ @struct_values = args[:struct_values] if args.key?(:struct_values)
2186
+ @value = args[:value] if args.key?(:value)
2187
+ end
2188
+ end
2189
+
2190
+ #
2191
+ class QueryRequest
2192
+ include Google::Apis::Core::Hashable
2193
+
2194
+ # [Optional] Specifies the default datasetId and projectId to assume for any
2195
+ # unqualified table names in the query. If not set, all table names in the query
2196
+ # string must be qualified in the format 'datasetId.tableId'.
2197
+ # Corresponds to the JSON property `defaultDataset`
2198
+ # @return [Google::Apis::BigqueryV2::DatasetReference]
2199
+ attr_accessor :default_dataset
2200
+
2201
+ # [Optional] If set to true, BigQuery doesn't run the job. Instead, if the query
2202
+ # is valid, BigQuery returns statistics about the job such as how many bytes
2203
+ # would be processed. If the query is invalid, an error returns. The default
2204
+ # value is false.
2205
+ # Corresponds to the JSON property `dryRun`
2206
+ # @return [Boolean]
2207
+ attr_accessor :dry_run
2208
+ alias_method :dry_run?, :dry_run
2209
+
2210
+ # The resource type of the request.
2211
+ # Corresponds to the JSON property `kind`
2212
+ # @return [String]
2213
+ attr_accessor :kind
2214
+
2215
+ # [Optional] The maximum number of rows of data to return per page of results.
2216
+ # Setting this flag to a small value such as 1000 and then paging through
2217
+ # results might improve reliability when the query result set is large. In
2218
+ # addition to this limit, responses are also limited to 10 MB. By default, there
2219
+ # is no maximum row count, and only the byte limit applies.
2220
+ # Corresponds to the JSON property `maxResults`
2221
+ # @return [Fixnum]
2222
+ attr_accessor :max_results
2223
+
2224
+ # [Experimental] Standard SQL only. Set to POSITIONAL to use positional (?)
2225
+ # query parameters or to NAMED to use named (@myparam) query parameters in this
2226
+ # query.
2227
+ # Corresponds to the JSON property `parameterMode`
2228
+ # @return [String]
2229
+ attr_accessor :parameter_mode
2230
+
2231
+ # [Deprecated] This property is deprecated.
2232
+ # Corresponds to the JSON property `preserveNulls`
2233
+ # @return [Boolean]
2234
+ attr_accessor :preserve_nulls
2235
+ alias_method :preserve_nulls?, :preserve_nulls
2236
+
2237
+ # [Required] A query string, following the BigQuery query syntax, of the query
2238
+ # to execute. Example: "SELECT count(f1) FROM [myProjectId:myDatasetId.myTableId]
2239
+ # ".
2240
+ # Corresponds to the JSON property `query`
2241
+ # @return [String]
2242
+ attr_accessor :query
2243
+
2244
+ # [Experimental] Query parameters for Standard SQL queries.
2245
+ # Corresponds to the JSON property `queryParameters`
2246
+ # @return [Array<Google::Apis::BigqueryV2::QueryParameter>]
2247
+ attr_accessor :query_parameters
2248
+
2249
+ # [Optional] How long to wait for the query to complete, in milliseconds, before
2250
+ # the request times out and returns. Note that this is only a timeout for the
2251
+ # request, not the query. If the query takes longer to run than the timeout
2252
+ # value, the call returns without any results and with the 'jobComplete' flag
2253
+ # set to false. You can call GetQueryResults() to wait for the query to complete
2254
+ # and read the results. The default value is 10000 milliseconds (10 seconds).
2255
+ # Corresponds to the JSON property `timeoutMs`
2256
+ # @return [Fixnum]
2257
+ attr_accessor :timeout_ms
2258
+
2259
+ # Specifies whether to use BigQuery's legacy SQL dialect for this query. The
2260
+ # default value is true. If set to false, the query will use BigQuery's standard
2261
+ # SQL: https://cloud.google.com/bigquery/sql-reference/ When useLegacySql is set
2262
+ # to false, the values of allowLargeResults and flattenResults are ignored;
2263
+ # query will be run as if allowLargeResults is true and flattenResults is false.
2264
+ # Corresponds to the JSON property `useLegacySql`
2265
+ # @return [Boolean]
2266
+ attr_accessor :use_legacy_sql
2267
+ alias_method :use_legacy_sql?, :use_legacy_sql
2268
+
2269
+ # [Optional] Whether to look for the result in the query cache. The query cache
2270
+ # is a best-effort cache that will be flushed whenever tables in the query are
2271
+ # modified. The default value is true.
2272
+ # Corresponds to the JSON property `useQueryCache`
2273
+ # @return [Boolean]
2274
+ attr_accessor :use_query_cache
2275
+ alias_method :use_query_cache?, :use_query_cache
2276
+
2277
+ def initialize(**args)
2278
+ update!(**args)
2279
+ end
2280
+
2281
+ # Update properties of this object
2282
+ def update!(**args)
2283
+ @default_dataset = args[:default_dataset] if args.key?(:default_dataset)
2284
+ @dry_run = args[:dry_run] if args.key?(:dry_run)
2285
+ @kind = args[:kind] if args.key?(:kind)
2286
+ @max_results = args[:max_results] if args.key?(:max_results)
2287
+ @parameter_mode = args[:parameter_mode] if args.key?(:parameter_mode)
2288
+ @preserve_nulls = args[:preserve_nulls] if args.key?(:preserve_nulls)
2289
+ @query = args[:query] if args.key?(:query)
2290
+ @query_parameters = args[:query_parameters] if args.key?(:query_parameters)
2291
+ @timeout_ms = args[:timeout_ms] if args.key?(:timeout_ms)
2292
+ @use_legacy_sql = args[:use_legacy_sql] if args.key?(:use_legacy_sql)
2293
+ @use_query_cache = args[:use_query_cache] if args.key?(:use_query_cache)
2294
+ end
2295
+ end
2296
+
2297
+ #
2298
+ class QueryResponse
2299
+ include Google::Apis::Core::Hashable
2300
+
2301
+ # Whether the query result was fetched from the query cache.
2302
+ # Corresponds to the JSON property `cacheHit`
2303
+ # @return [Boolean]
2304
+ attr_accessor :cache_hit
2305
+ alias_method :cache_hit?, :cache_hit
2306
+
2307
+ # [Output-only] All errors and warnings encountered during the running of the
2308
+ # job. Errors here do not necessarily mean that the job has completed or was
2309
+ # unsuccessful.
2310
+ # Corresponds to the JSON property `errors`
2311
+ # @return [Array<Google::Apis::BigqueryV2::ErrorProto>]
2312
+ attr_accessor :errors
2313
+
2314
+ # Whether the query has completed or not. If rows or totalRows are present, this
2315
+ # will always be true. If this is false, totalRows will not be available.
2316
+ # Corresponds to the JSON property `jobComplete`
2317
+ # @return [Boolean]
2318
+ attr_accessor :job_complete
2319
+ alias_method :job_complete?, :job_complete
2320
+
2321
+ # Reference to the Job that was created to run the query. This field will be
2322
+ # present even if the original request timed out, in which case GetQueryResults
2323
+ # can be used to read the results once the query has completed. Since this API
2324
+ # only returns the first page of results, subsequent pages can be fetched via
2325
+ # the same mechanism (GetQueryResults).
2326
+ # Corresponds to the JSON property `jobReference`
2327
+ # @return [Google::Apis::BigqueryV2::JobReference]
2328
+ attr_accessor :job_reference
2329
+
2330
+ # The resource type.
2331
+ # Corresponds to the JSON property `kind`
2332
+ # @return [String]
2333
+ attr_accessor :kind
2334
+
2335
+ # [Output-only, Experimental] The number of rows affected by a DML statement.
2336
+ # Present only for DML statements INSERT, UPDATE or DELETE.
2337
+ # Corresponds to the JSON property `numDmlAffectedRows`
2338
+ # @return [String]
2339
+ attr_accessor :num_dml_affected_rows
2340
+
2341
+ # A token used for paging results.
2342
+ # Corresponds to the JSON property `pageToken`
2343
+ # @return [String]
2344
+ attr_accessor :page_token
2345
+
2346
+ # An object with as many results as can be contained within the maximum
2347
+ # permitted reply size. To get any additional rows, you can call GetQueryResults
2348
+ # and specify the jobReference returned above.
2349
+ # Corresponds to the JSON property `rows`
2350
+ # @return [Array<Google::Apis::BigqueryV2::TableRow>]
2351
+ attr_accessor :rows
2352
+
2353
+ # The schema of the results. Present only when the query completes successfully.
2354
+ # Corresponds to the JSON property `schema`
2355
+ # @return [Google::Apis::BigqueryV2::TableSchema]
2356
+ attr_accessor :schema
2357
+
2358
+ # The total number of bytes processed for this query. If this query was a dry
2359
+ # run, this is the number of bytes that would be processed if the query were run.
2360
+ # Corresponds to the JSON property `totalBytesProcessed`
2361
+ # @return [String]
2362
+ attr_accessor :total_bytes_processed
2363
+
2364
+ # The total number of rows in the complete query result set, which can be more
2365
+ # than the number of rows in this single page of results.
2366
+ # Corresponds to the JSON property `totalRows`
2367
+ # @return [String]
2368
+ attr_accessor :total_rows
2369
+
2370
+ def initialize(**args)
2371
+ update!(**args)
2372
+ end
2373
+
2374
+ # Update properties of this object
2375
+ def update!(**args)
2376
+ @cache_hit = args[:cache_hit] if args.key?(:cache_hit)
2377
+ @errors = args[:errors] if args.key?(:errors)
2378
+ @job_complete = args[:job_complete] if args.key?(:job_complete)
2379
+ @job_reference = args[:job_reference] if args.key?(:job_reference)
2380
+ @kind = args[:kind] if args.key?(:kind)
2381
+ @num_dml_affected_rows = args[:num_dml_affected_rows] if args.key?(:num_dml_affected_rows)
2382
+ @page_token = args[:page_token] if args.key?(:page_token)
2383
+ @rows = args[:rows] if args.key?(:rows)
2384
+ @schema = args[:schema] if args.key?(:schema)
2385
+ @total_bytes_processed = args[:total_bytes_processed] if args.key?(:total_bytes_processed)
2386
+ @total_rows = args[:total_rows] if args.key?(:total_rows)
2387
+ end
2388
+ end
2389
+
2390
+ #
2391
+ class Streamingbuffer
2392
+ include Google::Apis::Core::Hashable
2393
+
2394
+ # [Output-only] A lower-bound estimate of the number of bytes currently in the
2395
+ # streaming buffer.
2396
+ # Corresponds to the JSON property `estimatedBytes`
2397
+ # @return [String]
2398
+ attr_accessor :estimated_bytes
2399
+
2400
+ # [Output-only] A lower-bound estimate of the number of rows currently in the
2401
+ # streaming buffer.
2402
+ # Corresponds to the JSON property `estimatedRows`
2403
+ # @return [String]
2404
+ attr_accessor :estimated_rows
2405
+
2406
+ # [Output-only] Contains the timestamp of the oldest entry in the streaming
2407
+ # buffer, in milliseconds since the epoch, if the streaming buffer is available.
2408
+ # Corresponds to the JSON property `oldestEntryTime`
2409
+ # @return [String]
2410
+ attr_accessor :oldest_entry_time
2411
+
2412
+ def initialize(**args)
2413
+ update!(**args)
2414
+ end
2415
+
2416
+ # Update properties of this object
2417
+ def update!(**args)
2418
+ @estimated_bytes = args[:estimated_bytes] if args.key?(:estimated_bytes)
2419
+ @estimated_rows = args[:estimated_rows] if args.key?(:estimated_rows)
2420
+ @oldest_entry_time = args[:oldest_entry_time] if args.key?(:oldest_entry_time)
2421
+ end
2422
+ end
2423
+
2424
+ #
2425
+ class Table
2426
+ include Google::Apis::Core::Hashable
2427
+
2428
+ # [Output-only] The time when this table was created, in milliseconds since the
2429
+ # epoch.
2430
+ # Corresponds to the JSON property `creationTime`
2431
+ # @return [String]
2432
+ attr_accessor :creation_time
2433
+
2434
+ # [Optional] A user-friendly description of this table.
2435
+ # Corresponds to the JSON property `description`
2436
+ # @return [String]
2437
+ attr_accessor :description
2438
+
2439
+ # [Output-only] A hash of this resource.
2440
+ # Corresponds to the JSON property `etag`
2441
+ # @return [String]
2442
+ attr_accessor :etag
2443
+
2444
+ # [Optional] The time when this table expires, in milliseconds since the epoch.
2445
+ # If not present, the table will persist indefinitely. Expired tables will be
2446
+ # deleted and their storage reclaimed.
2447
+ # Corresponds to the JSON property `expirationTime`
2448
+ # @return [String]
2449
+ attr_accessor :expiration_time
2450
+
2451
+ # [Optional] Describes the data format, location, and other properties of a
2452
+ # table stored outside of BigQuery. By defining these properties, the data
2453
+ # source can then be queried as if it were a standard BigQuery table.
2454
+ # Corresponds to the JSON property `externalDataConfiguration`
2455
+ # @return [Google::Apis::BigqueryV2::ExternalDataConfiguration]
2456
+ attr_accessor :external_data_configuration
2457
+
2458
+ # [Optional] A descriptive name for this table.
2459
+ # Corresponds to the JSON property `friendlyName`
2460
+ # @return [String]
2461
+ attr_accessor :friendly_name
2462
+
2463
+ # [Output-only] An opaque ID uniquely identifying the table.
2464
+ # Corresponds to the JSON property `id`
2465
+ # @return [String]
2466
+ attr_accessor :id
2467
+
2468
+ # [Output-only] The type of the resource.
2469
+ # Corresponds to the JSON property `kind`
2470
+ # @return [String]
2471
+ attr_accessor :kind
2472
+
2473
+ # [Experimental] The labels associated with this table. You can use these to
2474
+ # organize and group your tables. Label keys and values can be no longer than 63
2475
+ # characters, can only contain letters, numeric characters, underscores and
2476
+ # dashes. International characters are allowed. Label values are optional. Label
2477
+ # keys must start with a letter and must be unique within a dataset. Both keys
2478
+ # and values are additionally constrained to be <= 128 bytes in size.
2479
+ # Corresponds to the JSON property `labels`
2480
+ # @return [Hash<String,String>]
2481
+ attr_accessor :labels
2482
+
2483
+ # [Output-only] The time when this table was last modified, in milliseconds
2484
+ # since the epoch.
2485
+ # Corresponds to the JSON property `lastModifiedTime`
2486
+ # @return [String]
2487
+ attr_accessor :last_modified_time
2488
+
2489
+ # [Output-only] The geographic location where the table resides. This value is
2490
+ # inherited from the dataset.
2491
+ # Corresponds to the JSON property `location`
2492
+ # @return [String]
2493
+ attr_accessor :location
2494
+
2495
+ # [Output-only] The size of this table in bytes, excluding any data in the
2496
+ # streaming buffer.
2497
+ # Corresponds to the JSON property `numBytes`
2498
+ # @return [String]
2499
+ attr_accessor :num_bytes
2500
+
2501
+ # [Output-only] The number of bytes in the table that are considered "long-term
2502
+ # storage".
2503
+ # Corresponds to the JSON property `numLongTermBytes`
2504
+ # @return [String]
2505
+ attr_accessor :num_long_term_bytes
2506
+
2507
+ # [Output-only] The number of rows of data in this table, excluding any data in
2508
+ # the streaming buffer.
2509
+ # Corresponds to the JSON property `numRows`
2510
+ # @return [String]
2511
+ attr_accessor :num_rows
2512
+
2513
+ # [Optional] Describes the schema of this table.
2514
+ # Corresponds to the JSON property `schema`
2515
+ # @return [Google::Apis::BigqueryV2::TableSchema]
2516
+ attr_accessor :schema
2517
+
2518
+ # [Output-only] A URL that can be used to access this resource again.
2519
+ # Corresponds to the JSON property `selfLink`
2520
+ # @return [String]
2521
+ attr_accessor :self_link
2522
+
2523
+ # [Output-only] Contains information regarding this table's streaming buffer, if
2524
+ # one is present. This field will be absent if the table is not being streamed
2525
+ # to or if there is no data in the streaming buffer.
2526
+ # Corresponds to the JSON property `streamingBuffer`
2527
+ # @return [Google::Apis::BigqueryV2::Streamingbuffer]
2528
+ attr_accessor :streaming_buffer
2529
+
2530
+ # [Required] Reference describing the ID of this table.
2531
+ # Corresponds to the JSON property `tableReference`
2532
+ # @return [Google::Apis::BigqueryV2::TableReference]
2533
+ attr_accessor :table_reference
2534
+
2535
+ # [Experimental] If specified, configures time-based partitioning for this table.
2536
+ # Corresponds to the JSON property `timePartitioning`
2537
+ # @return [Google::Apis::BigqueryV2::TimePartitioning]
2538
+ attr_accessor :time_partitioning
2539
+
2540
+ # [Output-only] Describes the table type. The following values are supported:
2541
+ # TABLE: A normal BigQuery table. VIEW: A virtual table defined by a SQL query.
2542
+ # EXTERNAL: A table that references data stored in an external storage system,
2543
+ # such as Google Cloud Storage. The default value is TABLE.
2544
+ # Corresponds to the JSON property `type`
2545
+ # @return [String]
2546
+ attr_accessor :type
2547
+
2548
+ # [Optional] The view definition.
2549
+ # Corresponds to the JSON property `view`
2550
+ # @return [Google::Apis::BigqueryV2::ViewDefinition]
2551
+ attr_accessor :view
2552
+
2553
+ def initialize(**args)
2554
+ update!(**args)
2555
+ end
2556
+
2557
+ # Update properties of this object
2558
+ def update!(**args)
2559
+ @creation_time = args[:creation_time] if args.key?(:creation_time)
2560
+ @description = args[:description] if args.key?(:description)
2561
+ @etag = args[:etag] if args.key?(:etag)
2562
+ @expiration_time = args[:expiration_time] if args.key?(:expiration_time)
2563
+ @external_data_configuration = args[:external_data_configuration] if args.key?(:external_data_configuration)
2564
+ @friendly_name = args[:friendly_name] if args.key?(:friendly_name)
2565
+ @id = args[:id] if args.key?(:id)
2566
+ @kind = args[:kind] if args.key?(:kind)
2567
+ @labels = args[:labels] if args.key?(:labels)
2568
+ @last_modified_time = args[:last_modified_time] if args.key?(:last_modified_time)
2569
+ @location = args[:location] if args.key?(:location)
2570
+ @num_bytes = args[:num_bytes] if args.key?(:num_bytes)
2571
+ @num_long_term_bytes = args[:num_long_term_bytes] if args.key?(:num_long_term_bytes)
2572
+ @num_rows = args[:num_rows] if args.key?(:num_rows)
2573
+ @schema = args[:schema] if args.key?(:schema)
2574
+ @self_link = args[:self_link] if args.key?(:self_link)
2575
+ @streaming_buffer = args[:streaming_buffer] if args.key?(:streaming_buffer)
2576
+ @table_reference = args[:table_reference] if args.key?(:table_reference)
2577
+ @time_partitioning = args[:time_partitioning] if args.key?(:time_partitioning)
2578
+ @type = args[:type] if args.key?(:type)
2579
+ @view = args[:view] if args.key?(:view)
2580
+ end
2581
+ end
2582
+
2583
+ #
2584
+ class TableCell
2585
+ include Google::Apis::Core::Hashable
2586
+
2587
+ #
2588
+ # Corresponds to the JSON property `v`
2589
+ # @return [Object]
2590
+ attr_accessor :v
2591
+
2592
+ def initialize(**args)
2593
+ update!(**args)
2594
+ end
2595
+
2596
+ # Update properties of this object
2597
+ def update!(**args)
2598
+ @v = args[:v] if args.key?(:v)
2599
+ end
2600
+ end
2601
+
2602
+ #
2603
+ class InsertAllTableDataRequest
2604
+ include Google::Apis::Core::Hashable
2605
+
2606
+ # [Optional] Accept rows that contain values that do not match the schema. The
2607
+ # unknown values are ignored. Default is false, which treats unknown values as
2608
+ # errors.
2609
+ # Corresponds to the JSON property `ignoreUnknownValues`
2610
+ # @return [Boolean]
2611
+ attr_accessor :ignore_unknown_values
2612
+ alias_method :ignore_unknown_values?, :ignore_unknown_values
2613
+
2614
+ # The resource type of the response.
2615
+ # Corresponds to the JSON property `kind`
2616
+ # @return [String]
2617
+ attr_accessor :kind
2618
+
2619
+ # The rows to insert.
2620
+ # Corresponds to the JSON property `rows`
2621
+ # @return [Array<Google::Apis::BigqueryV2::InsertAllTableDataRequest::Row>]
2622
+ attr_accessor :rows
2623
+
2624
+ # [Optional] Insert all valid rows of a request, even if invalid rows exist. The
2625
+ # default value is false, which causes the entire request to fail if any invalid
2626
+ # rows exist.
2627
+ # Corresponds to the JSON property `skipInvalidRows`
2628
+ # @return [Boolean]
2629
+ attr_accessor :skip_invalid_rows
2630
+ alias_method :skip_invalid_rows?, :skip_invalid_rows
2631
+
2632
+ # [Experimental] If specified, treats the destination table as a base template,
2633
+ # and inserts the rows into an instance table named "`destination``
2634
+ # templateSuffix`". BigQuery will manage creation of the instance table, using
2635
+ # the schema of the base template table. See https://cloud.google.com/bigquery/
2636
+ # streaming-data-into-bigquery#template-tables for considerations when working
2637
+ # with templates tables.
2638
+ # Corresponds to the JSON property `templateSuffix`
2639
+ # @return [String]
2640
+ attr_accessor :template_suffix
2641
+
2642
+ def initialize(**args)
2643
+ update!(**args)
2644
+ end
2645
+
2646
+ # Update properties of this object
2647
+ def update!(**args)
2648
+ @ignore_unknown_values = args[:ignore_unknown_values] if args.key?(:ignore_unknown_values)
2649
+ @kind = args[:kind] if args.key?(:kind)
2650
+ @rows = args[:rows] if args.key?(:rows)
2651
+ @skip_invalid_rows = args[:skip_invalid_rows] if args.key?(:skip_invalid_rows)
2652
+ @template_suffix = args[:template_suffix] if args.key?(:template_suffix)
2653
+ end
2654
+
2655
+ #
2656
+ class Row
2657
+ include Google::Apis::Core::Hashable
2658
+
2659
+ # [Optional] A unique ID for each row. BigQuery uses this property to detect
2660
+ # duplicate insertion requests on a best-effort basis.
2661
+ # Corresponds to the JSON property `insertId`
2662
+ # @return [String]
2663
+ attr_accessor :insert_id
2664
+
2665
+ # Represents a single JSON object.
2666
+ # Corresponds to the JSON property `json`
2667
+ # @return [Hash<String,Object>]
2668
+ attr_accessor :json
2669
+
2670
+ def initialize(**args)
2671
+ update!(**args)
2672
+ end
2673
+
2674
+ # Update properties of this object
2675
+ def update!(**args)
2676
+ @insert_id = args[:insert_id] if args.key?(:insert_id)
2677
+ @json = args[:json] if args.key?(:json)
2678
+ end
2679
+ end
2680
+ end
2681
+
2682
+ #
2683
+ class InsertAllTableDataResponse
2684
+ include Google::Apis::Core::Hashable
2685
+
2686
+ # An array of errors for rows that were not inserted.
2687
+ # Corresponds to the JSON property `insertErrors`
2688
+ # @return [Array<Google::Apis::BigqueryV2::InsertAllTableDataResponse::InsertError>]
2689
+ attr_accessor :insert_errors
2690
+
2691
+ # The resource type of the response.
2692
+ # Corresponds to the JSON property `kind`
2693
+ # @return [String]
2694
+ attr_accessor :kind
2695
+
2696
+ def initialize(**args)
2697
+ update!(**args)
2698
+ end
2699
+
2700
+ # Update properties of this object
2701
+ def update!(**args)
2702
+ @insert_errors = args[:insert_errors] if args.key?(:insert_errors)
2703
+ @kind = args[:kind] if args.key?(:kind)
2704
+ end
2705
+
2706
+ #
2707
+ class InsertError
2708
+ include Google::Apis::Core::Hashable
2709
+
2710
+ # Error information for the row indicated by the index property.
2711
+ # Corresponds to the JSON property `errors`
2712
+ # @return [Array<Google::Apis::BigqueryV2::ErrorProto>]
2713
+ attr_accessor :errors
2714
+
2715
+ # The index of the row that error applies to.
2716
+ # Corresponds to the JSON property `index`
2717
+ # @return [Fixnum]
2718
+ attr_accessor :index
2719
+
2720
+ def initialize(**args)
2721
+ update!(**args)
2722
+ end
2723
+
2724
+ # Update properties of this object
2725
+ def update!(**args)
2726
+ @errors = args[:errors] if args.key?(:errors)
2727
+ @index = args[:index] if args.key?(:index)
2728
+ end
2729
+ end
2730
+ end
2731
+
2732
+ #
2733
+ class TableDataList
2734
+ include Google::Apis::Core::Hashable
2735
+
2736
+ # A hash of this page of results.
2737
+ # Corresponds to the JSON property `etag`
2738
+ # @return [String]
2739
+ attr_accessor :etag
2740
+
2741
+ # The resource type of the response.
2742
+ # Corresponds to the JSON property `kind`
2743
+ # @return [String]
2744
+ attr_accessor :kind
2745
+
2746
+ # A token used for paging results. Providing this token instead of the
2747
+ # startIndex parameter can help you retrieve stable results when an underlying
2748
+ # table is changing.
2749
+ # Corresponds to the JSON property `pageToken`
2750
+ # @return [String]
2751
+ attr_accessor :page_token
2752
+
2753
+ # Rows of results.
2754
+ # Corresponds to the JSON property `rows`
2755
+ # @return [Array<Google::Apis::BigqueryV2::TableRow>]
2756
+ attr_accessor :rows
2757
+
2758
+ # The total number of rows in the complete table.
2759
+ # Corresponds to the JSON property `totalRows`
2760
+ # @return [String]
2761
+ attr_accessor :total_rows
2762
+
2763
+ def initialize(**args)
2764
+ update!(**args)
2765
+ end
2766
+
2767
+ # Update properties of this object
2768
+ def update!(**args)
2769
+ @etag = args[:etag] if args.key?(:etag)
2770
+ @kind = args[:kind] if args.key?(:kind)
2771
+ @page_token = args[:page_token] if args.key?(:page_token)
2772
+ @rows = args[:rows] if args.key?(:rows)
2773
+ @total_rows = args[:total_rows] if args.key?(:total_rows)
2774
+ end
2775
+ end
2776
+
2777
+ #
2778
+ class TableFieldSchema
2779
+ include Google::Apis::Core::Hashable
2780
+
2781
+ # [Optional] The field description. The maximum length is 16K characters.
2782
+ # Corresponds to the JSON property `description`
2783
+ # @return [String]
2784
+ attr_accessor :description
2785
+
2786
+ # [Optional] Describes the nested schema fields if the type property is set to
2787
+ # RECORD.
2788
+ # Corresponds to the JSON property `fields`
2789
+ # @return [Array<Google::Apis::BigqueryV2::TableFieldSchema>]
2790
+ attr_accessor :fields
2791
+
2792
+ # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and
2793
+ # REPEATED. The default value is NULLABLE.
2794
+ # Corresponds to the JSON property `mode`
2795
+ # @return [String]
2796
+ attr_accessor :mode
2797
+
2798
+ # [Required] The field name. The name must contain only letters (a-z, A-Z),
2799
+ # numbers (0-9), or underscores (_), and must start with a letter or underscore.
2800
+ # The maximum length is 128 characters.
2801
+ # Corresponds to the JSON property `name`
2802
+ # @return [String]
2803
+ attr_accessor :name
2804
+
2805
+ # [Required] The field data type. Possible values include STRING, BYTES, INTEGER,
2806
+ # INT64 (same as INTEGER), FLOAT, FLOAT64 (same as FLOAT), BOOLEAN, BOOL (same
2807
+ # as BOOLEAN), TIMESTAMP, DATE, TIME, DATETIME, RECORD (where RECORD indicates
2808
+ # that the field contains a nested schema) or STRUCT (same as RECORD).
2809
+ # Corresponds to the JSON property `type`
2810
+ # @return [String]
2811
+ attr_accessor :type
2812
+
2813
+ def initialize(**args)
2814
+ update!(**args)
2815
+ end
2816
+
2817
+ # Update properties of this object
2818
+ def update!(**args)
2819
+ @description = args[:description] if args.key?(:description)
2820
+ @fields = args[:fields] if args.key?(:fields)
2821
+ @mode = args[:mode] if args.key?(:mode)
2822
+ @name = args[:name] if args.key?(:name)
2823
+ @type = args[:type] if args.key?(:type)
2824
+ end
2825
+ end
2826
+
2827
+ #
2828
+ class TableList
2829
+ include Google::Apis::Core::Hashable
2830
+
2831
+ # A hash of this page of results.
2832
+ # Corresponds to the JSON property `etag`
2833
+ # @return [String]
2834
+ attr_accessor :etag
2835
+
2836
+ # The type of list.
2837
+ # Corresponds to the JSON property `kind`
2838
+ # @return [String]
2839
+ attr_accessor :kind
2840
+
2841
+ # A token to request the next page of results.
2842
+ # Corresponds to the JSON property `nextPageToken`
2843
+ # @return [String]
2844
+ attr_accessor :next_page_token
2845
+
2846
+ # Tables in the requested dataset.
2847
+ # Corresponds to the JSON property `tables`
2848
+ # @return [Array<Google::Apis::BigqueryV2::TableList::Table>]
2849
+ attr_accessor :tables
2850
+
2851
+ # The total number of tables in the dataset.
2852
+ # Corresponds to the JSON property `totalItems`
2853
+ # @return [Fixnum]
2854
+ attr_accessor :total_items
2855
+
2856
+ def initialize(**args)
2857
+ update!(**args)
2858
+ end
2859
+
2860
+ # Update properties of this object
2861
+ def update!(**args)
2862
+ @etag = args[:etag] if args.key?(:etag)
2863
+ @kind = args[:kind] if args.key?(:kind)
2864
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
2865
+ @tables = args[:tables] if args.key?(:tables)
2866
+ @total_items = args[:total_items] if args.key?(:total_items)
2867
+ end
2868
+
2869
+ #
2870
+ class Table
2871
+ include Google::Apis::Core::Hashable
2872
+
2873
+ # The user-friendly name for this table.
2874
+ # Corresponds to the JSON property `friendlyName`
2875
+ # @return [String]
2876
+ attr_accessor :friendly_name
2877
+
2878
+ # An opaque ID of the table
2879
+ # Corresponds to the JSON property `id`
2880
+ # @return [String]
2881
+ attr_accessor :id
2882
+
2883
+ # The resource type.
2884
+ # Corresponds to the JSON property `kind`
2885
+ # @return [String]
2886
+ attr_accessor :kind
2887
+
2888
+ # [Experimental] The labels associated with this table. You can use these to
2889
+ # organize and group your tables.
2890
+ # Corresponds to the JSON property `labels`
2891
+ # @return [Hash<String,String>]
2892
+ attr_accessor :labels
2893
+
2894
+ # A reference uniquely identifying the table.
2895
+ # Corresponds to the JSON property `tableReference`
2896
+ # @return [Google::Apis::BigqueryV2::TableReference]
2897
+ attr_accessor :table_reference
2898
+
2899
+ # The type of table. Possible values are: TABLE, VIEW.
2900
+ # Corresponds to the JSON property `type`
2901
+ # @return [String]
2902
+ attr_accessor :type
2903
+
2904
+ def initialize(**args)
2905
+ update!(**args)
2906
+ end
2907
+
2908
+ # Update properties of this object
2909
+ def update!(**args)
2910
+ @friendly_name = args[:friendly_name] if args.key?(:friendly_name)
2911
+ @id = args[:id] if args.key?(:id)
2912
+ @kind = args[:kind] if args.key?(:kind)
2913
+ @labels = args[:labels] if args.key?(:labels)
2914
+ @table_reference = args[:table_reference] if args.key?(:table_reference)
2915
+ @type = args[:type] if args.key?(:type)
2916
+ end
2917
+ end
2918
+ end
2919
+
2920
+ #
2921
+ class TableReference
2922
+ include Google::Apis::Core::Hashable
2923
+
2924
+ # [Required] The ID of the dataset containing this table.
2925
+ # Corresponds to the JSON property `datasetId`
2926
+ # @return [String]
2927
+ attr_accessor :dataset_id
2928
+
2929
+ # [Required] The ID of the project containing this table.
2930
+ # Corresponds to the JSON property `projectId`
2931
+ # @return [String]
2932
+ attr_accessor :project_id
2933
+
2934
+ # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z),
2935
+ # numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
2936
+ # Corresponds to the JSON property `tableId`
2937
+ # @return [String]
2938
+ attr_accessor :table_id
2939
+
2940
+ def initialize(**args)
2941
+ update!(**args)
2942
+ end
2943
+
2944
+ # Update properties of this object
2945
+ def update!(**args)
2946
+ @dataset_id = args[:dataset_id] if args.key?(:dataset_id)
2947
+ @project_id = args[:project_id] if args.key?(:project_id)
2948
+ @table_id = args[:table_id] if args.key?(:table_id)
2949
+ end
2950
+ end
2951
+
2952
+ #
2953
+ class TableRow
2954
+ include Google::Apis::Core::Hashable
2955
+
2956
+ # Represents a single row in the result set, consisting of one or more fields.
2957
+ # Corresponds to the JSON property `f`
2958
+ # @return [Array<Google::Apis::BigqueryV2::TableCell>]
2959
+ attr_accessor :f
2960
+
2961
+ def initialize(**args)
2962
+ update!(**args)
2963
+ end
2964
+
2965
+ # Update properties of this object
2966
+ def update!(**args)
2967
+ @f = args[:f] if args.key?(:f)
2968
+ end
2969
+ end
2970
+
2971
+ #
2972
+ class TableSchema
2973
+ include Google::Apis::Core::Hashable
2974
+
2975
+ # Describes the fields in a table.
2976
+ # Corresponds to the JSON property `fields`
2977
+ # @return [Array<Google::Apis::BigqueryV2::TableFieldSchema>]
2978
+ attr_accessor :fields
2979
+
2980
+ def initialize(**args)
2981
+ update!(**args)
2982
+ end
2983
+
2984
+ # Update properties of this object
2985
+ def update!(**args)
2986
+ @fields = args[:fields] if args.key?(:fields)
2987
+ end
2988
+ end
2989
+
2990
+ #
2991
+ class TimePartitioning
2992
+ include Google::Apis::Core::Hashable
2993
+
2994
+ # [Optional] Number of milliseconds for which to keep the storage for a
2995
+ # partition.
2996
+ # Corresponds to the JSON property `expirationMs`
2997
+ # @return [String]
2998
+ attr_accessor :expiration_ms
2999
+
3000
+ # [Required] The only type supported is DAY, which will generate one partition
3001
+ # per day based on data loading time.
3002
+ # Corresponds to the JSON property `type`
3003
+ # @return [String]
3004
+ attr_accessor :type
3005
+
3006
+ def initialize(**args)
3007
+ update!(**args)
3008
+ end
3009
+
3010
+ # Update properties of this object
3011
+ def update!(**args)
3012
+ @expiration_ms = args[:expiration_ms] if args.key?(:expiration_ms)
3013
+ @type = args[:type] if args.key?(:type)
3014
+ end
3015
+ end
3016
+
3017
+ #
3018
+ class UserDefinedFunctionResource
3019
+ include Google::Apis::Core::Hashable
3020
+
3021
+ # [Pick one] An inline resource that contains code for a user-defined function (
3022
+ # UDF). Providing a inline code resource is equivalent to providing a URI for a
3023
+ # file containing the same code.
3024
+ # Corresponds to the JSON property `inlineCode`
3025
+ # @return [String]
3026
+ attr_accessor :inline_code
3027
+
3028
+ # [Pick one] A code resource to load from a Google Cloud Storage URI (gs://
3029
+ # bucket/path).
3030
+ # Corresponds to the JSON property `resourceUri`
3031
+ # @return [String]
3032
+ attr_accessor :resource_uri
3033
+
3034
+ def initialize(**args)
3035
+ update!(**args)
3036
+ end
3037
+
3038
+ # Update properties of this object
3039
+ def update!(**args)
3040
+ @inline_code = args[:inline_code] if args.key?(:inline_code)
3041
+ @resource_uri = args[:resource_uri] if args.key?(:resource_uri)
3042
+ end
3043
+ end
3044
+
3045
+ #
3046
+ class ViewDefinition
3047
+ include Google::Apis::Core::Hashable
3048
+
3049
+ # [Required] A query that BigQuery executes when the view is referenced.
3050
+ # Corresponds to the JSON property `query`
3051
+ # @return [String]
3052
+ attr_accessor :query
3053
+
3054
+ # Specifies whether to use BigQuery's legacy SQL for this view. The default
3055
+ # value is true. If set to false, the view will use BigQuery's standard SQL:
3056
+ # https://cloud.google.com/bigquery/sql-reference/ Queries and views that
3057
+ # reference this view must use the same flag value.
3058
+ # Corresponds to the JSON property `useLegacySql`
3059
+ # @return [Boolean]
3060
+ attr_accessor :use_legacy_sql
3061
+ alias_method :use_legacy_sql?, :use_legacy_sql
3062
+
3063
+ # [Experimental] Describes user-defined function resources used in the query.
3064
+ # Corresponds to the JSON property `userDefinedFunctionResources`
3065
+ # @return [Array<Google::Apis::BigqueryV2::UserDefinedFunctionResource>]
3066
+ attr_accessor :user_defined_function_resources
3067
+
3068
+ def initialize(**args)
3069
+ update!(**args)
3070
+ end
3071
+
3072
+ # Update properties of this object
3073
+ def update!(**args)
3074
+ @query = args[:query] if args.key?(:query)
3075
+ @use_legacy_sql = args[:use_legacy_sql] if args.key?(:use_legacy_sql)
3076
+ @user_defined_function_resources = args[:user_defined_function_resources] if args.key?(:user_defined_function_resources)
3077
+ end
3078
+ end
3079
+ end
3080
+ end
3081
+ end