google-api-client 0.31.0 → 0.32.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (295) hide show
  1. checksums.yaml +4 -4
  2. data/.kokoro/continuous/linux.cfg +11 -1
  3. data/.kokoro/continuous/osx.cfg +5 -0
  4. data/.kokoro/continuous/windows.cfg +10 -0
  5. data/.kokoro/presubmit/linux.cfg +11 -1
  6. data/.kokoro/presubmit/osx.cfg +5 -0
  7. data/.kokoro/presubmit/windows.cfg +10 -0
  8. data/CHANGELOG.md +107 -0
  9. data/generated/google/apis/androidmanagement_v1.rb +1 -1
  10. data/generated/google/apis/androidmanagement_v1/classes.rb +12 -1
  11. data/generated/google/apis/androidmanagement_v1/representations.rb +1 -0
  12. data/generated/google/apis/bigquery_v2.rb +1 -1
  13. data/generated/google/apis/bigquery_v2/classes.rb +241 -0
  14. data/generated/google/apis/bigquery_v2/representations.rb +115 -0
  15. data/generated/google/apis/bigqueryconnection_v1beta1.rb +1 -1
  16. data/generated/google/apis/bigqueryconnection_v1beta1/classes.rb +62 -29
  17. data/generated/google/apis/bigquerydatatransfer_v1.rb +1 -1
  18. data/generated/google/apis/bigquerydatatransfer_v1/classes.rb +2 -2
  19. data/generated/google/apis/bigquerydatatransfer_v1/service.rb +30 -26
  20. data/generated/google/apis/bigqueryreservation_v1.rb +1 -1
  21. data/generated/google/apis/bigqueryreservation_v1/classes.rb +7 -7
  22. data/generated/google/apis/bigqueryreservation_v1/representations.rb +3 -3
  23. data/generated/google/apis/bigqueryreservation_v1alpha2.rb +1 -1
  24. data/generated/google/apis/bigqueryreservation_v1alpha2/classes.rb +0 -175
  25. data/generated/google/apis/bigqueryreservation_v1alpha2/representations.rb +0 -65
  26. data/generated/google/apis/bigqueryreservation_v1alpha2/service.rb +0 -140
  27. data/generated/google/apis/bigqueryreservation_v1beta1.rb +37 -0
  28. data/generated/google/apis/bigqueryreservation_v1beta1/classes.rb +497 -0
  29. data/generated/google/apis/bigqueryreservation_v1beta1/representations.rb +236 -0
  30. data/generated/google/apis/bigqueryreservation_v1beta1/service.rb +713 -0
  31. data/generated/google/apis/binaryauthorization_v1.rb +1 -1
  32. data/generated/google/apis/binaryauthorization_v1/classes.rb +307 -0
  33. data/generated/google/apis/binaryauthorization_v1/representations.rb +88 -0
  34. data/generated/google/apis/binaryauthorization_v1/service.rb +230 -0
  35. data/generated/google/apis/binaryauthorization_v1beta1.rb +1 -1
  36. data/generated/google/apis/binaryauthorization_v1beta1/classes.rb +62 -29
  37. data/generated/google/apis/blogger_v3.rb +1 -1
  38. data/generated/google/apis/blogger_v3/service.rb +6 -6
  39. data/generated/google/apis/calendar_v3.rb +1 -1
  40. data/generated/google/apis/calendar_v3/classes.rb +1 -0
  41. data/generated/google/apis/cloudasset_v1.rb +1 -1
  42. data/generated/google/apis/cloudasset_v1/classes.rb +72 -29
  43. data/generated/google/apis/cloudasset_v1/representations.rb +1 -0
  44. data/generated/google/apis/cloudasset_v1/service.rb +1 -1
  45. data/generated/google/apis/cloudasset_v1beta1.rb +1 -1
  46. data/generated/google/apis/cloudasset_v1beta1/classes.rb +62 -29
  47. data/generated/google/apis/cloudasset_v1beta1/service.rb +2 -2
  48. data/generated/google/apis/cloudfunctions_v1.rb +1 -1
  49. data/generated/google/apis/cloudfunctions_v1/classes.rb +7 -2
  50. data/generated/google/apis/cloudfunctions_v1/service.rb +10 -7
  51. data/generated/google/apis/cloudfunctions_v1beta2.rb +1 -1
  52. data/generated/google/apis/cloudfunctions_v1beta2/classes.rb +1 -1
  53. data/generated/google/apis/cloudfunctions_v1beta2/service.rb +7 -6
  54. data/generated/google/apis/cloudidentity_v1.rb +4 -1
  55. data/generated/google/apis/cloudidentity_v1beta1.rb +4 -1
  56. data/generated/google/apis/cloudiot_v1.rb +1 -1
  57. data/generated/google/apis/cloudiot_v1/classes.rb +68 -35
  58. data/generated/google/apis/cloudiot_v1/service.rb +18 -17
  59. data/generated/google/apis/cloudkms_v1.rb +1 -1
  60. data/generated/google/apis/cloudkms_v1/classes.rb +77 -35
  61. data/generated/google/apis/cloudkms_v1/service.rb +33 -27
  62. data/generated/google/apis/cloudprivatecatalogproducer_v1beta1.rb +1 -1
  63. data/generated/google/apis/cloudprivatecatalogproducer_v1beta1/classes.rb +62 -29
  64. data/generated/google/apis/cloudsearch_v1.rb +1 -1
  65. data/generated/google/apis/cloudsearch_v1/classes.rb +354 -0
  66. data/generated/google/apis/cloudsearch_v1/representations.rb +196 -0
  67. data/generated/google/apis/cloudsearch_v1/service.rb +314 -2
  68. data/generated/google/apis/cloudtasks_v2beta3.rb +1 -1
  69. data/generated/google/apis/cloudtasks_v2beta3/classes.rb +62 -29
  70. data/generated/google/apis/cloudtrace_v1.rb +1 -1
  71. data/generated/google/apis/cloudtrace_v1/classes.rb +1 -1
  72. data/generated/google/apis/cloudtrace_v1/service.rb +10 -10
  73. data/generated/google/apis/cloudtrace_v2.rb +1 -1
  74. data/generated/google/apis/cloudtrace_v2/classes.rb +3 -3
  75. data/generated/google/apis/commentanalyzer_v1alpha1.rb +1 -1
  76. data/generated/google/apis/commentanalyzer_v1alpha1/classes.rb +7 -10
  77. data/generated/google/apis/compute_alpha.rb +1 -1
  78. data/generated/google/apis/compute_alpha/classes.rb +38 -42
  79. data/generated/google/apis/compute_alpha/representations.rb +5 -16
  80. data/generated/google/apis/compute_beta.rb +1 -1
  81. data/generated/google/apis/compute_beta/classes.rb +10 -5
  82. data/generated/google/apis/compute_v1.rb +1 -1
  83. data/generated/google/apis/compute_v1/classes.rb +1327 -4
  84. data/generated/google/apis/compute_v1/representations.rb +439 -0
  85. data/generated/google/apis/container_v1.rb +1 -1
  86. data/generated/google/apis/container_v1/classes.rb +111 -0
  87. data/generated/google/apis/container_v1/representations.rb +51 -0
  88. data/generated/google/apis/containeranalysis_v1alpha1.rb +1 -1
  89. data/generated/google/apis/containeranalysis_v1alpha1/classes.rb +76 -30
  90. data/generated/google/apis/containeranalysis_v1alpha1/representations.rb +1 -0
  91. data/generated/google/apis/containeranalysis_v1beta1.rb +1 -1
  92. data/generated/google/apis/containeranalysis_v1beta1/classes.rb +70 -30
  93. data/generated/google/apis/content_v2.rb +1 -1
  94. data/generated/google/apis/content_v2/service.rb +0 -226
  95. data/generated/google/apis/dataflow_v1b3.rb +1 -1
  96. data/generated/google/apis/dataflow_v1b3/classes.rb +42 -0
  97. data/generated/google/apis/dataflow_v1b3/representations.rb +4 -0
  98. data/generated/google/apis/dataproc_v1.rb +1 -1
  99. data/generated/google/apis/dataproc_v1/classes.rb +324 -38
  100. data/generated/google/apis/dataproc_v1/representations.rb +97 -0
  101. data/generated/google/apis/dataproc_v1/service.rb +613 -1
  102. data/generated/google/apis/dataproc_v1beta2.rb +1 -1
  103. data/generated/google/apis/dataproc_v1beta2/classes.rb +100 -54
  104. data/generated/google/apis/dataproc_v1beta2/service.rb +29 -22
  105. data/generated/google/apis/dialogflow_v2.rb +1 -1
  106. data/generated/google/apis/dialogflow_v2/classes.rb +363 -167
  107. data/generated/google/apis/dialogflow_v2/representations.rb +160 -49
  108. data/generated/google/apis/dialogflow_v2/service.rb +1 -1
  109. data/generated/google/apis/dialogflow_v2beta1.rb +1 -1
  110. data/generated/google/apis/dialogflow_v2beta1/classes.rb +433 -178
  111. data/generated/google/apis/dialogflow_v2beta1/representations.rb +199 -59
  112. data/generated/google/apis/dialogflow_v2beta1/service.rb +39 -0
  113. data/generated/google/apis/dlp_v2.rb +1 -1
  114. data/generated/google/apis/dlp_v2/classes.rb +3 -4
  115. data/generated/google/apis/doubleclickbidmanager_v1.rb +1 -1
  116. data/generated/google/apis/drive_v2.rb +1 -1
  117. data/generated/google/apis/drive_v2/classes.rb +2 -2
  118. data/generated/google/apis/drive_v3.rb +1 -1
  119. data/generated/google/apis/drive_v3/classes.rb +2 -2
  120. data/generated/google/apis/fcm_v1.rb +1 -1
  121. data/generated/google/apis/fcm_v1/classes.rb +9 -4
  122. data/generated/google/apis/file_v1.rb +1 -1
  123. data/generated/google/apis/file_v1/classes.rb +8 -0
  124. data/generated/google/apis/file_v1/representations.rb +1 -0
  125. data/generated/google/apis/file_v1/service.rb +2 -0
  126. data/generated/google/apis/file_v1beta1.rb +1 -1
  127. data/generated/google/apis/file_v1beta1/classes.rb +8 -0
  128. data/generated/google/apis/file_v1beta1/representations.rb +1 -0
  129. data/generated/google/apis/file_v1beta1/service.rb +2 -0
  130. data/generated/google/apis/firebase_v1beta1.rb +1 -1
  131. data/generated/google/apis/firebase_v1beta1/classes.rb +41 -4
  132. data/generated/google/apis/firebase_v1beta1/representations.rb +2 -0
  133. data/generated/google/apis/firebase_v1beta1/service.rb +22 -14
  134. data/generated/google/apis/fitness_v1.rb +19 -19
  135. data/generated/google/apis/healthcare_v1beta1.rb +1 -1
  136. data/generated/google/apis/healthcare_v1beta1/classes.rb +136 -100
  137. data/generated/google/apis/healthcare_v1beta1/representations.rb +1 -1
  138. data/generated/google/apis/healthcare_v1beta1/service.rb +124 -119
  139. data/generated/google/apis/iam_v1.rb +1 -1
  140. data/generated/google/apis/iam_v1/classes.rb +87 -41
  141. data/generated/google/apis/iap_v1.rb +1 -1
  142. data/generated/google/apis/iap_v1/classes.rb +62 -29
  143. data/generated/google/apis/iap_v1beta1.rb +1 -1
  144. data/generated/google/apis/iap_v1beta1/classes.rb +62 -29
  145. data/generated/google/apis/ml_v1.rb +1 -1
  146. data/generated/google/apis/ml_v1/classes.rb +114 -49
  147. data/generated/google/apis/ml_v1/representations.rb +2 -0
  148. data/generated/google/apis/ml_v1/service.rb +12 -6
  149. data/generated/google/apis/monitoring_v3.rb +1 -1
  150. data/generated/google/apis/monitoring_v3/classes.rb +14 -10
  151. data/generated/google/apis/monitoring_v3/representations.rb +1 -0
  152. data/generated/google/apis/oslogin_v1.rb +1 -1
  153. data/generated/google/apis/oslogin_v1/classes.rb +12 -0
  154. data/generated/google/apis/oslogin_v1/representations.rb +2 -0
  155. data/generated/google/apis/oslogin_v1alpha.rb +1 -1
  156. data/generated/google/apis/oslogin_v1alpha/classes.rb +12 -0
  157. data/generated/google/apis/oslogin_v1alpha/representations.rb +2 -0
  158. data/generated/google/apis/oslogin_v1beta.rb +1 -1
  159. data/generated/google/apis/oslogin_v1beta/classes.rb +12 -0
  160. data/generated/google/apis/oslogin_v1beta/representations.rb +2 -0
  161. data/generated/google/apis/policytroubleshooter_v1beta.rb +34 -0
  162. data/generated/google/apis/policytroubleshooter_v1beta/classes.rb +621 -0
  163. data/generated/google/apis/policytroubleshooter_v1beta/representations.rb +203 -0
  164. data/generated/google/apis/policytroubleshooter_v1beta/service.rb +91 -0
  165. data/generated/google/apis/proximitybeacon_v1beta1.rb +1 -1
  166. data/generated/google/apis/proximitybeacon_v1beta1/classes.rb +7 -4
  167. data/generated/google/apis/proximitybeacon_v1beta1/service.rb +60 -58
  168. data/generated/google/apis/recommender_v1beta1.rb +34 -0
  169. data/generated/google/apis/recommender_v1beta1/classes.rb +502 -0
  170. data/generated/google/apis/recommender_v1beta1/representations.rb +232 -0
  171. data/generated/google/apis/recommender_v1beta1/service.rb +262 -0
  172. data/generated/google/apis/remotebuildexecution_v1.rb +1 -1
  173. data/generated/google/apis/remotebuildexecution_v1/classes.rb +49 -1100
  174. data/generated/google/apis/remotebuildexecution_v1/representations.rb +1 -276
  175. data/generated/google/apis/remotebuildexecution_v1/service.rb +0 -77
  176. data/generated/google/apis/remotebuildexecution_v1alpha.rb +1 -1
  177. data/generated/google/apis/remotebuildexecution_v1alpha/classes.rb +12 -990
  178. data/generated/google/apis/remotebuildexecution_v1alpha/representations.rb +1 -245
  179. data/generated/google/apis/remotebuildexecution_v2.rb +1 -1
  180. data/generated/google/apis/remotebuildexecution_v2/classes.rb +12 -990
  181. data/generated/google/apis/remotebuildexecution_v2/representations.rb +1 -245
  182. data/generated/google/apis/run_v1.rb +1 -1
  183. data/generated/google/apis/run_v1/classes.rb +3553 -33
  184. data/generated/google/apis/run_v1/representations.rb +1186 -4
  185. data/generated/google/apis/run_v1/service.rb +2509 -23
  186. data/generated/google/apis/run_v1alpha1.rb +1 -1
  187. data/generated/google/apis/run_v1alpha1/classes.rb +103 -140
  188. data/generated/google/apis/run_v1alpha1/representations.rb +5 -43
  189. data/generated/google/apis/run_v1beta1.rb +35 -0
  190. data/generated/google/apis/run_v1beta1/classes.rb +1209 -0
  191. data/generated/google/apis/run_v1beta1/representations.rb +421 -0
  192. data/generated/google/apis/run_v1beta1/service.rb +172 -0
  193. data/generated/google/apis/runtimeconfig_v1beta1.rb +1 -1
  194. data/generated/google/apis/runtimeconfig_v1beta1/classes.rb +62 -29
  195. data/generated/google/apis/safebrowsing_v4.rb +5 -2
  196. data/generated/google/apis/safebrowsing_v4/service.rb +4 -1
  197. data/generated/google/apis/securitycenter_v1.rb +1 -1
  198. data/generated/google/apis/securitycenter_v1/classes.rb +70 -35
  199. data/generated/google/apis/securitycenter_v1/service.rb +13 -12
  200. data/generated/google/apis/securitycenter_v1beta1.rb +1 -1
  201. data/generated/google/apis/securitycenter_v1beta1/classes.rb +71 -35
  202. data/generated/google/apis/securitycenter_v1beta1/service.rb +13 -12
  203. data/generated/google/apis/servicebroker_v1.rb +1 -1
  204. data/generated/google/apis/servicebroker_v1/classes.rb +62 -29
  205. data/generated/google/apis/servicebroker_v1alpha1.rb +1 -1
  206. data/generated/google/apis/servicebroker_v1alpha1/classes.rb +62 -29
  207. data/generated/google/apis/servicebroker_v1beta1.rb +1 -1
  208. data/generated/google/apis/servicebroker_v1beta1/classes.rb +62 -29
  209. data/generated/google/apis/serviceconsumermanagement_v1.rb +1 -1
  210. data/generated/google/apis/serviceconsumermanagement_v1/classes.rb +11 -2
  211. data/generated/google/apis/serviceconsumermanagement_v1/representations.rb +1 -0
  212. data/generated/google/apis/servicemanagement_v1.rb +1 -1
  213. data/generated/google/apis/servicemanagement_v1/classes.rb +63 -33
  214. data/generated/google/apis/servicenetworking_v1.rb +1 -1
  215. data/generated/google/apis/servicenetworking_v1/classes.rb +11 -2
  216. data/generated/google/apis/servicenetworking_v1/representations.rb +1 -0
  217. data/generated/google/apis/servicenetworking_v1beta.rb +1 -1
  218. data/generated/google/apis/servicenetworking_v1beta/classes.rb +11 -2
  219. data/generated/google/apis/servicenetworking_v1beta/representations.rb +1 -0
  220. data/generated/google/apis/serviceusage_v1.rb +1 -1
  221. data/generated/google/apis/serviceusage_v1/classes.rb +11 -2
  222. data/generated/google/apis/serviceusage_v1/representations.rb +1 -0
  223. data/generated/google/apis/serviceusage_v1beta1.rb +1 -1
  224. data/generated/google/apis/serviceusage_v1beta1/classes.rb +11 -2
  225. data/generated/google/apis/serviceusage_v1beta1/representations.rb +1 -0
  226. data/generated/google/apis/spanner_v1.rb +1 -1
  227. data/generated/google/apis/spanner_v1/classes.rb +78 -2
  228. data/generated/google/apis/spanner_v1/representations.rb +44 -0
  229. data/generated/google/apis/spanner_v1/service.rb +35 -0
  230. data/generated/google/apis/speech_v1.rb +1 -1
  231. data/generated/google/apis/speech_v1/classes.rb +73 -19
  232. data/generated/google/apis/speech_v1/representations.rb +18 -0
  233. data/generated/google/apis/speech_v1p1beta1.rb +1 -1
  234. data/generated/google/apis/speech_v1p1beta1/classes.rb +31 -35
  235. data/generated/google/apis/speech_v2beta.rb +1 -1
  236. data/generated/google/apis/speech_v2beta/classes.rb +6 -6
  237. data/generated/google/apis/speech_v2beta/representations.rb +2 -2
  238. data/generated/google/apis/storage_v1.rb +1 -1
  239. data/generated/google/apis/storage_v1/classes.rb +1 -1
  240. data/generated/google/apis/storage_v1/representations.rb +2 -1
  241. data/generated/google/apis/storage_v1beta1.rb +1 -1
  242. data/generated/google/apis/storage_v1beta2.rb +1 -1
  243. data/generated/google/apis/streetviewpublish_v1.rb +1 -1
  244. data/generated/google/apis/streetviewpublish_v1/classes.rb +1 -1
  245. data/generated/google/apis/streetviewpublish_v1/service.rb +9 -5
  246. data/generated/google/apis/testing_v1.rb +1 -1
  247. data/generated/google/apis/testing_v1/classes.rb +42 -0
  248. data/generated/google/apis/testing_v1/representations.rb +18 -0
  249. data/generated/google/apis/texttospeech_v1.rb +1 -1
  250. data/generated/google/apis/texttospeech_v1/classes.rb +6 -5
  251. data/generated/google/apis/texttospeech_v1/service.rb +1 -1
  252. data/generated/google/apis/texttospeech_v1beta1.rb +1 -1
  253. data/generated/google/apis/texttospeech_v1beta1/classes.rb +6 -5
  254. data/generated/google/apis/texttospeech_v1beta1/service.rb +1 -1
  255. data/generated/google/apis/toolresults_v1beta3.rb +1 -1
  256. data/generated/google/apis/toolresults_v1beta3/classes.rb +1 -1
  257. data/generated/google/apis/translate_v3beta1.rb +1 -1
  258. data/generated/google/apis/translate_v3beta1/classes.rb +22 -16
  259. data/generated/google/apis/translate_v3beta1/service.rb +31 -31
  260. data/generated/google/apis/videointelligence_v1.rb +1 -1
  261. data/generated/google/apis/videointelligence_v1/classes.rb +45 -10
  262. data/generated/google/apis/videointelligence_v1beta2.rb +1 -1
  263. data/generated/google/apis/videointelligence_v1beta2/classes.rb +45 -10
  264. data/generated/google/apis/videointelligence_v1p1beta1.rb +1 -1
  265. data/generated/google/apis/videointelligence_v1p1beta1/classes.rb +45 -10
  266. data/generated/google/apis/videointelligence_v1p2beta1.rb +1 -1
  267. data/generated/google/apis/videointelligence_v1p2beta1/classes.rb +45 -10
  268. data/generated/google/apis/videointelligence_v1p3beta1.rb +1 -1
  269. data/generated/google/apis/videointelligence_v1p3beta1/classes.rb +45 -10
  270. data/generated/google/apis/vision_v1.rb +1 -1
  271. data/generated/google/apis/vision_v1/classes.rb +6 -156
  272. data/generated/google/apis/vision_v1/representations.rb +0 -44
  273. data/generated/google/apis/vision_v1p1beta1.rb +1 -1
  274. data/generated/google/apis/vision_v1p1beta1/classes.rb +6 -156
  275. data/generated/google/apis/vision_v1p1beta1/representations.rb +0 -44
  276. data/generated/google/apis/vision_v1p2beta1.rb +1 -1
  277. data/generated/google/apis/vision_v1p2beta1/classes.rb +6 -156
  278. data/generated/google/apis/vision_v1p2beta1/representations.rb +0 -44
  279. data/generated/google/apis/websecurityscanner_v1.rb +1 -1
  280. data/generated/google/apis/websecurityscanner_v1alpha.rb +1 -1
  281. data/generated/google/apis/websecurityscanner_v1alpha/classes.rb +21 -31
  282. data/generated/google/apis/websecurityscanner_v1alpha/service.rb +1 -1
  283. data/generated/google/apis/websecurityscanner_v1beta.rb +1 -1
  284. data/generated/google/apis/websecurityscanner_v1beta/classes.rb +30 -42
  285. data/generated/google/apis/websecurityscanner_v1beta/service.rb +1 -1
  286. data/generated/google/apis/youtube_partner_v1.rb +1 -1
  287. data/generated/google/apis/youtube_partner_v1/classes.rb +0 -83
  288. data/generated/google/apis/youtube_partner_v1/representations.rb +0 -35
  289. data/generated/google/apis/youtube_partner_v1/service.rb +0 -100
  290. data/lib/google/apis/version.rb +1 -1
  291. metadata +18 -6
  292. data/generated/google/apis/dfareporting_v3_1.rb +0 -40
  293. data/generated/google/apis/dfareporting_v3_1/classes.rb +0 -11998
  294. data/generated/google/apis/dfareporting_v3_1/representations.rb +0 -4313
  295. data/generated/google/apis/dfareporting_v3_1/service.rb +0 -8688
@@ -0,0 +1,236 @@
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 BigqueryreservationV1beta1
24
+
25
+ class Assignment
26
+ class Representation < Google::Apis::Core::JsonRepresentation; end
27
+
28
+ include Google::Apis::Core::JsonObjectSupport
29
+ end
30
+
31
+ class CapacityCommitment
32
+ class Representation < Google::Apis::Core::JsonRepresentation; end
33
+
34
+ include Google::Apis::Core::JsonObjectSupport
35
+ end
36
+
37
+ class CreateCapacityCommitmentMetadata
38
+ class Representation < Google::Apis::Core::JsonRepresentation; end
39
+
40
+ include Google::Apis::Core::JsonObjectSupport
41
+ end
42
+
43
+ class Empty
44
+ class Representation < Google::Apis::Core::JsonRepresentation; end
45
+
46
+ include Google::Apis::Core::JsonObjectSupport
47
+ end
48
+
49
+ class ListAssignmentsResponse
50
+ class Representation < Google::Apis::Core::JsonRepresentation; end
51
+
52
+ include Google::Apis::Core::JsonObjectSupport
53
+ end
54
+
55
+ class ListCapacityCommitmentsResponse
56
+ class Representation < Google::Apis::Core::JsonRepresentation; end
57
+
58
+ include Google::Apis::Core::JsonObjectSupport
59
+ end
60
+
61
+ class ListLocationsResponse
62
+ class Representation < Google::Apis::Core::JsonRepresentation; end
63
+
64
+ include Google::Apis::Core::JsonObjectSupport
65
+ end
66
+
67
+ class ListReservationsResponse
68
+ class Representation < Google::Apis::Core::JsonRepresentation; end
69
+
70
+ include Google::Apis::Core::JsonObjectSupport
71
+ end
72
+
73
+ class Location
74
+ class Representation < Google::Apis::Core::JsonRepresentation; end
75
+
76
+ include Google::Apis::Core::JsonObjectSupport
77
+ end
78
+
79
+ class LocationMetadata
80
+ class Representation < Google::Apis::Core::JsonRepresentation; end
81
+
82
+ include Google::Apis::Core::JsonObjectSupport
83
+ end
84
+
85
+ class Operation
86
+ class Representation < Google::Apis::Core::JsonRepresentation; end
87
+
88
+ include Google::Apis::Core::JsonObjectSupport
89
+ end
90
+
91
+ class Reservation
92
+ class Representation < Google::Apis::Core::JsonRepresentation; end
93
+
94
+ include Google::Apis::Core::JsonObjectSupport
95
+ end
96
+
97
+ class SearchAssignmentsResponse
98
+ class Representation < Google::Apis::Core::JsonRepresentation; end
99
+
100
+ include Google::Apis::Core::JsonObjectSupport
101
+ end
102
+
103
+ class Status
104
+ class Representation < Google::Apis::Core::JsonRepresentation; end
105
+
106
+ include Google::Apis::Core::JsonObjectSupport
107
+ end
108
+
109
+ class Assignment
110
+ # @private
111
+ class Representation < Google::Apis::Core::JsonRepresentation
112
+ property :assignee, as: 'assignee'
113
+ property :job_type, as: 'jobType'
114
+ property :name, as: 'name'
115
+ end
116
+ end
117
+
118
+ class CapacityCommitment
119
+ # @private
120
+ class Representation < Google::Apis::Core::JsonRepresentation
121
+ property :commitment_end_time, as: 'commitmentEndTime'
122
+ property :name, as: 'name'
123
+ property :plan, as: 'plan'
124
+ property :slot_count, :numeric_string => true, as: 'slotCount'
125
+ property :state, as: 'state'
126
+ end
127
+ end
128
+
129
+ class CreateCapacityCommitmentMetadata
130
+ # @private
131
+ class Representation < Google::Apis::Core::JsonRepresentation
132
+ property :capacity_commitment, as: 'capacityCommitment'
133
+ end
134
+ end
135
+
136
+ class Empty
137
+ # @private
138
+ class Representation < Google::Apis::Core::JsonRepresentation
139
+ end
140
+ end
141
+
142
+ class ListAssignmentsResponse
143
+ # @private
144
+ class Representation < Google::Apis::Core::JsonRepresentation
145
+ collection :assignments, as: 'assignments', class: Google::Apis::BigqueryreservationV1beta1::Assignment, decorator: Google::Apis::BigqueryreservationV1beta1::Assignment::Representation
146
+
147
+ property :next_page_token, as: 'nextPageToken'
148
+ end
149
+ end
150
+
151
+ class ListCapacityCommitmentsResponse
152
+ # @private
153
+ class Representation < Google::Apis::Core::JsonRepresentation
154
+ collection :capacity_commitments, as: 'capacityCommitments', class: Google::Apis::BigqueryreservationV1beta1::CapacityCommitment, decorator: Google::Apis::BigqueryreservationV1beta1::CapacityCommitment::Representation
155
+
156
+ property :next_page_token, as: 'nextPageToken'
157
+ end
158
+ end
159
+
160
+ class ListLocationsResponse
161
+ # @private
162
+ class Representation < Google::Apis::Core::JsonRepresentation
163
+ collection :locations, as: 'locations', class: Google::Apis::BigqueryreservationV1beta1::Location, decorator: Google::Apis::BigqueryreservationV1beta1::Location::Representation
164
+
165
+ property :next_page_token, as: 'nextPageToken'
166
+ end
167
+ end
168
+
169
+ class ListReservationsResponse
170
+ # @private
171
+ class Representation < Google::Apis::Core::JsonRepresentation
172
+ property :next_page_token, as: 'nextPageToken'
173
+ collection :reservations, as: 'reservations', class: Google::Apis::BigqueryreservationV1beta1::Reservation, decorator: Google::Apis::BigqueryreservationV1beta1::Reservation::Representation
174
+
175
+ end
176
+ end
177
+
178
+ class Location
179
+ # @private
180
+ class Representation < Google::Apis::Core::JsonRepresentation
181
+ property :display_name, as: 'displayName'
182
+ hash :labels, as: 'labels'
183
+ property :location_id, as: 'locationId'
184
+ hash :metadata, as: 'metadata'
185
+ property :name, as: 'name'
186
+ end
187
+ end
188
+
189
+ class LocationMetadata
190
+ # @private
191
+ class Representation < Google::Apis::Core::JsonRepresentation
192
+ property :legacy_location_id, as: 'legacyLocationId'
193
+ end
194
+ end
195
+
196
+ class Operation
197
+ # @private
198
+ class Representation < Google::Apis::Core::JsonRepresentation
199
+ property :done, as: 'done'
200
+ property :error, as: 'error', class: Google::Apis::BigqueryreservationV1beta1::Status, decorator: Google::Apis::BigqueryreservationV1beta1::Status::Representation
201
+
202
+ hash :metadata, as: 'metadata'
203
+ property :name, as: 'name'
204
+ hash :response, as: 'response'
205
+ end
206
+ end
207
+
208
+ class Reservation
209
+ # @private
210
+ class Representation < Google::Apis::Core::JsonRepresentation
211
+ property :ignore_idle_slots, as: 'ignoreIdleSlots'
212
+ property :name, as: 'name'
213
+ property :slot_capacity, :numeric_string => true, as: 'slotCapacity'
214
+ end
215
+ end
216
+
217
+ class SearchAssignmentsResponse
218
+ # @private
219
+ class Representation < Google::Apis::Core::JsonRepresentation
220
+ collection :assignments, as: 'assignments', class: Google::Apis::BigqueryreservationV1beta1::Assignment, decorator: Google::Apis::BigqueryreservationV1beta1::Assignment::Representation
221
+
222
+ property :next_page_token, as: 'nextPageToken'
223
+ end
224
+ end
225
+
226
+ class Status
227
+ # @private
228
+ class Representation < Google::Apis::Core::JsonRepresentation
229
+ property :code, as: 'code'
230
+ collection :details, as: 'details'
231
+ property :message, as: 'message'
232
+ end
233
+ end
234
+ end
235
+ end
236
+ end
@@ -0,0 +1,713 @@
1
+ # Copyright 2015 Google Inc.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'google/apis/core/base_service'
16
+ require 'google/apis/core/json_representation'
17
+ require 'google/apis/core/hashable'
18
+ require 'google/apis/errors'
19
+
20
+ module Google
21
+ module Apis
22
+ module BigqueryreservationV1beta1
23
+ # BigQuery Reservation API
24
+ #
25
+ # A service to modify your BigQuery flat-rate reservations.
26
+ #
27
+ # @example
28
+ # require 'google/apis/bigqueryreservation_v1beta1'
29
+ #
30
+ # Bigqueryreservation = Google::Apis::BigqueryreservationV1beta1 # Alias the module
31
+ # service = Bigqueryreservation::BigQueryReservationService.new
32
+ #
33
+ # @see https://cloud.google.com/bigquery/
34
+ class BigQueryReservationService < Google::Apis::Core::BaseService
35
+ # @return [String]
36
+ # API key. Your API key identifies your project and provides you with API access,
37
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
38
+ attr_accessor :key
39
+
40
+ # @return [String]
41
+ # Available to use for quota purposes for server-side applications. Can be any
42
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
43
+ attr_accessor :quota_user
44
+
45
+ def initialize
46
+ super('https://bigqueryreservation.googleapis.com/', '')
47
+ @batch_path = 'batch'
48
+ end
49
+
50
+ # Gets information about a location.
51
+ # @param [String] name
52
+ # Resource name for the location.
53
+ # @param [String] fields
54
+ # Selector specifying which fields to include in a partial response.
55
+ # @param [String] quota_user
56
+ # Available to use for quota purposes for server-side applications. Can be any
57
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
58
+ # @param [Google::Apis::RequestOptions] options
59
+ # Request-specific options
60
+ #
61
+ # @yield [result, err] Result & error if block supplied
62
+ # @yieldparam result [Google::Apis::BigqueryreservationV1beta1::Location] parsed result object
63
+ # @yieldparam err [StandardError] error object if request failed
64
+ #
65
+ # @return [Google::Apis::BigqueryreservationV1beta1::Location]
66
+ #
67
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
68
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
69
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
70
+ def get_project_location(name, fields: nil, quota_user: nil, options: nil, &block)
71
+ command = make_simple_command(:get, 'v1beta1/{+name}', options)
72
+ command.response_representation = Google::Apis::BigqueryreservationV1beta1::Location::Representation
73
+ command.response_class = Google::Apis::BigqueryreservationV1beta1::Location
74
+ command.params['name'] = name unless name.nil?
75
+ command.query['fields'] = fields unless fields.nil?
76
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
77
+ execute_or_queue_command(command, &block)
78
+ end
79
+
80
+ # Lists information about the supported locations for this service.
81
+ # @param [String] name
82
+ # The resource that owns the locations collection, if applicable.
83
+ # @param [String] filter
84
+ # The standard list filter.
85
+ # @param [Fixnum] page_size
86
+ # The standard list page size.
87
+ # @param [String] page_token
88
+ # The standard list page token.
89
+ # @param [String] fields
90
+ # Selector specifying which fields to include in a partial response.
91
+ # @param [String] quota_user
92
+ # Available to use for quota purposes for server-side applications. Can be any
93
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
94
+ # @param [Google::Apis::RequestOptions] options
95
+ # Request-specific options
96
+ #
97
+ # @yield [result, err] Result & error if block supplied
98
+ # @yieldparam result [Google::Apis::BigqueryreservationV1beta1::ListLocationsResponse] parsed result object
99
+ # @yieldparam err [StandardError] error object if request failed
100
+ #
101
+ # @return [Google::Apis::BigqueryreservationV1beta1::ListLocationsResponse]
102
+ #
103
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
104
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
105
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
106
+ def list_project_locations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
107
+ command = make_simple_command(:get, 'v1beta1/{+name}/locations', options)
108
+ command.response_representation = Google::Apis::BigqueryreservationV1beta1::ListLocationsResponse::Representation
109
+ command.response_class = Google::Apis::BigqueryreservationV1beta1::ListLocationsResponse
110
+ command.params['name'] = name unless name.nil?
111
+ command.query['filter'] = filter unless filter.nil?
112
+ command.query['pageSize'] = page_size unless page_size.nil?
113
+ command.query['pageToken'] = page_token unless page_token.nil?
114
+ command.query['fields'] = fields unless fields.nil?
115
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
116
+ execute_or_queue_command(command, &block)
117
+ end
118
+
119
+ # Looks up assignments for a specified resource for a particular region.
120
+ # If the request is about a project:
121
+ # 1) Assignments created on the project will be returned if they exist.
122
+ # 2) Otherwise assignments created on the closest ancestor will be
123
+ # returned. 3) Assignments for different JobTypes will all be returned.
124
+ # Same logic applies if the request is about a folder.
125
+ # If the request is about an organization, then assignments created on the
126
+ # organization will be returned (organization doesn't have ancestors).
127
+ # Comparing to ListAssignments, there are some behavior
128
+ # differences:
129
+ # 1) permission on the assignee will be verified in this API.
130
+ # 2) Hierarchy lookup (project->folder->organization) happens in this API.
131
+ # 3) Parent here is projects/*/locations/*, instead of
132
+ # projects/*/locations/*reservations/*.
133
+ # Wildcard "-" can be used for projects in
134
+ # SearchAssignmentsRequest.parent. Note "-" cannot be used for projects
135
+ # nor locations.
136
+ # @param [String] parent
137
+ # The resource name of the admin project(containing project and location),
138
+ # e.g.:
139
+ # "projects/myproject/locations/US".
140
+ # @param [Fixnum] page_size
141
+ # The maximum number of items to return.
142
+ # @param [String] page_token
143
+ # The next_page_token value returned from a previous List request, if any.
144
+ # @param [String] query
145
+ # Please specify resource name as assignee in the query.
146
+ # e.g., "assignee=projects/myproject"
147
+ # "assignee=folders/123"
148
+ # "assignee=organizations/456"
149
+ # @param [String] fields
150
+ # Selector specifying which fields to include in a partial response.
151
+ # @param [String] quota_user
152
+ # Available to use for quota purposes for server-side applications. Can be any
153
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
154
+ # @param [Google::Apis::RequestOptions] options
155
+ # Request-specific options
156
+ #
157
+ # @yield [result, err] Result & error if block supplied
158
+ # @yieldparam result [Google::Apis::BigqueryreservationV1beta1::SearchAssignmentsResponse] parsed result object
159
+ # @yieldparam err [StandardError] error object if request failed
160
+ #
161
+ # @return [Google::Apis::BigqueryreservationV1beta1::SearchAssignmentsResponse]
162
+ #
163
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
164
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
165
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
166
+ def search_project_location_assignments(parent, page_size: nil, page_token: nil, query: nil, fields: nil, quota_user: nil, options: nil, &block)
167
+ command = make_simple_command(:get, 'v1beta1/{+parent}:searchAssignments', options)
168
+ command.response_representation = Google::Apis::BigqueryreservationV1beta1::SearchAssignmentsResponse::Representation
169
+ command.response_class = Google::Apis::BigqueryreservationV1beta1::SearchAssignmentsResponse
170
+ command.params['parent'] = parent unless parent.nil?
171
+ command.query['pageSize'] = page_size unless page_size.nil?
172
+ command.query['pageToken'] = page_token unless page_token.nil?
173
+ command.query['query'] = query unless query.nil?
174
+ command.query['fields'] = fields unless fields.nil?
175
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
176
+ execute_or_queue_command(command, &block)
177
+ end
178
+
179
+ # Deletes a capacity commitment. Attempting to delete capacity commitment
180
+ # before its commitment_end_time will fail with the error code
181
+ # `google.rpc.Code.FAILED_PRECONDITION`.
182
+ # @param [String] name
183
+ # Resource name of the capacity commitment to delete. E.g.,
184
+ # projects/myproject/locations/US/capacityCommitments/123
185
+ # @param [String] fields
186
+ # Selector specifying which fields to include in a partial response.
187
+ # @param [String] quota_user
188
+ # Available to use for quota purposes for server-side applications. Can be any
189
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
190
+ # @param [Google::Apis::RequestOptions] options
191
+ # Request-specific options
192
+ #
193
+ # @yield [result, err] Result & error if block supplied
194
+ # @yieldparam result [Google::Apis::BigqueryreservationV1beta1::Empty] parsed result object
195
+ # @yieldparam err [StandardError] error object if request failed
196
+ #
197
+ # @return [Google::Apis::BigqueryreservationV1beta1::Empty]
198
+ #
199
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
200
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
201
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
202
+ def delete_project_location_capacity_commitment(name, fields: nil, quota_user: nil, options: nil, &block)
203
+ command = make_simple_command(:delete, 'v1beta1/{+name}', options)
204
+ command.response_representation = Google::Apis::BigqueryreservationV1beta1::Empty::Representation
205
+ command.response_class = Google::Apis::BigqueryreservationV1beta1::Empty
206
+ command.params['name'] = name unless name.nil?
207
+ command.query['fields'] = fields unless fields.nil?
208
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
209
+ execute_or_queue_command(command, &block)
210
+ end
211
+
212
+ # Returns information about the capacity commitment.
213
+ # @param [String] name
214
+ # Resource name of the capacity commitment to retrieve. E.g.,
215
+ # projects/myproject/locations/US/capacityCommitments/123
216
+ # @param [String] fields
217
+ # Selector specifying which fields to include in a partial response.
218
+ # @param [String] quota_user
219
+ # Available to use for quota purposes for server-side applications. Can be any
220
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
221
+ # @param [Google::Apis::RequestOptions] options
222
+ # Request-specific options
223
+ #
224
+ # @yield [result, err] Result & error if block supplied
225
+ # @yieldparam result [Google::Apis::BigqueryreservationV1beta1::CapacityCommitment] parsed result object
226
+ # @yieldparam err [StandardError] error object if request failed
227
+ #
228
+ # @return [Google::Apis::BigqueryreservationV1beta1::CapacityCommitment]
229
+ #
230
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
231
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
232
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
233
+ def get_project_location_capacity_commitment(name, fields: nil, quota_user: nil, options: nil, &block)
234
+ command = make_simple_command(:get, 'v1beta1/{+name}', options)
235
+ command.response_representation = Google::Apis::BigqueryreservationV1beta1::CapacityCommitment::Representation
236
+ command.response_class = Google::Apis::BigqueryreservationV1beta1::CapacityCommitment
237
+ command.params['name'] = name unless name.nil?
238
+ command.query['fields'] = fields unless fields.nil?
239
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
240
+ execute_or_queue_command(command, &block)
241
+ end
242
+
243
+ # Lists all the capacity commitments for the admin project.
244
+ # @param [String] parent
245
+ # Resource name of the parent reservation. E.g.,
246
+ # projects/myproject/locations/US
247
+ # @param [Fixnum] page_size
248
+ # The maximum number of items to return.
249
+ # @param [String] page_token
250
+ # The next_page_token value returned from a previous List request, if any.
251
+ # @param [String] fields
252
+ # Selector specifying which fields to include in a partial response.
253
+ # @param [String] quota_user
254
+ # Available to use for quota purposes for server-side applications. Can be any
255
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
256
+ # @param [Google::Apis::RequestOptions] options
257
+ # Request-specific options
258
+ #
259
+ # @yield [result, err] Result & error if block supplied
260
+ # @yieldparam result [Google::Apis::BigqueryreservationV1beta1::ListCapacityCommitmentsResponse] parsed result object
261
+ # @yieldparam err [StandardError] error object if request failed
262
+ #
263
+ # @return [Google::Apis::BigqueryreservationV1beta1::ListCapacityCommitmentsResponse]
264
+ #
265
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
266
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
267
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
268
+ def list_project_location_capacity_commitments(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
269
+ command = make_simple_command(:get, 'v1beta1/{+parent}/capacityCommitments', options)
270
+ command.response_representation = Google::Apis::BigqueryreservationV1beta1::ListCapacityCommitmentsResponse::Representation
271
+ command.response_class = Google::Apis::BigqueryreservationV1beta1::ListCapacityCommitmentsResponse
272
+ command.params['parent'] = parent unless parent.nil?
273
+ command.query['pageSize'] = page_size unless page_size.nil?
274
+ command.query['pageToken'] = page_token unless page_token.nil?
275
+ command.query['fields'] = fields unless fields.nil?
276
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
277
+ execute_or_queue_command(command, &block)
278
+ end
279
+
280
+ # Starts asynchronous cancellation on a long-running operation. The server
281
+ # makes a best effort to cancel the operation, but success is not
282
+ # guaranteed. If the server doesn't support this method, it returns
283
+ # `google.rpc.Code.UNIMPLEMENTED`. Clients can use
284
+ # Operations.GetOperation or
285
+ # other methods to check whether the cancellation succeeded or whether the
286
+ # operation completed despite cancellation. On successful cancellation,
287
+ # the operation is not deleted; instead, it becomes an operation with
288
+ # an Operation.error value with a google.rpc.Status.code of 1,
289
+ # corresponding to `Code.CANCELLED`.
290
+ # @param [String] name
291
+ # The name of the operation resource to be cancelled.
292
+ # @param [String] fields
293
+ # Selector specifying which fields to include in a partial response.
294
+ # @param [String] quota_user
295
+ # Available to use for quota purposes for server-side applications. Can be any
296
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
297
+ # @param [Google::Apis::RequestOptions] options
298
+ # Request-specific options
299
+ #
300
+ # @yield [result, err] Result & error if block supplied
301
+ # @yieldparam result [Google::Apis::BigqueryreservationV1beta1::Empty] parsed result object
302
+ # @yieldparam err [StandardError] error object if request failed
303
+ #
304
+ # @return [Google::Apis::BigqueryreservationV1beta1::Empty]
305
+ #
306
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
307
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
308
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
309
+ def cancel_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
310
+ command = make_simple_command(:post, 'v1beta1/{+name}:cancel', options)
311
+ command.response_representation = Google::Apis::BigqueryreservationV1beta1::Empty::Representation
312
+ command.response_class = Google::Apis::BigqueryreservationV1beta1::Empty
313
+ command.params['name'] = name unless name.nil?
314
+ command.query['fields'] = fields unless fields.nil?
315
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
316
+ execute_or_queue_command(command, &block)
317
+ end
318
+
319
+ # Gets the latest state of a long-running operation. Clients can use this
320
+ # method to poll the operation result at intervals as recommended by the API
321
+ # service.
322
+ # @param [String] name
323
+ # The name of the operation resource.
324
+ # @param [String] fields
325
+ # Selector specifying which fields to include in a partial response.
326
+ # @param [String] quota_user
327
+ # Available to use for quota purposes for server-side applications. Can be any
328
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
329
+ # @param [Google::Apis::RequestOptions] options
330
+ # Request-specific options
331
+ #
332
+ # @yield [result, err] Result & error if block supplied
333
+ # @yieldparam result [Google::Apis::BigqueryreservationV1beta1::Operation] parsed result object
334
+ # @yieldparam err [StandardError] error object if request failed
335
+ #
336
+ # @return [Google::Apis::BigqueryreservationV1beta1::Operation]
337
+ #
338
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
339
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
340
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
341
+ def get_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
342
+ command = make_simple_command(:get, 'v1beta1/{+name}', options)
343
+ command.response_representation = Google::Apis::BigqueryreservationV1beta1::Operation::Representation
344
+ command.response_class = Google::Apis::BigqueryreservationV1beta1::Operation
345
+ command.params['name'] = name unless name.nil?
346
+ command.query['fields'] = fields unless fields.nil?
347
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
348
+ execute_or_queue_command(command, &block)
349
+ end
350
+
351
+ # Creates a new reservation resource.
352
+ # @param [String] parent
353
+ # Project, location. E.g.,
354
+ # projects/myproject/locations/US
355
+ # @param [Google::Apis::BigqueryreservationV1beta1::Reservation] reservation_object
356
+ # @param [String] reservation_id
357
+ # The reservation ID. This field must only contain alphanumeric characters or
358
+ # dash.
359
+ # @param [String] fields
360
+ # Selector specifying which fields to include in a partial response.
361
+ # @param [String] quota_user
362
+ # Available to use for quota purposes for server-side applications. Can be any
363
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
364
+ # @param [Google::Apis::RequestOptions] options
365
+ # Request-specific options
366
+ #
367
+ # @yield [result, err] Result & error if block supplied
368
+ # @yieldparam result [Google::Apis::BigqueryreservationV1beta1::Reservation] parsed result object
369
+ # @yieldparam err [StandardError] error object if request failed
370
+ #
371
+ # @return [Google::Apis::BigqueryreservationV1beta1::Reservation]
372
+ #
373
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
374
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
375
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
376
+ def create_project_location_reservation(parent, reservation_object = nil, reservation_id: nil, fields: nil, quota_user: nil, options: nil, &block)
377
+ command = make_simple_command(:post, 'v1beta1/{+parent}/reservations', options)
378
+ command.request_representation = Google::Apis::BigqueryreservationV1beta1::Reservation::Representation
379
+ command.request_object = reservation_object
380
+ command.response_representation = Google::Apis::BigqueryreservationV1beta1::Reservation::Representation
381
+ command.response_class = Google::Apis::BigqueryreservationV1beta1::Reservation
382
+ command.params['parent'] = parent unless parent.nil?
383
+ command.query['reservationId'] = reservation_id unless reservation_id.nil?
384
+ command.query['fields'] = fields unless fields.nil?
385
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
386
+ execute_or_queue_command(command, &block)
387
+ end
388
+
389
+ # Deletes a reservation.
390
+ # Returns `google.rpc.Code.FAILED_PRECONDITION` when reservation has
391
+ # assignments. This check can be bypassed by
392
+ # setting DeleteReservationRequest.force flag to true.
393
+ # @param [String] name
394
+ # Resource name of the reservation to retrieve. E.g.,
395
+ # projects/myproject/locations/US/reservations/team1-prod
396
+ # @param [String] fields
397
+ # Selector specifying which fields to include in a partial response.
398
+ # @param [String] quota_user
399
+ # Available to use for quota purposes for server-side applications. Can be any
400
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
401
+ # @param [Google::Apis::RequestOptions] options
402
+ # Request-specific options
403
+ #
404
+ # @yield [result, err] Result & error if block supplied
405
+ # @yieldparam result [Google::Apis::BigqueryreservationV1beta1::Empty] parsed result object
406
+ # @yieldparam err [StandardError] error object if request failed
407
+ #
408
+ # @return [Google::Apis::BigqueryreservationV1beta1::Empty]
409
+ #
410
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
411
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
412
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
413
+ def delete_project_location_reservation(name, fields: nil, quota_user: nil, options: nil, &block)
414
+ command = make_simple_command(:delete, 'v1beta1/{+name}', options)
415
+ command.response_representation = Google::Apis::BigqueryreservationV1beta1::Empty::Representation
416
+ command.response_class = Google::Apis::BigqueryreservationV1beta1::Empty
417
+ command.params['name'] = name unless name.nil?
418
+ command.query['fields'] = fields unless fields.nil?
419
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
420
+ execute_or_queue_command(command, &block)
421
+ end
422
+
423
+ # Returns information about the reservation.
424
+ # @param [String] name
425
+ # Resource name of the reservation to retrieve. E.g.,
426
+ # projects/myproject/locations/US/reservations/team1-prod
427
+ # @param [String] fields
428
+ # Selector specifying which fields to include in a partial response.
429
+ # @param [String] quota_user
430
+ # Available to use for quota purposes for server-side applications. Can be any
431
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
432
+ # @param [Google::Apis::RequestOptions] options
433
+ # Request-specific options
434
+ #
435
+ # @yield [result, err] Result & error if block supplied
436
+ # @yieldparam result [Google::Apis::BigqueryreservationV1beta1::Reservation] parsed result object
437
+ # @yieldparam err [StandardError] error object if request failed
438
+ #
439
+ # @return [Google::Apis::BigqueryreservationV1beta1::Reservation]
440
+ #
441
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
442
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
443
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
444
+ def get_project_location_reservation(name, fields: nil, quota_user: nil, options: nil, &block)
445
+ command = make_simple_command(:get, 'v1beta1/{+name}', options)
446
+ command.response_representation = Google::Apis::BigqueryreservationV1beta1::Reservation::Representation
447
+ command.response_class = Google::Apis::BigqueryreservationV1beta1::Reservation
448
+ command.params['name'] = name unless name.nil?
449
+ command.query['fields'] = fields unless fields.nil?
450
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
451
+ execute_or_queue_command(command, &block)
452
+ end
453
+
454
+ # Lists all the reservations for the project in the specified location.
455
+ # @param [String] parent
456
+ # The parent resource name containing project and location, e.g.:
457
+ # "projects/myproject/locations/US"
458
+ # @param [String] filter
459
+ # Can be used to filter out reservations based on names, capacity, etc, e.g.:
460
+ # filter="reservation.slot_capacity > 200"
461
+ # filter="reservation.name = \"*dev/*\""
462
+ # Advanced filtering syntax can be
463
+ # [here](https://cloud.google.com/logging/docs/view/advanced-filters).
464
+ # @param [Fixnum] page_size
465
+ # The maximum number of items to return.
466
+ # @param [String] page_token
467
+ # The next_page_token value returned from a previous List request, if any.
468
+ # @param [String] fields
469
+ # Selector specifying which fields to include in a partial response.
470
+ # @param [String] quota_user
471
+ # Available to use for quota purposes for server-side applications. Can be any
472
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
473
+ # @param [Google::Apis::RequestOptions] options
474
+ # Request-specific options
475
+ #
476
+ # @yield [result, err] Result & error if block supplied
477
+ # @yieldparam result [Google::Apis::BigqueryreservationV1beta1::ListReservationsResponse] parsed result object
478
+ # @yieldparam err [StandardError] error object if request failed
479
+ #
480
+ # @return [Google::Apis::BigqueryreservationV1beta1::ListReservationsResponse]
481
+ #
482
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
483
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
484
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
485
+ def list_project_location_reservations(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
486
+ command = make_simple_command(:get, 'v1beta1/{+parent}/reservations', options)
487
+ command.response_representation = Google::Apis::BigqueryreservationV1beta1::ListReservationsResponse::Representation
488
+ command.response_class = Google::Apis::BigqueryreservationV1beta1::ListReservationsResponse
489
+ command.params['parent'] = parent unless parent.nil?
490
+ command.query['filter'] = filter unless filter.nil?
491
+ command.query['pageSize'] = page_size unless page_size.nil?
492
+ command.query['pageToken'] = page_token unless page_token.nil?
493
+ command.query['fields'] = fields unless fields.nil?
494
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
495
+ execute_or_queue_command(command, &block)
496
+ end
497
+
498
+ # Updates an existing reservation resource.
499
+ # @param [String] name
500
+ # The resource name of the reservation, e.g.,
501
+ # "projects/*/locations/*/reservations/team1-prod".
502
+ # @param [Google::Apis::BigqueryreservationV1beta1::Reservation] reservation_object
503
+ # @param [String] update_mask
504
+ # Standard field mask for the set of fields to be updated.
505
+ # @param [String] fields
506
+ # Selector specifying which fields to include in a partial response.
507
+ # @param [String] quota_user
508
+ # Available to use for quota purposes for server-side applications. Can be any
509
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
510
+ # @param [Google::Apis::RequestOptions] options
511
+ # Request-specific options
512
+ #
513
+ # @yield [result, err] Result & error if block supplied
514
+ # @yieldparam result [Google::Apis::BigqueryreservationV1beta1::Reservation] parsed result object
515
+ # @yieldparam err [StandardError] error object if request failed
516
+ #
517
+ # @return [Google::Apis::BigqueryreservationV1beta1::Reservation]
518
+ #
519
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
520
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
521
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
522
+ def patch_project_location_reservation(name, reservation_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
523
+ command = make_simple_command(:patch, 'v1beta1/{+name}', options)
524
+ command.request_representation = Google::Apis::BigqueryreservationV1beta1::Reservation::Representation
525
+ command.request_object = reservation_object
526
+ command.response_representation = Google::Apis::BigqueryreservationV1beta1::Reservation::Representation
527
+ command.response_class = Google::Apis::BigqueryreservationV1beta1::Reservation
528
+ command.params['name'] = name unless name.nil?
529
+ command.query['updateMask'] = update_mask unless update_mask.nil?
530
+ command.query['fields'] = fields unless fields.nil?
531
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
532
+ execute_or_queue_command(command, &block)
533
+ end
534
+
535
+ # Returns `google.rpc.Code.PERMISSION_DENIED` if user does not have
536
+ # 'bigquery.admin' permissions on the project using the reservation
537
+ # and the project that owns this reservation.
538
+ # Returns `google.rpc.Code.INVALID_ARGUMENT` when location of the assignment
539
+ # does not match location of the reservation.
540
+ # @param [String] parent
541
+ # The parent resource name of the assignment
542
+ # E.g.: projects/myproject/location/US/reservations/team1-prod
543
+ # @param [Google::Apis::BigqueryreservationV1beta1::Assignment] assignment_object
544
+ # @param [String] fields
545
+ # Selector specifying which fields to include in a partial response.
546
+ # @param [String] quota_user
547
+ # Available to use for quota purposes for server-side applications. Can be any
548
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
549
+ # @param [Google::Apis::RequestOptions] options
550
+ # Request-specific options
551
+ #
552
+ # @yield [result, err] Result & error if block supplied
553
+ # @yieldparam result [Google::Apis::BigqueryreservationV1beta1::Assignment] parsed result object
554
+ # @yieldparam err [StandardError] error object if request failed
555
+ #
556
+ # @return [Google::Apis::BigqueryreservationV1beta1::Assignment]
557
+ #
558
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
559
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
560
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
561
+ def create_project_location_reservation_assignment(parent, assignment_object = nil, fields: nil, quota_user: nil, options: nil, &block)
562
+ command = make_simple_command(:post, 'v1beta1/{+parent}/assignments', options)
563
+ command.request_representation = Google::Apis::BigqueryreservationV1beta1::Assignment::Representation
564
+ command.request_object = assignment_object
565
+ command.response_representation = Google::Apis::BigqueryreservationV1beta1::Assignment::Representation
566
+ command.response_class = Google::Apis::BigqueryreservationV1beta1::Assignment
567
+ command.params['parent'] = parent unless parent.nil?
568
+ command.query['fields'] = fields unless fields.nil?
569
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
570
+ execute_or_queue_command(command, &block)
571
+ end
572
+
573
+ # Deletes a assignment. No expansion will happen.
574
+ # E.g:
575
+ # organizationA contains project1 and project2. Reservation res1 exists.
576
+ # CreateAssignment was invoked previously and following assignments were
577
+ # created explicitly:
578
+ # <organizationA, res1>
579
+ # <project1, res1>
580
+ # Then deletion of <organizationA, res1> won't affect <project1, res1>. After
581
+ # deletion of <organizationA, res1>, queries from project1 will still use
582
+ # res1, while queries from project2 will use on-demand mode.
583
+ # @param [String] name
584
+ # Name of the resource, e.g.:
585
+ # projects/myproject/locations/US/reservations/team1-prod/assignments/123
586
+ # @param [String] fields
587
+ # Selector specifying which fields to include in a partial response.
588
+ # @param [String] quota_user
589
+ # Available to use for quota purposes for server-side applications. Can be any
590
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
591
+ # @param [Google::Apis::RequestOptions] options
592
+ # Request-specific options
593
+ #
594
+ # @yield [result, err] Result & error if block supplied
595
+ # @yieldparam result [Google::Apis::BigqueryreservationV1beta1::Empty] parsed result object
596
+ # @yieldparam err [StandardError] error object if request failed
597
+ #
598
+ # @return [Google::Apis::BigqueryreservationV1beta1::Empty]
599
+ #
600
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
601
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
602
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
603
+ def delete_project_location_reservation_assignment(name, fields: nil, quota_user: nil, options: nil, &block)
604
+ command = make_simple_command(:delete, 'v1beta1/{+name}', options)
605
+ command.response_representation = Google::Apis::BigqueryreservationV1beta1::Empty::Representation
606
+ command.response_class = Google::Apis::BigqueryreservationV1beta1::Empty
607
+ command.params['name'] = name unless name.nil?
608
+ command.query['fields'] = fields unless fields.nil?
609
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
610
+ execute_or_queue_command(command, &block)
611
+ end
612
+
613
+ # Lists assignments.
614
+ # Only explicitly created assignments will be returned. E.g:
615
+ # organizationA contains project1 and project2. Reservation res1 exists.
616
+ # CreateAssignment was invoked previously and following assignments were
617
+ # created explicitly:
618
+ # <organizationA, res1>
619
+ # <project1, res1>
620
+ # Then this API will just return the above two assignments for reservation
621
+ # res1, and no expansion/merge will happen. Wildcard "-" can be used for
622
+ # reservations in the request. In that case all assignments belongs to the
623
+ # specified project and location will be listed. Note
624
+ # "-" cannot be used for projects nor locations.
625
+ # @param [String] parent
626
+ # The parent resource name e.g.:
627
+ # projects/myproject/location/US/reservations/team1-prod
628
+ # Or:
629
+ # projects/myproject/location/US/reservations/-
630
+ # @param [Fixnum] page_size
631
+ # The maximum number of items to return.
632
+ # @param [String] page_token
633
+ # The next_page_token value returned from a previous List request, if any.
634
+ # @param [String] fields
635
+ # Selector specifying which fields to include in a partial response.
636
+ # @param [String] quota_user
637
+ # Available to use for quota purposes for server-side applications. Can be any
638
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
639
+ # @param [Google::Apis::RequestOptions] options
640
+ # Request-specific options
641
+ #
642
+ # @yield [result, err] Result & error if block supplied
643
+ # @yieldparam result [Google::Apis::BigqueryreservationV1beta1::ListAssignmentsResponse] parsed result object
644
+ # @yieldparam err [StandardError] error object if request failed
645
+ #
646
+ # @return [Google::Apis::BigqueryreservationV1beta1::ListAssignmentsResponse]
647
+ #
648
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
649
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
650
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
651
+ def list_project_location_reservation_assignments(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
652
+ command = make_simple_command(:get, 'v1beta1/{+parent}/assignments', options)
653
+ command.response_representation = Google::Apis::BigqueryreservationV1beta1::ListAssignmentsResponse::Representation
654
+ command.response_class = Google::Apis::BigqueryreservationV1beta1::ListAssignmentsResponse
655
+ command.params['parent'] = parent unless parent.nil?
656
+ command.query['pageSize'] = page_size unless page_size.nil?
657
+ command.query['pageToken'] = page_token unless page_token.nil?
658
+ command.query['fields'] = fields unless fields.nil?
659
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
660
+ execute_or_queue_command(command, &block)
661
+ end
662
+
663
+ # Moves a assignment under a new reservation. Customers can do this by
664
+ # deleting the existing assignment followed by creating another assignment
665
+ # under the new reservation, but this method provides a transactional way to
666
+ # do so, to make sure the assignee always has an associated reservation.
667
+ # Without the method customers might see some queries run on-demand which
668
+ # might be unexpected.
669
+ # @param [String] name
670
+ # The resource name of the assignment,
671
+ # e.g.:
672
+ # projects/myproject/locations/US/reservations/team1-prod/assignments/123
673
+ # @param [String] destination_id
674
+ # The new reservation ID, e.g.:
675
+ # projects/myotherproject/locations/US/reservations/team2-prod
676
+ # @param [String] fields
677
+ # Selector specifying which fields to include in a partial response.
678
+ # @param [String] quota_user
679
+ # Available to use for quota purposes for server-side applications. Can be any
680
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
681
+ # @param [Google::Apis::RequestOptions] options
682
+ # Request-specific options
683
+ #
684
+ # @yield [result, err] Result & error if block supplied
685
+ # @yieldparam result [Google::Apis::BigqueryreservationV1beta1::Assignment] parsed result object
686
+ # @yieldparam err [StandardError] error object if request failed
687
+ #
688
+ # @return [Google::Apis::BigqueryreservationV1beta1::Assignment]
689
+ #
690
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
691
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
692
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
693
+ def move_project_location_reservation_assignment(name, destination_id: nil, fields: nil, quota_user: nil, options: nil, &block)
694
+ command = make_simple_command(:post, 'v1beta1/{+name}:move', options)
695
+ command.response_representation = Google::Apis::BigqueryreservationV1beta1::Assignment::Representation
696
+ command.response_class = Google::Apis::BigqueryreservationV1beta1::Assignment
697
+ command.params['name'] = name unless name.nil?
698
+ command.query['destinationId'] = destination_id unless destination_id.nil?
699
+ command.query['fields'] = fields unless fields.nil?
700
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
701
+ execute_or_queue_command(command, &block)
702
+ end
703
+
704
+ protected
705
+
706
+ def apply_command_defaults(command)
707
+ command.query['key'] = key unless key.nil?
708
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
709
+ end
710
+ end
711
+ end
712
+ end
713
+ end