google-api-client 0.9.8 → 0.10.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (320) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +15 -8
  3. data/CHANGELOG.md +84 -0
  4. data/Gemfile +10 -2
  5. data/README.md +10 -2
  6. data/api_names.yaml +37172 -135
  7. data/generated/google/apis/adexchangebuyer2_v2beta1.rb +35 -0
  8. data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +1200 -0
  9. data/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +526 -0
  10. data/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +844 -0
  11. data/generated/google/apis/adexchangebuyer_v1_4.rb +1 -1
  12. data/generated/google/apis/adexchangebuyer_v1_4/classes.rb +310 -28
  13. data/generated/google/apis/adexchangebuyer_v1_4/representations.rb +84 -0
  14. data/generated/google/apis/adexchangebuyer_v1_4/service.rb +60 -8
  15. data/generated/google/apis/adexchangeseller_v2_0.rb +2 -3
  16. data/generated/google/apis/adexchangeseller_v2_0/service.rb +1 -2
  17. data/generated/google/apis/admin_directory_v1.rb +1 -1
  18. data/generated/google/apis/admin_directory_v1/classes.rb +206 -0
  19. data/generated/google/apis/admin_directory_v1/representations.rb +63 -0
  20. data/generated/google/apis/admin_directory_v1/service.rb +41 -2
  21. data/generated/google/apis/admin_reports_v1.rb +5 -5
  22. data/generated/google/apis/admin_reports_v1/service.rb +6 -6
  23. data/generated/google/apis/adsense_v1_4.rb +1 -1
  24. data/generated/google/apis/adsense_v1_4/classes.rb +1 -1
  25. data/generated/google/apis/adsensehost_v4_1.rb +1 -1
  26. data/generated/google/apis/adsensehost_v4_1/classes.rb +1 -2
  27. data/generated/google/apis/analytics_v3.rb +1 -1
  28. data/generated/google/apis/analytics_v3/classes.rb +379 -3
  29. data/generated/google/apis/analytics_v3/representations.rb +136 -0
  30. data/generated/google/apis/analytics_v3/service.rb +256 -0
  31. data/generated/google/apis/analyticsreporting_v4.rb +1 -1
  32. data/generated/google/apis/analyticsreporting_v4/classes.rb +858 -823
  33. data/generated/google/apis/analyticsreporting_v4/representations.rb +194 -193
  34. data/generated/google/apis/analyticsreporting_v4/service.rb +4 -4
  35. data/generated/google/apis/androidenterprise_v1.rb +1 -1
  36. data/generated/google/apis/androidenterprise_v1/classes.rb +913 -220
  37. data/generated/google/apis/androidenterprise_v1/representations.rb +337 -30
  38. data/generated/google/apis/androidenterprise_v1/service.rb +1163 -561
  39. data/generated/google/apis/androidpublisher_v2.rb +1 -1
  40. data/generated/google/apis/androidpublisher_v2/classes.rb +230 -8
  41. data/generated/google/apis/androidpublisher_v2/representations.rb +90 -0
  42. data/generated/google/apis/androidpublisher_v2/service.rb +116 -3
  43. data/generated/google/apis/appengine_v1beta5.rb +7 -1
  44. data/generated/google/apis/appengine_v1beta5/classes.rb +810 -395
  45. data/generated/google/apis/appengine_v1beta5/representations.rb +188 -22
  46. data/generated/google/apis/appengine_v1beta5/service.rb +343 -39
  47. data/generated/google/apis/appsactivity_v1.rb +3 -3
  48. data/generated/google/apis/appsactivity_v1/classes.rb +7 -0
  49. data/generated/google/apis/appsactivity_v1/representations.rb +1 -0
  50. data/generated/google/apis/appsactivity_v1/service.rb +1 -1
  51. data/generated/google/apis/appstate_v1.rb +1 -1
  52. data/generated/google/apis/bigquery_v2.rb +1 -1
  53. data/generated/google/apis/bigquery_v2/classes.rb +360 -38
  54. data/generated/google/apis/bigquery_v2/representations.rb +106 -0
  55. data/generated/google/apis/bigquery_v2/service.rb +18 -4
  56. data/generated/google/apis/books_v1.rb +2 -2
  57. data/generated/google/apis/books_v1/classes.rb +83 -0
  58. data/generated/google/apis/books_v1/representations.rb +35 -0
  59. data/generated/google/apis/books_v1/service.rb +7 -3
  60. data/generated/google/apis/calendar_v3.rb +1 -1
  61. data/generated/google/apis/calendar_v3/classes.rb +208 -5
  62. data/generated/google/apis/calendar_v3/representations.rb +97 -0
  63. data/generated/google/apis/civicinfo_v2.rb +3 -2
  64. data/generated/google/apis/civicinfo_v2/classes.rb +377 -5
  65. data/generated/google/apis/civicinfo_v2/representations.rb +149 -0
  66. data/generated/google/apis/civicinfo_v2/service.rb +27 -6
  67. data/generated/google/apis/classroom_v1.rb +22 -25
  68. data/generated/google/apis/classroom_v1/classes.rb +998 -761
  69. data/generated/google/apis/classroom_v1/representations.rb +263 -198
  70. data/generated/google/apis/classroom_v1/service.rb +1349 -672
  71. data/generated/google/apis/cloudbilling_v1.rb +3 -3
  72. data/generated/google/apis/cloudbilling_v1/classes.rb +76 -75
  73. data/generated/google/apis/cloudbilling_v1/representations.rb +17 -17
  74. data/generated/google/apis/cloudbilling_v1/service.rb +117 -110
  75. data/generated/google/apis/cloudbuild_v1.rb +1 -1
  76. data/generated/google/apis/cloudbuild_v1/classes.rb +661 -264
  77. data/generated/google/apis/cloudbuild_v1/representations.rb +198 -48
  78. data/generated/google/apis/cloudbuild_v1/service.rb +259 -44
  79. data/generated/google/apis/clouddebugger_v2.rb +5 -8
  80. data/generated/google/apis/clouddebugger_v2/classes.rb +686 -616
  81. data/generated/google/apis/clouddebugger_v2/representations.rb +151 -151
  82. data/generated/google/apis/clouddebugger_v2/service.rb +165 -159
  83. data/generated/google/apis/cloudkms_v1.rb +35 -0
  84. data/generated/google/apis/cloudkms_v1/classes.rb +1022 -0
  85. data/generated/google/apis/cloudkms_v1/representations.rb +448 -0
  86. data/generated/google/apis/cloudkms_v1/service.rb +933 -0
  87. data/generated/google/apis/cloudkms_v1beta1.rb +35 -0
  88. data/generated/google/apis/cloudkms_v1beta1/classes.rb +1039 -0
  89. data/generated/google/apis/cloudkms_v1beta1/representations.rb +448 -0
  90. data/generated/google/apis/cloudkms_v1beta1/service.rb +933 -0
  91. data/generated/google/apis/cloudmonitoring_v2beta2.rb +1 -1
  92. data/generated/google/apis/cloudresourcemanager_v1.rb +4 -4
  93. data/generated/google/apis/cloudresourcemanager_v1/classes.rb +1529 -167
  94. data/generated/google/apis/cloudresourcemanager_v1/representations.rb +491 -26
  95. data/generated/google/apis/cloudresourcemanager_v1/service.rb +1593 -135
  96. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +1 -1
  97. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +1155 -235
  98. data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +344 -44
  99. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +702 -310
  100. data/generated/google/apis/cloudtrace_v1.rb +9 -9
  101. data/generated/google/apis/cloudtrace_v1/classes.rb +98 -92
  102. data/generated/google/apis/cloudtrace_v1/representations.rb +24 -24
  103. data/generated/google/apis/cloudtrace_v1/service.rb +42 -37
  104. data/generated/google/apis/compute_beta.rb +1 -1
  105. data/generated/google/apis/compute_beta/classes.rb +7007 -3648
  106. data/generated/google/apis/compute_beta/representations.rb +1459 -120
  107. data/generated/google/apis/compute_beta/service.rb +7943 -3726
  108. data/generated/google/apis/compute_v1.rb +1 -1
  109. data/generated/google/apis/compute_v1/classes.rb +2567 -370
  110. data/generated/google/apis/compute_v1/representations.rb +855 -0
  111. data/generated/google/apis/compute_v1/service.rb +6388 -2908
  112. data/generated/google/apis/container_v1.rb +1 -1
  113. data/generated/google/apis/container_v1/classes.rb +287 -16
  114. data/generated/google/apis/container_v1/representations.rb +113 -2
  115. data/generated/google/apis/container_v1/service.rb +130 -0
  116. data/generated/google/apis/content_v2.rb +1 -1
  117. data/generated/google/apis/content_v2/classes.rb +778 -10
  118. data/generated/google/apis/content_v2/representations.rb +339 -0
  119. data/generated/google/apis/content_v2/service.rb +364 -49
  120. data/generated/google/apis/dataflow_v1b3.rb +37 -0
  121. data/generated/google/apis/dataflow_v1b3/classes.rb +4941 -0
  122. data/generated/google/apis/dataflow_v1b3/representations.rb +2037 -0
  123. data/generated/google/apis/dataflow_v1b3/service.rb +957 -0
  124. data/generated/google/apis/dataproc_v1.rb +1 -1
  125. data/generated/google/apis/dataproc_v1/classes.rb +1235 -963
  126. data/generated/google/apis/dataproc_v1/representations.rb +299 -225
  127. data/generated/google/apis/dataproc_v1/service.rb +277 -192
  128. data/generated/google/apis/datastore_v1.rb +38 -0
  129. data/generated/google/apis/datastore_v1/classes.rb +1289 -0
  130. data/generated/google/apis/datastore_v1/representations.rb +572 -0
  131. data/generated/google/apis/datastore_v1/service.rb +259 -0
  132. data/generated/google/apis/datastore_v1beta3.rb +38 -0
  133. data/generated/google/apis/datastore_v1beta3/classes.rb +1284 -0
  134. data/generated/google/apis/datastore_v1beta3/representations.rb +572 -0
  135. data/generated/google/apis/datastore_v1beta3/service.rb +259 -0
  136. data/generated/google/apis/deploymentmanager_v2.rb +1 -1
  137. data/generated/google/apis/deploymentmanager_v2/classes.rb +436 -3
  138. data/generated/google/apis/deploymentmanager_v2/representations.rb +178 -0
  139. data/generated/google/apis/deploymentmanager_v2/service.rb +226 -61
  140. data/generated/google/apis/dfareporting_v2_5.rb +40 -0
  141. data/generated/google/apis/dfareporting_v2_5/classes.rb +11225 -0
  142. data/generated/google/apis/dfareporting_v2_5/representations.rb +3982 -0
  143. data/generated/google/apis/dfareporting_v2_5/service.rb +8755 -0
  144. data/generated/google/apis/dfareporting_v2_6.rb +40 -0
  145. data/generated/google/apis/dfareporting_v2_6/classes.rb +11586 -0
  146. data/generated/google/apis/dfareporting_v2_6/representations.rb +4119 -0
  147. data/generated/google/apis/dfareporting_v2_6/service.rb +9025 -0
  148. data/generated/google/apis/dfareporting_v2_7.rb +40 -0
  149. data/generated/google/apis/dfareporting_v2_7/classes.rb +11876 -0
  150. data/generated/google/apis/dfareporting_v2_7/representations.rb +4243 -0
  151. data/generated/google/apis/dfareporting_v2_7/service.rb +9095 -0
  152. data/generated/google/apis/dns_v1.rb +1 -1
  153. data/generated/google/apis/dns_v1/classes.rb +1 -1
  154. data/generated/google/apis/dns_v2beta1.rb +43 -0
  155. data/generated/google/apis/dns_v2beta1/classes.rb +915 -0
  156. data/generated/google/apis/dns_v2beta1/representations.rb +368 -0
  157. data/generated/google/apis/dns_v2beta1/service.rb +768 -0
  158. data/generated/google/apis/doubleclickbidmanager_v1.rb +1 -1
  159. data/generated/google/apis/doubleclickbidmanager_v1/classes.rb +79 -86
  160. data/generated/google/apis/doubleclickbidmanager_v1/representations.rb +25 -28
  161. data/generated/google/apis/doubleclickbidmanager_v1/service.rb +10 -8
  162. data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
  163. data/generated/google/apis/doubleclicksearch_v2/classes.rb +6 -4
  164. data/generated/google/apis/drive_v2.rb +1 -1
  165. data/generated/google/apis/drive_v2/classes.rb +595 -37
  166. data/generated/google/apis/drive_v2/representations.rb +140 -0
  167. data/generated/google/apis/drive_v2/service.rb +406 -40
  168. data/generated/google/apis/drive_v3.rb +1 -1
  169. data/generated/google/apis/drive_v3/classes.rb +507 -40
  170. data/generated/google/apis/drive_v3/representations.rb +105 -0
  171. data/generated/google/apis/drive_v3/service.rb +326 -29
  172. data/generated/google/apis/fitness_v1.rb +38 -2
  173. data/generated/google/apis/fitness_v1/classes.rb +65 -7
  174. data/generated/google/apis/fitness_v1/representations.rb +20 -0
  175. data/generated/google/apis/fitness_v1/service.rb +17 -18
  176. data/generated/google/apis/fusiontables_v2.rb +1 -1
  177. data/generated/google/apis/fusiontables_v2/classes.rb +4 -3
  178. data/generated/google/apis/games_configuration_v1configuration.rb +1 -1
  179. data/generated/google/apis/games_management_v1management.rb +1 -1
  180. data/generated/google/apis/games_v1.rb +1 -1
  181. data/generated/google/apis/genomics_v1.rb +10 -12
  182. data/generated/google/apis/genomics_v1/classes.rb +2276 -2165
  183. data/generated/google/apis/genomics_v1/representations.rb +468 -496
  184. data/generated/google/apis/genomics_v1/service.rb +978 -882
  185. data/generated/google/apis/gmail_v1.rb +11 -2
  186. data/generated/google/apis/gmail_v1/classes.rb +655 -5
  187. data/generated/google/apis/gmail_v1/representations.rb +261 -0
  188. data/generated/google/apis/gmail_v1/service.rb +1211 -48
  189. data/generated/google/apis/groupssettings_v1.rb +2 -2
  190. data/generated/google/apis/groupssettings_v1/classes.rb +12 -0
  191. data/generated/google/apis/groupssettings_v1/representations.rb +2 -0
  192. data/generated/google/apis/iam_v1.rb +2 -2
  193. data/generated/google/apis/iam_v1/classes.rb +446 -368
  194. data/generated/google/apis/iam_v1/representations.rb +109 -91
  195. data/generated/google/apis/iam_v1/service.rb +249 -162
  196. data/generated/google/apis/identitytoolkit_v3.rb +7 -1
  197. data/generated/google/apis/identitytoolkit_v3/classes.rb +254 -2
  198. data/generated/google/apis/identitytoolkit_v3/representations.rb +38 -0
  199. data/generated/google/apis/kgsearch_v1.rb +2 -3
  200. data/generated/google/apis/kgsearch_v1/classes.rb +13 -13
  201. data/generated/google/apis/kgsearch_v1/representations.rb +2 -2
  202. data/generated/google/apis/kgsearch_v1/service.rb +26 -24
  203. data/generated/google/apis/language_v1beta1.rb +36 -0
  204. data/generated/google/apis/language_v1beta1/classes.rb +757 -0
  205. data/generated/google/apis/language_v1beta1/representations.rb +339 -0
  206. data/generated/google/apis/language_v1beta1/service.rb +185 -0
  207. data/generated/google/apis/licensing_v1.rb +3 -3
  208. data/generated/google/apis/licensing_v1/classes.rb +14 -2
  209. data/generated/google/apis/licensing_v1/representations.rb +2 -0
  210. data/generated/google/apis/licensing_v1/service.rb +1 -1
  211. data/generated/google/apis/logging_v2beta1.rb +6 -6
  212. data/generated/google/apis/logging_v2beta1/classes.rb +900 -775
  213. data/generated/google/apis/logging_v2beta1/representations.rb +163 -142
  214. data/generated/google/apis/logging_v2beta1/service.rb +427 -155
  215. data/generated/google/apis/manufacturers_v1.rb +34 -0
  216. data/generated/google/apis/manufacturers_v1/classes.rb +605 -0
  217. data/generated/google/apis/manufacturers_v1/representations.rb +223 -0
  218. data/generated/google/apis/manufacturers_v1/service.rb +138 -0
  219. data/generated/google/apis/mirror_v1.rb +2 -2
  220. data/generated/google/apis/mirror_v1/service.rb +1 -1
  221. data/generated/google/apis/monitoring_v3.rb +45 -0
  222. data/generated/google/apis/monitoring_v3/classes.rb +1333 -0
  223. data/generated/google/apis/monitoring_v3/representations.rb +516 -0
  224. data/generated/google/apis/monitoring_v3/service.rb +706 -0
  225. data/generated/google/apis/oauth2_v2.rb +1 -1
  226. data/generated/google/apis/pagespeedonline_v2.rb +1 -1
  227. data/generated/google/apis/partners_v2.rb +3 -3
  228. data/generated/google/apis/partners_v2/classes.rb +1831 -477
  229. data/generated/google/apis/partners_v2/representations.rb +571 -114
  230. data/generated/google/apis/partners_v2/service.rb +898 -167
  231. data/generated/google/apis/people_v1.rb +15 -16
  232. data/generated/google/apis/people_v1/classes.rb +1047 -859
  233. data/generated/google/apis/people_v1/representations.rb +252 -213
  234. data/generated/google/apis/people_v1/service.rb +75 -62
  235. data/generated/google/apis/plus_domains_v1.rb +1 -1
  236. data/generated/google/apis/plus_v1.rb +1 -1
  237. data/generated/google/apis/proximitybeacon_v1beta1.rb +1 -1
  238. data/generated/google/apis/proximitybeacon_v1beta1/classes.rb +527 -456
  239. data/generated/google/apis/proximitybeacon_v1beta1/representations.rb +101 -100
  240. data/generated/google/apis/proximitybeacon_v1beta1/service.rb +467 -343
  241. data/generated/google/apis/pubsub_v1.rb +1 -1
  242. data/generated/google/apis/pubsub_v1/classes.rb +363 -310
  243. data/generated/google/apis/pubsub_v1/representations.rb +76 -76
  244. data/generated/google/apis/pubsub_v1/service.rb +464 -335
  245. data/generated/google/apis/qpx_express_v1.rb +1 -1
  246. data/generated/google/apis/qpx_express_v1/classes.rb +6 -0
  247. data/generated/google/apis/qpx_express_v1/representations.rb +1 -0
  248. data/generated/google/apis/replicapool_v1beta2.rb +1 -1
  249. data/generated/google/apis/replicapoolupdater_v1beta1.rb +4 -2
  250. data/generated/google/apis/replicapoolupdater_v1beta1/service.rb +3 -1
  251. data/generated/google/apis/reseller_v1.rb +1 -1
  252. data/generated/google/apis/reseller_v1/classes.rb +222 -61
  253. data/generated/google/apis/reseller_v1/representations.rb +28 -0
  254. data/generated/google/apis/reseller_v1/service.rb +240 -47
  255. data/generated/google/apis/script_v1.rb +19 -19
  256. data/generated/google/apis/script_v1/classes.rb +151 -137
  257. data/generated/google/apis/script_v1/representations.rb +26 -26
  258. data/generated/google/apis/script_v1/service.rb +9 -8
  259. data/generated/google/apis/sheets_v4.rb +7 -7
  260. data/generated/google/apis/sheets_v4/classes.rb +4530 -3506
  261. data/generated/google/apis/sheets_v4/representations.rb +988 -737
  262. data/generated/google/apis/sheets_v4/service.rb +266 -99
  263. data/generated/google/apis/site_verification_v1.rb +1 -1
  264. data/generated/google/apis/slides_v1.rb +49 -0
  265. data/generated/google/apis/slides_v1/classes.rb +4480 -0
  266. data/generated/google/apis/slides_v1/representations.rb +1926 -0
  267. data/generated/google/apis/slides_v1/service.rb +245 -0
  268. data/generated/google/apis/speech_v1beta1.rb +34 -0
  269. data/generated/google/apis/speech_v1beta1/classes.rb +498 -0
  270. data/generated/google/apis/speech_v1beta1/representations.rb +206 -0
  271. data/generated/google/apis/speech_v1beta1/service.rb +270 -0
  272. data/generated/google/apis/sqladmin_v1beta4.rb +1 -1
  273. data/generated/google/apis/sqladmin_v1beta4/classes.rb +131 -10
  274. data/generated/google/apis/sqladmin_v1beta4/representations.rb +50 -0
  275. data/generated/google/apis/sqladmin_v1beta4/service.rb +92 -2
  276. data/generated/google/apis/storage_v1.rb +1 -1
  277. data/generated/google/apis/storage_v1/classes.rb +205 -21
  278. data/generated/google/apis/storage_v1/representations.rb +51 -1
  279. data/generated/google/apis/storage_v1/service.rb +263 -9
  280. data/generated/google/apis/tagmanager_v1.rb +5 -5
  281. data/generated/google/apis/translate_v2.rb +2 -2
  282. data/generated/google/apis/translate_v2/service.rb +1 -1
  283. data/generated/google/apis/vision_v1.rb +1 -1
  284. data/generated/google/apis/vision_v1/classes.rb +1275 -731
  285. data/generated/google/apis/vision_v1/representations.rb +378 -111
  286. data/generated/google/apis/vision_v1/service.rb +4 -4
  287. data/generated/google/apis/webmasters_v3.rb +1 -1
  288. data/generated/google/apis/youtube_analytics_v1.rb +1 -1
  289. data/generated/google/apis/youtube_analytics_v1/classes.rb +0 -209
  290. data/generated/google/apis/youtube_analytics_v1/representations.rb +0 -99
  291. data/generated/google/apis/youtube_analytics_v1/service.rb +5 -77
  292. data/generated/google/apis/youtube_partner_v1.rb +1 -1
  293. data/generated/google/apis/youtube_partner_v1/classes.rb +155 -0
  294. data/generated/google/apis/youtube_partner_v1/representations.rb +69 -0
  295. data/generated/google/apis/youtube_partner_v1/service.rb +107 -3
  296. data/generated/google/apis/youtube_v3.rb +1 -1
  297. data/generated/google/apis/youtube_v3/classes.rb +430 -22
  298. data/generated/google/apis/youtube_v3/representations.rb +171 -4
  299. data/generated/google/apis/youtube_v3/service.rb +100 -9
  300. data/generated/google/apis/youtubereporting_v1.rb +4 -4
  301. data/generated/google/apis/youtubereporting_v1/classes.rb +140 -131
  302. data/generated/google/apis/youtubereporting_v1/representations.rb +37 -37
  303. data/generated/google/apis/youtubereporting_v1/service.rb +139 -135
  304. data/google-api-client.gemspec +4 -3
  305. data/lib/google/apis/core/api_command.rb +16 -6
  306. data/lib/google/apis/core/base_service.rb +17 -9
  307. data/lib/google/apis/core/download.rb +7 -2
  308. data/lib/google/apis/core/http_command.rb +5 -1
  309. data/lib/google/apis/core/json_representation.rb +2 -2
  310. data/lib/google/apis/core/upload.rb +7 -1
  311. data/lib/google/apis/errors.rb +6 -2
  312. data/lib/google/apis/generator/annotator.rb +6 -0
  313. data/lib/google/apis/version.rb +1 -1
  314. data/samples/cli/lib/samples/bigquery.rb +101 -0
  315. data/samples/cli/lib/samples/calendar.rb +1 -1
  316. data/samples/cli/lib/samples/gmail.rb +74 -0
  317. data/samples/cli/lib/samples/sheets.rb +61 -0
  318. data/samples/cli/lib/samples/you_tube.rb +4 -1
  319. data/sync.rb +71 -0
  320. metadata +86 -18
@@ -20,13 +20,13 @@ module Google
20
20
  module Apis
21
21
  # Google Cloud Billing API
22
22
  #
23
- # Retrieves Google Developers Console billing accounts and associates them with
24
- # projects.
23
+ # Allows developers to manage billing for their Google Cloud Platform projects
24
+ # programmatically.
25
25
  #
26
26
  # @see https://cloud.google.com/billing/
27
27
  module CloudbillingV1
28
28
  VERSION = 'V1'
29
- REVISION = '20151222'
29
+ REVISION = '20170210'
30
30
 
31
31
  # View and manage your data across Google Cloud Platform services
32
32
  AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
@@ -22,32 +22,41 @@ module Google
22
22
  module Apis
23
23
  module CloudbillingV1
24
24
 
25
- # A billing account in [Google Developers Console](https://console.developers.
26
- # google.com/). You can assign a billing account to one or more projects.
27
- class BillingAccount
25
+ # Encapsulation of billing information for a Cloud Console project. A project
26
+ # has at most one associated billing account at a time (but a billing account
27
+ # can be assigned to multiple projects).
28
+ class ProjectBillingInfo
28
29
  include Google::Apis::Core::Hashable
29
30
 
30
- # The resource name of the billing account. The resource name has the form `
31
- # billingAccounts/`billing_account_id``. For example, `billingAccounts/012345-
32
- # 567890-ABCDEF` would be the resource name for billing account `012345-567890-
33
- # ABCDEF`.
31
+ # True if the project is associated with an open billing account, to which
32
+ # usage on the project is charged. False if the project is associated with a
33
+ # closed billing account, or no billing account at all, and therefore cannot
34
+ # use paid services. This field is read-only.
35
+ # Corresponds to the JSON property `billingEnabled`
36
+ # @return [Boolean]
37
+ attr_accessor :billing_enabled
38
+ alias_method :billing_enabled?, :billing_enabled
39
+
40
+ # The resource name for the `ProjectBillingInfo`; has the form
41
+ # `projects/`project_id`/billingInfo`. For example, the resource name for the
42
+ # billing information for project `tokyo-rain-123` would be
43
+ # `projects/tokyo-rain-123/billingInfo`. This field is read-only.
34
44
  # Corresponds to the JSON property `name`
35
45
  # @return [String]
36
46
  attr_accessor :name
37
47
 
38
- # True if the billing account is open, and will therefore be charged for any
39
- # usage on associated projects. False if the billing account is closed, and
40
- # therefore projects associated with it will be unable to use paid services.
41
- # Corresponds to the JSON property `open`
42
- # @return [Boolean]
43
- attr_accessor :open
44
- alias_method :open?, :open
48
+ # The ID of the project that this `ProjectBillingInfo` represents, such as
49
+ # `tokyo-rain-123`. This is a convenience field so that you don't need to
50
+ # parse the `name` field to obtain a project ID. This field is read-only.
51
+ # Corresponds to the JSON property `projectId`
52
+ # @return [String]
53
+ attr_accessor :project_id
45
54
 
46
- # The display name given to the billing account, such as `My Billing Account`.
47
- # This name is displayed in the Google Developers Console.
48
- # Corresponds to the JSON property `displayName`
55
+ # The resource name of the billing account associated with the project, if
56
+ # any. For example, `billingAccounts/012345-567890-ABCDEF`.
57
+ # Corresponds to the JSON property `billingAccountName`
49
58
  # @return [String]
50
- attr_accessor :display_name
59
+ attr_accessor :billing_account_name
51
60
 
52
61
  def initialize(**args)
53
62
  update!(**args)
@@ -55,102 +64,95 @@ module Google
55
64
 
56
65
  # Update properties of this object
57
66
  def update!(**args)
67
+ @billing_enabled = args[:billing_enabled] if args.key?(:billing_enabled)
58
68
  @name = args[:name] if args.key?(:name)
59
- @open = args[:open] if args.key?(:open)
60
- @display_name = args[:display_name] if args.key?(:display_name)
69
+ @project_id = args[:project_id] if args.key?(:project_id)
70
+ @billing_account_name = args[:billing_account_name] if args.key?(:billing_account_name)
61
71
  end
62
72
  end
63
73
 
64
- # Response message for `ListBillingAccounts`.
65
- class ListBillingAccountsResponse
74
+ # Request message for `ListProjectBillingInfoResponse`.
75
+ class ListProjectBillingInfoResponse
66
76
  include Google::Apis::Core::Hashable
67
77
 
68
- # A list of billing accounts.
69
- # Corresponds to the JSON property `billingAccounts`
70
- # @return [Array<Google::Apis::CloudbillingV1::BillingAccount>]
71
- attr_accessor :billing_accounts
72
-
73
- # A token to retrieve the next page of results. To retrieve the next page, call `
74
- # ListBillingAccounts` again with the `page_token` field set to this value. This
75
- # field is empty if there are no more results to retrieve.
78
+ # A token to retrieve the next page of results. To retrieve the next page,
79
+ # call `ListProjectBillingInfo` again with the `page_token` field set to this
80
+ # value. This field is empty if there are no more results to retrieve.
76
81
  # Corresponds to the JSON property `nextPageToken`
77
82
  # @return [String]
78
83
  attr_accessor :next_page_token
79
84
 
85
+ # A list of `ProjectBillingInfo` resources representing the projects
86
+ # associated with the billing account.
87
+ # Corresponds to the JSON property `projectBillingInfo`
88
+ # @return [Array<Google::Apis::CloudbillingV1::ProjectBillingInfo>]
89
+ attr_accessor :project_billing_info
90
+
80
91
  def initialize(**args)
81
92
  update!(**args)
82
93
  end
83
94
 
84
95
  # Update properties of this object
85
96
  def update!(**args)
86
- @billing_accounts = args[:billing_accounts] if args.key?(:billing_accounts)
87
97
  @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
98
+ @project_billing_info = args[:project_billing_info] if args.key?(:project_billing_info)
88
99
  end
89
100
  end
90
101
 
91
- # Request message for `ListProjectBillingInfoResponse`.
92
- class ListProjectBillingInfoResponse
102
+ # Response message for `ListBillingAccounts`.
103
+ class ListBillingAccountsResponse
93
104
  include Google::Apis::Core::Hashable
94
105
 
95
- # A list of `ProjectBillingInfo` resources representing the projects associated
96
- # with the billing account.
97
- # Corresponds to the JSON property `projectBillingInfo`
98
- # @return [Array<Google::Apis::CloudbillingV1::ProjectBillingInfo>]
99
- attr_accessor :project_billing_info
100
-
101
- # A token to retrieve the next page of results. To retrieve the next page, call `
102
- # ListProjectBillingInfo` again with the `page_token` field set to this value.
103
- # This field is empty if there are no more results to retrieve.
106
+ # A token to retrieve the next page of results. To retrieve the next page,
107
+ # call `ListBillingAccounts` again with the `page_token` field set to this
108
+ # value. This field is empty if there are no more results to retrieve.
104
109
  # Corresponds to the JSON property `nextPageToken`
105
110
  # @return [String]
106
111
  attr_accessor :next_page_token
107
112
 
113
+ # A list of billing accounts.
114
+ # Corresponds to the JSON property `billingAccounts`
115
+ # @return [Array<Google::Apis::CloudbillingV1::BillingAccount>]
116
+ attr_accessor :billing_accounts
117
+
108
118
  def initialize(**args)
109
119
  update!(**args)
110
120
  end
111
121
 
112
122
  # Update properties of this object
113
123
  def update!(**args)
114
- @project_billing_info = args[:project_billing_info] if args.key?(:project_billing_info)
115
124
  @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
125
+ @billing_accounts = args[:billing_accounts] if args.key?(:billing_accounts)
116
126
  end
117
127
  end
118
128
 
119
- # Encapsulation of billing information for a Developers Console project. A
120
- # project has at most one associated billing account at a time (but a billing
121
- # account can be assigned to multiple projects).
122
- class ProjectBillingInfo
129
+ # A billing account in [Google Cloud
130
+ # Console](https://console.cloud.google.com/). You can assign a billing account
131
+ # to one or more projects.
132
+ class BillingAccount
123
133
  include Google::Apis::Core::Hashable
124
134
 
125
- # The resource name for the `ProjectBillingInfo`; has the form `projects/`
126
- # project_id`/billingInfo`. For example, the resource name for the billing
127
- # information for project `tokyo-rain-123` would be `projects/tokyo-rain-123/
128
- # billingInfo`. This field is read-only.
129
- # Corresponds to the JSON property `name`
135
+ # The display name given to the billing account, such as `My Billing
136
+ # Account`. This name is displayed in the Google Cloud Console.
137
+ # Corresponds to the JSON property `displayName`
130
138
  # @return [String]
131
- attr_accessor :name
139
+ attr_accessor :display_name
132
140
 
133
- # The ID of the project that this `ProjectBillingInfo` represents, such as `
134
- # tokyo-rain-123`. This is a convenience field so that you don't need to parse
135
- # the `name` field to obtain a project ID. This field is read-only.
136
- # Corresponds to the JSON property `projectId`
137
- # @return [String]
138
- attr_accessor :project_id
141
+ # True if the billing account is open, and will therefore be charged for any
142
+ # usage on associated projects. False if the billing account is closed, and
143
+ # therefore projects associated with it will be unable to use paid services.
144
+ # Corresponds to the JSON property `open`
145
+ # @return [Boolean]
146
+ attr_accessor :open
147
+ alias_method :open?, :open
139
148
 
140
- # The resource name of the billing account associated with the project, if any.
141
- # For example, `billingAccounts/012345-567890-ABCDEF`.
142
- # Corresponds to the JSON property `billingAccountName`
149
+ # The resource name of the billing account. The resource name has the form
150
+ # `billingAccounts/`billing_account_id``. For example,
151
+ # `billingAccounts/012345-567890-ABCDEF` would be the resource name for
152
+ # billing account `012345-567890-ABCDEF`.
153
+ # Corresponds to the JSON property `name`
143
154
  # @return [String]
144
- attr_accessor :billing_account_name
145
-
146
- # True if the project is associated with an open billing account, to which usage
147
- # on the project is charged. False if the project is associated with a closed
148
- # billing account, or no billing account at all, and therefore cannot use paid
149
- # services. This field is read-only.
150
- # Corresponds to the JSON property `billingEnabled`
151
- # @return [Boolean]
152
- attr_accessor :billing_enabled
153
- alias_method :billing_enabled?, :billing_enabled
155
+ attr_accessor :name
154
156
 
155
157
  def initialize(**args)
156
158
  update!(**args)
@@ -158,10 +160,9 @@ module Google
158
160
 
159
161
  # Update properties of this object
160
162
  def update!(**args)
163
+ @display_name = args[:display_name] if args.key?(:display_name)
164
+ @open = args[:open] if args.key?(:open)
161
165
  @name = args[:name] if args.key?(:name)
162
- @project_id = args[:project_id] if args.key?(:project_id)
163
- @billing_account_name = args[:billing_account_name] if args.key?(:billing_account_name)
164
- @billing_enabled = args[:billing_enabled] if args.key?(:billing_enabled)
165
166
  end
166
167
  end
167
168
  end
@@ -22,64 +22,64 @@ module Google
22
22
  module Apis
23
23
  module CloudbillingV1
24
24
 
25
- class BillingAccount
25
+ class ProjectBillingInfo
26
26
  class Representation < Google::Apis::Core::JsonRepresentation; end
27
27
 
28
28
  include Google::Apis::Core::JsonObjectSupport
29
29
  end
30
30
 
31
- class ListBillingAccountsResponse
31
+ class ListProjectBillingInfoResponse
32
32
  class Representation < Google::Apis::Core::JsonRepresentation; end
33
33
 
34
34
  include Google::Apis::Core::JsonObjectSupport
35
35
  end
36
36
 
37
- class ListProjectBillingInfoResponse
37
+ class ListBillingAccountsResponse
38
38
  class Representation < Google::Apis::Core::JsonRepresentation; end
39
39
 
40
40
  include Google::Apis::Core::JsonObjectSupport
41
41
  end
42
42
 
43
- class ProjectBillingInfo
43
+ class BillingAccount
44
44
  class Representation < Google::Apis::Core::JsonRepresentation; end
45
45
 
46
46
  include Google::Apis::Core::JsonObjectSupport
47
47
  end
48
48
 
49
- class BillingAccount
49
+ class ProjectBillingInfo
50
50
  # @private
51
51
  class Representation < Google::Apis::Core::JsonRepresentation
52
+ property :billing_enabled, as: 'billingEnabled'
52
53
  property :name, as: 'name'
53
- property :open, as: 'open'
54
- property :display_name, as: 'displayName'
54
+ property :project_id, as: 'projectId'
55
+ property :billing_account_name, as: 'billingAccountName'
55
56
  end
56
57
  end
57
58
 
58
- class ListBillingAccountsResponse
59
+ class ListProjectBillingInfoResponse
59
60
  # @private
60
61
  class Representation < Google::Apis::Core::JsonRepresentation
61
- collection :billing_accounts, as: 'billingAccounts', class: Google::Apis::CloudbillingV1::BillingAccount, decorator: Google::Apis::CloudbillingV1::BillingAccount::Representation
62
-
63
62
  property :next_page_token, as: 'nextPageToken'
63
+ collection :project_billing_info, as: 'projectBillingInfo', class: Google::Apis::CloudbillingV1::ProjectBillingInfo, decorator: Google::Apis::CloudbillingV1::ProjectBillingInfo::Representation
64
+
64
65
  end
65
66
  end
66
67
 
67
- class ListProjectBillingInfoResponse
68
+ class ListBillingAccountsResponse
68
69
  # @private
69
70
  class Representation < Google::Apis::Core::JsonRepresentation
70
- collection :project_billing_info, as: 'projectBillingInfo', class: Google::Apis::CloudbillingV1::ProjectBillingInfo, decorator: Google::Apis::CloudbillingV1::ProjectBillingInfo::Representation
71
-
72
71
  property :next_page_token, as: 'nextPageToken'
72
+ collection :billing_accounts, as: 'billingAccounts', class: Google::Apis::CloudbillingV1::BillingAccount, decorator: Google::Apis::CloudbillingV1::BillingAccount::Representation
73
+
73
74
  end
74
75
  end
75
76
 
76
- class ProjectBillingInfo
77
+ class BillingAccount
77
78
  # @private
78
79
  class Representation < Google::Apis::Core::JsonRepresentation
80
+ property :display_name, as: 'displayName'
81
+ property :open, as: 'open'
79
82
  property :name, as: 'name'
80
- property :project_id, as: 'projectId'
81
- property :billing_account_name, as: 'billingAccountName'
82
- property :billing_enabled, as: 'billingEnabled'
83
83
  end
84
84
  end
85
85
  end
@@ -22,8 +22,8 @@ module Google
22
22
  module CloudbillingV1
23
23
  # Google Cloud Billing API
24
24
  #
25
- # Retrieves Google Developers Console billing accounts and associates them with
26
- # projects.
25
+ # Allows developers to manage billing for their Google Cloud Platform projects
26
+ # programmatically.
27
27
  #
28
28
  # @example
29
29
  # require 'google/apis/cloudbilling_v1'
@@ -47,202 +47,209 @@ module Google
47
47
  super('https://cloudbilling.googleapis.com/', '')
48
48
  end
49
49
 
50
- # Gets information about a billing account. The current authenticated user must
51
- # be an [owner of the billing account](https://support.google.com/cloud/answer/
52
- # 4430947).
50
+ # Sets or updates the billing account associated with a project. You specify
51
+ # the new billing account by setting the `billing_account_name` in the
52
+ # `ProjectBillingInfo` resource to the resource name of a billing account.
53
+ # Associating a project with an open billing account enables billing on the
54
+ # project and allows charges for resource usage. If the project already had a
55
+ # billing account, this method changes the billing account used for resource
56
+ # usage charges.
57
+ # *Note:* Incurred charges that have not yet been reported in the transaction
58
+ # history of the Google Cloud Console may be billed to the new billing
59
+ # account, even if the charge occurred before the new billing account was
60
+ # assigned to the project.
61
+ # The current authenticated user must have ownership privileges for both the
62
+ # [project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo
63
+ # ) and the [billing
64
+ # account](https://support.google.com/cloud/answer/4430947).
65
+ # You can disable billing on the project by setting the
66
+ # `billing_account_name` field to empty. This action disassociates the
67
+ # current billing account from the project. Any billable activity of your
68
+ # in-use services will stop, and your application could stop functioning as
69
+ # expected. Any unbilled charges to date will be billed to the previously
70
+ # associated account. The current authenticated user must be either an owner
71
+ # of the project or an owner of the billing account for the project.
72
+ # Note that associating a project with a *closed* billing account will have
73
+ # much the same effect as disabling billing on the project: any paid
74
+ # resources used by the project will be shut down. Thus, unless you wish to
75
+ # disable billing, you should always call this method with the name of an
76
+ # *open* billing account.
53
77
  # @param [String] name
54
- # The resource name of the billing account to retrieve. For example, `
55
- # billingAccounts/012345-567890-ABCDEF`.
56
- # @param [String] fields
57
- # Selector specifying which fields to include in a partial response.
78
+ # The resource name of the project associated with the billing information
79
+ # that you want to update. For example, `projects/tokyo-rain-123`.
80
+ # @param [Google::Apis::CloudbillingV1::ProjectBillingInfo] project_billing_info_object
58
81
  # @param [String] quota_user
59
82
  # Available to use for quota purposes for server-side applications. Can be any
60
83
  # arbitrary string assigned to a user, but should not exceed 40 characters.
84
+ # @param [String] fields
85
+ # Selector specifying which fields to include in a partial response.
61
86
  # @param [Google::Apis::RequestOptions] options
62
87
  # Request-specific options
63
88
  #
64
89
  # @yield [result, err] Result & error if block supplied
65
- # @yieldparam result [Google::Apis::CloudbillingV1::BillingAccount] parsed result object
90
+ # @yieldparam result [Google::Apis::CloudbillingV1::ProjectBillingInfo] parsed result object
66
91
  # @yieldparam err [StandardError] error object if request failed
67
92
  #
68
- # @return [Google::Apis::CloudbillingV1::BillingAccount]
93
+ # @return [Google::Apis::CloudbillingV1::ProjectBillingInfo]
69
94
  #
70
95
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
71
96
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
72
97
  # @raise [Google::Apis::AuthorizationError] Authorization is required
73
- def get_billing_account(name, fields: nil, quota_user: nil, options: nil, &block)
74
- command = make_simple_command(:get, 'v1/{+name}', options)
75
- command.response_representation = Google::Apis::CloudbillingV1::BillingAccount::Representation
76
- command.response_class = Google::Apis::CloudbillingV1::BillingAccount
98
+ def update_project_billing_info(name, project_billing_info_object = nil, quota_user: nil, fields: nil, options: nil, &block)
99
+ command = make_simple_command(:put, 'v1/{+name}/billingInfo', options)
100
+ command.request_representation = Google::Apis::CloudbillingV1::ProjectBillingInfo::Representation
101
+ command.request_object = project_billing_info_object
102
+ command.response_representation = Google::Apis::CloudbillingV1::ProjectBillingInfo::Representation
103
+ command.response_class = Google::Apis::CloudbillingV1::ProjectBillingInfo
77
104
  command.params['name'] = name unless name.nil?
78
- command.query['fields'] = fields unless fields.nil?
79
105
  command.query['quotaUser'] = quota_user unless quota_user.nil?
106
+ command.query['fields'] = fields unless fields.nil?
80
107
  execute_or_queue_command(command, &block)
81
108
  end
82
109
 
83
- # Lists the billing accounts that the current authenticated user [owns](https://
84
- # support.google.com/cloud/answer/4430947).
85
- # @param [Fixnum] page_size
86
- # Requested page size. The maximum page size is 100; this is also the default.
87
- # @param [String] page_token
88
- # A token identifying a page of results to return. This should be a `
89
- # next_page_token` value returned from a previous `ListBillingAccounts` call. If
90
- # unspecified, the first page of results is returned.
91
- # @param [String] fields
92
- # Selector specifying which fields to include in a partial response.
110
+ # Gets the billing information for a project. The current authenticated user
111
+ # must have [permission to view the
112
+ # project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo
113
+ # ).
114
+ # @param [String] name
115
+ # The resource name of the project for which billing information is
116
+ # retrieved. For example, `projects/tokyo-rain-123`.
93
117
  # @param [String] quota_user
94
118
  # Available to use for quota purposes for server-side applications. Can be any
95
119
  # arbitrary string assigned to a user, but should not exceed 40 characters.
120
+ # @param [String] fields
121
+ # Selector specifying which fields to include in a partial response.
96
122
  # @param [Google::Apis::RequestOptions] options
97
123
  # Request-specific options
98
124
  #
99
125
  # @yield [result, err] Result & error if block supplied
100
- # @yieldparam result [Google::Apis::CloudbillingV1::ListBillingAccountsResponse] parsed result object
126
+ # @yieldparam result [Google::Apis::CloudbillingV1::ProjectBillingInfo] parsed result object
101
127
  # @yieldparam err [StandardError] error object if request failed
102
128
  #
103
- # @return [Google::Apis::CloudbillingV1::ListBillingAccountsResponse]
129
+ # @return [Google::Apis::CloudbillingV1::ProjectBillingInfo]
104
130
  #
105
131
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
106
132
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
107
133
  # @raise [Google::Apis::AuthorizationError] Authorization is required
108
- def list_billing_accounts(page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
109
- command = make_simple_command(:get, 'v1/billingAccounts', options)
110
- command.response_representation = Google::Apis::CloudbillingV1::ListBillingAccountsResponse::Representation
111
- command.response_class = Google::Apis::CloudbillingV1::ListBillingAccountsResponse
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?
134
+ def get_project_billing_info(name, quota_user: nil, fields: nil, options: nil, &block)
135
+ command = make_simple_command(:get, 'v1/{+name}/billingInfo', options)
136
+ command.response_representation = Google::Apis::CloudbillingV1::ProjectBillingInfo::Representation
137
+ command.response_class = Google::Apis::CloudbillingV1::ProjectBillingInfo
138
+ command.params['name'] = name unless name.nil?
115
139
  command.query['quotaUser'] = quota_user unless quota_user.nil?
140
+ command.query['fields'] = fields unless fields.nil?
116
141
  execute_or_queue_command(command, &block)
117
142
  end
118
143
 
119
- # Lists the projects associated with a billing account. The current
120
- # authenticated user must be an [owner of the billing account](https://support.
121
- # google.com/cloud/answer/4430947).
144
+ # Gets information about a billing account. The current authenticated user
145
+ # must be an [owner of the billing
146
+ # account](https://support.google.com/cloud/answer/4430947).
122
147
  # @param [String] name
123
- # The resource name of the billing account associated with the projects that you
124
- # want to list. For example, `billingAccounts/012345-567890-ABCDEF`.
125
- # @param [Fixnum] page_size
126
- # Requested page size. The maximum page size is 100; this is also the default.
127
- # @param [String] page_token
128
- # A token identifying a page of results to be returned. This should be a `
129
- # next_page_token` value returned from a previous `ListProjectBillingInfo` call.
130
- # If unspecified, the first page of results is returned.
131
- # @param [String] fields
132
- # Selector specifying which fields to include in a partial response.
148
+ # The resource name of the billing account to retrieve. For example,
149
+ # `billingAccounts/012345-567890-ABCDEF`.
133
150
  # @param [String] quota_user
134
151
  # Available to use for quota purposes for server-side applications. Can be any
135
152
  # arbitrary string assigned to a user, but should not exceed 40 characters.
153
+ # @param [String] fields
154
+ # Selector specifying which fields to include in a partial response.
136
155
  # @param [Google::Apis::RequestOptions] options
137
156
  # Request-specific options
138
157
  #
139
158
  # @yield [result, err] Result & error if block supplied
140
- # @yieldparam result [Google::Apis::CloudbillingV1::ListProjectBillingInfoResponse] parsed result object
159
+ # @yieldparam result [Google::Apis::CloudbillingV1::BillingAccount] parsed result object
141
160
  # @yieldparam err [StandardError] error object if request failed
142
161
  #
143
- # @return [Google::Apis::CloudbillingV1::ListProjectBillingInfoResponse]
162
+ # @return [Google::Apis::CloudbillingV1::BillingAccount]
144
163
  #
145
164
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
146
165
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
147
166
  # @raise [Google::Apis::AuthorizationError] Authorization is required
148
- def list_billing_account_projects(name, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
149
- command = make_simple_command(:get, 'v1/{+name}/projects', options)
150
- command.response_representation = Google::Apis::CloudbillingV1::ListProjectBillingInfoResponse::Representation
151
- command.response_class = Google::Apis::CloudbillingV1::ListProjectBillingInfoResponse
167
+ def get_billing_account(name, quota_user: nil, fields: nil, options: nil, &block)
168
+ command = make_simple_command(:get, 'v1/{+name}', options)
169
+ command.response_representation = Google::Apis::CloudbillingV1::BillingAccount::Representation
170
+ command.response_class = Google::Apis::CloudbillingV1::BillingAccount
152
171
  command.params['name'] = name unless name.nil?
153
- command.query['pageSize'] = page_size unless page_size.nil?
154
- command.query['pageToken'] = page_token unless page_token.nil?
155
- command.query['fields'] = fields unless fields.nil?
156
172
  command.query['quotaUser'] = quota_user unless quota_user.nil?
173
+ command.query['fields'] = fields unless fields.nil?
157
174
  execute_or_queue_command(command, &block)
158
175
  end
159
176
 
160
- # Gets the billing information for a project. The current authenticated user
161
- # must have [permission to view the project](https://cloud.google.com/docs/
162
- # permissions-overview#h.bgs0oxofvnoo ).
163
- # @param [String] name
164
- # The resource name of the project for which billing information is retrieved.
165
- # For example, `projects/tokyo-rain-123`.
166
- # @param [String] fields
167
- # Selector specifying which fields to include in a partial response.
177
+ # Lists the billing accounts that the current authenticated user
178
+ # [owns](https://support.google.com/cloud/answer/4430947).
179
+ # @param [Fixnum] page_size
180
+ # Requested page size. The maximum page size is 100; this is also the
181
+ # default.
182
+ # @param [String] page_token
183
+ # A token identifying a page of results to return. This should be a
184
+ # `next_page_token` value returned from a previous `ListBillingAccounts`
185
+ # call. If unspecified, the first page of results is returned.
168
186
  # @param [String] quota_user
169
187
  # Available to use for quota purposes for server-side applications. Can be any
170
188
  # arbitrary string assigned to a user, but should not exceed 40 characters.
189
+ # @param [String] fields
190
+ # Selector specifying which fields to include in a partial response.
171
191
  # @param [Google::Apis::RequestOptions] options
172
192
  # Request-specific options
173
193
  #
174
194
  # @yield [result, err] Result & error if block supplied
175
- # @yieldparam result [Google::Apis::CloudbillingV1::ProjectBillingInfo] parsed result object
195
+ # @yieldparam result [Google::Apis::CloudbillingV1::ListBillingAccountsResponse] parsed result object
176
196
  # @yieldparam err [StandardError] error object if request failed
177
197
  #
178
- # @return [Google::Apis::CloudbillingV1::ProjectBillingInfo]
198
+ # @return [Google::Apis::CloudbillingV1::ListBillingAccountsResponse]
179
199
  #
180
200
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
181
201
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
182
202
  # @raise [Google::Apis::AuthorizationError] Authorization is required
183
- def get_project_billing_info(name, fields: nil, quota_user: nil, options: nil, &block)
184
- command = make_simple_command(:get, 'v1/{+name}/billingInfo', options)
185
- command.response_representation = Google::Apis::CloudbillingV1::ProjectBillingInfo::Representation
186
- command.response_class = Google::Apis::CloudbillingV1::ProjectBillingInfo
187
- command.params['name'] = name unless name.nil?
188
- command.query['fields'] = fields unless fields.nil?
203
+ def list_billing_accounts(page_size: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block)
204
+ command = make_simple_command(:get, 'v1/billingAccounts', options)
205
+ command.response_representation = Google::Apis::CloudbillingV1::ListBillingAccountsResponse::Representation
206
+ command.response_class = Google::Apis::CloudbillingV1::ListBillingAccountsResponse
207
+ command.query['pageSize'] = page_size unless page_size.nil?
208
+ command.query['pageToken'] = page_token unless page_token.nil?
189
209
  command.query['quotaUser'] = quota_user unless quota_user.nil?
210
+ command.query['fields'] = fields unless fields.nil?
190
211
  execute_or_queue_command(command, &block)
191
212
  end
192
213
 
193
- # Sets or updates the billing account associated with a project. You specify the
194
- # new billing account by setting the `billing_account_name` in the `
195
- # ProjectBillingInfo` resource to the resource name of a billing account.
196
- # Associating a project with an open billing account enables billing on the
197
- # project and allows charges for resource usage. If the project already had a
198
- # billing account, this method changes the billing account used for resource
199
- # usage charges. *Note:* Incurred charges that have not yet been reported in the
200
- # transaction history of the Google Developers Console may be billed to the new
201
- # billing account, even if the charge occurred before the new billing account
202
- # was assigned to the project. The current authenticated user must have
203
- # ownership privileges for both the [project](https://cloud.google.com/docs/
204
- # permissions-overview#h.bgs0oxofvnoo ) and the [billing account](https://
205
- # support.google.com/cloud/answer/4430947). You can disable billing on the
206
- # project by setting the `billing_account_name` field to empty. This action
207
- # disassociates the current billing account from the project. Any billable
208
- # activity of your in-use services will stop, and your application could stop
209
- # functioning as expected. Any unbilled charges to date will be billed to the
210
- # previously associated account. The current authenticated user must be either
211
- # an owner of the project or an owner of the billing account for the project.
212
- # Note that associating a project with a *closed* billing account will have much
213
- # the same effect as disabling billing on the project: any paid resources used
214
- # by the project will be shut down. Thus, unless you wish to disable billing,
215
- # you should always call this method with the name of an *open* billing account.
214
+ # Lists the projects associated with a billing account. The current
215
+ # authenticated user must be an [owner of the billing
216
+ # account](https://support.google.com/cloud/answer/4430947).
216
217
  # @param [String] name
217
- # The resource name of the project associated with the billing information that
218
- # you want to update. For example, `projects/tokyo-rain-123`.
219
- # @param [Google::Apis::CloudbillingV1::ProjectBillingInfo] project_billing_info_object
220
- # @param [String] fields
221
- # Selector specifying which fields to include in a partial response.
218
+ # The resource name of the billing account associated with the projects that
219
+ # you want to list. For example, `billingAccounts/012345-567890-ABCDEF`.
220
+ # @param [Fixnum] page_size
221
+ # Requested page size. The maximum page size is 100; this is also the
222
+ # default.
223
+ # @param [String] page_token
224
+ # A token identifying a page of results to be returned. This should be a
225
+ # `next_page_token` value returned from a previous `ListProjectBillingInfo`
226
+ # call. If unspecified, the first page of results is returned.
222
227
  # @param [String] quota_user
223
228
  # Available to use for quota purposes for server-side applications. Can be any
224
229
  # arbitrary string assigned to a user, but should not exceed 40 characters.
230
+ # @param [String] fields
231
+ # Selector specifying which fields to include in a partial response.
225
232
  # @param [Google::Apis::RequestOptions] options
226
233
  # Request-specific options
227
234
  #
228
235
  # @yield [result, err] Result & error if block supplied
229
- # @yieldparam result [Google::Apis::CloudbillingV1::ProjectBillingInfo] parsed result object
236
+ # @yieldparam result [Google::Apis::CloudbillingV1::ListProjectBillingInfoResponse] parsed result object
230
237
  # @yieldparam err [StandardError] error object if request failed
231
238
  #
232
- # @return [Google::Apis::CloudbillingV1::ProjectBillingInfo]
239
+ # @return [Google::Apis::CloudbillingV1::ListProjectBillingInfoResponse]
233
240
  #
234
241
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
235
242
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
236
243
  # @raise [Google::Apis::AuthorizationError] Authorization is required
237
- def update_project_billing_info(name, project_billing_info_object = nil, fields: nil, quota_user: nil, options: nil, &block)
238
- command = make_simple_command(:put, 'v1/{+name}/billingInfo', options)
239
- command.request_representation = Google::Apis::CloudbillingV1::ProjectBillingInfo::Representation
240
- command.request_object = project_billing_info_object
241
- command.response_representation = Google::Apis::CloudbillingV1::ProjectBillingInfo::Representation
242
- command.response_class = Google::Apis::CloudbillingV1::ProjectBillingInfo
244
+ def list_billing_account_projects(name, page_size: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block)
245
+ command = make_simple_command(:get, 'v1/{+name}/projects', options)
246
+ command.response_representation = Google::Apis::CloudbillingV1::ListProjectBillingInfoResponse::Representation
247
+ command.response_class = Google::Apis::CloudbillingV1::ListProjectBillingInfoResponse
243
248
  command.params['name'] = name unless name.nil?
244
- command.query['fields'] = fields unless fields.nil?
249
+ command.query['pageSize'] = page_size unless page_size.nil?
250
+ command.query['pageToken'] = page_token unless page_token.nil?
245
251
  command.query['quotaUser'] = quota_user unless quota_user.nil?
252
+ command.query['fields'] = fields unless fields.nil?
246
253
  execute_or_queue_command(command, &block)
247
254
  end
248
255