google-api-client 0.12.0 → 0.13.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (315) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +7 -0
  3. data/api_names.yaml +945 -41609
  4. data/generated/google/apis/acceleratedmobilepageurl_v1/classes.rb +12 -12
  5. data/generated/google/apis/acceleratedmobilepageurl_v1/representations.rb +2 -2
  6. data/generated/google/apis/adexchangebuyer2_v2beta1.rb +1 -1
  7. data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +1437 -412
  8. data/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +516 -71
  9. data/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +1098 -422
  10. data/generated/google/apis/adexchangebuyer_v1_4/classes.rb +6 -6
  11. data/generated/google/apis/adexchangebuyer_v1_4/representations.rb +3 -3
  12. data/generated/google/apis/adexchangebuyer_v1_4/service.rb +3 -3
  13. data/generated/google/apis/adexchangeseller_v2_0/service.rb +10 -10
  14. data/generated/google/apis/admin_directory_v1/service.rb +26 -26
  15. data/generated/google/apis/adsense_v1_4.rb +1 -1
  16. data/generated/google/apis/adsense_v1_4/classes.rb +2 -2
  17. data/generated/google/apis/adsense_v1_4/representations.rb +3 -3
  18. data/generated/google/apis/adsense_v1_4/service.rb +44 -44
  19. data/generated/google/apis/adsensehost_v4_1.rb +1 -1
  20. data/generated/google/apis/adsensehost_v4_1/service.rb +22 -22
  21. data/generated/google/apis/analytics_v3/classes.rb +3 -3
  22. data/generated/google/apis/analytics_v3/representations.rb +3 -3
  23. data/generated/google/apis/analytics_v3/service.rb +82 -82
  24. data/generated/google/apis/analyticsreporting_v4/classes.rb +937 -937
  25. data/generated/google/apis/analyticsreporting_v4/representations.rb +128 -128
  26. data/generated/google/apis/analyticsreporting_v4/service.rb +1 -1
  27. data/generated/google/apis/androidenterprise_v1.rb +1 -1
  28. data/generated/google/apis/androidenterprise_v1/classes.rb +10 -10
  29. data/generated/google/apis/androidenterprise_v1/representations.rb +20 -20
  30. data/generated/google/apis/androidenterprise_v1/service.rb +43 -43
  31. data/generated/google/apis/androidpublisher_v2/classes.rb +26 -26
  32. data/generated/google/apis/androidpublisher_v2/representations.rb +46 -46
  33. data/generated/google/apis/androidpublisher_v2/service.rb +95 -95
  34. data/generated/google/apis/appengine_v1.rb +4 -4
  35. data/generated/google/apis/appengine_v1/classes.rb +1570 -1512
  36. data/generated/google/apis/appengine_v1/representations.rb +362 -343
  37. data/generated/google/apis/appengine_v1/service.rb +220 -220
  38. data/generated/google/apis/appstate_v1.rb +1 -1
  39. data/generated/google/apis/bigquery_v2.rb +1 -1
  40. data/generated/google/apis/bigquery_v2/classes.rb +5 -5
  41. data/generated/google/apis/bigquery_v2/representations.rb +8 -8
  42. data/generated/google/apis/bigquery_v2/service.rb +13 -13
  43. data/generated/google/apis/blogger_v3/service.rb +3 -3
  44. data/generated/google/apis/books_v1/classes.rb +55 -55
  45. data/generated/google/apis/books_v1/representations.rb +67 -67
  46. data/generated/google/apis/books_v1/service.rb +82 -82
  47. data/generated/google/apis/calendar_v3.rb +1 -1
  48. data/generated/google/apis/calendar_v3/classes.rb +6 -6
  49. data/generated/google/apis/calendar_v3/representations.rb +3 -3
  50. data/generated/google/apis/calendar_v3/service.rb +2 -2
  51. data/generated/google/apis/civicinfo_v2/classes.rb +2 -2
  52. data/generated/google/apis/civicinfo_v2/representations.rb +4 -4
  53. data/generated/google/apis/civicinfo_v2/service.rb +12 -12
  54. data/generated/google/apis/classroom_v1.rb +7 -7
  55. data/generated/google/apis/classroom_v1/classes.rb +1013 -991
  56. data/generated/google/apis/classroom_v1/representations.rb +207 -204
  57. data/generated/google/apis/classroom_v1/service.rb +709 -709
  58. data/generated/google/apis/cloudbuild_v1.rb +1 -1
  59. data/generated/google/apis/cloudbuild_v1/classes.rb +307 -307
  60. data/generated/google/apis/cloudbuild_v1/representations.rb +84 -84
  61. data/generated/google/apis/cloudbuild_v1/service.rb +125 -125
  62. data/generated/google/apis/clouddebugger_v2/classes.rb +673 -673
  63. data/generated/google/apis/clouddebugger_v2/representations.rb +152 -152
  64. data/generated/google/apis/clouddebugger_v2/service.rb +55 -55
  65. data/generated/google/apis/clouderrorreporting_v1beta1.rb +1 -1
  66. data/generated/google/apis/clouderrorreporting_v1beta1/classes.rb +121 -121
  67. data/generated/google/apis/clouderrorreporting_v1beta1/representations.rb +25 -25
  68. data/generated/google/apis/clouderrorreporting_v1beta1/service.rb +74 -74
  69. data/generated/google/apis/cloudkms_v1.rb +1 -1
  70. data/generated/google/apis/cloudkms_v1/classes.rb +668 -613
  71. data/generated/google/apis/cloudkms_v1/representations.rb +151 -133
  72. data/generated/google/apis/cloudkms_v1/service.rb +267 -267
  73. data/generated/google/apis/cloudresourcemanager_v1.rb +4 -4
  74. data/generated/google/apis/cloudresourcemanager_v1/classes.rb +1167 -1168
  75. data/generated/google/apis/cloudresourcemanager_v1/representations.rb +193 -193
  76. data/generated/google/apis/cloudresourcemanager_v1/service.rb +470 -469
  77. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +1 -1
  78. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +508 -509
  79. data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +94 -94
  80. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +157 -156
  81. data/generated/google/apis/cloudtrace_v1/service.rb +34 -34
  82. data/generated/google/apis/compute_beta.rb +1 -1
  83. data/generated/google/apis/compute_beta/classes.rb +163 -15
  84. data/generated/google/apis/compute_beta/representations.rb +54 -14
  85. data/generated/google/apis/compute_beta/service.rb +2258 -482
  86. data/generated/google/apis/compute_v1.rb +1 -1
  87. data/generated/google/apis/compute_v1/classes.rb +465 -13
  88. data/generated/google/apis/compute_v1/representations.rb +202 -16
  89. data/generated/google/apis/compute_v1/service.rb +573 -309
  90. data/generated/google/apis/container_v1.rb +1 -1
  91. data/generated/google/apis/container_v1/classes.rb +635 -589
  92. data/generated/google/apis/container_v1/representations.rb +139 -111
  93. data/generated/google/apis/container_v1/service.rb +272 -227
  94. data/generated/google/apis/content_v2.rb +1 -1
  95. data/generated/google/apis/content_v2/classes.rb +86 -74
  96. data/generated/google/apis/content_v2/representations.rb +107 -105
  97. data/generated/google/apis/content_v2/service.rb +131 -130
  98. data/generated/google/apis/customsearch_v1.rb +2 -2
  99. data/generated/google/apis/customsearch_v1/classes.rb +0 -6
  100. data/generated/google/apis/customsearch_v1/representations.rb +0 -1
  101. data/generated/google/apis/customsearch_v1/service.rb +2 -5
  102. data/generated/google/apis/dataflow_v1b3.rb +7 -4
  103. data/generated/google/apis/dataflow_v1b3/classes.rb +3405 -3405
  104. data/generated/google/apis/dataflow_v1b3/representations.rb +834 -834
  105. data/generated/google/apis/dataflow_v1b3/service.rb +244 -244
  106. data/generated/google/apis/dataproc_v1.rb +1 -1
  107. data/generated/google/apis/dataproc_v1/classes.rb +543 -691
  108. data/generated/google/apis/dataproc_v1/representations.rb +129 -185
  109. data/generated/google/apis/dataproc_v1/service.rb +347 -347
  110. data/generated/google/apis/datastore_v1.rb +4 -4
  111. data/generated/google/apis/datastore_v1/classes.rb +833 -833
  112. data/generated/google/apis/datastore_v1/representations.rb +182 -182
  113. data/generated/google/apis/datastore_v1/service.rb +45 -45
  114. data/generated/google/apis/deploymentmanager_v2/classes.rb +5 -5
  115. data/generated/google/apis/deploymentmanager_v2/representations.rb +10 -10
  116. data/generated/google/apis/deploymentmanager_v2/service.rb +20 -20
  117. data/generated/google/apis/discovery_v1/classes.rb +4 -4
  118. data/generated/google/apis/discovery_v1/representations.rb +2 -2
  119. data/generated/google/apis/discovery_v1/service.rb +1 -1
  120. data/generated/google/apis/dns_v1.rb +1 -1
  121. data/generated/google/apis/dns_v1/classes.rb +3 -3
  122. data/generated/google/apis/dns_v1/representations.rb +6 -6
  123. data/generated/google/apis/dns_v1/service.rb +12 -12
  124. data/generated/google/apis/dns_v2beta1.rb +1 -1
  125. data/generated/google/apis/doubleclickbidmanager_v1/service.rb +8 -8
  126. data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
  127. data/generated/google/apis/drive_v2.rb +1 -1
  128. data/generated/google/apis/drive_v2/classes.rb +1 -1
  129. data/generated/google/apis/drive_v2/service.rb +1 -1
  130. data/generated/google/apis/drive_v3.rb +1 -1
  131. data/generated/google/apis/drive_v3/service.rb +1 -1
  132. data/generated/google/apis/firebasedynamiclinks_v1.rb +1 -1
  133. data/generated/google/apis/firebasedynamiclinks_v1/classes.rb +160 -110
  134. data/generated/google/apis/firebasedynamiclinks_v1/representations.rb +60 -31
  135. data/generated/google/apis/firebasedynamiclinks_v1/service.rb +38 -3
  136. data/generated/google/apis/firebaserules_v1/classes.rb +354 -354
  137. data/generated/google/apis/firebaserules_v1/representations.rb +87 -87
  138. data/generated/google/apis/firebaserules_v1/service.rb +103 -103
  139. data/generated/google/apis/fusiontables_v2/service.rb +2 -2
  140. data/generated/google/apis/games_configuration_v1configuration.rb +1 -1
  141. data/generated/google/apis/games_configuration_v1configuration/classes.rb +2 -2
  142. data/generated/google/apis/games_configuration_v1configuration/representations.rb +4 -4
  143. data/generated/google/apis/games_configuration_v1configuration/service.rb +8 -8
  144. data/generated/google/apis/games_management_v1management.rb +1 -1
  145. data/generated/google/apis/games_v1.rb +1 -1
  146. data/generated/google/apis/games_v1/classes.rb +23 -23
  147. data/generated/google/apis/games_v1/representations.rb +43 -43
  148. data/generated/google/apis/games_v1/service.rb +72 -72
  149. data/generated/google/apis/genomics_v1.rb +1 -1
  150. data/generated/google/apis/genomics_v1/classes.rb +2316 -2316
  151. data/generated/google/apis/genomics_v1/representations.rb +291 -291
  152. data/generated/google/apis/genomics_v1/service.rb +821 -821
  153. data/generated/google/apis/gmail_v1.rb +1 -1
  154. data/generated/google/apis/groupsmigration_v1.rb +1 -1
  155. data/generated/google/apis/groupssettings_v1.rb +1 -1
  156. data/generated/google/apis/groupssettings_v1/classes.rb +2 -2
  157. data/generated/google/apis/groupssettings_v1/service.rb +3 -0
  158. data/generated/google/apis/iam_v1/classes.rb +338 -338
  159. data/generated/google/apis/iam_v1/representations.rb +98 -98
  160. data/generated/google/apis/iam_v1/service.rb +35 -35
  161. data/generated/google/apis/identitytoolkit_v3/classes.rb +15 -15
  162. data/generated/google/apis/identitytoolkit_v3/representations.rb +30 -30
  163. data/generated/google/apis/identitytoolkit_v3/service.rb +64 -64
  164. data/generated/google/apis/kgsearch_v1/service.rb +13 -13
  165. data/generated/google/apis/language_v1.rb +1 -1
  166. data/generated/google/apis/language_v1/classes.rb +374 -374
  167. data/generated/google/apis/language_v1/representations.rb +97 -97
  168. data/generated/google/apis/language_v1/service.rb +16 -16
  169. data/generated/google/apis/language_v1beta1.rb +1 -1
  170. data/generated/google/apis/language_v1beta1/classes.rb +441 -441
  171. data/generated/google/apis/language_v1beta1/representations.rb +108 -108
  172. data/generated/google/apis/language_v1beta1/service.rb +30 -30
  173. data/generated/google/apis/licensing_v1/service.rb +2 -2
  174. data/generated/google/apis/logging_v2.rb +1 -1
  175. data/generated/google/apis/logging_v2/classes.rb +712 -712
  176. data/generated/google/apis/logging_v2/representations.rb +109 -109
  177. data/generated/google/apis/logging_v2/service.rb +543 -539
  178. data/generated/google/apis/logging_v2beta1.rb +1 -1
  179. data/generated/google/apis/logging_v2beta1/classes.rb +752 -752
  180. data/generated/google/apis/logging_v2beta1/representations.rb +94 -94
  181. data/generated/google/apis/logging_v2beta1/service.rb +257 -256
  182. data/generated/google/apis/manufacturers_v1/classes.rb +130 -130
  183. data/generated/google/apis/manufacturers_v1/representations.rb +28 -28
  184. data/generated/google/apis/mirror_v1/classes.rb +5 -5
  185. data/generated/google/apis/mirror_v1/representations.rb +10 -10
  186. data/generated/google/apis/mirror_v1/service.rb +20 -20
  187. data/generated/google/apis/ml_v1.rb +1 -1
  188. data/generated/google/apis/ml_v1/classes.rb +1830 -1210
  189. data/generated/google/apis/ml_v1/representations.rb +342 -120
  190. data/generated/google/apis/ml_v1/service.rb +365 -258
  191. data/generated/google/apis/monitoring_v3.rb +4 -4
  192. data/generated/google/apis/monitoring_v3/classes.rb +889 -889
  193. data/generated/google/apis/monitoring_v3/representations.rb +174 -174
  194. data/generated/google/apis/monitoring_v3/service.rb +119 -119
  195. data/generated/google/apis/mybusiness_v3/service.rb +5 -5
  196. data/generated/google/apis/oauth2_v2/service.rb +1 -1
  197. data/generated/google/apis/pagespeedonline_v2/classes.rb +11 -11
  198. data/generated/google/apis/pagespeedonline_v2/representations.rb +13 -13
  199. data/generated/google/apis/pagespeedonline_v2/service.rb +1 -1
  200. data/generated/google/apis/partners_v2.rb +1 -1
  201. data/generated/google/apis/partners_v2/classes.rb +550 -536
  202. data/generated/google/apis/partners_v2/representations.rb +118 -116
  203. data/generated/google/apis/partners_v2/service.rb +439 -439
  204. data/generated/google/apis/people_v1.rb +4 -4
  205. data/generated/google/apis/people_v1/classes.rb +414 -413
  206. data/generated/google/apis/people_v1/representations.rb +85 -85
  207. data/generated/google/apis/people_v1/service.rb +111 -18
  208. data/generated/google/apis/plus_domains_v1.rb +1 -1
  209. data/generated/google/apis/plus_domains_v1/service.rb +4 -4
  210. data/generated/google/apis/plus_v1.rb +1 -1
  211. data/generated/google/apis/plus_v1/service.rb +1 -1
  212. data/generated/google/apis/prediction_v1_6/service.rb +8 -8
  213. data/generated/google/apis/proximitybeacon_v1beta1.rb +1 -1
  214. data/generated/google/apis/proximitybeacon_v1beta1/classes.rb +443 -443
  215. data/generated/google/apis/proximitybeacon_v1beta1/representations.rb +92 -92
  216. data/generated/google/apis/proximitybeacon_v1beta1/service.rb +152 -152
  217. data/generated/google/apis/pubsub_v1/classes.rb +249 -249
  218. data/generated/google/apis/pubsub_v1/representations.rb +80 -80
  219. data/generated/google/apis/pubsub_v1/service.rb +415 -415
  220. data/generated/google/apis/qpx_express_v1/classes.rb +2 -2
  221. data/generated/google/apis/qpx_express_v1/representations.rb +4 -4
  222. data/generated/google/apis/qpx_express_v1/service.rb +8 -8
  223. data/generated/google/apis/replicapool_v1beta2/classes.rb +5 -5
  224. data/generated/google/apis/replicapool_v1beta2/representations.rb +10 -10
  225. data/generated/google/apis/replicapool_v1beta2/service.rb +21 -21
  226. data/generated/google/apis/replicapoolupdater_v1beta1/service.rb +1 -1
  227. data/generated/google/apis/resourceviews_v1beta2/classes.rb +5 -5
  228. data/generated/google/apis/resourceviews_v1beta2/representations.rb +10 -10
  229. data/generated/google/apis/resourceviews_v1beta2/service.rb +20 -20
  230. data/generated/google/apis/runtimeconfig_v1.rb +4 -4
  231. data/generated/google/apis/runtimeconfig_v1/classes.rb +15 -15
  232. data/generated/google/apis/runtimeconfig_v1/representations.rb +2 -2
  233. data/generated/google/apis/runtimeconfig_v1/service.rb +4 -4
  234. data/generated/google/apis/script_v1.rb +17 -17
  235. data/generated/google/apis/script_v1/classes.rb +27 -27
  236. data/generated/google/apis/script_v1/representations.rb +5 -5
  237. data/generated/google/apis/script_v1/service.rb +4 -4
  238. data/generated/google/apis/searchconsole_v1.rb +1 -1
  239. data/generated/google/apis/searchconsole_v1/classes.rb +53 -53
  240. data/generated/google/apis/searchconsole_v1/representations.rb +23 -23
  241. data/generated/google/apis/searchconsole_v1/service.rb +4 -4
  242. data/generated/google/apis/servicecontrol_v1.rb +1 -1
  243. data/generated/google/apis/servicecontrol_v1/classes.rb +1175 -1175
  244. data/generated/google/apis/servicecontrol_v1/representations.rb +206 -206
  245. data/generated/google/apis/servicecontrol_v1/service.rb +116 -116
  246. data/generated/google/apis/servicemanagement_v1.rb +1 -1
  247. data/generated/google/apis/servicemanagement_v1/classes.rb +1186 -1125
  248. data/generated/google/apis/servicemanagement_v1/representations.rb +241 -223
  249. data/generated/google/apis/servicemanagement_v1/service.rb +201 -201
  250. data/generated/google/apis/serviceuser_v1.rb +1 -1
  251. data/generated/google/apis/serviceuser_v1/classes.rb +2645 -2641
  252. data/generated/google/apis/serviceuser_v1/representations.rb +234 -234
  253. data/generated/google/apis/serviceuser_v1/service.rb +37 -37
  254. data/generated/google/apis/sheets_v4.rb +1 -1
  255. data/generated/google/apis/sheets_v4/classes.rb +5042 -4111
  256. data/generated/google/apis/sheets_v4/representations.rb +994 -824
  257. data/generated/google/apis/sheets_v4/service.rb +80 -80
  258. data/generated/google/apis/site_verification_v1/classes.rb +6 -6
  259. data/generated/google/apis/site_verification_v1/representations.rb +8 -8
  260. data/generated/google/apis/site_verification_v1/service.rb +12 -12
  261. data/generated/google/apis/slides_v1.rb +1 -1
  262. data/generated/google/apis/slides_v1/classes.rb +2885 -2885
  263. data/generated/google/apis/slides_v1/representations.rb +310 -310
  264. data/generated/google/apis/slides_v1/service.rb +54 -54
  265. data/generated/google/apis/sourcerepo_v1/classes.rb +206 -206
  266. data/generated/google/apis/sourcerepo_v1/representations.rb +52 -52
  267. data/generated/google/apis/sourcerepo_v1/service.rb +5 -5
  268. data/generated/google/apis/spanner_v1.rb +1 -1
  269. data/generated/google/apis/spanner_v1/classes.rb +2142 -2141
  270. data/generated/google/apis/spanner_v1/representations.rb +174 -174
  271. data/generated/google/apis/spanner_v1/service.rb +497 -497
  272. data/generated/google/apis/speech_v1beta1.rb +1 -1
  273. data/generated/google/apis/speech_v1beta1/classes.rb +227 -227
  274. data/generated/google/apis/speech_v1beta1/representations.rb +50 -50
  275. data/generated/google/apis/speech_v1beta1/service.rb +33 -33
  276. data/generated/google/apis/sqladmin_v1beta4.rb +1 -1
  277. data/generated/google/apis/sqladmin_v1beta4/classes.rb +21 -21
  278. data/generated/google/apis/sqladmin_v1beta4/representations.rb +29 -29
  279. data/generated/google/apis/sqladmin_v1beta4/service.rb +56 -56
  280. data/generated/google/apis/storage_v1.rb +1 -1
  281. data/generated/google/apis/storage_v1/classes.rb +40 -6
  282. data/generated/google/apis/storage_v1/representations.rb +20 -4
  283. data/generated/google/apis/storage_v1/service.rb +61 -46
  284. data/generated/google/apis/storagetransfer_v1.rb +1 -1
  285. data/generated/google/apis/storagetransfer_v1/classes.rb +184 -184
  286. data/generated/google/apis/storagetransfer_v1/representations.rb +35 -35
  287. data/generated/google/apis/storagetransfer_v1/service.rb +70 -70
  288. data/generated/google/apis/tagmanager_v1/service.rb +33 -33
  289. data/generated/google/apis/toolresults_v1beta3.rb +1 -1
  290. data/generated/google/apis/translate_v2/classes.rb +12 -12
  291. data/generated/google/apis/translate_v2/representations.rb +10 -10
  292. data/generated/google/apis/translate_v2/service.rb +62 -62
  293. data/generated/google/apis/vision_v1.rb +1 -1
  294. data/generated/google/apis/vision_v1/classes.rb +1267 -1267
  295. data/generated/google/apis/vision_v1/representations.rb +200 -200
  296. data/generated/google/apis/vision_v1/service.rb +10 -10
  297. data/generated/google/apis/webmasters_v3.rb +1 -1
  298. data/generated/google/apis/webmasters_v3/classes.rb +4 -4
  299. data/generated/google/apis/webmasters_v3/representations.rb +8 -8
  300. data/generated/google/apis/webmasters_v3/service.rb +21 -21
  301. data/generated/google/apis/youtube_analytics_v1.rb +1 -1
  302. data/generated/google/apis/youtube_analytics_v1/classes.rb +2 -2
  303. data/generated/google/apis/youtube_analytics_v1/representations.rb +4 -4
  304. data/generated/google/apis/youtube_analytics_v1/service.rb +8 -8
  305. data/generated/google/apis/youtube_v3/classes.rb +20 -20
  306. data/generated/google/apis/youtube_v3/representations.rb +40 -40
  307. data/generated/google/apis/youtube_v3/service.rb +80 -80
  308. data/generated/google/apis/youtubereporting_v1.rb +1 -1
  309. data/generated/google/apis/youtubereporting_v1/classes.rb +129 -129
  310. data/generated/google/apis/youtubereporting_v1/representations.rb +38 -38
  311. data/generated/google/apis/youtubereporting_v1/service.rb +97 -97
  312. data/lib/google/apis/generator/annotator.rb +2 -2
  313. data/lib/google/apis/generator/model.rb +2 -2
  314. data/lib/google/apis/version.rb +1 -1
  315. metadata +2 -2
@@ -22,6 +22,42 @@ module Google
22
22
  module Apis
23
23
  module LoggingV2
24
24
 
25
+ class HttpRequest
26
+ class Representation < Google::Apis::Core::JsonRepresentation; end
27
+
28
+ include Google::Apis::Core::JsonObjectSupport
29
+ end
30
+
31
+ class ListSinksResponse
32
+ class Representation < Google::Apis::Core::JsonRepresentation; end
33
+
34
+ include Google::Apis::Core::JsonObjectSupport
35
+ end
36
+
37
+ class LabelDescriptor
38
+ class Representation < Google::Apis::Core::JsonRepresentation; end
39
+
40
+ include Google::Apis::Core::JsonObjectSupport
41
+ end
42
+
43
+ class MonitoredResourceDescriptor
44
+ class Representation < Google::Apis::Core::JsonRepresentation; end
45
+
46
+ include Google::Apis::Core::JsonObjectSupport
47
+ end
48
+
49
+ class LogEntrySourceLocation
50
+ class Representation < Google::Apis::Core::JsonRepresentation; end
51
+
52
+ include Google::Apis::Core::JsonObjectSupport
53
+ end
54
+
55
+ class ListLogEntriesResponse
56
+ class Representation < Google::Apis::Core::JsonRepresentation; end
57
+
58
+ include Google::Apis::Core::JsonObjectSupport
59
+ end
60
+
25
61
  class LogLine
26
62
  class Representation < Google::Apis::Core::JsonRepresentation; end
27
63
 
@@ -76,19 +112,19 @@ module Google
76
112
  include Google::Apis::Core::JsonObjectSupport
77
113
  end
78
114
 
79
- class WriteLogEntriesResponse
115
+ class LogMetric
80
116
  class Representation < Google::Apis::Core::JsonRepresentation; end
81
117
 
82
118
  include Google::Apis::Core::JsonObjectSupport
83
119
  end
84
120
 
85
- class LogMetric
121
+ class LogEntryOperation
86
122
  class Representation < Google::Apis::Core::JsonRepresentation; end
87
123
 
88
124
  include Google::Apis::Core::JsonObjectSupport
89
125
  end
90
126
 
91
- class LogEntryOperation
127
+ class WriteLogEntriesResponse
92
128
  class Representation < Google::Apis::Core::JsonRepresentation; end
93
129
 
94
130
  include Google::Apis::Core::JsonObjectSupport
@@ -119,49 +155,81 @@ module Google
119
155
  end
120
156
 
121
157
  class HttpRequest
122
- class Representation < Google::Apis::Core::JsonRepresentation; end
123
-
124
- include Google::Apis::Core::JsonObjectSupport
158
+ # @private
159
+ class Representation < Google::Apis::Core::JsonRepresentation
160
+ property :latency, as: 'latency'
161
+ property :user_agent, as: 'userAgent'
162
+ property :cache_fill_bytes, :numeric_string => true, as: 'cacheFillBytes'
163
+ property :request_method, as: 'requestMethod'
164
+ property :request_size, :numeric_string => true, as: 'requestSize'
165
+ property :response_size, :numeric_string => true, as: 'responseSize'
166
+ property :request_url, as: 'requestUrl'
167
+ property :remote_ip, as: 'remoteIp'
168
+ property :server_ip, as: 'serverIp'
169
+ property :cache_lookup, as: 'cacheLookup'
170
+ property :cache_hit, as: 'cacheHit'
171
+ property :cache_validated_with_origin_server, as: 'cacheValidatedWithOriginServer'
172
+ property :status, as: 'status'
173
+ property :referer, as: 'referer'
174
+ end
125
175
  end
126
176
 
127
177
  class ListSinksResponse
128
- class Representation < Google::Apis::Core::JsonRepresentation; end
178
+ # @private
179
+ class Representation < Google::Apis::Core::JsonRepresentation
180
+ property :next_page_token, as: 'nextPageToken'
181
+ collection :sinks, as: 'sinks', class: Google::Apis::LoggingV2::LogSink, decorator: Google::Apis::LoggingV2::LogSink::Representation
129
182
 
130
- include Google::Apis::Core::JsonObjectSupport
183
+ end
131
184
  end
132
185
 
133
186
  class LabelDescriptor
134
- class Representation < Google::Apis::Core::JsonRepresentation; end
135
-
136
- include Google::Apis::Core::JsonObjectSupport
187
+ # @private
188
+ class Representation < Google::Apis::Core::JsonRepresentation
189
+ property :key, as: 'key'
190
+ property :description, as: 'description'
191
+ property :value_type, as: 'valueType'
192
+ end
137
193
  end
138
194
 
139
195
  class MonitoredResourceDescriptor
140
- class Representation < Google::Apis::Core::JsonRepresentation; end
196
+ # @private
197
+ class Representation < Google::Apis::Core::JsonRepresentation
198
+ property :name, as: 'name'
199
+ property :display_name, as: 'displayName'
200
+ property :description, as: 'description'
201
+ property :type, as: 'type'
202
+ collection :labels, as: 'labels', class: Google::Apis::LoggingV2::LabelDescriptor, decorator: Google::Apis::LoggingV2::LabelDescriptor::Representation
141
203
 
142
- include Google::Apis::Core::JsonObjectSupport
204
+ end
143
205
  end
144
206
 
145
207
  class LogEntrySourceLocation
146
- class Representation < Google::Apis::Core::JsonRepresentation; end
147
-
148
- include Google::Apis::Core::JsonObjectSupport
208
+ # @private
209
+ class Representation < Google::Apis::Core::JsonRepresentation
210
+ property :file, as: 'file'
211
+ property :function, as: 'function'
212
+ property :line, :numeric_string => true, as: 'line'
213
+ end
149
214
  end
150
215
 
151
216
  class ListLogEntriesResponse
152
- class Representation < Google::Apis::Core::JsonRepresentation; end
217
+ # @private
218
+ class Representation < Google::Apis::Core::JsonRepresentation
219
+ collection :entries, as: 'entries', class: Google::Apis::LoggingV2::LogEntry, decorator: Google::Apis::LoggingV2::LogEntry::Representation
153
220
 
154
- include Google::Apis::Core::JsonObjectSupport
221
+ property :next_page_token, as: 'nextPageToken'
222
+ end
155
223
  end
156
224
 
157
225
  class LogLine
158
226
  # @private
159
227
  class Representation < Google::Apis::Core::JsonRepresentation
228
+ property :time, as: 'time'
160
229
  property :severity, as: 'severity'
161
230
  property :log_message, as: 'logMessage'
162
231
  property :source_location, as: 'sourceLocation', class: Google::Apis::LoggingV2::SourceLocation, decorator: Google::Apis::LoggingV2::SourceLocation::Representation
163
232
 
164
- property :time, as: 'time'
165
233
  end
166
234
  end
167
235
 
@@ -183,45 +251,45 @@ module Google
183
251
  class LogEntry
184
252
  # @private
185
253
  class Representation < Google::Apis::Core::JsonRepresentation
254
+ property :insert_id, as: 'insertId'
255
+ property :operation, as: 'operation', class: Google::Apis::LoggingV2::LogEntryOperation, decorator: Google::Apis::LoggingV2::LogEntryOperation::Representation
256
+
257
+ property :text_payload, as: 'textPayload'
258
+ hash :proto_payload, as: 'protoPayload'
186
259
  property :trace, as: 'trace'
187
260
  hash :labels, as: 'labels'
188
261
  property :severity, as: 'severity'
189
262
  property :source_location, as: 'sourceLocation', class: Google::Apis::LoggingV2::LogEntrySourceLocation, decorator: Google::Apis::LoggingV2::LogEntrySourceLocation::Representation
190
263
 
191
- property :timestamp, as: 'timestamp'
192
264
  property :receive_timestamp, as: 'receiveTimestamp'
265
+ property :timestamp, as: 'timestamp'
193
266
  property :log_name, as: 'logName'
194
267
  property :http_request, as: 'httpRequest', class: Google::Apis::LoggingV2::HttpRequest, decorator: Google::Apis::LoggingV2::HttpRequest::Representation
195
268
 
196
269
  property :resource, as: 'resource', class: Google::Apis::LoggingV2::MonitoredResource, decorator: Google::Apis::LoggingV2::MonitoredResource::Representation
197
270
 
198
271
  hash :json_payload, as: 'jsonPayload'
199
- property :insert_id, as: 'insertId'
200
- property :operation, as: 'operation', class: Google::Apis::LoggingV2::LogEntryOperation, decorator: Google::Apis::LoggingV2::LogEntryOperation::Representation
201
-
202
- property :text_payload, as: 'textPayload'
203
- hash :proto_payload, as: 'protoPayload'
204
272
  end
205
273
  end
206
274
 
207
275
  class SourceLocation
208
276
  # @private
209
277
  class Representation < Google::Apis::Core::JsonRepresentation
278
+ property :file, as: 'file'
210
279
  property :function_name, as: 'functionName'
211
280
  property :line, :numeric_string => true, as: 'line'
212
- property :file, as: 'file'
213
281
  end
214
282
  end
215
283
 
216
284
  class ListLogEntriesRequest
217
285
  # @private
218
286
  class Representation < Google::Apis::Core::JsonRepresentation
219
- property :page_token, as: 'pageToken'
220
287
  property :page_size, as: 'pageSize'
221
288
  property :order_by, as: 'orderBy'
222
289
  collection :resource_names, as: 'resourceNames'
223
290
  collection :project_ids, as: 'projectIds'
224
291
  property :filter, as: 'filter'
292
+ property :page_token, as: 'pageToken'
225
293
  end
226
294
  end
227
295
 
@@ -245,9 +313,9 @@ module Google
245
313
  property :task_queue_name, as: 'taskQueueName'
246
314
  property :request_id, as: 'requestId'
247
315
  property :nickname, as: 'nickname'
248
- property :pending_time, as: 'pendingTime'
249
- property :resource, as: 'resource'
250
316
  property :status, as: 'status'
317
+ property :resource, as: 'resource'
318
+ property :pending_time, as: 'pendingTime'
251
319
  property :task_name, as: 'taskName'
252
320
  property :url_map_entry, as: 'urlMapEntry'
253
321
  property :instance_index, as: 'instanceIndex'
@@ -282,29 +350,29 @@ module Google
282
350
  end
283
351
  end
284
352
 
285
- class WriteLogEntriesResponse
286
- # @private
287
- class Representation < Google::Apis::Core::JsonRepresentation
288
- end
289
- end
290
-
291
353
  class LogMetric
292
354
  # @private
293
355
  class Representation < Google::Apis::Core::JsonRepresentation
294
- property :version, as: 'version'
295
356
  property :filter, as: 'filter'
296
357
  property :name, as: 'name'
297
358
  property :description, as: 'description'
359
+ property :version, as: 'version'
298
360
  end
299
361
  end
300
362
 
301
363
  class LogEntryOperation
302
364
  # @private
303
365
  class Representation < Google::Apis::Core::JsonRepresentation
366
+ property :last, as: 'last'
304
367
  property :id, as: 'id'
305
368
  property :producer, as: 'producer'
306
369
  property :first, as: 'first'
307
- property :last, as: 'last'
370
+ end
371
+ end
372
+
373
+ class WriteLogEntriesResponse
374
+ # @private
375
+ class Representation < Google::Apis::Core::JsonRepresentation
308
376
  end
309
377
  end
310
378
 
@@ -319,14 +387,14 @@ module Google
319
387
  class LogSink
320
388
  # @private
321
389
  class Representation < Google::Apis::Core::JsonRepresentation
322
- property :name, as: 'name'
323
390
  property :include_children, as: 'includeChildren'
324
- property :destination, as: 'destination'
325
391
  property :filter, as: 'filter'
392
+ property :destination, as: 'destination'
326
393
  property :end_time, as: 'endTime'
327
- property :writer_identity, as: 'writerIdentity'
328
394
  property :start_time, as: 'startTime'
395
+ property :writer_identity, as: 'writerIdentity'
329
396
  property :output_version_format, as: 'outputVersionFormat'
397
+ property :name, as: 'name'
330
398
  end
331
399
  end
332
400
 
@@ -346,76 +414,8 @@ module Google
346
414
  class ListLogsResponse
347
415
  # @private
348
416
  class Representation < Google::Apis::Core::JsonRepresentation
349
- collection :log_names, as: 'logNames'
350
417
  property :next_page_token, as: 'nextPageToken'
351
- end
352
- end
353
-
354
- class HttpRequest
355
- # @private
356
- class Representation < Google::Apis::Core::JsonRepresentation
357
- property :cache_validated_with_origin_server, as: 'cacheValidatedWithOriginServer'
358
- property :status, as: 'status'
359
- property :referer, as: 'referer'
360
- property :user_agent, as: 'userAgent'
361
- property :latency, as: 'latency'
362
- property :cache_fill_bytes, :numeric_string => true, as: 'cacheFillBytes'
363
- property :request_method, as: 'requestMethod'
364
- property :response_size, :numeric_string => true, as: 'responseSize'
365
- property :request_size, :numeric_string => true, as: 'requestSize'
366
- property :request_url, as: 'requestUrl'
367
- property :server_ip, as: 'serverIp'
368
- property :remote_ip, as: 'remoteIp'
369
- property :cache_lookup, as: 'cacheLookup'
370
- property :cache_hit, as: 'cacheHit'
371
- end
372
- end
373
-
374
- class ListSinksResponse
375
- # @private
376
- class Representation < Google::Apis::Core::JsonRepresentation
377
- property :next_page_token, as: 'nextPageToken'
378
- collection :sinks, as: 'sinks', class: Google::Apis::LoggingV2::LogSink, decorator: Google::Apis::LoggingV2::LogSink::Representation
379
-
380
- end
381
- end
382
-
383
- class LabelDescriptor
384
- # @private
385
- class Representation < Google::Apis::Core::JsonRepresentation
386
- property :key, as: 'key'
387
- property :description, as: 'description'
388
- property :value_type, as: 'valueType'
389
- end
390
- end
391
-
392
- class MonitoredResourceDescriptor
393
- # @private
394
- class Representation < Google::Apis::Core::JsonRepresentation
395
- property :name, as: 'name'
396
- property :display_name, as: 'displayName'
397
- property :description, as: 'description'
398
- property :type, as: 'type'
399
- collection :labels, as: 'labels', class: Google::Apis::LoggingV2::LabelDescriptor, decorator: Google::Apis::LoggingV2::LabelDescriptor::Representation
400
-
401
- end
402
- end
403
-
404
- class LogEntrySourceLocation
405
- # @private
406
- class Representation < Google::Apis::Core::JsonRepresentation
407
- property :file, as: 'file'
408
- property :function, as: 'function'
409
- property :line, :numeric_string => true, as: 'line'
410
- end
411
- end
412
-
413
- class ListLogEntriesResponse
414
- # @private
415
- class Representation < Google::Apis::Core::JsonRepresentation
416
- property :next_page_token, as: 'nextPageToken'
417
- collection :entries, as: 'entries', class: Google::Apis::LoggingV2::LogEntry, decorator: Google::Apis::LoggingV2::LogEntry::Representation
418
-
418
+ collection :log_names, as: 'logNames'
419
419
  end
420
420
  end
421
421
  end
@@ -47,6 +47,45 @@ module Google
47
47
  @batch_path = 'batch'
48
48
  end
49
49
 
50
+ # Deletes all the log entries in a log. The log reappears if it receives new
51
+ # entries. Log entries written shortly before the delete operation might not be
52
+ # deleted.
53
+ # @param [String] log_name
54
+ # Required. The resource name of the log to delete:
55
+ # "projects/[PROJECT_ID]/logs/[LOG_ID]"
56
+ # "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
57
+ # "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]"
58
+ # "folders/[FOLDER_ID]/logs/[LOG_ID]"
59
+ # [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog"
60
+ # , "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%
61
+ # 2Factivity". For more information about log names, see LogEntry.
62
+ # @param [String] fields
63
+ # Selector specifying which fields to include in a partial response.
64
+ # @param [String] quota_user
65
+ # Available to use for quota purposes for server-side applications. Can be any
66
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
67
+ # @param [Google::Apis::RequestOptions] options
68
+ # Request-specific options
69
+ #
70
+ # @yield [result, err] Result & error if block supplied
71
+ # @yieldparam result [Google::Apis::LoggingV2::Empty] parsed result object
72
+ # @yieldparam err [StandardError] error object if request failed
73
+ #
74
+ # @return [Google::Apis::LoggingV2::Empty]
75
+ #
76
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
77
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
78
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
79
+ def delete_project_log(log_name, fields: nil, quota_user: nil, options: nil, &block)
80
+ command = make_simple_command(:delete, 'v2/{+logName}', options)
81
+ command.response_representation = Google::Apis::LoggingV2::Empty::Representation
82
+ command.response_class = Google::Apis::LoggingV2::Empty
83
+ command.params['logName'] = log_name unless log_name.nil?
84
+ command.query['fields'] = fields unless fields.nil?
85
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
86
+ execute_or_queue_command(command, &block)
87
+ end
88
+
50
89
  # Lists the logs in projects, organizations, folders, or billing accounts. Only
51
90
  # logs that have entries are listed.
52
91
  # @param [String] parent
@@ -64,11 +103,11 @@ module Google
64
103
  # Optional. The maximum number of results to return from this request. Non-
65
104
  # positive values are ignored. The presence of nextPageToken in the response
66
105
  # indicates that more results might be available.
106
+ # @param [String] fields
107
+ # Selector specifying which fields to include in a partial response.
67
108
  # @param [String] quota_user
68
109
  # Available to use for quota purposes for server-side applications. Can be any
69
110
  # arbitrary string assigned to a user, but should not exceed 40 characters.
70
- # @param [String] fields
71
- # Selector specifying which fields to include in a partial response.
72
111
  # @param [Google::Apis::RequestOptions] options
73
112
  # Request-specific options
74
113
  #
@@ -81,54 +120,15 @@ module Google
81
120
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
82
121
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
83
122
  # @raise [Google::Apis::AuthorizationError] Authorization is required
84
- def list_folder_logs(parent, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block)
123
+ def list_project_logs(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
85
124
  command = make_simple_command(:get, 'v2/{+parent}/logs', options)
86
125
  command.response_representation = Google::Apis::LoggingV2::ListLogsResponse::Representation
87
126
  command.response_class = Google::Apis::LoggingV2::ListLogsResponse
88
127
  command.params['parent'] = parent unless parent.nil?
89
128
  command.query['pageToken'] = page_token unless page_token.nil?
90
129
  command.query['pageSize'] = page_size unless page_size.nil?
91
- command.query['quotaUser'] = quota_user unless quota_user.nil?
92
130
  command.query['fields'] = fields unless fields.nil?
93
- execute_or_queue_command(command, &block)
94
- end
95
-
96
- # Deletes all the log entries in a log. The log reappears if it receives new
97
- # entries. Log entries written shortly before the delete operation might not be
98
- # deleted.
99
- # @param [String] log_name
100
- # Required. The resource name of the log to delete:
101
- # "projects/[PROJECT_ID]/logs/[LOG_ID]"
102
- # "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
103
- # "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]"
104
- # "folders/[FOLDER_ID]/logs/[LOG_ID]"
105
- # [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog"
106
- # , "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%
107
- # 2Factivity". For more information about log names, see LogEntry.
108
- # @param [String] quota_user
109
- # Available to use for quota purposes for server-side applications. Can be any
110
- # arbitrary string assigned to a user, but should not exceed 40 characters.
111
- # @param [String] fields
112
- # Selector specifying which fields to include in a partial response.
113
- # @param [Google::Apis::RequestOptions] options
114
- # Request-specific options
115
- #
116
- # @yield [result, err] Result & error if block supplied
117
- # @yieldparam result [Google::Apis::LoggingV2::Empty] parsed result object
118
- # @yieldparam err [StandardError] error object if request failed
119
- #
120
- # @return [Google::Apis::LoggingV2::Empty]
121
- #
122
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
123
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
124
- # @raise [Google::Apis::AuthorizationError] Authorization is required
125
- def delete_folder_log(log_name, quota_user: nil, fields: nil, options: nil, &block)
126
- command = make_simple_command(:delete, 'v2/{+logName}', options)
127
- command.response_representation = Google::Apis::LoggingV2::Empty::Representation
128
- command.response_class = Google::Apis::LoggingV2::Empty
129
- command.params['logName'] = log_name unless log_name.nil?
130
131
  command.query['quotaUser'] = quota_user unless quota_user.nil?
131
- command.query['fields'] = fields unless fields.nil?
132
132
  execute_or_queue_command(command, &block)
133
133
  end
134
134
 
@@ -142,11 +142,11 @@ module Google
142
142
  # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
143
143
  # "folders/[FOLDER_ID]/sinks/[SINK_ID]"
144
144
  # Example: "projects/my-project-id/sinks/my-sink-id".
145
+ # @param [String] fields
146
+ # Selector specifying which fields to include in a partial response.
145
147
  # @param [String] quota_user
146
148
  # Available to use for quota purposes for server-side applications. Can be any
147
149
  # arbitrary string assigned to a user, but should not exceed 40 characters.
148
- # @param [String] fields
149
- # Selector specifying which fields to include in a partial response.
150
150
  # @param [Google::Apis::RequestOptions] options
151
151
  # Request-specific options
152
152
  #
@@ -159,13 +159,13 @@ module Google
159
159
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
160
160
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
161
161
  # @raise [Google::Apis::AuthorizationError] Authorization is required
162
- def delete_folder_sink(sink_name, quota_user: nil, fields: nil, options: nil, &block)
162
+ def delete_project_sink(sink_name, fields: nil, quota_user: nil, options: nil, &block)
163
163
  command = make_simple_command(:delete, 'v2/{+sinkName}', options)
164
164
  command.response_representation = Google::Apis::LoggingV2::Empty::Representation
165
165
  command.response_class = Google::Apis::LoggingV2::Empty
166
166
  command.params['sinkName'] = sink_name unless sink_name.nil?
167
- command.query['quotaUser'] = quota_user unless quota_user.nil?
168
167
  command.query['fields'] = fields unless fields.nil?
168
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
169
169
  execute_or_queue_command(command, &block)
170
170
  end
171
171
 
@@ -185,11 +185,11 @@ module Google
185
185
  # Optional. The maximum number of results to return from this request. Non-
186
186
  # positive values are ignored. The presence of nextPageToken in the response
187
187
  # indicates that more results might be available.
188
+ # @param [String] fields
189
+ # Selector specifying which fields to include in a partial response.
188
190
  # @param [String] quota_user
189
191
  # Available to use for quota purposes for server-side applications. Can be any
190
192
  # arbitrary string assigned to a user, but should not exceed 40 characters.
191
- # @param [String] fields
192
- # Selector specifying which fields to include in a partial response.
193
193
  # @param [Google::Apis::RequestOptions] options
194
194
  # Request-specific options
195
195
  #
@@ -202,15 +202,15 @@ module Google
202
202
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
203
203
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
204
204
  # @raise [Google::Apis::AuthorizationError] Authorization is required
205
- def list_folder_sinks(parent, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block)
205
+ def list_project_sinks(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
206
206
  command = make_simple_command(:get, 'v2/{+parent}/sinks', options)
207
207
  command.response_representation = Google::Apis::LoggingV2::ListSinksResponse::Representation
208
208
  command.response_class = Google::Apis::LoggingV2::ListSinksResponse
209
209
  command.params['parent'] = parent unless parent.nil?
210
210
  command.query['pageToken'] = page_token unless page_token.nil?
211
211
  command.query['pageSize'] = page_size unless page_size.nil?
212
- command.query['quotaUser'] = quota_user unless quota_user.nil?
213
212
  command.query['fields'] = fields unless fields.nil?
213
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
214
214
  execute_or_queue_command(command, &block)
215
215
  end
216
216
 
@@ -222,11 +222,11 @@ module Google
222
222
  # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
223
223
  # "folders/[FOLDER_ID]/sinks/[SINK_ID]"
224
224
  # Example: "projects/my-project-id/sinks/my-sink-id".
225
+ # @param [String] fields
226
+ # Selector specifying which fields to include in a partial response.
225
227
  # @param [String] quota_user
226
228
  # Available to use for quota purposes for server-side applications. Can be any
227
229
  # arbitrary string assigned to a user, but should not exceed 40 characters.
228
- # @param [String] fields
229
- # Selector specifying which fields to include in a partial response.
230
230
  # @param [Google::Apis::RequestOptions] options
231
231
  # Request-specific options
232
232
  #
@@ -239,13 +239,13 @@ module Google
239
239
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
240
240
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
241
241
  # @raise [Google::Apis::AuthorizationError] Authorization is required
242
- def get_folder_sink(sink_name, quota_user: nil, fields: nil, options: nil, &block)
242
+ def get_project_sink(sink_name, fields: nil, quota_user: nil, options: nil, &block)
243
243
  command = make_simple_command(:get, 'v2/{+sinkName}', options)
244
244
  command.response_representation = Google::Apis::LoggingV2::LogSink::Representation
245
245
  command.response_class = Google::Apis::LoggingV2::LogSink
246
246
  command.params['sinkName'] = sink_name unless sink_name.nil?
247
- command.query['quotaUser'] = quota_user unless quota_user.nil?
248
247
  command.query['fields'] = fields unless fields.nil?
248
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
249
249
  execute_or_queue_command(command, &block)
250
250
  end
251
251
 
@@ -272,12 +272,13 @@ module Google
272
272
  # there is no change to the sink's writer_identity.
273
273
  # If the old value is false and the new value is true, then writer_identity is
274
274
  # changed to a unique service account.
275
- # It is an error if the old value is true and the new value is false.
275
+ # It is an error if the old value is true and the new value is set to false or
276
+ # defaulted to false.
277
+ # @param [String] fields
278
+ # Selector specifying which fields to include in a partial response.
276
279
  # @param [String] quota_user
277
280
  # Available to use for quota purposes for server-side applications. Can be any
278
281
  # arbitrary string assigned to a user, but should not exceed 40 characters.
279
- # @param [String] fields
280
- # Selector specifying which fields to include in a partial response.
281
282
  # @param [Google::Apis::RequestOptions] options
282
283
  # Request-specific options
283
284
  #
@@ -290,7 +291,7 @@ module Google
290
291
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
291
292
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
292
293
  # @raise [Google::Apis::AuthorizationError] Authorization is required
293
- def update_folder_sink(sink_name, log_sink_object = nil, unique_writer_identity: nil, quota_user: nil, fields: nil, options: nil, &block)
294
+ def update_project_sink(sink_name, log_sink_object = nil, unique_writer_identity: nil, fields: nil, quota_user: nil, options: nil, &block)
294
295
  command = make_simple_command(:put, 'v2/{+sinkName}', options)
295
296
  command.request_representation = Google::Apis::LoggingV2::LogSink::Representation
296
297
  command.request_object = log_sink_object
@@ -298,8 +299,8 @@ module Google
298
299
  command.response_class = Google::Apis::LoggingV2::LogSink
299
300
  command.params['sinkName'] = sink_name unless sink_name.nil?
300
301
  command.query['uniqueWriterIdentity'] = unique_writer_identity unless unique_writer_identity.nil?
301
- command.query['quotaUser'] = quota_user unless quota_user.nil?
302
302
  command.query['fields'] = fields unless fields.nil?
303
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
303
304
  execute_or_queue_command(command, &block)
304
305
  end
305
306
 
@@ -326,11 +327,11 @@ module Google
326
327
  # owned by a non-project resource such as an organization, then the value of
327
328
  # writer_identity will be a unique service account used only for exports from
328
329
  # the new sink. For more information, see writer_identity in LogSink.
330
+ # @param [String] fields
331
+ # Selector specifying which fields to include in a partial response.
329
332
  # @param [String] quota_user
330
333
  # Available to use for quota purposes for server-side applications. Can be any
331
334
  # arbitrary string assigned to a user, but should not exceed 40 characters.
332
- # @param [String] fields
333
- # Selector specifying which fields to include in a partial response.
334
335
  # @param [Google::Apis::RequestOptions] options
335
336
  # Request-specific options
336
337
  #
@@ -343,7 +344,7 @@ module Google
343
344
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
344
345
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
345
346
  # @raise [Google::Apis::AuthorizationError] Authorization is required
346
- def create_folder_sink(parent, log_sink_object = nil, unique_writer_identity: nil, quota_user: nil, fields: nil, options: nil, &block)
347
+ def create_project_sink(parent, log_sink_object = nil, unique_writer_identity: nil, fields: nil, quota_user: nil, options: nil, &block)
347
348
  command = make_simple_command(:post, 'v2/{+parent}/sinks', options)
348
349
  command.request_representation = Google::Apis::LoggingV2::LogSink::Representation
349
350
  command.request_object = log_sink_object
@@ -351,202 +352,204 @@ module Google
351
352
  command.response_class = Google::Apis::LoggingV2::LogSink
352
353
  command.params['parent'] = parent unless parent.nil?
353
354
  command.query['uniqueWriterIdentity'] = unique_writer_identity unless unique_writer_identity.nil?
354
- command.query['quotaUser'] = quota_user unless quota_user.nil?
355
355
  command.query['fields'] = fields unless fields.nil?
356
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
356
357
  execute_or_queue_command(command, &block)
357
358
  end
358
359
 
359
- # Lists the descriptors for monitored resource types used by Stackdriver Logging.
360
- # @param [String] page_token
361
- # Optional. If present, then retrieve the next batch of results from the
362
- # preceding call to this method. pageToken must be the value of nextPageToken
363
- # from the previous response. The values of other method parameters should be
364
- # identical to those in the previous call.
365
- # @param [Fixnum] page_size
366
- # Optional. The maximum number of results to return from this request. Non-
367
- # positive values are ignored. The presence of nextPageToken in the response
368
- # indicates that more results might be available.
360
+ # Deletes a logs-based metric.
361
+ # @param [String] metric_name
362
+ # The resource name of the metric to delete:
363
+ # "projects/[PROJECT_ID]/metrics/[METRIC_ID]"
364
+ # @param [String] fields
365
+ # Selector specifying which fields to include in a partial response.
369
366
  # @param [String] quota_user
370
367
  # Available to use for quota purposes for server-side applications. Can be any
371
368
  # arbitrary string assigned to a user, but should not exceed 40 characters.
372
- # @param [String] fields
373
- # Selector specifying which fields to include in a partial response.
374
369
  # @param [Google::Apis::RequestOptions] options
375
370
  # Request-specific options
376
371
  #
377
372
  # @yield [result, err] Result & error if block supplied
378
- # @yieldparam result [Google::Apis::LoggingV2::ListMonitoredResourceDescriptorsResponse] parsed result object
373
+ # @yieldparam result [Google::Apis::LoggingV2::Empty] parsed result object
379
374
  # @yieldparam err [StandardError] error object if request failed
380
375
  #
381
- # @return [Google::Apis::LoggingV2::ListMonitoredResourceDescriptorsResponse]
376
+ # @return [Google::Apis::LoggingV2::Empty]
382
377
  #
383
378
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
384
379
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
385
380
  # @raise [Google::Apis::AuthorizationError] Authorization is required
386
- def list_monitored_resource_descriptors(page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block)
387
- command = make_simple_command(:get, 'v2/monitoredResourceDescriptors', options)
388
- command.response_representation = Google::Apis::LoggingV2::ListMonitoredResourceDescriptorsResponse::Representation
389
- command.response_class = Google::Apis::LoggingV2::ListMonitoredResourceDescriptorsResponse
390
- command.query['pageToken'] = page_token unless page_token.nil?
391
- command.query['pageSize'] = page_size unless page_size.nil?
392
- command.query['quotaUser'] = quota_user unless quota_user.nil?
381
+ def delete_project_metric(metric_name, fields: nil, quota_user: nil, options: nil, &block)
382
+ command = make_simple_command(:delete, 'v2/{+metricName}', options)
383
+ command.response_representation = Google::Apis::LoggingV2::Empty::Representation
384
+ command.response_class = Google::Apis::LoggingV2::Empty
385
+ command.params['metricName'] = metric_name unless metric_name.nil?
393
386
  command.query['fields'] = fields unless fields.nil?
387
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
394
388
  execute_or_queue_command(command, &block)
395
389
  end
396
390
 
397
- # Lists the logs in projects, organizations, folders, or billing accounts. Only
398
- # logs that have entries are listed.
391
+ # Lists logs-based metrics.
399
392
  # @param [String] parent
400
- # Required. The resource name that owns the logs:
393
+ # Required. The name of the project containing the metrics:
401
394
  # "projects/[PROJECT_ID]"
402
- # "organizations/[ORGANIZATION_ID]"
403
- # "billingAccounts/[BILLING_ACCOUNT_ID]"
404
- # "folders/[FOLDER_ID]"
395
+ # @param [Fixnum] page_size
396
+ # Optional. The maximum number of results to return from this request. Non-
397
+ # positive values are ignored. The presence of nextPageToken in the response
398
+ # indicates that more results might be available.
405
399
  # @param [String] page_token
406
400
  # Optional. If present, then retrieve the next batch of results from the
407
401
  # preceding call to this method. pageToken must be the value of nextPageToken
408
402
  # from the previous response. The values of other method parameters should be
409
403
  # identical to those in the previous call.
410
- # @param [Fixnum] page_size
411
- # Optional. The maximum number of results to return from this request. Non-
412
- # positive values are ignored. The presence of nextPageToken in the response
413
- # indicates that more results might be available.
404
+ # @param [String] fields
405
+ # Selector specifying which fields to include in a partial response.
414
406
  # @param [String] quota_user
415
407
  # Available to use for quota purposes for server-side applications. Can be any
416
408
  # arbitrary string assigned to a user, but should not exceed 40 characters.
417
- # @param [String] fields
418
- # Selector specifying which fields to include in a partial response.
419
409
  # @param [Google::Apis::RequestOptions] options
420
410
  # Request-specific options
421
411
  #
422
412
  # @yield [result, err] Result & error if block supplied
423
- # @yieldparam result [Google::Apis::LoggingV2::ListLogsResponse] parsed result object
413
+ # @yieldparam result [Google::Apis::LoggingV2::ListLogMetricsResponse] parsed result object
424
414
  # @yieldparam err [StandardError] error object if request failed
425
415
  #
426
- # @return [Google::Apis::LoggingV2::ListLogsResponse]
416
+ # @return [Google::Apis::LoggingV2::ListLogMetricsResponse]
427
417
  #
428
418
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
429
419
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
430
420
  # @raise [Google::Apis::AuthorizationError] Authorization is required
431
- def list_organization_logs(parent, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block)
432
- command = make_simple_command(:get, 'v2/{+parent}/logs', options)
433
- command.response_representation = Google::Apis::LoggingV2::ListLogsResponse::Representation
434
- command.response_class = Google::Apis::LoggingV2::ListLogsResponse
421
+ def list_project_metrics(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
422
+ command = make_simple_command(:get, 'v2/{+parent}/metrics', options)
423
+ command.response_representation = Google::Apis::LoggingV2::ListLogMetricsResponse::Representation
424
+ command.response_class = Google::Apis::LoggingV2::ListLogMetricsResponse
435
425
  command.params['parent'] = parent unless parent.nil?
436
- command.query['pageToken'] = page_token unless page_token.nil?
437
426
  command.query['pageSize'] = page_size unless page_size.nil?
438
- command.query['quotaUser'] = quota_user unless quota_user.nil?
427
+ command.query['pageToken'] = page_token unless page_token.nil?
439
428
  command.query['fields'] = fields unless fields.nil?
429
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
440
430
  execute_or_queue_command(command, &block)
441
431
  end
442
432
 
443
- # Deletes all the log entries in a log. The log reappears if it receives new
444
- # entries. Log entries written shortly before the delete operation might not be
445
- # deleted.
446
- # @param [String] log_name
447
- # Required. The resource name of the log to delete:
448
- # "projects/[PROJECT_ID]/logs/[LOG_ID]"
449
- # "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
450
- # "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]"
451
- # "folders/[FOLDER_ID]/logs/[LOG_ID]"
452
- # [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog"
453
- # , "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%
454
- # 2Factivity". For more information about log names, see LogEntry.
433
+ # Gets a logs-based metric.
434
+ # @param [String] metric_name
435
+ # The resource name of the desired metric:
436
+ # "projects/[PROJECT_ID]/metrics/[METRIC_ID]"
437
+ # @param [String] fields
438
+ # Selector specifying which fields to include in a partial response.
455
439
  # @param [String] quota_user
456
440
  # Available to use for quota purposes for server-side applications. Can be any
457
441
  # arbitrary string assigned to a user, but should not exceed 40 characters.
458
- # @param [String] fields
459
- # Selector specifying which fields to include in a partial response.
460
442
  # @param [Google::Apis::RequestOptions] options
461
443
  # Request-specific options
462
444
  #
463
445
  # @yield [result, err] Result & error if block supplied
464
- # @yieldparam result [Google::Apis::LoggingV2::Empty] parsed result object
446
+ # @yieldparam result [Google::Apis::LoggingV2::LogMetric] parsed result object
465
447
  # @yieldparam err [StandardError] error object if request failed
466
448
  #
467
- # @return [Google::Apis::LoggingV2::Empty]
449
+ # @return [Google::Apis::LoggingV2::LogMetric]
468
450
  #
469
451
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
470
452
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
471
453
  # @raise [Google::Apis::AuthorizationError] Authorization is required
472
- def delete_organization_log(log_name, quota_user: nil, fields: nil, options: nil, &block)
473
- command = make_simple_command(:delete, 'v2/{+logName}', options)
474
- command.response_representation = Google::Apis::LoggingV2::Empty::Representation
475
- command.response_class = Google::Apis::LoggingV2::Empty
476
- command.params['logName'] = log_name unless log_name.nil?
477
- command.query['quotaUser'] = quota_user unless quota_user.nil?
454
+ def get_project_metric(metric_name, fields: nil, quota_user: nil, options: nil, &block)
455
+ command = make_simple_command(:get, 'v2/{+metricName}', options)
456
+ command.response_representation = Google::Apis::LoggingV2::LogMetric::Representation
457
+ command.response_class = Google::Apis::LoggingV2::LogMetric
458
+ command.params['metricName'] = metric_name unless metric_name.nil?
478
459
  command.query['fields'] = fields unless fields.nil?
460
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
479
461
  execute_or_queue_command(command, &block)
480
462
  end
481
463
 
482
- # Creates a sink that exports specified log entries to a destination. The export
483
- # of newly-ingested log entries begins immediately, unless the current time is
484
- # outside the sink's start and end times or the sink's writer_identity is not
485
- # permitted to write to the destination. A sink can export log entries only from
486
- # the resource owning the sink.
487
- # @param [String] parent
488
- # Required. The resource in which to create the sink:
489
- # "projects/[PROJECT_ID]"
490
- # "organizations/[ORGANIZATION_ID]"
491
- # "billingAccounts/[BILLING_ACCOUNT_ID]"
492
- # "folders/[FOLDER_ID]"
493
- # Examples: "projects/my-logging-project", "organizations/123456789".
494
- # @param [Google::Apis::LoggingV2::LogSink] log_sink_object
495
- # @param [Boolean] unique_writer_identity
496
- # Optional. Determines the kind of IAM identity returned as writer_identity in
497
- # the new sink. If this value is omitted or set to false, and if the sink's
498
- # parent is a project, then the value returned as writer_identity is the same
499
- # group or service account used by Stackdriver Logging before the addition of
500
- # writer identities to this API. The sink's destination must be in the same
501
- # project as the sink itself.If this field is set to true, or if the sink is
502
- # owned by a non-project resource such as an organization, then the value of
503
- # writer_identity will be a unique service account used only for exports from
504
- # the new sink. For more information, see writer_identity in LogSink.
464
+ # Creates or updates a logs-based metric.
465
+ # @param [String] metric_name
466
+ # The resource name of the metric to update:
467
+ # "projects/[PROJECT_ID]/metrics/[METRIC_ID]"
468
+ # The updated metric must be provided in the request and it's name field must be
469
+ # the same as [METRIC_ID] If the metric does not exist in [PROJECT_ID], then a
470
+ # new metric is created.
471
+ # @param [Google::Apis::LoggingV2::LogMetric] log_metric_object
472
+ # @param [String] fields
473
+ # Selector specifying which fields to include in a partial response.
505
474
  # @param [String] quota_user
506
475
  # Available to use for quota purposes for server-side applications. Can be any
507
476
  # arbitrary string assigned to a user, but should not exceed 40 characters.
508
- # @param [String] fields
509
- # Selector specifying which fields to include in a partial response.
510
477
  # @param [Google::Apis::RequestOptions] options
511
478
  # Request-specific options
512
479
  #
513
480
  # @yield [result, err] Result & error if block supplied
514
- # @yieldparam result [Google::Apis::LoggingV2::LogSink] parsed result object
481
+ # @yieldparam result [Google::Apis::LoggingV2::LogMetric] parsed result object
515
482
  # @yieldparam err [StandardError] error object if request failed
516
483
  #
517
- # @return [Google::Apis::LoggingV2::LogSink]
484
+ # @return [Google::Apis::LoggingV2::LogMetric]
518
485
  #
519
486
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
520
487
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
521
488
  # @raise [Google::Apis::AuthorizationError] Authorization is required
522
- def create_organization_sink(parent, log_sink_object = nil, unique_writer_identity: nil, quota_user: nil, fields: nil, options: nil, &block)
523
- command = make_simple_command(:post, 'v2/{+parent}/sinks', options)
524
- command.request_representation = Google::Apis::LoggingV2::LogSink::Representation
525
- command.request_object = log_sink_object
526
- command.response_representation = Google::Apis::LoggingV2::LogSink::Representation
527
- command.response_class = Google::Apis::LoggingV2::LogSink
528
- command.params['parent'] = parent unless parent.nil?
529
- command.query['uniqueWriterIdentity'] = unique_writer_identity unless unique_writer_identity.nil?
530
- command.query['quotaUser'] = quota_user unless quota_user.nil?
489
+ def update_project_metric(metric_name, log_metric_object = nil, fields: nil, quota_user: nil, options: nil, &block)
490
+ command = make_simple_command(:put, 'v2/{+metricName}', options)
491
+ command.request_representation = Google::Apis::LoggingV2::LogMetric::Representation
492
+ command.request_object = log_metric_object
493
+ command.response_representation = Google::Apis::LoggingV2::LogMetric::Representation
494
+ command.response_class = Google::Apis::LoggingV2::LogMetric
495
+ command.params['metricName'] = metric_name unless metric_name.nil?
531
496
  command.query['fields'] = fields unless fields.nil?
497
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
532
498
  execute_or_queue_command(command, &block)
533
499
  end
534
500
 
535
- # Deletes a sink. If the sink has a unique writer_identity, then that service
536
- # account is also deleted.
537
- # @param [String] sink_name
538
- # Required. The full resource name of the sink to delete, including the parent
539
- # resource and the sink identifier:
540
- # "projects/[PROJECT_ID]/sinks/[SINK_ID]"
541
- # "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
542
- # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
543
- # "folders/[FOLDER_ID]/sinks/[SINK_ID]"
544
- # Example: "projects/my-project-id/sinks/my-sink-id".
501
+ # Creates a logs-based metric.
502
+ # @param [String] parent
503
+ # The resource name of the project in which to create the metric:
504
+ # "projects/[PROJECT_ID]"
505
+ # The new metric must be provided in the request.
506
+ # @param [Google::Apis::LoggingV2::LogMetric] log_metric_object
507
+ # @param [String] fields
508
+ # Selector specifying which fields to include in a partial response.
545
509
  # @param [String] quota_user
546
510
  # Available to use for quota purposes for server-side applications. Can be any
547
511
  # arbitrary string assigned to a user, but should not exceed 40 characters.
512
+ # @param [Google::Apis::RequestOptions] options
513
+ # Request-specific options
514
+ #
515
+ # @yield [result, err] Result & error if block supplied
516
+ # @yieldparam result [Google::Apis::LoggingV2::LogMetric] parsed result object
517
+ # @yieldparam err [StandardError] error object if request failed
518
+ #
519
+ # @return [Google::Apis::LoggingV2::LogMetric]
520
+ #
521
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
522
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
523
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
524
+ def create_project_metric(parent, log_metric_object = nil, fields: nil, quota_user: nil, options: nil, &block)
525
+ command = make_simple_command(:post, 'v2/{+parent}/metrics', options)
526
+ command.request_representation = Google::Apis::LoggingV2::LogMetric::Representation
527
+ command.request_object = log_metric_object
528
+ command.response_representation = Google::Apis::LoggingV2::LogMetric::Representation
529
+ command.response_class = Google::Apis::LoggingV2::LogMetric
530
+ command.params['parent'] = parent unless parent.nil?
531
+ command.query['fields'] = fields unless fields.nil?
532
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
533
+ execute_or_queue_command(command, &block)
534
+ end
535
+
536
+ # Deletes all the log entries in a log. The log reappears if it receives new
537
+ # entries. Log entries written shortly before the delete operation might not be
538
+ # deleted.
539
+ # @param [String] log_name
540
+ # Required. The resource name of the log to delete:
541
+ # "projects/[PROJECT_ID]/logs/[LOG_ID]"
542
+ # "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
543
+ # "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]"
544
+ # "folders/[FOLDER_ID]/logs/[LOG_ID]"
545
+ # [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog"
546
+ # , "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%
547
+ # 2Factivity". For more information about log names, see LogEntry.
548
548
  # @param [String] fields
549
549
  # Selector specifying which fields to include in a partial response.
550
+ # @param [String] quota_user
551
+ # Available to use for quota purposes for server-side applications. Can be any
552
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
550
553
  # @param [Google::Apis::RequestOptions] options
551
554
  # Request-specific options
552
555
  #
@@ -559,13 +562,59 @@ module Google
559
562
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
560
563
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
561
564
  # @raise [Google::Apis::AuthorizationError] Authorization is required
562
- def delete_organization_sink(sink_name, quota_user: nil, fields: nil, options: nil, &block)
563
- command = make_simple_command(:delete, 'v2/{+sinkName}', options)
565
+ def delete_billing_account_log(log_name, fields: nil, quota_user: nil, options: nil, &block)
566
+ command = make_simple_command(:delete, 'v2/{+logName}', options)
564
567
  command.response_representation = Google::Apis::LoggingV2::Empty::Representation
565
568
  command.response_class = Google::Apis::LoggingV2::Empty
566
- command.params['sinkName'] = sink_name unless sink_name.nil?
569
+ command.params['logName'] = log_name unless log_name.nil?
570
+ command.query['fields'] = fields unless fields.nil?
567
571
  command.query['quotaUser'] = quota_user unless quota_user.nil?
572
+ execute_or_queue_command(command, &block)
573
+ end
574
+
575
+ # Lists the logs in projects, organizations, folders, or billing accounts. Only
576
+ # logs that have entries are listed.
577
+ # @param [String] parent
578
+ # Required. The resource name that owns the logs:
579
+ # "projects/[PROJECT_ID]"
580
+ # "organizations/[ORGANIZATION_ID]"
581
+ # "billingAccounts/[BILLING_ACCOUNT_ID]"
582
+ # "folders/[FOLDER_ID]"
583
+ # @param [String] page_token
584
+ # Optional. If present, then retrieve the next batch of results from the
585
+ # preceding call to this method. pageToken must be the value of nextPageToken
586
+ # from the previous response. The values of other method parameters should be
587
+ # identical to those in the previous call.
588
+ # @param [Fixnum] page_size
589
+ # Optional. The maximum number of results to return from this request. Non-
590
+ # positive values are ignored. The presence of nextPageToken in the response
591
+ # indicates that more results might be available.
592
+ # @param [String] fields
593
+ # Selector specifying which fields to include in a partial response.
594
+ # @param [String] quota_user
595
+ # Available to use for quota purposes for server-side applications. Can be any
596
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
597
+ # @param [Google::Apis::RequestOptions] options
598
+ # Request-specific options
599
+ #
600
+ # @yield [result, err] Result & error if block supplied
601
+ # @yieldparam result [Google::Apis::LoggingV2::ListLogsResponse] parsed result object
602
+ # @yieldparam err [StandardError] error object if request failed
603
+ #
604
+ # @return [Google::Apis::LoggingV2::ListLogsResponse]
605
+ #
606
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
607
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
608
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
609
+ def list_billing_account_logs(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
610
+ command = make_simple_command(:get, 'v2/{+parent}/logs', options)
611
+ command.response_representation = Google::Apis::LoggingV2::ListLogsResponse::Representation
612
+ command.response_class = Google::Apis::LoggingV2::ListLogsResponse
613
+ command.params['parent'] = parent unless parent.nil?
614
+ command.query['pageToken'] = page_token unless page_token.nil?
615
+ command.query['pageSize'] = page_size unless page_size.nil?
568
616
  command.query['fields'] = fields unless fields.nil?
617
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
569
618
  execute_or_queue_command(command, &block)
570
619
  end
571
620
 
@@ -585,11 +634,11 @@ module Google
585
634
  # Optional. The maximum number of results to return from this request. Non-
586
635
  # positive values are ignored. The presence of nextPageToken in the response
587
636
  # indicates that more results might be available.
637
+ # @param [String] fields
638
+ # Selector specifying which fields to include in a partial response.
588
639
  # @param [String] quota_user
589
640
  # Available to use for quota purposes for server-side applications. Can be any
590
641
  # arbitrary string assigned to a user, but should not exceed 40 characters.
591
- # @param [String] fields
592
- # Selector specifying which fields to include in a partial response.
593
642
  # @param [Google::Apis::RequestOptions] options
594
643
  # Request-specific options
595
644
  #
@@ -602,15 +651,15 @@ module Google
602
651
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
603
652
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
604
653
  # @raise [Google::Apis::AuthorizationError] Authorization is required
605
- def list_organization_sinks(parent, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block)
654
+ def list_billing_account_sinks(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
606
655
  command = make_simple_command(:get, 'v2/{+parent}/sinks', options)
607
656
  command.response_representation = Google::Apis::LoggingV2::ListSinksResponse::Representation
608
657
  command.response_class = Google::Apis::LoggingV2::ListSinksResponse
609
658
  command.params['parent'] = parent unless parent.nil?
610
659
  command.query['pageToken'] = page_token unless page_token.nil?
611
660
  command.query['pageSize'] = page_size unless page_size.nil?
612
- command.query['quotaUser'] = quota_user unless quota_user.nil?
613
661
  command.query['fields'] = fields unless fields.nil?
662
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
614
663
  execute_or_queue_command(command, &block)
615
664
  end
616
665
 
@@ -622,11 +671,11 @@ module Google
622
671
  # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
623
672
  # "folders/[FOLDER_ID]/sinks/[SINK_ID]"
624
673
  # Example: "projects/my-project-id/sinks/my-sink-id".
674
+ # @param [String] fields
675
+ # Selector specifying which fields to include in a partial response.
625
676
  # @param [String] quota_user
626
677
  # Available to use for quota purposes for server-side applications. Can be any
627
678
  # arbitrary string assigned to a user, but should not exceed 40 characters.
628
- # @param [String] fields
629
- # Selector specifying which fields to include in a partial response.
630
679
  # @param [Google::Apis::RequestOptions] options
631
680
  # Request-specific options
632
681
  #
@@ -639,13 +688,13 @@ module Google
639
688
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
640
689
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
641
690
  # @raise [Google::Apis::AuthorizationError] Authorization is required
642
- def get_organization_sink(sink_name, quota_user: nil, fields: nil, options: nil, &block)
691
+ def get_billing_account_sink(sink_name, fields: nil, quota_user: nil, options: nil, &block)
643
692
  command = make_simple_command(:get, 'v2/{+sinkName}', options)
644
693
  command.response_representation = Google::Apis::LoggingV2::LogSink::Representation
645
694
  command.response_class = Google::Apis::LoggingV2::LogSink
646
695
  command.params['sinkName'] = sink_name unless sink_name.nil?
647
- command.query['quotaUser'] = quota_user unless quota_user.nil?
648
696
  command.query['fields'] = fields unless fields.nil?
697
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
649
698
  execute_or_queue_command(command, &block)
650
699
  end
651
700
 
@@ -672,12 +721,13 @@ module Google
672
721
  # there is no change to the sink's writer_identity.
673
722
  # If the old value is false and the new value is true, then writer_identity is
674
723
  # changed to a unique service account.
675
- # It is an error if the old value is true and the new value is false.
724
+ # It is an error if the old value is true and the new value is set to false or
725
+ # defaulted to false.
726
+ # @param [String] fields
727
+ # Selector specifying which fields to include in a partial response.
676
728
  # @param [String] quota_user
677
729
  # Available to use for quota purposes for server-side applications. Can be any
678
730
  # arbitrary string assigned to a user, but should not exceed 40 characters.
679
- # @param [String] fields
680
- # Selector specifying which fields to include in a partial response.
681
731
  # @param [Google::Apis::RequestOptions] options
682
732
  # Request-specific options
683
733
  #
@@ -690,7 +740,7 @@ module Google
690
740
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
691
741
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
692
742
  # @raise [Google::Apis::AuthorizationError] Authorization is required
693
- def update_organization_sink(sink_name, log_sink_object = nil, unique_writer_identity: nil, quota_user: nil, fields: nil, options: nil, &block)
743
+ def update_billing_account_sink(sink_name, log_sink_object = nil, unique_writer_identity: nil, fields: nil, quota_user: nil, options: nil, &block)
694
744
  command = make_simple_command(:put, 'v2/{+sinkName}', options)
695
745
  command.request_representation = Google::Apis::LoggingV2::LogSink::Representation
696
746
  command.request_object = log_sink_object
@@ -698,69 +748,137 @@ module Google
698
748
  command.response_class = Google::Apis::LoggingV2::LogSink
699
749
  command.params['sinkName'] = sink_name unless sink_name.nil?
700
750
  command.query['uniqueWriterIdentity'] = unique_writer_identity unless unique_writer_identity.nil?
701
- command.query['quotaUser'] = quota_user unless quota_user.nil?
702
751
  command.query['fields'] = fields unless fields.nil?
752
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
703
753
  execute_or_queue_command(command, &block)
704
754
  end
705
755
 
706
- # Writes log entries to Stackdriver Logging.
707
- # @param [Google::Apis::LoggingV2::WriteLogEntriesRequest] write_log_entries_request_object
756
+ # Creates a sink that exports specified log entries to a destination. The export
757
+ # of newly-ingested log entries begins immediately, unless the current time is
758
+ # outside the sink's start and end times or the sink's writer_identity is not
759
+ # permitted to write to the destination. A sink can export log entries only from
760
+ # the resource owning the sink.
761
+ # @param [String] parent
762
+ # Required. The resource in which to create the sink:
763
+ # "projects/[PROJECT_ID]"
764
+ # "organizations/[ORGANIZATION_ID]"
765
+ # "billingAccounts/[BILLING_ACCOUNT_ID]"
766
+ # "folders/[FOLDER_ID]"
767
+ # Examples: "projects/my-logging-project", "organizations/123456789".
768
+ # @param [Google::Apis::LoggingV2::LogSink] log_sink_object
769
+ # @param [Boolean] unique_writer_identity
770
+ # Optional. Determines the kind of IAM identity returned as writer_identity in
771
+ # the new sink. If this value is omitted or set to false, and if the sink's
772
+ # parent is a project, then the value returned as writer_identity is the same
773
+ # group or service account used by Stackdriver Logging before the addition of
774
+ # writer identities to this API. The sink's destination must be in the same
775
+ # project as the sink itself.If this field is set to true, or if the sink is
776
+ # owned by a non-project resource such as an organization, then the value of
777
+ # writer_identity will be a unique service account used only for exports from
778
+ # the new sink. For more information, see writer_identity in LogSink.
779
+ # @param [String] fields
780
+ # Selector specifying which fields to include in a partial response.
708
781
  # @param [String] quota_user
709
782
  # Available to use for quota purposes for server-side applications. Can be any
710
783
  # arbitrary string assigned to a user, but should not exceed 40 characters.
711
- # @param [String] fields
712
- # Selector specifying which fields to include in a partial response.
713
784
  # @param [Google::Apis::RequestOptions] options
714
785
  # Request-specific options
715
786
  #
716
787
  # @yield [result, err] Result & error if block supplied
717
- # @yieldparam result [Google::Apis::LoggingV2::WriteLogEntriesResponse] parsed result object
788
+ # @yieldparam result [Google::Apis::LoggingV2::LogSink] parsed result object
718
789
  # @yieldparam err [StandardError] error object if request failed
719
790
  #
720
- # @return [Google::Apis::LoggingV2::WriteLogEntriesResponse]
791
+ # @return [Google::Apis::LoggingV2::LogSink]
721
792
  #
722
793
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
723
794
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
724
795
  # @raise [Google::Apis::AuthorizationError] Authorization is required
725
- def write_entry_log_entries(write_log_entries_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
726
- command = make_simple_command(:post, 'v2/entries:write', options)
727
- command.request_representation = Google::Apis::LoggingV2::WriteLogEntriesRequest::Representation
728
- command.request_object = write_log_entries_request_object
729
- command.response_representation = Google::Apis::LoggingV2::WriteLogEntriesResponse::Representation
730
- command.response_class = Google::Apis::LoggingV2::WriteLogEntriesResponse
731
- command.query['quotaUser'] = quota_user unless quota_user.nil?
796
+ def create_billing_account_sink(parent, log_sink_object = nil, unique_writer_identity: nil, fields: nil, quota_user: nil, options: nil, &block)
797
+ command = make_simple_command(:post, 'v2/{+parent}/sinks', options)
798
+ command.request_representation = Google::Apis::LoggingV2::LogSink::Representation
799
+ command.request_object = log_sink_object
800
+ command.response_representation = Google::Apis::LoggingV2::LogSink::Representation
801
+ command.response_class = Google::Apis::LoggingV2::LogSink
802
+ command.params['parent'] = parent unless parent.nil?
803
+ command.query['uniqueWriterIdentity'] = unique_writer_identity unless unique_writer_identity.nil?
732
804
  command.query['fields'] = fields unless fields.nil?
805
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
733
806
  execute_or_queue_command(command, &block)
734
807
  end
735
808
 
736
- # Lists log entries. Use this method to retrieve log entries from Stackdriver
737
- # Logging. For ways to export log entries, see Exporting Logs.
738
- # @param [Google::Apis::LoggingV2::ListLogEntriesRequest] list_log_entries_request_object
809
+ # Deletes a sink. If the sink has a unique writer_identity, then that service
810
+ # account is also deleted.
811
+ # @param [String] sink_name
812
+ # Required. The full resource name of the sink to delete, including the parent
813
+ # resource and the sink identifier:
814
+ # "projects/[PROJECT_ID]/sinks/[SINK_ID]"
815
+ # "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
816
+ # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
817
+ # "folders/[FOLDER_ID]/sinks/[SINK_ID]"
818
+ # Example: "projects/my-project-id/sinks/my-sink-id".
819
+ # @param [String] fields
820
+ # Selector specifying which fields to include in a partial response.
739
821
  # @param [String] quota_user
740
822
  # Available to use for quota purposes for server-side applications. Can be any
741
823
  # arbitrary string assigned to a user, but should not exceed 40 characters.
824
+ # @param [Google::Apis::RequestOptions] options
825
+ # Request-specific options
826
+ #
827
+ # @yield [result, err] Result & error if block supplied
828
+ # @yieldparam result [Google::Apis::LoggingV2::Empty] parsed result object
829
+ # @yieldparam err [StandardError] error object if request failed
830
+ #
831
+ # @return [Google::Apis::LoggingV2::Empty]
832
+ #
833
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
834
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
835
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
836
+ def delete_billing_account_sink(sink_name, fields: nil, quota_user: nil, options: nil, &block)
837
+ command = make_simple_command(:delete, 'v2/{+sinkName}', options)
838
+ command.response_representation = Google::Apis::LoggingV2::Empty::Representation
839
+ command.response_class = Google::Apis::LoggingV2::Empty
840
+ command.params['sinkName'] = sink_name unless sink_name.nil?
841
+ command.query['fields'] = fields unless fields.nil?
842
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
843
+ execute_or_queue_command(command, &block)
844
+ end
845
+
846
+ # Deletes all the log entries in a log. The log reappears if it receives new
847
+ # entries. Log entries written shortly before the delete operation might not be
848
+ # deleted.
849
+ # @param [String] log_name
850
+ # Required. The resource name of the log to delete:
851
+ # "projects/[PROJECT_ID]/logs/[LOG_ID]"
852
+ # "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
853
+ # "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]"
854
+ # "folders/[FOLDER_ID]/logs/[LOG_ID]"
855
+ # [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog"
856
+ # , "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%
857
+ # 2Factivity". For more information about log names, see LogEntry.
742
858
  # @param [String] fields
743
859
  # Selector specifying which fields to include in a partial response.
860
+ # @param [String] quota_user
861
+ # Available to use for quota purposes for server-side applications. Can be any
862
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
744
863
  # @param [Google::Apis::RequestOptions] options
745
864
  # Request-specific options
746
865
  #
747
866
  # @yield [result, err] Result & error if block supplied
748
- # @yieldparam result [Google::Apis::LoggingV2::ListLogEntriesResponse] parsed result object
867
+ # @yieldparam result [Google::Apis::LoggingV2::Empty] parsed result object
749
868
  # @yieldparam err [StandardError] error object if request failed
750
869
  #
751
- # @return [Google::Apis::LoggingV2::ListLogEntriesResponse]
870
+ # @return [Google::Apis::LoggingV2::Empty]
752
871
  #
753
872
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
754
873
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
755
874
  # @raise [Google::Apis::AuthorizationError] Authorization is required
756
- def list_entry_log_entries(list_log_entries_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
757
- command = make_simple_command(:post, 'v2/entries:list', options)
758
- command.request_representation = Google::Apis::LoggingV2::ListLogEntriesRequest::Representation
759
- command.request_object = list_log_entries_request_object
760
- command.response_representation = Google::Apis::LoggingV2::ListLogEntriesResponse::Representation
761
- command.response_class = Google::Apis::LoggingV2::ListLogEntriesResponse
762
- command.query['quotaUser'] = quota_user unless quota_user.nil?
875
+ def delete_folder_log(log_name, fields: nil, quota_user: nil, options: nil, &block)
876
+ command = make_simple_command(:delete, 'v2/{+logName}', options)
877
+ command.response_representation = Google::Apis::LoggingV2::Empty::Representation
878
+ command.response_class = Google::Apis::LoggingV2::Empty
879
+ command.params['logName'] = log_name unless log_name.nil?
763
880
  command.query['fields'] = fields unless fields.nil?
881
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
764
882
  execute_or_queue_command(command, &block)
765
883
  end
766
884
 
@@ -781,11 +899,11 @@ module Google
781
899
  # Optional. The maximum number of results to return from this request. Non-
782
900
  # positive values are ignored. The presence of nextPageToken in the response
783
901
  # indicates that more results might be available.
902
+ # @param [String] fields
903
+ # Selector specifying which fields to include in a partial response.
784
904
  # @param [String] quota_user
785
905
  # Available to use for quota purposes for server-side applications. Can be any
786
906
  # arbitrary string assigned to a user, but should not exceed 40 characters.
787
- # @param [String] fields
788
- # Selector specifying which fields to include in a partial response.
789
907
  # @param [Google::Apis::RequestOptions] options
790
908
  # Request-specific options
791
909
  #
@@ -798,35 +916,33 @@ module Google
798
916
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
799
917
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
800
918
  # @raise [Google::Apis::AuthorizationError] Authorization is required
801
- def list_project_logs(parent, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block)
919
+ def list_folder_logs(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
802
920
  command = make_simple_command(:get, 'v2/{+parent}/logs', options)
803
921
  command.response_representation = Google::Apis::LoggingV2::ListLogsResponse::Representation
804
922
  command.response_class = Google::Apis::LoggingV2::ListLogsResponse
805
923
  command.params['parent'] = parent unless parent.nil?
806
924
  command.query['pageToken'] = page_token unless page_token.nil?
807
925
  command.query['pageSize'] = page_size unless page_size.nil?
808
- command.query['quotaUser'] = quota_user unless quota_user.nil?
809
926
  command.query['fields'] = fields unless fields.nil?
927
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
810
928
  execute_or_queue_command(command, &block)
811
929
  end
812
930
 
813
- # Deletes all the log entries in a log. The log reappears if it receives new
814
- # entries. Log entries written shortly before the delete operation might not be
815
- # deleted.
816
- # @param [String] log_name
817
- # Required. The resource name of the log to delete:
818
- # "projects/[PROJECT_ID]/logs/[LOG_ID]"
819
- # "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
820
- # "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]"
821
- # "folders/[FOLDER_ID]/logs/[LOG_ID]"
822
- # [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog"
823
- # , "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%
824
- # 2Factivity". For more information about log names, see LogEntry.
931
+ # Deletes a sink. If the sink has a unique writer_identity, then that service
932
+ # account is also deleted.
933
+ # @param [String] sink_name
934
+ # Required. The full resource name of the sink to delete, including the parent
935
+ # resource and the sink identifier:
936
+ # "projects/[PROJECT_ID]/sinks/[SINK_ID]"
937
+ # "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
938
+ # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
939
+ # "folders/[FOLDER_ID]/sinks/[SINK_ID]"
940
+ # Example: "projects/my-project-id/sinks/my-sink-id".
941
+ # @param [String] fields
942
+ # Selector specifying which fields to include in a partial response.
825
943
  # @param [String] quota_user
826
944
  # Available to use for quota purposes for server-side applications. Can be any
827
945
  # arbitrary string assigned to a user, but should not exceed 40 characters.
828
- # @param [String] fields
829
- # Selector specifying which fields to include in a partial response.
830
946
  # @param [Google::Apis::RequestOptions] options
831
947
  # Request-specific options
832
948
  #
@@ -839,13 +955,13 @@ module Google
839
955
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
840
956
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
841
957
  # @raise [Google::Apis::AuthorizationError] Authorization is required
842
- def delete_project_log(log_name, quota_user: nil, fields: nil, options: nil, &block)
843
- command = make_simple_command(:delete, 'v2/{+logName}', options)
958
+ def delete_folder_sink(sink_name, fields: nil, quota_user: nil, options: nil, &block)
959
+ command = make_simple_command(:delete, 'v2/{+sinkName}', options)
844
960
  command.response_representation = Google::Apis::LoggingV2::Empty::Representation
845
961
  command.response_class = Google::Apis::LoggingV2::Empty
846
- command.params['logName'] = log_name unless log_name.nil?
847
- command.query['quotaUser'] = quota_user unless quota_user.nil?
962
+ command.params['sinkName'] = sink_name unless sink_name.nil?
848
963
  command.query['fields'] = fields unless fields.nil?
964
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
849
965
  execute_or_queue_command(command, &block)
850
966
  end
851
967
 
@@ -865,11 +981,11 @@ module Google
865
981
  # Optional. The maximum number of results to return from this request. Non-
866
982
  # positive values are ignored. The presence of nextPageToken in the response
867
983
  # indicates that more results might be available.
984
+ # @param [String] fields
985
+ # Selector specifying which fields to include in a partial response.
868
986
  # @param [String] quota_user
869
987
  # Available to use for quota purposes for server-side applications. Can be any
870
988
  # arbitrary string assigned to a user, but should not exceed 40 characters.
871
- # @param [String] fields
872
- # Selector specifying which fields to include in a partial response.
873
989
  # @param [Google::Apis::RequestOptions] options
874
990
  # Request-specific options
875
991
  #
@@ -882,15 +998,15 @@ module Google
882
998
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
883
999
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
884
1000
  # @raise [Google::Apis::AuthorizationError] Authorization is required
885
- def list_project_sinks(parent, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block)
1001
+ def list_folder_sinks(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
886
1002
  command = make_simple_command(:get, 'v2/{+parent}/sinks', options)
887
1003
  command.response_representation = Google::Apis::LoggingV2::ListSinksResponse::Representation
888
1004
  command.response_class = Google::Apis::LoggingV2::ListSinksResponse
889
1005
  command.params['parent'] = parent unless parent.nil?
890
1006
  command.query['pageToken'] = page_token unless page_token.nil?
891
1007
  command.query['pageSize'] = page_size unless page_size.nil?
892
- command.query['quotaUser'] = quota_user unless quota_user.nil?
893
1008
  command.query['fields'] = fields unless fields.nil?
1009
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
894
1010
  execute_or_queue_command(command, &block)
895
1011
  end
896
1012
 
@@ -902,11 +1018,11 @@ module Google
902
1018
  # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
903
1019
  # "folders/[FOLDER_ID]/sinks/[SINK_ID]"
904
1020
  # Example: "projects/my-project-id/sinks/my-sink-id".
1021
+ # @param [String] fields
1022
+ # Selector specifying which fields to include in a partial response.
905
1023
  # @param [String] quota_user
906
1024
  # Available to use for quota purposes for server-side applications. Can be any
907
1025
  # arbitrary string assigned to a user, but should not exceed 40 characters.
908
- # @param [String] fields
909
- # Selector specifying which fields to include in a partial response.
910
1026
  # @param [Google::Apis::RequestOptions] options
911
1027
  # Request-specific options
912
1028
  #
@@ -919,13 +1035,13 @@ module Google
919
1035
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
920
1036
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
921
1037
  # @raise [Google::Apis::AuthorizationError] Authorization is required
922
- def get_project_sink(sink_name, quota_user: nil, fields: nil, options: nil, &block)
1038
+ def get_folder_sink(sink_name, fields: nil, quota_user: nil, options: nil, &block)
923
1039
  command = make_simple_command(:get, 'v2/{+sinkName}', options)
924
1040
  command.response_representation = Google::Apis::LoggingV2::LogSink::Representation
925
1041
  command.response_class = Google::Apis::LoggingV2::LogSink
926
1042
  command.params['sinkName'] = sink_name unless sink_name.nil?
927
- command.query['quotaUser'] = quota_user unless quota_user.nil?
928
1043
  command.query['fields'] = fields unless fields.nil?
1044
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
929
1045
  execute_or_queue_command(command, &block)
930
1046
  end
931
1047
 
@@ -952,12 +1068,13 @@ module Google
952
1068
  # there is no change to the sink's writer_identity.
953
1069
  # If the old value is false and the new value is true, then writer_identity is
954
1070
  # changed to a unique service account.
955
- # It is an error if the old value is true and the new value is false.
1071
+ # It is an error if the old value is true and the new value is set to false or
1072
+ # defaulted to false.
1073
+ # @param [String] fields
1074
+ # Selector specifying which fields to include in a partial response.
956
1075
  # @param [String] quota_user
957
1076
  # Available to use for quota purposes for server-side applications. Can be any
958
1077
  # arbitrary string assigned to a user, but should not exceed 40 characters.
959
- # @param [String] fields
960
- # Selector specifying which fields to include in a partial response.
961
1078
  # @param [Google::Apis::RequestOptions] options
962
1079
  # Request-specific options
963
1080
  #
@@ -970,7 +1087,7 @@ module Google
970
1087
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
971
1088
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
972
1089
  # @raise [Google::Apis::AuthorizationError] Authorization is required
973
- def update_project_sink(sink_name, log_sink_object = nil, unique_writer_identity: nil, quota_user: nil, fields: nil, options: nil, &block)
1090
+ def update_folder_sink(sink_name, log_sink_object = nil, unique_writer_identity: nil, fields: nil, quota_user: nil, options: nil, &block)
974
1091
  command = make_simple_command(:put, 'v2/{+sinkName}', options)
975
1092
  command.request_representation = Google::Apis::LoggingV2::LogSink::Representation
976
1093
  command.request_object = log_sink_object
@@ -978,8 +1095,8 @@ module Google
978
1095
  command.response_class = Google::Apis::LoggingV2::LogSink
979
1096
  command.params['sinkName'] = sink_name unless sink_name.nil?
980
1097
  command.query['uniqueWriterIdentity'] = unique_writer_identity unless unique_writer_identity.nil?
981
- command.query['quotaUser'] = quota_user unless quota_user.nil?
982
1098
  command.query['fields'] = fields unless fields.nil?
1099
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
983
1100
  execute_or_queue_command(command, &block)
984
1101
  end
985
1102
 
@@ -995,257 +1112,82 @@ module Google
995
1112
  # "billingAccounts/[BILLING_ACCOUNT_ID]"
996
1113
  # "folders/[FOLDER_ID]"
997
1114
  # Examples: "projects/my-logging-project", "organizations/123456789".
998
- # @param [Google::Apis::LoggingV2::LogSink] log_sink_object
999
- # @param [Boolean] unique_writer_identity
1000
- # Optional. Determines the kind of IAM identity returned as writer_identity in
1001
- # the new sink. If this value is omitted or set to false, and if the sink's
1002
- # parent is a project, then the value returned as writer_identity is the same
1003
- # group or service account used by Stackdriver Logging before the addition of
1004
- # writer identities to this API. The sink's destination must be in the same
1005
- # project as the sink itself.If this field is set to true, or if the sink is
1006
- # owned by a non-project resource such as an organization, then the value of
1007
- # writer_identity will be a unique service account used only for exports from
1008
- # the new sink. For more information, see writer_identity in LogSink.
1009
- # @param [String] quota_user
1010
- # Available to use for quota purposes for server-side applications. Can be any
1011
- # arbitrary string assigned to a user, but should not exceed 40 characters.
1012
- # @param [String] fields
1013
- # Selector specifying which fields to include in a partial response.
1014
- # @param [Google::Apis::RequestOptions] options
1015
- # Request-specific options
1016
- #
1017
- # @yield [result, err] Result & error if block supplied
1018
- # @yieldparam result [Google::Apis::LoggingV2::LogSink] parsed result object
1019
- # @yieldparam err [StandardError] error object if request failed
1020
- #
1021
- # @return [Google::Apis::LoggingV2::LogSink]
1022
- #
1023
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1024
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1025
- # @raise [Google::Apis::AuthorizationError] Authorization is required
1026
- def create_project_sink(parent, log_sink_object = nil, unique_writer_identity: nil, quota_user: nil, fields: nil, options: nil, &block)
1027
- command = make_simple_command(:post, 'v2/{+parent}/sinks', options)
1028
- command.request_representation = Google::Apis::LoggingV2::LogSink::Representation
1029
- command.request_object = log_sink_object
1030
- command.response_representation = Google::Apis::LoggingV2::LogSink::Representation
1031
- command.response_class = Google::Apis::LoggingV2::LogSink
1032
- command.params['parent'] = parent unless parent.nil?
1033
- command.query['uniqueWriterIdentity'] = unique_writer_identity unless unique_writer_identity.nil?
1034
- command.query['quotaUser'] = quota_user unless quota_user.nil?
1035
- command.query['fields'] = fields unless fields.nil?
1036
- execute_or_queue_command(command, &block)
1037
- end
1038
-
1039
- # Deletes a sink. If the sink has a unique writer_identity, then that service
1040
- # account is also deleted.
1041
- # @param [String] sink_name
1042
- # Required. The full resource name of the sink to delete, including the parent
1043
- # resource and the sink identifier:
1044
- # "projects/[PROJECT_ID]/sinks/[SINK_ID]"
1045
- # "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
1046
- # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
1047
- # "folders/[FOLDER_ID]/sinks/[SINK_ID]"
1048
- # Example: "projects/my-project-id/sinks/my-sink-id".
1049
- # @param [String] quota_user
1050
- # Available to use for quota purposes for server-side applications. Can be any
1051
- # arbitrary string assigned to a user, but should not exceed 40 characters.
1052
- # @param [String] fields
1053
- # Selector specifying which fields to include in a partial response.
1054
- # @param [Google::Apis::RequestOptions] options
1055
- # Request-specific options
1056
- #
1057
- # @yield [result, err] Result & error if block supplied
1058
- # @yieldparam result [Google::Apis::LoggingV2::Empty] parsed result object
1059
- # @yieldparam err [StandardError] error object if request failed
1060
- #
1061
- # @return [Google::Apis::LoggingV2::Empty]
1062
- #
1063
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1064
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1065
- # @raise [Google::Apis::AuthorizationError] Authorization is required
1066
- def delete_project_sink(sink_name, quota_user: nil, fields: nil, options: nil, &block)
1067
- command = make_simple_command(:delete, 'v2/{+sinkName}', options)
1068
- command.response_representation = Google::Apis::LoggingV2::Empty::Representation
1069
- command.response_class = Google::Apis::LoggingV2::Empty
1070
- command.params['sinkName'] = sink_name unless sink_name.nil?
1071
- command.query['quotaUser'] = quota_user unless quota_user.nil?
1072
- command.query['fields'] = fields unless fields.nil?
1073
- execute_or_queue_command(command, &block)
1074
- end
1075
-
1076
- # Deletes a logs-based metric.
1077
- # @param [String] metric_name
1078
- # The resource name of the metric to delete:
1079
- # "projects/[PROJECT_ID]/metrics/[METRIC_ID]"
1080
- # @param [String] quota_user
1081
- # Available to use for quota purposes for server-side applications. Can be any
1082
- # arbitrary string assigned to a user, but should not exceed 40 characters.
1083
- # @param [String] fields
1084
- # Selector specifying which fields to include in a partial response.
1085
- # @param [Google::Apis::RequestOptions] options
1086
- # Request-specific options
1087
- #
1088
- # @yield [result, err] Result & error if block supplied
1089
- # @yieldparam result [Google::Apis::LoggingV2::Empty] parsed result object
1090
- # @yieldparam err [StandardError] error object if request failed
1091
- #
1092
- # @return [Google::Apis::LoggingV2::Empty]
1093
- #
1094
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1095
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1096
- # @raise [Google::Apis::AuthorizationError] Authorization is required
1097
- def delete_project_metric(metric_name, quota_user: nil, fields: nil, options: nil, &block)
1098
- command = make_simple_command(:delete, 'v2/{+metricName}', options)
1099
- command.response_representation = Google::Apis::LoggingV2::Empty::Representation
1100
- command.response_class = Google::Apis::LoggingV2::Empty
1101
- command.params['metricName'] = metric_name unless metric_name.nil?
1102
- command.query['quotaUser'] = quota_user unless quota_user.nil?
1103
- command.query['fields'] = fields unless fields.nil?
1104
- execute_or_queue_command(command, &block)
1105
- end
1106
-
1107
- # Lists logs-based metrics.
1108
- # @param [String] parent
1109
- # Required. The name of the project containing the metrics:
1110
- # "projects/[PROJECT_ID]"
1111
- # @param [String] page_token
1112
- # Optional. If present, then retrieve the next batch of results from the
1113
- # preceding call to this method. pageToken must be the value of nextPageToken
1114
- # from the previous response. The values of other method parameters should be
1115
- # identical to those in the previous call.
1116
- # @param [Fixnum] page_size
1117
- # Optional. The maximum number of results to return from this request. Non-
1118
- # positive values are ignored. The presence of nextPageToken in the response
1119
- # indicates that more results might be available.
1120
- # @param [String] quota_user
1121
- # Available to use for quota purposes for server-side applications. Can be any
1122
- # arbitrary string assigned to a user, but should not exceed 40 characters.
1123
- # @param [String] fields
1124
- # Selector specifying which fields to include in a partial response.
1125
- # @param [Google::Apis::RequestOptions] options
1126
- # Request-specific options
1127
- #
1128
- # @yield [result, err] Result & error if block supplied
1129
- # @yieldparam result [Google::Apis::LoggingV2::ListLogMetricsResponse] parsed result object
1130
- # @yieldparam err [StandardError] error object if request failed
1131
- #
1132
- # @return [Google::Apis::LoggingV2::ListLogMetricsResponse]
1133
- #
1134
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1135
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1136
- # @raise [Google::Apis::AuthorizationError] Authorization is required
1137
- def list_project_metrics(parent, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block)
1138
- command = make_simple_command(:get, 'v2/{+parent}/metrics', options)
1139
- command.response_representation = Google::Apis::LoggingV2::ListLogMetricsResponse::Representation
1140
- command.response_class = Google::Apis::LoggingV2::ListLogMetricsResponse
1141
- command.params['parent'] = parent unless parent.nil?
1142
- command.query['pageToken'] = page_token unless page_token.nil?
1143
- command.query['pageSize'] = page_size unless page_size.nil?
1144
- command.query['quotaUser'] = quota_user unless quota_user.nil?
1145
- command.query['fields'] = fields unless fields.nil?
1146
- execute_or_queue_command(command, &block)
1147
- end
1148
-
1149
- # Gets a logs-based metric.
1150
- # @param [String] metric_name
1151
- # The resource name of the desired metric:
1152
- # "projects/[PROJECT_ID]/metrics/[METRIC_ID]"
1153
- # @param [String] quota_user
1154
- # Available to use for quota purposes for server-side applications. Can be any
1155
- # arbitrary string assigned to a user, but should not exceed 40 characters.
1156
- # @param [String] fields
1157
- # Selector specifying which fields to include in a partial response.
1158
- # @param [Google::Apis::RequestOptions] options
1159
- # Request-specific options
1160
- #
1161
- # @yield [result, err] Result & error if block supplied
1162
- # @yieldparam result [Google::Apis::LoggingV2::LogMetric] parsed result object
1163
- # @yieldparam err [StandardError] error object if request failed
1164
- #
1165
- # @return [Google::Apis::LoggingV2::LogMetric]
1166
- #
1167
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1168
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1169
- # @raise [Google::Apis::AuthorizationError] Authorization is required
1170
- def get_project_metric(metric_name, quota_user: nil, fields: nil, options: nil, &block)
1171
- command = make_simple_command(:get, 'v2/{+metricName}', options)
1172
- command.response_representation = Google::Apis::LoggingV2::LogMetric::Representation
1173
- command.response_class = Google::Apis::LoggingV2::LogMetric
1174
- command.params['metricName'] = metric_name unless metric_name.nil?
1175
- command.query['quotaUser'] = quota_user unless quota_user.nil?
1176
- command.query['fields'] = fields unless fields.nil?
1177
- execute_or_queue_command(command, &block)
1178
- end
1179
-
1180
- # Creates or updates a logs-based metric.
1181
- # @param [String] metric_name
1182
- # The resource name of the metric to update:
1183
- # "projects/[PROJECT_ID]/metrics/[METRIC_ID]"
1184
- # The updated metric must be provided in the request and it's name field must be
1185
- # the same as [METRIC_ID] If the metric does not exist in [PROJECT_ID], then a
1186
- # new metric is created.
1187
- # @param [Google::Apis::LoggingV2::LogMetric] log_metric_object
1115
+ # @param [Google::Apis::LoggingV2::LogSink] log_sink_object
1116
+ # @param [Boolean] unique_writer_identity
1117
+ # Optional. Determines the kind of IAM identity returned as writer_identity in
1118
+ # the new sink. If this value is omitted or set to false, and if the sink's
1119
+ # parent is a project, then the value returned as writer_identity is the same
1120
+ # group or service account used by Stackdriver Logging before the addition of
1121
+ # writer identities to this API. The sink's destination must be in the same
1122
+ # project as the sink itself.If this field is set to true, or if the sink is
1123
+ # owned by a non-project resource such as an organization, then the value of
1124
+ # writer_identity will be a unique service account used only for exports from
1125
+ # the new sink. For more information, see writer_identity in LogSink.
1126
+ # @param [String] fields
1127
+ # Selector specifying which fields to include in a partial response.
1188
1128
  # @param [String] quota_user
1189
1129
  # Available to use for quota purposes for server-side applications. Can be any
1190
1130
  # arbitrary string assigned to a user, but should not exceed 40 characters.
1191
- # @param [String] fields
1192
- # Selector specifying which fields to include in a partial response.
1193
1131
  # @param [Google::Apis::RequestOptions] options
1194
1132
  # Request-specific options
1195
1133
  #
1196
1134
  # @yield [result, err] Result & error if block supplied
1197
- # @yieldparam result [Google::Apis::LoggingV2::LogMetric] parsed result object
1135
+ # @yieldparam result [Google::Apis::LoggingV2::LogSink] parsed result object
1198
1136
  # @yieldparam err [StandardError] error object if request failed
1199
1137
  #
1200
- # @return [Google::Apis::LoggingV2::LogMetric]
1138
+ # @return [Google::Apis::LoggingV2::LogSink]
1201
1139
  #
1202
1140
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1203
1141
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1204
1142
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1205
- def update_project_metric(metric_name, log_metric_object = nil, quota_user: nil, fields: nil, options: nil, &block)
1206
- command = make_simple_command(:put, 'v2/{+metricName}', options)
1207
- command.request_representation = Google::Apis::LoggingV2::LogMetric::Representation
1208
- command.request_object = log_metric_object
1209
- command.response_representation = Google::Apis::LoggingV2::LogMetric::Representation
1210
- command.response_class = Google::Apis::LoggingV2::LogMetric
1211
- command.params['metricName'] = metric_name unless metric_name.nil?
1212
- command.query['quotaUser'] = quota_user unless quota_user.nil?
1143
+ def create_folder_sink(parent, log_sink_object = nil, unique_writer_identity: nil, fields: nil, quota_user: nil, options: nil, &block)
1144
+ command = make_simple_command(:post, 'v2/{+parent}/sinks', options)
1145
+ command.request_representation = Google::Apis::LoggingV2::LogSink::Representation
1146
+ command.request_object = log_sink_object
1147
+ command.response_representation = Google::Apis::LoggingV2::LogSink::Representation
1148
+ command.response_class = Google::Apis::LoggingV2::LogSink
1149
+ command.params['parent'] = parent unless parent.nil?
1150
+ command.query['uniqueWriterIdentity'] = unique_writer_identity unless unique_writer_identity.nil?
1213
1151
  command.query['fields'] = fields unless fields.nil?
1152
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1214
1153
  execute_or_queue_command(command, &block)
1215
1154
  end
1216
1155
 
1217
- # Creates a logs-based metric.
1218
- # @param [String] parent
1219
- # The resource name of the project in which to create the metric:
1220
- # "projects/[PROJECT_ID]"
1221
- # The new metric must be provided in the request.
1222
- # @param [Google::Apis::LoggingV2::LogMetric] log_metric_object
1156
+ # Lists the descriptors for monitored resource types used by Stackdriver Logging.
1157
+ # @param [String] page_token
1158
+ # Optional. If present, then retrieve the next batch of results from the
1159
+ # preceding call to this method. pageToken must be the value of nextPageToken
1160
+ # from the previous response. The values of other method parameters should be
1161
+ # identical to those in the previous call.
1162
+ # @param [Fixnum] page_size
1163
+ # Optional. The maximum number of results to return from this request. Non-
1164
+ # positive values are ignored. The presence of nextPageToken in the response
1165
+ # indicates that more results might be available.
1166
+ # @param [String] fields
1167
+ # Selector specifying which fields to include in a partial response.
1223
1168
  # @param [String] quota_user
1224
1169
  # Available to use for quota purposes for server-side applications. Can be any
1225
1170
  # arbitrary string assigned to a user, but should not exceed 40 characters.
1226
- # @param [String] fields
1227
- # Selector specifying which fields to include in a partial response.
1228
1171
  # @param [Google::Apis::RequestOptions] options
1229
1172
  # Request-specific options
1230
1173
  #
1231
1174
  # @yield [result, err] Result & error if block supplied
1232
- # @yieldparam result [Google::Apis::LoggingV2::LogMetric] parsed result object
1175
+ # @yieldparam result [Google::Apis::LoggingV2::ListMonitoredResourceDescriptorsResponse] parsed result object
1233
1176
  # @yieldparam err [StandardError] error object if request failed
1234
1177
  #
1235
- # @return [Google::Apis::LoggingV2::LogMetric]
1178
+ # @return [Google::Apis::LoggingV2::ListMonitoredResourceDescriptorsResponse]
1236
1179
  #
1237
1180
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1238
1181
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1239
1182
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1240
- def create_project_metric(parent, log_metric_object = nil, quota_user: nil, fields: nil, options: nil, &block)
1241
- command = make_simple_command(:post, 'v2/{+parent}/metrics', options)
1242
- command.request_representation = Google::Apis::LoggingV2::LogMetric::Representation
1243
- command.request_object = log_metric_object
1244
- command.response_representation = Google::Apis::LoggingV2::LogMetric::Representation
1245
- command.response_class = Google::Apis::LoggingV2::LogMetric
1246
- command.params['parent'] = parent unless parent.nil?
1247
- command.query['quotaUser'] = quota_user unless quota_user.nil?
1183
+ def list_monitored_resource_descriptors(page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
1184
+ command = make_simple_command(:get, 'v2/monitoredResourceDescriptors', options)
1185
+ command.response_representation = Google::Apis::LoggingV2::ListMonitoredResourceDescriptorsResponse::Representation
1186
+ command.response_class = Google::Apis::LoggingV2::ListMonitoredResourceDescriptorsResponse
1187
+ command.query['pageToken'] = page_token unless page_token.nil?
1188
+ command.query['pageSize'] = page_size unless page_size.nil?
1248
1189
  command.query['fields'] = fields unless fields.nil?
1190
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1249
1191
  execute_or_queue_command(command, &block)
1250
1192
  end
1251
1193
 
@@ -1257,20 +1199,20 @@ module Google
1257
1199
  # "organizations/[ORGANIZATION_ID]"
1258
1200
  # "billingAccounts/[BILLING_ACCOUNT_ID]"
1259
1201
  # "folders/[FOLDER_ID]"
1202
+ # @param [Fixnum] page_size
1203
+ # Optional. The maximum number of results to return from this request. Non-
1204
+ # positive values are ignored. The presence of nextPageToken in the response
1205
+ # indicates that more results might be available.
1260
1206
  # @param [String] page_token
1261
1207
  # Optional. If present, then retrieve the next batch of results from the
1262
1208
  # preceding call to this method. pageToken must be the value of nextPageToken
1263
1209
  # from the previous response. The values of other method parameters should be
1264
1210
  # identical to those in the previous call.
1265
- # @param [Fixnum] page_size
1266
- # Optional. The maximum number of results to return from this request. Non-
1267
- # positive values are ignored. The presence of nextPageToken in the response
1268
- # indicates that more results might be available.
1211
+ # @param [String] fields
1212
+ # Selector specifying which fields to include in a partial response.
1269
1213
  # @param [String] quota_user
1270
1214
  # Available to use for quota purposes for server-side applications. Can be any
1271
1215
  # arbitrary string assigned to a user, but should not exceed 40 characters.
1272
- # @param [String] fields
1273
- # Selector specifying which fields to include in a partial response.
1274
1216
  # @param [Google::Apis::RequestOptions] options
1275
1217
  # Request-specific options
1276
1218
  #
@@ -1283,15 +1225,15 @@ module Google
1283
1225
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1284
1226
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1285
1227
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1286
- def list_billing_account_logs(parent, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block)
1228
+ def list_organization_logs(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1287
1229
  command = make_simple_command(:get, 'v2/{+parent}/logs', options)
1288
1230
  command.response_representation = Google::Apis::LoggingV2::ListLogsResponse::Representation
1289
1231
  command.response_class = Google::Apis::LoggingV2::ListLogsResponse
1290
1232
  command.params['parent'] = parent unless parent.nil?
1291
- command.query['pageToken'] = page_token unless page_token.nil?
1292
1233
  command.query['pageSize'] = page_size unless page_size.nil?
1293
- command.query['quotaUser'] = quota_user unless quota_user.nil?
1234
+ command.query['pageToken'] = page_token unless page_token.nil?
1294
1235
  command.query['fields'] = fields unless fields.nil?
1236
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1295
1237
  execute_or_queue_command(command, &block)
1296
1238
  end
1297
1239
 
@@ -1307,11 +1249,11 @@ module Google
1307
1249
  # [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog"
1308
1250
  # , "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%
1309
1251
  # 2Factivity". For more information about log names, see LogEntry.
1252
+ # @param [String] fields
1253
+ # Selector specifying which fields to include in a partial response.
1310
1254
  # @param [String] quota_user
1311
1255
  # Available to use for quota purposes for server-side applications. Can be any
1312
1256
  # arbitrary string assigned to a user, but should not exceed 40 characters.
1313
- # @param [String] fields
1314
- # Selector specifying which fields to include in a partial response.
1315
1257
  # @param [Google::Apis::RequestOptions] options
1316
1258
  # Request-specific options
1317
1259
  #
@@ -1324,13 +1266,93 @@ module Google
1324
1266
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1325
1267
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1326
1268
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1327
- def delete_billing_account_log(log_name, quota_user: nil, fields: nil, options: nil, &block)
1269
+ def delete_organization_log(log_name, fields: nil, quota_user: nil, options: nil, &block)
1328
1270
  command = make_simple_command(:delete, 'v2/{+logName}', options)
1329
1271
  command.response_representation = Google::Apis::LoggingV2::Empty::Representation
1330
1272
  command.response_class = Google::Apis::LoggingV2::Empty
1331
1273
  command.params['logName'] = log_name unless log_name.nil?
1274
+ command.query['fields'] = fields unless fields.nil?
1275
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1276
+ execute_or_queue_command(command, &block)
1277
+ end
1278
+
1279
+ # Lists sinks.
1280
+ # @param [String] parent
1281
+ # Required. The parent resource whose sinks are to be listed:
1282
+ # "projects/[PROJECT_ID]"
1283
+ # "organizations/[ORGANIZATION_ID]"
1284
+ # "billingAccounts/[BILLING_ACCOUNT_ID]"
1285
+ # "folders/[FOLDER_ID]"
1286
+ # @param [String] page_token
1287
+ # Optional. If present, then retrieve the next batch of results from the
1288
+ # preceding call to this method. pageToken must be the value of nextPageToken
1289
+ # from the previous response. The values of other method parameters should be
1290
+ # identical to those in the previous call.
1291
+ # @param [Fixnum] page_size
1292
+ # Optional. The maximum number of results to return from this request. Non-
1293
+ # positive values are ignored. The presence of nextPageToken in the response
1294
+ # indicates that more results might be available.
1295
+ # @param [String] fields
1296
+ # Selector specifying which fields to include in a partial response.
1297
+ # @param [String] quota_user
1298
+ # Available to use for quota purposes for server-side applications. Can be any
1299
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1300
+ # @param [Google::Apis::RequestOptions] options
1301
+ # Request-specific options
1302
+ #
1303
+ # @yield [result, err] Result & error if block supplied
1304
+ # @yieldparam result [Google::Apis::LoggingV2::ListSinksResponse] parsed result object
1305
+ # @yieldparam err [StandardError] error object if request failed
1306
+ #
1307
+ # @return [Google::Apis::LoggingV2::ListSinksResponse]
1308
+ #
1309
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1310
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1311
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1312
+ def list_organization_sinks(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
1313
+ command = make_simple_command(:get, 'v2/{+parent}/sinks', options)
1314
+ command.response_representation = Google::Apis::LoggingV2::ListSinksResponse::Representation
1315
+ command.response_class = Google::Apis::LoggingV2::ListSinksResponse
1316
+ command.params['parent'] = parent unless parent.nil?
1317
+ command.query['pageToken'] = page_token unless page_token.nil?
1318
+ command.query['pageSize'] = page_size unless page_size.nil?
1319
+ command.query['fields'] = fields unless fields.nil?
1332
1320
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1321
+ execute_or_queue_command(command, &block)
1322
+ end
1323
+
1324
+ # Gets a sink.
1325
+ # @param [String] sink_name
1326
+ # Required. The resource name of the sink:
1327
+ # "projects/[PROJECT_ID]/sinks/[SINK_ID]"
1328
+ # "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
1329
+ # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
1330
+ # "folders/[FOLDER_ID]/sinks/[SINK_ID]"
1331
+ # Example: "projects/my-project-id/sinks/my-sink-id".
1332
+ # @param [String] fields
1333
+ # Selector specifying which fields to include in a partial response.
1334
+ # @param [String] quota_user
1335
+ # Available to use for quota purposes for server-side applications. Can be any
1336
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1337
+ # @param [Google::Apis::RequestOptions] options
1338
+ # Request-specific options
1339
+ #
1340
+ # @yield [result, err] Result & error if block supplied
1341
+ # @yieldparam result [Google::Apis::LoggingV2::LogSink] parsed result object
1342
+ # @yieldparam err [StandardError] error object if request failed
1343
+ #
1344
+ # @return [Google::Apis::LoggingV2::LogSink]
1345
+ #
1346
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1347
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1348
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1349
+ def get_organization_sink(sink_name, fields: nil, quota_user: nil, options: nil, &block)
1350
+ command = make_simple_command(:get, 'v2/{+sinkName}', options)
1351
+ command.response_representation = Google::Apis::LoggingV2::LogSink::Representation
1352
+ command.response_class = Google::Apis::LoggingV2::LogSink
1353
+ command.params['sinkName'] = sink_name unless sink_name.nil?
1333
1354
  command.query['fields'] = fields unless fields.nil?
1355
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1334
1356
  execute_or_queue_command(command, &block)
1335
1357
  end
1336
1358
 
@@ -1357,12 +1379,13 @@ module Google
1357
1379
  # there is no change to the sink's writer_identity.
1358
1380
  # If the old value is false and the new value is true, then writer_identity is
1359
1381
  # changed to a unique service account.
1360
- # It is an error if the old value is true and the new value is false.
1382
+ # It is an error if the old value is true and the new value is set to false or
1383
+ # defaulted to false.
1384
+ # @param [String] fields
1385
+ # Selector specifying which fields to include in a partial response.
1361
1386
  # @param [String] quota_user
1362
1387
  # Available to use for quota purposes for server-side applications. Can be any
1363
1388
  # arbitrary string assigned to a user, but should not exceed 40 characters.
1364
- # @param [String] fields
1365
- # Selector specifying which fields to include in a partial response.
1366
1389
  # @param [Google::Apis::RequestOptions] options
1367
1390
  # Request-specific options
1368
1391
  #
@@ -1375,7 +1398,7 @@ module Google
1375
1398
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1376
1399
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1377
1400
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1378
- def update_billing_account_sink(sink_name, log_sink_object = nil, unique_writer_identity: nil, quota_user: nil, fields: nil, options: nil, &block)
1401
+ def update_organization_sink(sink_name, log_sink_object = nil, unique_writer_identity: nil, fields: nil, quota_user: nil, options: nil, &block)
1379
1402
  command = make_simple_command(:put, 'v2/{+sinkName}', options)
1380
1403
  command.request_representation = Google::Apis::LoggingV2::LogSink::Representation
1381
1404
  command.request_object = log_sink_object
@@ -1383,8 +1406,8 @@ module Google
1383
1406
  command.response_class = Google::Apis::LoggingV2::LogSink
1384
1407
  command.params['sinkName'] = sink_name unless sink_name.nil?
1385
1408
  command.query['uniqueWriterIdentity'] = unique_writer_identity unless unique_writer_identity.nil?
1386
- command.query['quotaUser'] = quota_user unless quota_user.nil?
1387
1409
  command.query['fields'] = fields unless fields.nil?
1410
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1388
1411
  execute_or_queue_command(command, &block)
1389
1412
  end
1390
1413
 
@@ -1411,11 +1434,11 @@ module Google
1411
1434
  # owned by a non-project resource such as an organization, then the value of
1412
1435
  # writer_identity will be a unique service account used only for exports from
1413
1436
  # the new sink. For more information, see writer_identity in LogSink.
1437
+ # @param [String] fields
1438
+ # Selector specifying which fields to include in a partial response.
1414
1439
  # @param [String] quota_user
1415
1440
  # Available to use for quota purposes for server-side applications. Can be any
1416
1441
  # arbitrary string assigned to a user, but should not exceed 40 characters.
1417
- # @param [String] fields
1418
- # Selector specifying which fields to include in a partial response.
1419
1442
  # @param [Google::Apis::RequestOptions] options
1420
1443
  # Request-specific options
1421
1444
  #
@@ -1428,7 +1451,7 @@ module Google
1428
1451
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1429
1452
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1430
1453
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1431
- def create_billing_account_sink(parent, log_sink_object = nil, unique_writer_identity: nil, quota_user: nil, fields: nil, options: nil, &block)
1454
+ def create_organization_sink(parent, log_sink_object = nil, unique_writer_identity: nil, fields: nil, quota_user: nil, options: nil, &block)
1432
1455
  command = make_simple_command(:post, 'v2/{+parent}/sinks', options)
1433
1456
  command.request_representation = Google::Apis::LoggingV2::LogSink::Representation
1434
1457
  command.request_object = log_sink_object
@@ -1436,8 +1459,8 @@ module Google
1436
1459
  command.response_class = Google::Apis::LoggingV2::LogSink
1437
1460
  command.params['parent'] = parent unless parent.nil?
1438
1461
  command.query['uniqueWriterIdentity'] = unique_writer_identity unless unique_writer_identity.nil?
1439
- command.query['quotaUser'] = quota_user unless quota_user.nil?
1440
1462
  command.query['fields'] = fields unless fields.nil?
1463
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1441
1464
  execute_or_queue_command(command, &block)
1442
1465
  end
1443
1466
 
@@ -1451,11 +1474,11 @@ module Google
1451
1474
  # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
1452
1475
  # "folders/[FOLDER_ID]/sinks/[SINK_ID]"
1453
1476
  # Example: "projects/my-project-id/sinks/my-sink-id".
1477
+ # @param [String] fields
1478
+ # Selector specifying which fields to include in a partial response.
1454
1479
  # @param [String] quota_user
1455
1480
  # Available to use for quota purposes for server-side applications. Can be any
1456
1481
  # arbitrary string assigned to a user, but should not exceed 40 characters.
1457
- # @param [String] fields
1458
- # Selector specifying which fields to include in a partial response.
1459
1482
  # @param [Google::Apis::RequestOptions] options
1460
1483
  # Request-specific options
1461
1484
  #
@@ -1468,93 +1491,74 @@ module Google
1468
1491
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1469
1492
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1470
1493
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1471
- def delete_billing_account_sink(sink_name, quota_user: nil, fields: nil, options: nil, &block)
1494
+ def delete_organization_sink(sink_name, fields: nil, quota_user: nil, options: nil, &block)
1472
1495
  command = make_simple_command(:delete, 'v2/{+sinkName}', options)
1473
1496
  command.response_representation = Google::Apis::LoggingV2::Empty::Representation
1474
1497
  command.response_class = Google::Apis::LoggingV2::Empty
1475
1498
  command.params['sinkName'] = sink_name unless sink_name.nil?
1476
- command.query['quotaUser'] = quota_user unless quota_user.nil?
1477
1499
  command.query['fields'] = fields unless fields.nil?
1500
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1478
1501
  execute_or_queue_command(command, &block)
1479
1502
  end
1480
1503
 
1481
- # Lists sinks.
1482
- # @param [String] parent
1483
- # Required. The parent resource whose sinks are to be listed:
1484
- # "projects/[PROJECT_ID]"
1485
- # "organizations/[ORGANIZATION_ID]"
1486
- # "billingAccounts/[BILLING_ACCOUNT_ID]"
1487
- # "folders/[FOLDER_ID]"
1488
- # @param [String] page_token
1489
- # Optional. If present, then retrieve the next batch of results from the
1490
- # preceding call to this method. pageToken must be the value of nextPageToken
1491
- # from the previous response. The values of other method parameters should be
1492
- # identical to those in the previous call.
1493
- # @param [Fixnum] page_size
1494
- # Optional. The maximum number of results to return from this request. Non-
1495
- # positive values are ignored. The presence of nextPageToken in the response
1496
- # indicates that more results might be available.
1504
+ # Lists log entries. Use this method to retrieve log entries from Stackdriver
1505
+ # Logging. For ways to export log entries, see Exporting Logs.
1506
+ # @param [Google::Apis::LoggingV2::ListLogEntriesRequest] list_log_entries_request_object
1507
+ # @param [String] fields
1508
+ # Selector specifying which fields to include in a partial response.
1497
1509
  # @param [String] quota_user
1498
1510
  # Available to use for quota purposes for server-side applications. Can be any
1499
1511
  # arbitrary string assigned to a user, but should not exceed 40 characters.
1500
- # @param [String] fields
1501
- # Selector specifying which fields to include in a partial response.
1502
1512
  # @param [Google::Apis::RequestOptions] options
1503
1513
  # Request-specific options
1504
1514
  #
1505
1515
  # @yield [result, err] Result & error if block supplied
1506
- # @yieldparam result [Google::Apis::LoggingV2::ListSinksResponse] parsed result object
1516
+ # @yieldparam result [Google::Apis::LoggingV2::ListLogEntriesResponse] parsed result object
1507
1517
  # @yieldparam err [StandardError] error object if request failed
1508
1518
  #
1509
- # @return [Google::Apis::LoggingV2::ListSinksResponse]
1519
+ # @return [Google::Apis::LoggingV2::ListLogEntriesResponse]
1510
1520
  #
1511
1521
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1512
1522
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1513
1523
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1514
- def list_billing_account_sinks(parent, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block)
1515
- command = make_simple_command(:get, 'v2/{+parent}/sinks', options)
1516
- command.response_representation = Google::Apis::LoggingV2::ListSinksResponse::Representation
1517
- command.response_class = Google::Apis::LoggingV2::ListSinksResponse
1518
- command.params['parent'] = parent unless parent.nil?
1519
- command.query['pageToken'] = page_token unless page_token.nil?
1520
- command.query['pageSize'] = page_size unless page_size.nil?
1521
- command.query['quotaUser'] = quota_user unless quota_user.nil?
1524
+ def list_entry_log_entries(list_log_entries_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1525
+ command = make_simple_command(:post, 'v2/entries:list', options)
1526
+ command.request_representation = Google::Apis::LoggingV2::ListLogEntriesRequest::Representation
1527
+ command.request_object = list_log_entries_request_object
1528
+ command.response_representation = Google::Apis::LoggingV2::ListLogEntriesResponse::Representation
1529
+ command.response_class = Google::Apis::LoggingV2::ListLogEntriesResponse
1522
1530
  command.query['fields'] = fields unless fields.nil?
1531
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1523
1532
  execute_or_queue_command(command, &block)
1524
1533
  end
1525
1534
 
1526
- # Gets a sink.
1527
- # @param [String] sink_name
1528
- # Required. The resource name of the sink:
1529
- # "projects/[PROJECT_ID]/sinks/[SINK_ID]"
1530
- # "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
1531
- # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
1532
- # "folders/[FOLDER_ID]/sinks/[SINK_ID]"
1533
- # Example: "projects/my-project-id/sinks/my-sink-id".
1535
+ # Writes log entries to Stackdriver Logging.
1536
+ # @param [Google::Apis::LoggingV2::WriteLogEntriesRequest] write_log_entries_request_object
1537
+ # @param [String] fields
1538
+ # Selector specifying which fields to include in a partial response.
1534
1539
  # @param [String] quota_user
1535
1540
  # Available to use for quota purposes for server-side applications. Can be any
1536
1541
  # arbitrary string assigned to a user, but should not exceed 40 characters.
1537
- # @param [String] fields
1538
- # Selector specifying which fields to include in a partial response.
1539
1542
  # @param [Google::Apis::RequestOptions] options
1540
1543
  # Request-specific options
1541
1544
  #
1542
1545
  # @yield [result, err] Result & error if block supplied
1543
- # @yieldparam result [Google::Apis::LoggingV2::LogSink] parsed result object
1546
+ # @yieldparam result [Google::Apis::LoggingV2::WriteLogEntriesResponse] parsed result object
1544
1547
  # @yieldparam err [StandardError] error object if request failed
1545
1548
  #
1546
- # @return [Google::Apis::LoggingV2::LogSink]
1549
+ # @return [Google::Apis::LoggingV2::WriteLogEntriesResponse]
1547
1550
  #
1548
1551
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1549
1552
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1550
1553
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1551
- def get_billing_account_sink(sink_name, quota_user: nil, fields: nil, options: nil, &block)
1552
- command = make_simple_command(:get, 'v2/{+sinkName}', options)
1553
- command.response_representation = Google::Apis::LoggingV2::LogSink::Representation
1554
- command.response_class = Google::Apis::LoggingV2::LogSink
1555
- command.params['sinkName'] = sink_name unless sink_name.nil?
1556
- command.query['quotaUser'] = quota_user unless quota_user.nil?
1554
+ def write_entry_log_entries(write_log_entries_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1555
+ command = make_simple_command(:post, 'v2/entries:write', options)
1556
+ command.request_representation = Google::Apis::LoggingV2::WriteLogEntriesRequest::Representation
1557
+ command.request_object = write_log_entries_request_object
1558
+ command.response_representation = Google::Apis::LoggingV2::WriteLogEntriesResponse::Representation
1559
+ command.response_class = Google::Apis::LoggingV2::WriteLogEntriesResponse
1557
1560
  command.query['fields'] = fields unless fields.nil?
1561
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1558
1562
  execute_or_queue_command(command, &block)
1559
1563
  end
1560
1564