google-api-client 0.11.2 → 0.11.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (246) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +6 -1
  3. data/README.md +6 -0
  4. data/api_names.yaml +1 -0
  5. data/generated/google/apis/acceleratedmobilepageurl_v1/classes.rb +38 -38
  6. data/generated/google/apis/acceleratedmobilepageurl_v1/representations.rb +13 -13
  7. data/generated/google/apis/acceleratedmobilepageurl_v1/service.rb +10 -10
  8. data/generated/google/apis/adexchangebuyer2_v2beta1.rb +1 -1
  9. data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +201 -201
  10. data/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +46 -46
  11. data/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +119 -119
  12. data/generated/google/apis/adexchangebuyer_v1_4.rb +1 -1
  13. data/generated/google/apis/adexchangebuyer_v1_4/classes.rb +52 -9
  14. data/generated/google/apis/adexchangebuyer_v1_4/representations.rb +9 -0
  15. data/generated/google/apis/adsense_v1_4.rb +1 -1
  16. data/generated/google/apis/adsensehost_v4_1.rb +1 -1
  17. data/generated/google/apis/analyticsreporting_v4/classes.rb +926 -926
  18. data/generated/google/apis/analyticsreporting_v4/representations.rb +149 -149
  19. data/generated/google/apis/androidenterprise_v1.rb +1 -1
  20. data/generated/google/apis/androidenterprise_v1/classes.rb +18 -11
  21. data/generated/google/apis/androidenterprise_v1/representations.rb +1 -0
  22. data/generated/google/apis/androidpublisher_v2.rb +1 -1
  23. data/generated/google/apis/appengine_v1.rb +1 -1
  24. data/generated/google/apis/appengine_v1/classes.rb +1487 -1487
  25. data/generated/google/apis/appengine_v1/representations.rb +229 -229
  26. data/generated/google/apis/appengine_v1/service.rb +188 -188
  27. data/generated/google/apis/appstate_v1.rb +1 -1
  28. data/generated/google/apis/bigquery_v2.rb +1 -1
  29. data/generated/google/apis/bigquery_v2/classes.rb +15 -10
  30. data/generated/google/apis/calendar_v3.rb +1 -1
  31. data/generated/google/apis/calendar_v3/service.rb +10 -4
  32. data/generated/google/apis/classroom_v1.rb +26 -17
  33. data/generated/google/apis/classroom_v1/classes.rb +990 -990
  34. data/generated/google/apis/classroom_v1/representations.rb +239 -239
  35. data/generated/google/apis/classroom_v1/service.rb +853 -853
  36. data/generated/google/apis/cloudbilling_v1.rb +1 -1
  37. data/generated/google/apis/cloudbuild_v1.rb +1 -1
  38. data/generated/google/apis/cloudbuild_v1/classes.rb +627 -627
  39. data/generated/google/apis/cloudbuild_v1/representations.rb +116 -116
  40. data/generated/google/apis/cloudbuild_v1/service.rb +162 -157
  41. data/generated/google/apis/clouddebugger_v2/classes.rb +258 -258
  42. data/generated/google/apis/clouddebugger_v2/representations.rb +80 -80
  43. data/generated/google/apis/clouddebugger_v2/service.rb +163 -163
  44. data/generated/google/apis/clouderrorreporting_v1beta1.rb +3 -4
  45. data/generated/google/apis/clouderrorreporting_v1beta1/classes.rb +202 -167
  46. data/generated/google/apis/clouderrorreporting_v1beta1/representations.rb +53 -37
  47. data/generated/google/apis/clouderrorreporting_v1beta1/service.rb +50 -51
  48. data/generated/google/apis/cloudfunctions_v1.rb +1 -1
  49. data/generated/google/apis/cloudkms_v1.rb +1 -1
  50. data/generated/google/apis/cloudkms_v1/classes.rb +628 -622
  51. data/generated/google/apis/cloudkms_v1/representations.rb +134 -133
  52. data/generated/google/apis/cloudkms_v1/service.rb +190 -190
  53. data/generated/google/apis/cloudresourcemanager_v1.rb +1 -1
  54. data/generated/google/apis/cloudresourcemanager_v1/classes.rb +835 -835
  55. data/generated/google/apis/cloudresourcemanager_v1/representations.rb +138 -138
  56. data/generated/google/apis/cloudresourcemanager_v1/service.rb +474 -474
  57. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +1 -1
  58. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +386 -386
  59. data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +75 -75
  60. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +64 -64
  61. data/generated/google/apis/cloudtrace_v1.rb +4 -4
  62. data/generated/google/apis/cloudtrace_v1/classes.rb +114 -114
  63. data/generated/google/apis/cloudtrace_v1/representations.rb +23 -23
  64. data/generated/google/apis/cloudtrace_v1/service.rb +14 -14
  65. data/generated/google/apis/compute_beta.rb +1 -1
  66. data/generated/google/apis/compute_beta/classes.rb +66 -25
  67. data/generated/google/apis/compute_beta/representations.rb +16 -0
  68. data/generated/google/apis/compute_beta/service.rb +85 -3
  69. data/generated/google/apis/compute_v1.rb +1 -1
  70. data/generated/google/apis/compute_v1/classes.rb +375 -24
  71. data/generated/google/apis/compute_v1/representations.rb +155 -0
  72. data/generated/google/apis/compute_v1/service.rb +481 -3
  73. data/generated/google/apis/container_v1.rb +1 -1
  74. data/generated/google/apis/container_v1/classes.rb +301 -301
  75. data/generated/google/apis/container_v1/representations.rb +59 -59
  76. data/generated/google/apis/container_v1/service.rb +178 -178
  77. data/generated/google/apis/content_v2.rb +1 -1
  78. data/generated/google/apis/content_v2/classes.rb +37 -2
  79. data/generated/google/apis/content_v2/representations.rb +15 -0
  80. data/generated/google/apis/content_v2/service.rb +58 -3
  81. data/generated/google/apis/dataflow_v1b3.rb +4 -1
  82. data/generated/google/apis/dataflow_v1b3/classes.rb +3514 -3279
  83. data/generated/google/apis/dataflow_v1b3/representations.rb +530 -440
  84. data/generated/google/apis/dataflow_v1b3/service.rb +378 -137
  85. data/generated/google/apis/dataproc_v1.rb +1 -1
  86. data/generated/google/apis/dataproc_v1/classes.rb +446 -446
  87. data/generated/google/apis/dataproc_v1/representations.rb +96 -96
  88. data/generated/google/apis/dataproc_v1/service.rb +302 -302
  89. data/generated/google/apis/datastore_v1.rb +1 -1
  90. data/generated/google/apis/datastore_v1/classes.rb +370 -374
  91. data/generated/google/apis/datastore_v1/representations.rb +120 -120
  92. data/generated/google/apis/datastore_v1/service.rb +62 -62
  93. data/generated/google/apis/dns_v1.rb +1 -1
  94. data/generated/google/apis/dns_v2beta1.rb +1 -1
  95. data/generated/google/apis/doubleclickbidmanager_v1.rb +3 -0
  96. data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
  97. data/generated/google/apis/drive_v2.rb +1 -1
  98. data/generated/google/apis/drive_v2/classes.rb +24 -21
  99. data/generated/google/apis/drive_v3.rb +1 -1
  100. data/generated/google/apis/drive_v3/classes.rb +24 -22
  101. data/generated/google/apis/firebasedynamiclinks_v1.rb +1 -1
  102. data/generated/google/apis/firebasedynamiclinks_v1/classes.rb +148 -149
  103. data/generated/google/apis/firebasedynamiclinks_v1/representations.rb +42 -42
  104. data/generated/google/apis/firebaserules_v1/classes.rb +71 -71
  105. data/generated/google/apis/firebaserules_v1/representations.rb +22 -22
  106. data/generated/google/apis/firebaserules_v1/service.rb +68 -68
  107. data/generated/google/apis/games_configuration_v1configuration.rb +1 -1
  108. data/generated/google/apis/games_management_v1management.rb +1 -1
  109. data/generated/google/apis/games_v1.rb +1 -1
  110. data/generated/google/apis/genomics_v1.rb +1 -1
  111. data/generated/google/apis/genomics_v1/classes.rb +2348 -2348
  112. data/generated/google/apis/genomics_v1/representations.rb +430 -430
  113. data/generated/google/apis/genomics_v1/service.rb +1159 -1159
  114. data/generated/google/apis/gmail_v1.rb +1 -1
  115. data/generated/google/apis/gmail_v1/service.rb +2 -2
  116. data/generated/google/apis/iam_v1.rb +1 -1
  117. data/generated/google/apis/iam_v1/classes.rb +305 -298
  118. data/generated/google/apis/iam_v1/representations.rb +97 -96
  119. data/generated/google/apis/iam_v1/service.rb +86 -86
  120. data/generated/google/apis/kgsearch_v1/classes.rb +6 -6
  121. data/generated/google/apis/kgsearch_v1/representations.rb +1 -1
  122. data/generated/google/apis/kgsearch_v1/service.rb +10 -10
  123. data/generated/google/apis/language_v1.rb +4 -4
  124. data/generated/google/apis/language_v1/classes.rb +452 -452
  125. data/generated/google/apis/language_v1/representations.rb +93 -93
  126. data/generated/google/apis/language_v1/service.rb +48 -48
  127. data/generated/google/apis/language_v1beta1.rb +4 -4
  128. data/generated/google/apis/language_v1beta1/classes.rb +84 -84
  129. data/generated/google/apis/language_v1beta1/representations.rb +22 -22
  130. data/generated/google/apis/language_v1beta1/service.rb +3 -3
  131. data/generated/google/apis/logging_v2.rb +1 -1
  132. data/generated/google/apis/logging_v2/classes.rb +884 -873
  133. data/generated/google/apis/logging_v2/representations.rb +167 -166
  134. data/generated/google/apis/logging_v2/service.rb +430 -430
  135. data/generated/google/apis/logging_v2beta1.rb +1 -1
  136. data/generated/google/apis/logging_v2beta1/classes.rb +550 -539
  137. data/generated/google/apis/logging_v2beta1/representations.rb +124 -123
  138. data/generated/google/apis/logging_v2beta1/service.rb +292 -292
  139. data/generated/google/apis/manufacturers_v1/classes.rb +322 -322
  140. data/generated/google/apis/manufacturers_v1/representations.rb +66 -66
  141. data/generated/google/apis/ml_v1.rb +1 -1
  142. data/generated/google/apis/ml_v1/classes.rb +501 -494
  143. data/generated/google/apis/ml_v1/representations.rb +92 -91
  144. data/generated/google/apis/ml_v1/service.rb +190 -190
  145. data/generated/google/apis/monitoring_v3.rb +1 -1
  146. data/generated/google/apis/monitoring_v3/classes.rb +878 -878
  147. data/generated/google/apis/monitoring_v3/representations.rb +176 -176
  148. data/generated/google/apis/monitoring_v3/service.rb +223 -262
  149. data/generated/google/apis/oauth2_v2.rb +1 -1
  150. data/generated/google/apis/partners_v2.rb +1 -1
  151. data/generated/google/apis/partners_v2/classes.rb +1506 -1506
  152. data/generated/google/apis/partners_v2/representations.rb +370 -370
  153. data/generated/google/apis/partners_v2/service.rb +393 -393
  154. data/generated/google/apis/people_v1.rb +13 -13
  155. data/generated/google/apis/people_v1/classes.rb +597 -594
  156. data/generated/google/apis/people_v1/representations.rb +121 -121
  157. data/generated/google/apis/people_v1/service.rb +39 -48
  158. data/generated/google/apis/plus_domains_v1.rb +1 -1
  159. data/generated/google/apis/plus_v1.rb +1 -1
  160. data/generated/google/apis/proximitybeacon_v1beta1.rb +1 -1
  161. data/generated/google/apis/proximitybeacon_v1beta1/classes.rb +323 -327
  162. data/generated/google/apis/proximitybeacon_v1beta1/representations.rb +100 -100
  163. data/generated/google/apis/proximitybeacon_v1beta1/service.rb +184 -184
  164. data/generated/google/apis/pubsub_v1.rb +1 -1
  165. data/generated/google/apis/pubsub_v1/classes.rb +178 -178
  166. data/generated/google/apis/pubsub_v1/representations.rb +55 -55
  167. data/generated/google/apis/pubsub_v1/service.rb +357 -357
  168. data/generated/google/apis/runtimeconfig_v1.rb +1 -1
  169. data/generated/google/apis/runtimeconfig_v1/classes.rb +20 -20
  170. data/generated/google/apis/runtimeconfig_v1/representations.rb +2 -2
  171. data/generated/google/apis/runtimeconfig_v1/service.rb +12 -7
  172. data/generated/google/apis/script_v1.rb +16 -16
  173. data/generated/google/apis/script_v1/classes.rb +113 -113
  174. data/generated/google/apis/script_v1/representations.rb +28 -28
  175. data/generated/google/apis/script_v1/service.rb +4 -4
  176. data/generated/google/apis/searchconsole_v1.rb +1 -1
  177. data/generated/google/apis/searchconsole_v1/classes.rb +84 -84
  178. data/generated/google/apis/searchconsole_v1/representations.rb +32 -32
  179. data/generated/google/apis/searchconsole_v1/service.rb +6 -6
  180. data/generated/google/apis/servicecontrol_v1.rb +4 -4
  181. data/generated/google/apis/servicecontrol_v1/classes.rb +1146 -1145
  182. data/generated/google/apis/servicecontrol_v1/representations.rb +203 -203
  183. data/generated/google/apis/servicecontrol_v1/service.rb +57 -57
  184. data/generated/google/apis/servicemanagement_v1.rb +4 -4
  185. data/generated/google/apis/servicemanagement_v1/classes.rb +3486 -3360
  186. data/generated/google/apis/servicemanagement_v1/representations.rb +342 -329
  187. data/generated/google/apis/servicemanagement_v1/service.rb +260 -250
  188. data/generated/google/apis/serviceuser_v1.rb +1 -1
  189. data/generated/google/apis/serviceuser_v1/classes.rb +2716 -2596
  190. data/generated/google/apis/serviceuser_v1/representations.rb +391 -379
  191. data/generated/google/apis/serviceuser_v1/service.rb +16 -16
  192. data/generated/google/apis/sheets_v4.rb +1 -1
  193. data/generated/google/apis/sheets_v4/classes.rb +4255 -4252
  194. data/generated/google/apis/sheets_v4/representations.rb +548 -548
  195. data/generated/google/apis/sheets_v4/service.rb +170 -170
  196. data/generated/google/apis/slides_v1.rb +4 -4
  197. data/generated/google/apis/slides_v1/classes.rb +2945 -2916
  198. data/generated/google/apis/slides_v1/representations.rb +700 -697
  199. data/generated/google/apis/slides_v1/service.rb +44 -44
  200. data/generated/google/apis/sourcerepo_v1.rb +2 -2
  201. data/generated/google/apis/sourcerepo_v1/classes.rb +419 -410
  202. data/generated/google/apis/sourcerepo_v1/representations.rb +88 -87
  203. data/generated/google/apis/sourcerepo_v1/service.rb +67 -58
  204. data/generated/google/apis/spanner_v1/classes.rb +2187 -2187
  205. data/generated/google/apis/spanner_v1/representations.rb +323 -323
  206. data/generated/google/apis/spanner_v1/service.rb +383 -383
  207. data/generated/google/apis/speech_v1beta1.rb +1 -1
  208. data/generated/google/apis/speech_v1beta1/classes.rb +226 -226
  209. data/generated/google/apis/speech_v1beta1/representations.rb +44 -44
  210. data/generated/google/apis/speech_v1beta1/service.rb +37 -32
  211. data/generated/google/apis/sqladmin_v1beta4.rb +1 -1
  212. data/generated/google/apis/sqladmin_v1beta4/classes.rb +10 -28
  213. data/generated/google/apis/sqladmin_v1beta4/representations.rb +2 -16
  214. data/generated/google/apis/sqladmin_v1beta4/service.rb +1 -1
  215. data/generated/google/apis/storage_v1.rb +1 -1
  216. data/generated/google/apis/storage_v1/classes.rb +26 -0
  217. data/generated/google/apis/storage_v1/representations.rb +15 -0
  218. data/generated/google/apis/storage_v1/service.rb +168 -42
  219. data/generated/google/apis/storagetransfer_v1.rb +1 -1
  220. data/generated/google/apis/storagetransfer_v1/classes.rb +218 -218
  221. data/generated/google/apis/storagetransfer_v1/representations.rb +47 -47
  222. data/generated/google/apis/storagetransfer_v1/service.rb +68 -68
  223. data/generated/google/apis/toolresults_v1beta3.rb +1 -1
  224. data/generated/google/apis/toolresults_v1beta3/classes.rb +7 -4
  225. data/generated/google/apis/toolresults_v1beta3/service.rb +9 -8
  226. data/generated/google/apis/translate_v2.rb +11 -4
  227. data/generated/google/apis/translate_v2/classes.rb +140 -37
  228. data/generated/google/apis/translate_v2/representations.rb +62 -15
  229. data/generated/google/apis/translate_v2/service.rb +119 -66
  230. data/generated/google/apis/vision_v1.rb +1 -1
  231. data/generated/google/apis/vision_v1/classes.rb +1265 -1273
  232. data/generated/google/apis/vision_v1/representations.rb +202 -202
  233. data/generated/google/apis/vision_v1/service.rb +4 -4
  234. data/generated/google/apis/webmasters_v3.rb +1 -1
  235. data/generated/google/apis/youtube_analytics_v1.rb +1 -1
  236. data/generated/google/apis/youtube_partner_v1.rb +1 -1
  237. data/generated/google/apis/youtube_partner_v1/classes.rb +2 -1
  238. data/generated/google/apis/youtubereporting_v1.rb +1 -1
  239. data/generated/google/apis/youtubereporting_v1/classes.rb +91 -91
  240. data/generated/google/apis/youtubereporting_v1/representations.rb +25 -25
  241. data/generated/google/apis/youtubereporting_v1/service.rb +94 -94
  242. data/lib/google/apis/core/api_command.rb +43 -10
  243. data/lib/google/apis/core/json_representation.rb +1 -1
  244. data/lib/google/apis/options.rb +6 -2
  245. data/lib/google/apis/version.rb +1 -1
  246. metadata +3 -3
@@ -47,87 +47,18 @@ module Google
47
47
  @batch_path = 'batch'
48
48
  end
49
49
 
50
- # Lists logs-based metrics.
51
- # @param [String] parent
52
- # Required. The name of the project containing the metrics:
53
- # "projects/[PROJECT_ID]"
54
- # @param [Fixnum] page_size
55
- # Optional. The maximum number of results to return from this request. Non-
56
- # positive values are ignored. The presence of nextPageToken in the response
57
- # indicates that more results might be available.
58
- # @param [String] page_token
59
- # Optional. If present, then retrieve the next batch of results from the
60
- # preceding call to this method. pageToken must be the value of nextPageToken
61
- # from the previous response. The values of other method parameters should be
62
- # identical to those in the previous call.
63
- # @param [String] fields
64
- # Selector specifying which fields to include in a partial response.
65
- # @param [String] quota_user
66
- # Available to use for quota purposes for server-side applications. Can be any
67
- # arbitrary string assigned to a user, but should not exceed 40 characters.
68
- # @param [Google::Apis::RequestOptions] options
69
- # Request-specific options
70
- #
71
- # @yield [result, err] Result & error if block supplied
72
- # @yieldparam result [Google::Apis::LoggingV2::ListLogMetricsResponse] parsed result object
73
- # @yieldparam err [StandardError] error object if request failed
74
- #
75
- # @return [Google::Apis::LoggingV2::ListLogMetricsResponse]
76
- #
77
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
78
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
79
- # @raise [Google::Apis::AuthorizationError] Authorization is required
80
- def list_project_metrics(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
81
- command = make_simple_command(:get, 'v2/{+parent}/metrics', options)
82
- command.response_representation = Google::Apis::LoggingV2::ListLogMetricsResponse::Representation
83
- command.response_class = Google::Apis::LoggingV2::ListLogMetricsResponse
84
- command.params['parent'] = parent unless parent.nil?
85
- command.query['pageSize'] = page_size unless page_size.nil?
86
- command.query['pageToken'] = page_token unless page_token.nil?
87
- command.query['fields'] = fields unless fields.nil?
88
- command.query['quotaUser'] = quota_user unless quota_user.nil?
89
- execute_or_queue_command(command, &block)
90
- end
91
-
92
- # Gets a logs-based metric.
93
- # @param [String] metric_name
94
- # The resource name of the desired metric:
95
- # "projects/[PROJECT_ID]/metrics/[METRIC_ID]"
96
- # @param [String] fields
97
- # Selector specifying which fields to include in a partial response.
98
- # @param [String] quota_user
99
- # Available to use for quota purposes for server-side applications. Can be any
100
- # arbitrary string assigned to a user, but should not exceed 40 characters.
101
- # @param [Google::Apis::RequestOptions] options
102
- # Request-specific options
103
- #
104
- # @yield [result, err] Result & error if block supplied
105
- # @yieldparam result [Google::Apis::LoggingV2::LogMetric] parsed result object
106
- # @yieldparam err [StandardError] error object if request failed
107
- #
108
- # @return [Google::Apis::LoggingV2::LogMetric]
109
- #
110
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
111
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
112
- # @raise [Google::Apis::AuthorizationError] Authorization is required
113
- def get_project_metric(metric_name, fields: nil, quota_user: nil, options: nil, &block)
114
- command = make_simple_command(:get, 'v2/{+metricName}', options)
115
- command.response_representation = Google::Apis::LoggingV2::LogMetric::Representation
116
- command.response_class = Google::Apis::LoggingV2::LogMetric
117
- command.params['metricName'] = metric_name unless metric_name.nil?
118
- command.query['fields'] = fields unless fields.nil?
119
- command.query['quotaUser'] = quota_user unless quota_user.nil?
120
- execute_or_queue_command(command, &block)
121
- end
122
-
123
- # Creates or updates a logs-based metric.
124
- # @param [String] metric_name
125
- # The resource name of the metric to update:
126
- # "projects/[PROJECT_ID]/metrics/[METRIC_ID]"
127
- # The updated metric must be provided in the request and it's name field must be
128
- # the same as [METRIC_ID] If the metric does not exist in [PROJECT_ID], then a
129
- # new metric is created.
130
- # @param [Google::Apis::LoggingV2::LogMetric] log_metric_object
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.
131
62
  # @param [String] fields
132
63
  # Selector specifying which fields to include in a partial response.
133
64
  # @param [String] quota_user
@@ -137,32 +68,41 @@ module Google
137
68
  # Request-specific options
138
69
  #
139
70
  # @yield [result, err] Result & error if block supplied
140
- # @yieldparam result [Google::Apis::LoggingV2::LogMetric] parsed result object
71
+ # @yieldparam result [Google::Apis::LoggingV2::Empty] parsed result object
141
72
  # @yieldparam err [StandardError] error object if request failed
142
73
  #
143
- # @return [Google::Apis::LoggingV2::LogMetric]
74
+ # @return [Google::Apis::LoggingV2::Empty]
144
75
  #
145
76
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
146
77
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
147
78
  # @raise [Google::Apis::AuthorizationError] Authorization is required
148
- def update_project_metric(metric_name, log_metric_object = nil, fields: nil, quota_user: nil, options: nil, &block)
149
- command = make_simple_command(:put, 'v2/{+metricName}', options)
150
- command.request_representation = Google::Apis::LoggingV2::LogMetric::Representation
151
- command.request_object = log_metric_object
152
- command.response_representation = Google::Apis::LoggingV2::LogMetric::Representation
153
- command.response_class = Google::Apis::LoggingV2::LogMetric
154
- command.params['metricName'] = metric_name unless metric_name.nil?
79
+ def delete_billing_account_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?
155
84
  command.query['fields'] = fields unless fields.nil?
156
85
  command.query['quotaUser'] = quota_user unless quota_user.nil?
157
86
  execute_or_queue_command(command, &block)
158
87
  end
159
88
 
160
- # Creates a logs-based metric.
89
+ # Lists the logs in projects, organizations, folders, or billing accounts. Only
90
+ # logs that have entries are listed.
161
91
  # @param [String] parent
162
- # The resource name of the project in which to create the metric:
92
+ # Required. The resource name that owns the logs:
163
93
  # "projects/[PROJECT_ID]"
164
- # The new metric must be provided in the request.
165
- # @param [Google::Apis::LoggingV2::LogMetric] log_metric_object
94
+ # "organizations/[ORGANIZATION_ID]"
95
+ # "billingAccounts/[BILLING_ACCOUNT_ID]"
96
+ # "folders/[FOLDER_ID]"
97
+ # @param [Fixnum] page_size
98
+ # Optional. The maximum number of results to return from this request. Non-
99
+ # positive values are ignored. The presence of nextPageToken in the response
100
+ # indicates that more results might be available.
101
+ # @param [String] page_token
102
+ # Optional. If present, then retrieve the next batch of results from the
103
+ # preceding call to this method. pageToken must be the value of nextPageToken
104
+ # from the previous response. The values of other method parameters should be
105
+ # identical to those in the previous call.
166
106
  # @param [String] fields
167
107
  # Selector specifying which fields to include in a partial response.
168
108
  # @param [String] quota_user
@@ -172,30 +112,36 @@ module Google
172
112
  # Request-specific options
173
113
  #
174
114
  # @yield [result, err] Result & error if block supplied
175
- # @yieldparam result [Google::Apis::LoggingV2::LogMetric] parsed result object
115
+ # @yieldparam result [Google::Apis::LoggingV2::ListLogsResponse] parsed result object
176
116
  # @yieldparam err [StandardError] error object if request failed
177
117
  #
178
- # @return [Google::Apis::LoggingV2::LogMetric]
118
+ # @return [Google::Apis::LoggingV2::ListLogsResponse]
179
119
  #
180
120
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
181
121
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
182
122
  # @raise [Google::Apis::AuthorizationError] Authorization is required
183
- def create_project_metric(parent, log_metric_object = nil, fields: nil, quota_user: nil, options: nil, &block)
184
- command = make_simple_command(:post, 'v2/{+parent}/metrics', options)
185
- command.request_representation = Google::Apis::LoggingV2::LogMetric::Representation
186
- command.request_object = log_metric_object
187
- command.response_representation = Google::Apis::LoggingV2::LogMetric::Representation
188
- command.response_class = Google::Apis::LoggingV2::LogMetric
123
+ def list_billing_account_logs(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
124
+ command = make_simple_command(:get, 'v2/{+parent}/logs', options)
125
+ command.response_representation = Google::Apis::LoggingV2::ListLogsResponse::Representation
126
+ command.response_class = Google::Apis::LoggingV2::ListLogsResponse
189
127
  command.params['parent'] = parent unless parent.nil?
128
+ command.query['pageSize'] = page_size unless page_size.nil?
129
+ command.query['pageToken'] = page_token unless page_token.nil?
190
130
  command.query['fields'] = fields unless fields.nil?
191
131
  command.query['quotaUser'] = quota_user unless quota_user.nil?
192
132
  execute_or_queue_command(command, &block)
193
133
  end
194
134
 
195
- # Deletes a logs-based metric.
196
- # @param [String] metric_name
197
- # The resource name of the metric to delete:
198
- # "projects/[PROJECT_ID]/metrics/[METRIC_ID]"
135
+ # Deletes a sink. If the sink has a unique writer_identity, then that service
136
+ # account is also deleted.
137
+ # @param [String] sink_name
138
+ # Required. The full resource name of the sink to delete, including the parent
139
+ # resource and the sink identifier:
140
+ # "projects/[PROJECT_ID]/sinks/[SINK_ID]"
141
+ # "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
142
+ # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
143
+ # "folders/[FOLDER_ID]/sinks/[SINK_ID]"
144
+ # Example: "projects/my-project-id/sinks/my-sink-id".
199
145
  # @param [String] fields
200
146
  # Selector specifying which fields to include in a partial response.
201
147
  # @param [String] quota_user
@@ -213,33 +159,32 @@ module Google
213
159
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
214
160
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
215
161
  # @raise [Google::Apis::AuthorizationError] Authorization is required
216
- def delete_project_metric(metric_name, fields: nil, quota_user: nil, options: nil, &block)
217
- command = make_simple_command(:delete, 'v2/{+metricName}', options)
162
+ def delete_billing_account_sink(sink_name, fields: nil, quota_user: nil, options: nil, &block)
163
+ command = make_simple_command(:delete, 'v2/{+sinkName}', options)
218
164
  command.response_representation = Google::Apis::LoggingV2::Empty::Representation
219
165
  command.response_class = Google::Apis::LoggingV2::Empty
220
- command.params['metricName'] = metric_name unless metric_name.nil?
166
+ command.params['sinkName'] = sink_name unless sink_name.nil?
221
167
  command.query['fields'] = fields unless fields.nil?
222
168
  command.query['quotaUser'] = quota_user unless quota_user.nil?
223
169
  execute_or_queue_command(command, &block)
224
170
  end
225
171
 
226
- # Lists the logs in projects, organizations, folders, or billing accounts. Only
227
- # logs that have entries are listed.
172
+ # Lists sinks.
228
173
  # @param [String] parent
229
- # Required. The resource name that owns the logs:
174
+ # Required. The parent resource whose sinks are to be listed:
230
175
  # "projects/[PROJECT_ID]"
231
176
  # "organizations/[ORGANIZATION_ID]"
232
177
  # "billingAccounts/[BILLING_ACCOUNT_ID]"
233
178
  # "folders/[FOLDER_ID]"
179
+ # @param [Fixnum] page_size
180
+ # Optional. The maximum number of results to return from this request. Non-
181
+ # positive values are ignored. The presence of nextPageToken in the response
182
+ # indicates that more results might be available.
234
183
  # @param [String] page_token
235
184
  # Optional. If present, then retrieve the next batch of results from the
236
185
  # preceding call to this method. pageToken must be the value of nextPageToken
237
186
  # from the previous response. The values of other method parameters should be
238
187
  # identical to those in the previous call.
239
- # @param [Fixnum] page_size
240
- # Optional. The maximum number of results to return from this request. Non-
241
- # positive values are ignored. The presence of nextPageToken in the response
242
- # indicates that more results might be available.
243
188
  # @param [String] fields
244
189
  # Selector specifying which fields to include in a partial response.
245
190
  # @param [String] quota_user
@@ -249,38 +194,34 @@ module Google
249
194
  # Request-specific options
250
195
  #
251
196
  # @yield [result, err] Result & error if block supplied
252
- # @yieldparam result [Google::Apis::LoggingV2::ListLogsResponse] parsed result object
197
+ # @yieldparam result [Google::Apis::LoggingV2::ListSinksResponse] parsed result object
253
198
  # @yieldparam err [StandardError] error object if request failed
254
199
  #
255
- # @return [Google::Apis::LoggingV2::ListLogsResponse]
200
+ # @return [Google::Apis::LoggingV2::ListSinksResponse]
256
201
  #
257
202
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
258
203
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
259
204
  # @raise [Google::Apis::AuthorizationError] Authorization is required
260
- def list_project_logs(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
261
- command = make_simple_command(:get, 'v2/{+parent}/logs', options)
262
- command.response_representation = Google::Apis::LoggingV2::ListLogsResponse::Representation
263
- command.response_class = Google::Apis::LoggingV2::ListLogsResponse
205
+ def list_billing_account_sinks(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
206
+ command = make_simple_command(:get, 'v2/{+parent}/sinks', options)
207
+ command.response_representation = Google::Apis::LoggingV2::ListSinksResponse::Representation
208
+ command.response_class = Google::Apis::LoggingV2::ListSinksResponse
264
209
  command.params['parent'] = parent unless parent.nil?
265
- command.query['pageToken'] = page_token unless page_token.nil?
266
210
  command.query['pageSize'] = page_size unless page_size.nil?
211
+ command.query['pageToken'] = page_token unless page_token.nil?
267
212
  command.query['fields'] = fields unless fields.nil?
268
213
  command.query['quotaUser'] = quota_user unless quota_user.nil?
269
214
  execute_or_queue_command(command, &block)
270
215
  end
271
216
 
272
- # Deletes all the log entries in a log. The log reappears if it receives new
273
- # entries. Log entries written shortly before the delete operation might not be
274
- # deleted.
275
- # @param [String] log_name
276
- # Required. The resource name of the log to delete:
277
- # "projects/[PROJECT_ID]/logs/[LOG_ID]"
278
- # "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
279
- # "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]"
280
- # "folders/[FOLDER_ID]/logs/[LOG_ID]"
281
- # [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog"
282
- # , "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%
283
- # 2Factivity". For more information about log names, see LogEntry.
217
+ # Gets a sink.
218
+ # @param [String] sink_name
219
+ # Required. The resource name of the sink:
220
+ # "projects/[PROJECT_ID]/sinks/[SINK_ID]"
221
+ # "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
222
+ # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
223
+ # "folders/[FOLDER_ID]/sinks/[SINK_ID]"
224
+ # Example: "projects/my-project-id/sinks/my-sink-id".
284
225
  # @param [String] fields
285
226
  # Selector specifying which fields to include in a partial response.
286
227
  # @param [String] quota_user
@@ -290,19 +231,19 @@ module Google
290
231
  # Request-specific options
291
232
  #
292
233
  # @yield [result, err] Result & error if block supplied
293
- # @yieldparam result [Google::Apis::LoggingV2::Empty] parsed result object
234
+ # @yieldparam result [Google::Apis::LoggingV2::LogSink] parsed result object
294
235
  # @yieldparam err [StandardError] error object if request failed
295
236
  #
296
- # @return [Google::Apis::LoggingV2::Empty]
237
+ # @return [Google::Apis::LoggingV2::LogSink]
297
238
  #
298
239
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
299
240
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
300
241
  # @raise [Google::Apis::AuthorizationError] Authorization is required
301
- def delete_project_log(log_name, fields: nil, quota_user: nil, options: nil, &block)
302
- command = make_simple_command(:delete, 'v2/{+logName}', options)
303
- command.response_representation = Google::Apis::LoggingV2::Empty::Representation
304
- command.response_class = Google::Apis::LoggingV2::Empty
305
- command.params['logName'] = log_name unless log_name.nil?
242
+ def get_billing_account_sink(sink_name, fields: nil, quota_user: nil, options: nil, &block)
243
+ command = make_simple_command(:get, 'v2/{+sinkName}', options)
244
+ command.response_representation = Google::Apis::LoggingV2::LogSink::Representation
245
+ command.response_class = Google::Apis::LoggingV2::LogSink
246
+ command.params['sinkName'] = sink_name unless sink_name.nil?
306
247
  command.query['fields'] = fields unless fields.nil?
307
248
  command.query['quotaUser'] = quota_user unless quota_user.nil?
308
249
  execute_or_queue_command(command, &block)
@@ -349,7 +290,7 @@ module Google
349
290
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
350
291
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
351
292
  # @raise [Google::Apis::AuthorizationError] Authorization is required
352
- def update_project_sink(sink_name, log_sink_object = nil, unique_writer_identity: nil, fields: nil, quota_user: nil, options: nil, &block)
293
+ def update_billing_account_sink(sink_name, log_sink_object = nil, unique_writer_identity: nil, fields: nil, quota_user: nil, options: nil, &block)
353
294
  command = make_simple_command(:put, 'v2/{+sinkName}', options)
354
295
  command.request_representation = Google::Apis::LoggingV2::LogSink::Representation
355
296
  command.request_object = log_sink_object
@@ -402,7 +343,7 @@ module Google
402
343
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
403
344
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
404
345
  # @raise [Google::Apis::AuthorizationError] Authorization is required
405
- def create_project_sink(parent, log_sink_object = nil, unique_writer_identity: nil, fields: nil, quota_user: nil, options: nil, &block)
346
+ def create_billing_account_sink(parent, log_sink_object = nil, unique_writer_identity: nil, fields: nil, quota_user: nil, options: nil, &block)
406
347
  command = make_simple_command(:post, 'v2/{+parent}/sinks', options)
407
348
  command.request_representation = Google::Apis::LoggingV2::LogSink::Representation
408
349
  command.request_object = log_sink_object
@@ -415,46 +356,10 @@ module Google
415
356
  execute_or_queue_command(command, &block)
416
357
  end
417
358
 
418
- # Deletes a sink. If the sink has a unique writer_identity, then that service
419
- # account is also deleted.
420
- # @param [String] sink_name
421
- # Required. The full resource name of the sink to delete, including the parent
422
- # resource and the sink identifier:
423
- # "projects/[PROJECT_ID]/sinks/[SINK_ID]"
424
- # "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
425
- # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
426
- # "folders/[FOLDER_ID]/sinks/[SINK_ID]"
427
- # Example: "projects/my-project-id/sinks/my-sink-id".
428
- # @param [String] fields
429
- # Selector specifying which fields to include in a partial response.
430
- # @param [String] quota_user
431
- # Available to use for quota purposes for server-side applications. Can be any
432
- # arbitrary string assigned to a user, but should not exceed 40 characters.
433
- # @param [Google::Apis::RequestOptions] options
434
- # Request-specific options
435
- #
436
- # @yield [result, err] Result & error if block supplied
437
- # @yieldparam result [Google::Apis::LoggingV2::Empty] parsed result object
438
- # @yieldparam err [StandardError] error object if request failed
439
- #
440
- # @return [Google::Apis::LoggingV2::Empty]
441
- #
442
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
443
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
444
- # @raise [Google::Apis::AuthorizationError] Authorization is required
445
- def delete_project_sink(sink_name, fields: nil, quota_user: nil, options: nil, &block)
446
- command = make_simple_command(:delete, 'v2/{+sinkName}', options)
447
- command.response_representation = Google::Apis::LoggingV2::Empty::Representation
448
- command.response_class = Google::Apis::LoggingV2::Empty
449
- command.params['sinkName'] = sink_name unless sink_name.nil?
450
- command.query['fields'] = fields unless fields.nil?
451
- command.query['quotaUser'] = quota_user unless quota_user.nil?
452
- execute_or_queue_command(command, &block)
453
- end
454
-
455
- # Lists sinks.
359
+ # Lists the logs in projects, organizations, folders, or billing accounts. Only
360
+ # logs that have entries are listed.
456
361
  # @param [String] parent
457
- # Required. The parent resource whose sinks are to be listed:
362
+ # Required. The resource name that owns the logs:
458
363
  # "projects/[PROJECT_ID]"
459
364
  # "organizations/[ORGANIZATION_ID]"
460
365
  # "billingAccounts/[BILLING_ACCOUNT_ID]"
@@ -477,18 +382,18 @@ module Google
477
382
  # Request-specific options
478
383
  #
479
384
  # @yield [result, err] Result & error if block supplied
480
- # @yieldparam result [Google::Apis::LoggingV2::ListSinksResponse] parsed result object
385
+ # @yieldparam result [Google::Apis::LoggingV2::ListLogsResponse] parsed result object
481
386
  # @yieldparam err [StandardError] error object if request failed
482
387
  #
483
- # @return [Google::Apis::LoggingV2::ListSinksResponse]
388
+ # @return [Google::Apis::LoggingV2::ListLogsResponse]
484
389
  #
485
390
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
486
391
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
487
392
  # @raise [Google::Apis::AuthorizationError] Authorization is required
488
- def list_project_sinks(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
489
- command = make_simple_command(:get, 'v2/{+parent}/sinks', options)
490
- command.response_representation = Google::Apis::LoggingV2::ListSinksResponse::Representation
491
- command.response_class = Google::Apis::LoggingV2::ListSinksResponse
393
+ def list_folder_logs(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
394
+ command = make_simple_command(:get, 'v2/{+parent}/logs', options)
395
+ command.response_representation = Google::Apis::LoggingV2::ListLogsResponse::Representation
396
+ command.response_class = Google::Apis::LoggingV2::ListLogsResponse
492
397
  command.params['parent'] = parent unless parent.nil?
493
398
  command.query['pageToken'] = page_token unless page_token.nil?
494
399
  command.query['pageSize'] = page_size unless page_size.nil?
@@ -497,41 +402,6 @@ module Google
497
402
  execute_or_queue_command(command, &block)
498
403
  end
499
404
 
500
- # Gets a sink.
501
- # @param [String] sink_name
502
- # Required. The resource name of the sink:
503
- # "projects/[PROJECT_ID]/sinks/[SINK_ID]"
504
- # "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
505
- # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
506
- # "folders/[FOLDER_ID]/sinks/[SINK_ID]"
507
- # Example: "projects/my-project-id/sinks/my-sink-id".
508
- # @param [String] fields
509
- # Selector specifying which fields to include in a partial response.
510
- # @param [String] quota_user
511
- # Available to use for quota purposes for server-side applications. Can be any
512
- # arbitrary string assigned to a user, but should not exceed 40 characters.
513
- # @param [Google::Apis::RequestOptions] options
514
- # Request-specific options
515
- #
516
- # @yield [result, err] Result & error if block supplied
517
- # @yieldparam result [Google::Apis::LoggingV2::LogSink] parsed result object
518
- # @yieldparam err [StandardError] error object if request failed
519
- #
520
- # @return [Google::Apis::LoggingV2::LogSink]
521
- #
522
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
523
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
524
- # @raise [Google::Apis::AuthorizationError] Authorization is required
525
- def get_project_sink(sink_name, fields: nil, quota_user: nil, options: nil, &block)
526
- command = make_simple_command(:get, 'v2/{+sinkName}', options)
527
- command.response_representation = Google::Apis::LoggingV2::LogSink::Representation
528
- command.response_class = Google::Apis::LoggingV2::LogSink
529
- command.params['sinkName'] = sink_name unless sink_name.nil?
530
- command.query['fields'] = fields unless fields.nil?
531
- command.query['quotaUser'] = quota_user unless quota_user.nil?
532
- execute_or_queue_command(command, &block)
533
- end
534
-
535
405
  # Deletes all the log entries in a log. The log reappears if it receives new
536
406
  # entries. Log entries written shortly before the delete operation might not be
537
407
  # deleted.
@@ -561,7 +431,7 @@ module Google
561
431
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
562
432
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
563
433
  # @raise [Google::Apis::AuthorizationError] Authorization is required
564
- def delete_billing_account_log(log_name, fields: nil, quota_user: nil, options: nil, &block)
434
+ def delete_folder_log(log_name, fields: nil, quota_user: nil, options: nil, &block)
565
435
  command = make_simple_command(:delete, 'v2/{+logName}', options)
566
436
  command.response_representation = Google::Apis::LoggingV2::Empty::Representation
567
437
  command.response_class = Google::Apis::LoggingV2::Empty
@@ -571,23 +441,16 @@ module Google
571
441
  execute_or_queue_command(command, &block)
572
442
  end
573
443
 
574
- # Lists the logs in projects, organizations, folders, or billing accounts. Only
575
- # logs that have entries are listed.
576
- # @param [String] parent
577
- # Required. The resource name that owns the logs:
578
- # "projects/[PROJECT_ID]"
579
- # "organizations/[ORGANIZATION_ID]"
580
- # "billingAccounts/[BILLING_ACCOUNT_ID]"
581
- # "folders/[FOLDER_ID]"
582
- # @param [String] page_token
583
- # Optional. If present, then retrieve the next batch of results from the
584
- # preceding call to this method. pageToken must be the value of nextPageToken
585
- # from the previous response. The values of other method parameters should be
586
- # identical to those in the previous call.
587
- # @param [Fixnum] page_size
588
- # Optional. The maximum number of results to return from this request. Non-
589
- # positive values are ignored. The presence of nextPageToken in the response
590
- # indicates that more results might be available.
444
+ # Deletes a sink. If the sink has a unique writer_identity, then that service
445
+ # account is also deleted.
446
+ # @param [String] sink_name
447
+ # Required. The full resource name of the sink to delete, including the parent
448
+ # resource and the sink identifier:
449
+ # "projects/[PROJECT_ID]/sinks/[SINK_ID]"
450
+ # "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
451
+ # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
452
+ # "folders/[FOLDER_ID]/sinks/[SINK_ID]"
453
+ # Example: "projects/my-project-id/sinks/my-sink-id".
591
454
  # @param [String] fields
592
455
  # Selector specifying which fields to include in a partial response.
593
456
  # @param [String] quota_user
@@ -597,21 +460,19 @@ module Google
597
460
  # Request-specific options
598
461
  #
599
462
  # @yield [result, err] Result & error if block supplied
600
- # @yieldparam result [Google::Apis::LoggingV2::ListLogsResponse] parsed result object
463
+ # @yieldparam result [Google::Apis::LoggingV2::Empty] parsed result object
601
464
  # @yieldparam err [StandardError] error object if request failed
602
465
  #
603
- # @return [Google::Apis::LoggingV2::ListLogsResponse]
466
+ # @return [Google::Apis::LoggingV2::Empty]
604
467
  #
605
468
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
606
469
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
607
470
  # @raise [Google::Apis::AuthorizationError] Authorization is required
608
- def list_billing_account_logs(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
609
- command = make_simple_command(:get, 'v2/{+parent}/logs', options)
610
- command.response_representation = Google::Apis::LoggingV2::ListLogsResponse::Representation
611
- command.response_class = Google::Apis::LoggingV2::ListLogsResponse
612
- command.params['parent'] = parent unless parent.nil?
613
- command.query['pageToken'] = page_token unless page_token.nil?
614
- command.query['pageSize'] = page_size unless page_size.nil?
471
+ def delete_folder_sink(sink_name, fields: nil, quota_user: nil, options: nil, &block)
472
+ command = make_simple_command(:delete, 'v2/{+sinkName}', options)
473
+ command.response_representation = Google::Apis::LoggingV2::Empty::Representation
474
+ command.response_class = Google::Apis::LoggingV2::Empty
475
+ command.params['sinkName'] = sink_name unless sink_name.nil?
615
476
  command.query['fields'] = fields unless fields.nil?
616
477
  command.query['quotaUser'] = quota_user unless quota_user.nil?
617
478
  execute_or_queue_command(command, &block)
@@ -624,15 +485,15 @@ module Google
624
485
  # "organizations/[ORGANIZATION_ID]"
625
486
  # "billingAccounts/[BILLING_ACCOUNT_ID]"
626
487
  # "folders/[FOLDER_ID]"
488
+ # @param [Fixnum] page_size
489
+ # Optional. The maximum number of results to return from this request. Non-
490
+ # positive values are ignored. The presence of nextPageToken in the response
491
+ # indicates that more results might be available.
627
492
  # @param [String] page_token
628
493
  # Optional. If present, then retrieve the next batch of results from the
629
494
  # preceding call to this method. pageToken must be the value of nextPageToken
630
495
  # from the previous response. The values of other method parameters should be
631
496
  # identical to those in the previous call.
632
- # @param [Fixnum] page_size
633
- # Optional. The maximum number of results to return from this request. Non-
634
- # positive values are ignored. The presence of nextPageToken in the response
635
- # indicates that more results might be available.
636
497
  # @param [String] fields
637
498
  # Selector specifying which fields to include in a partial response.
638
499
  # @param [String] quota_user
@@ -650,13 +511,13 @@ module Google
650
511
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
651
512
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
652
513
  # @raise [Google::Apis::AuthorizationError] Authorization is required
653
- def list_billing_account_sinks(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
514
+ def list_folder_sinks(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
654
515
  command = make_simple_command(:get, 'v2/{+parent}/sinks', options)
655
516
  command.response_representation = Google::Apis::LoggingV2::ListSinksResponse::Representation
656
517
  command.response_class = Google::Apis::LoggingV2::ListSinksResponse
657
518
  command.params['parent'] = parent unless parent.nil?
658
- command.query['pageToken'] = page_token unless page_token.nil?
659
519
  command.query['pageSize'] = page_size unless page_size.nil?
520
+ command.query['pageToken'] = page_token unless page_token.nil?
660
521
  command.query['fields'] = fields unless fields.nil?
661
522
  command.query['quotaUser'] = quota_user unless quota_user.nil?
662
523
  execute_or_queue_command(command, &block)
@@ -687,7 +548,7 @@ module Google
687
548
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
688
549
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
689
550
  # @raise [Google::Apis::AuthorizationError] Authorization is required
690
- def get_billing_account_sink(sink_name, fields: nil, quota_user: nil, options: nil, &block)
551
+ def get_folder_sink(sink_name, fields: nil, quota_user: nil, options: nil, &block)
691
552
  command = make_simple_command(:get, 'v2/{+sinkName}', options)
692
553
  command.response_representation = Google::Apis::LoggingV2::LogSink::Representation
693
554
  command.response_class = Google::Apis::LoggingV2::LogSink
@@ -738,7 +599,7 @@ module Google
738
599
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
739
600
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
740
601
  # @raise [Google::Apis::AuthorizationError] Authorization is required
741
- def update_billing_account_sink(sink_name, log_sink_object = nil, unique_writer_identity: nil, fields: nil, quota_user: nil, options: nil, &block)
602
+ def update_folder_sink(sink_name, log_sink_object = nil, unique_writer_identity: nil, fields: nil, quota_user: nil, options: nil, &block)
742
603
  command = make_simple_command(:put, 'v2/{+sinkName}', options)
743
604
  command.request_representation = Google::Apis::LoggingV2::LogSink::Representation
744
605
  command.request_object = log_sink_object
@@ -791,7 +652,7 @@ module Google
791
652
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
792
653
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
793
654
  # @raise [Google::Apis::AuthorizationError] Authorization is required
794
- def create_billing_account_sink(parent, log_sink_object = nil, unique_writer_identity: nil, fields: nil, quota_user: nil, options: nil, &block)
655
+ def create_folder_sink(parent, log_sink_object = nil, unique_writer_identity: nil, fields: nil, quota_user: nil, options: nil, &block)
795
656
  command = make_simple_command(:post, 'v2/{+parent}/sinks', options)
796
657
  command.request_representation = Google::Apis::LoggingV2::LogSink::Representation
797
658
  command.request_object = log_sink_object
@@ -804,16 +665,16 @@ module Google
804
665
  execute_or_queue_command(command, &block)
805
666
  end
806
667
 
807
- # Deletes a sink. If the sink has a unique writer_identity, then that service
808
- # account is also deleted.
809
- # @param [String] sink_name
810
- # Required. The full resource name of the sink to delete, including the parent
811
- # resource and the sink identifier:
812
- # "projects/[PROJECT_ID]/sinks/[SINK_ID]"
813
- # "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
814
- # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
815
- # "folders/[FOLDER_ID]/sinks/[SINK_ID]"
816
- # Example: "projects/my-project-id/sinks/my-sink-id".
668
+ # Lists the descriptors for monitored resource types used by Stackdriver Logging.
669
+ # @param [String] page_token
670
+ # Optional. If present, then retrieve the next batch of results from the
671
+ # preceding call to this method. pageToken must be the value of nextPageToken
672
+ # from the previous response. The values of other method parameters should be
673
+ # identical to those in the previous call.
674
+ # @param [Fixnum] page_size
675
+ # Optional. The maximum number of results to return from this request. Non-
676
+ # positive values are ignored. The presence of nextPageToken in the response
677
+ # indicates that more results might be available.
817
678
  # @param [String] fields
818
679
  # Selector specifying which fields to include in a partial response.
819
680
  # @param [String] quota_user
@@ -823,19 +684,20 @@ module Google
823
684
  # Request-specific options
824
685
  #
825
686
  # @yield [result, err] Result & error if block supplied
826
- # @yieldparam result [Google::Apis::LoggingV2::Empty] parsed result object
687
+ # @yieldparam result [Google::Apis::LoggingV2::ListMonitoredResourceDescriptorsResponse] parsed result object
827
688
  # @yieldparam err [StandardError] error object if request failed
828
689
  #
829
- # @return [Google::Apis::LoggingV2::Empty]
690
+ # @return [Google::Apis::LoggingV2::ListMonitoredResourceDescriptorsResponse]
830
691
  #
831
692
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
832
693
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
833
694
  # @raise [Google::Apis::AuthorizationError] Authorization is required
834
- def delete_billing_account_sink(sink_name, fields: nil, quota_user: nil, options: nil, &block)
835
- command = make_simple_command(:delete, 'v2/{+sinkName}', options)
836
- command.response_representation = Google::Apis::LoggingV2::Empty::Representation
837
- command.response_class = Google::Apis::LoggingV2::Empty
838
- command.params['sinkName'] = sink_name unless sink_name.nil?
695
+ def list_monitored_resource_descriptors(page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
696
+ command = make_simple_command(:get, 'v2/monitoredResourceDescriptors', options)
697
+ command.response_representation = Google::Apis::LoggingV2::ListMonitoredResourceDescriptorsResponse::Representation
698
+ command.response_class = Google::Apis::LoggingV2::ListMonitoredResourceDescriptorsResponse
699
+ command.query['pageToken'] = page_token unless page_token.nil?
700
+ command.query['pageSize'] = page_size unless page_size.nil?
839
701
  command.query['fields'] = fields unless fields.nil?
840
702
  command.query['quotaUser'] = quota_user unless quota_user.nil?
841
703
  execute_or_queue_command(command, &block)
@@ -870,7 +732,7 @@ module Google
870
732
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
871
733
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
872
734
  # @raise [Google::Apis::AuthorizationError] Authorization is required
873
- def delete_folder_log(log_name, fields: nil, quota_user: nil, options: nil, &block)
735
+ def delete_organization_log(log_name, fields: nil, quota_user: nil, options: nil, &block)
874
736
  command = make_simple_command(:delete, 'v2/{+logName}', options)
875
737
  command.response_representation = Google::Apis::LoggingV2::Empty::Representation
876
738
  command.response_class = Google::Apis::LoggingV2::Empty
@@ -914,7 +776,7 @@ module Google
914
776
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
915
777
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
916
778
  # @raise [Google::Apis::AuthorizationError] Authorization is required
917
- def list_folder_logs(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
779
+ def list_organization_logs(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
918
780
  command = make_simple_command(:get, 'v2/{+parent}/logs', options)
919
781
  command.response_representation = Google::Apis::LoggingV2::ListLogsResponse::Representation
920
782
  command.response_class = Google::Apis::LoggingV2::ListLogsResponse
@@ -926,60 +788,6 @@ module Google
926
788
  execute_or_queue_command(command, &block)
927
789
  end
928
790
 
929
- # Updates a sink. If the named sink doesn't exist, then this method is identical
930
- # to sinks.create. If the named sink does exist, then this method replaces the
931
- # following fields in the existing sink with values from the new sink:
932
- # destination, filter, output_version_format, start_time, and end_time. The
933
- # updated filter might also have a new writer_identity; see the
934
- # unique_writer_identity field.
935
- # @param [String] sink_name
936
- # Required. The full resource name of the sink to update, including the parent
937
- # resource and the sink identifier:
938
- # "projects/[PROJECT_ID]/sinks/[SINK_ID]"
939
- # "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
940
- # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
941
- # "folders/[FOLDER_ID]/sinks/[SINK_ID]"
942
- # Example: "projects/my-project-id/sinks/my-sink-id".
943
- # @param [Google::Apis::LoggingV2::LogSink] log_sink_object
944
- # @param [Boolean] unique_writer_identity
945
- # Optional. See sinks.create for a description of this field. When updating a
946
- # sink, the effect of this field on the value of writer_identity in the updated
947
- # sink depends on both the old and new values of this field:
948
- # If the old and new values of this field are both false or both true, then
949
- # there is no change to the sink's writer_identity.
950
- # If the old value is false and the new value is true, then writer_identity is
951
- # changed to a unique service account.
952
- # It is an error if the old value is true and the new value is false.
953
- # @param [String] fields
954
- # Selector specifying which fields to include in a partial response.
955
- # @param [String] quota_user
956
- # Available to use for quota purposes for server-side applications. Can be any
957
- # arbitrary string assigned to a user, but should not exceed 40 characters.
958
- # @param [Google::Apis::RequestOptions] options
959
- # Request-specific options
960
- #
961
- # @yield [result, err] Result & error if block supplied
962
- # @yieldparam result [Google::Apis::LoggingV2::LogSink] parsed result object
963
- # @yieldparam err [StandardError] error object if request failed
964
- #
965
- # @return [Google::Apis::LoggingV2::LogSink]
966
- #
967
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
968
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
969
- # @raise [Google::Apis::AuthorizationError] Authorization is required
970
- def update_folder_sink(sink_name, log_sink_object = nil, unique_writer_identity: nil, fields: nil, quota_user: nil, options: nil, &block)
971
- command = make_simple_command(:put, 'v2/{+sinkName}', options)
972
- command.request_representation = Google::Apis::LoggingV2::LogSink::Representation
973
- command.request_object = log_sink_object
974
- command.response_representation = Google::Apis::LoggingV2::LogSink::Representation
975
- command.response_class = Google::Apis::LoggingV2::LogSink
976
- command.params['sinkName'] = sink_name unless sink_name.nil?
977
- command.query['uniqueWriterIdentity'] = unique_writer_identity unless unique_writer_identity.nil?
978
- command.query['fields'] = fields unless fields.nil?
979
- command.query['quotaUser'] = quota_user unless quota_user.nil?
980
- execute_or_queue_command(command, &block)
981
- end
982
-
983
791
  # Creates a sink that exports specified log entries to a destination. The export
984
792
  # of newly-ingested log entries begins immediately, unless the current time is
985
793
  # outside the sink's start and end times or the sink's writer_identity is not
@@ -1020,7 +828,7 @@ module Google
1020
828
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1021
829
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1022
830
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1023
- def create_folder_sink(parent, log_sink_object = nil, unique_writer_identity: nil, fields: nil, quota_user: nil, options: nil, &block)
831
+ def create_organization_sink(parent, log_sink_object = nil, unique_writer_identity: nil, fields: nil, quota_user: nil, options: nil, &block)
1024
832
  command = make_simple_command(:post, 'v2/{+parent}/sinks', options)
1025
833
  command.request_representation = Google::Apis::LoggingV2::LogSink::Representation
1026
834
  command.request_object = log_sink_object
@@ -1060,7 +868,7 @@ module Google
1060
868
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1061
869
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1062
870
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1063
- def delete_folder_sink(sink_name, fields: nil, quota_user: nil, options: nil, &block)
871
+ def delete_organization_sink(sink_name, fields: nil, quota_user: nil, options: nil, &block)
1064
872
  command = make_simple_command(:delete, 'v2/{+sinkName}', options)
1065
873
  command.response_representation = Google::Apis::LoggingV2::Empty::Representation
1066
874
  command.response_class = Google::Apis::LoggingV2::Empty
@@ -1103,7 +911,7 @@ module Google
1103
911
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1104
912
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1105
913
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1106
- def list_folder_sinks(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
914
+ def list_organization_sinks(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
1107
915
  command = make_simple_command(:get, 'v2/{+parent}/sinks', options)
1108
916
  command.response_representation = Google::Apis::LoggingV2::ListSinksResponse::Representation
1109
917
  command.response_class = Google::Apis::LoggingV2::ListSinksResponse
@@ -1140,7 +948,7 @@ module Google
1140
948
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1141
949
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1142
950
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1143
- def get_folder_sink(sink_name, fields: nil, quota_user: nil, options: nil, &block)
951
+ def get_organization_sink(sink_name, fields: nil, quota_user: nil, options: nil, &block)
1144
952
  command = make_simple_command(:get, 'v2/{+sinkName}', options)
1145
953
  command.response_representation = Google::Apis::LoggingV2::LogSink::Representation
1146
954
  command.response_class = Google::Apis::LoggingV2::LogSink
@@ -1150,7 +958,129 @@ module Google
1150
958
  execute_or_queue_command(command, &block)
1151
959
  end
1152
960
 
1153
- # Lists the descriptors for monitored resource types used by Stackdriver Logging.
961
+ # Updates a sink. If the named sink doesn't exist, then this method is identical
962
+ # to sinks.create. If the named sink does exist, then this method replaces the
963
+ # following fields in the existing sink with values from the new sink:
964
+ # destination, filter, output_version_format, start_time, and end_time. The
965
+ # updated filter might also have a new writer_identity; see the
966
+ # unique_writer_identity field.
967
+ # @param [String] sink_name
968
+ # Required. The full resource name of the sink to update, including the parent
969
+ # resource and the sink identifier:
970
+ # "projects/[PROJECT_ID]/sinks/[SINK_ID]"
971
+ # "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
972
+ # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
973
+ # "folders/[FOLDER_ID]/sinks/[SINK_ID]"
974
+ # Example: "projects/my-project-id/sinks/my-sink-id".
975
+ # @param [Google::Apis::LoggingV2::LogSink] log_sink_object
976
+ # @param [Boolean] unique_writer_identity
977
+ # Optional. See sinks.create for a description of this field. When updating a
978
+ # sink, the effect of this field on the value of writer_identity in the updated
979
+ # sink depends on both the old and new values of this field:
980
+ # If the old and new values of this field are both false or both true, then
981
+ # there is no change to the sink's writer_identity.
982
+ # If the old value is false and the new value is true, then writer_identity is
983
+ # changed to a unique service account.
984
+ # It is an error if the old value is true and the new value is false.
985
+ # @param [String] fields
986
+ # Selector specifying which fields to include in a partial response.
987
+ # @param [String] quota_user
988
+ # Available to use for quota purposes for server-side applications. Can be any
989
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
990
+ # @param [Google::Apis::RequestOptions] options
991
+ # Request-specific options
992
+ #
993
+ # @yield [result, err] Result & error if block supplied
994
+ # @yieldparam result [Google::Apis::LoggingV2::LogSink] parsed result object
995
+ # @yieldparam err [StandardError] error object if request failed
996
+ #
997
+ # @return [Google::Apis::LoggingV2::LogSink]
998
+ #
999
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1000
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1001
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1002
+ def update_organization_sink(sink_name, log_sink_object = nil, unique_writer_identity: nil, fields: nil, quota_user: nil, options: nil, &block)
1003
+ command = make_simple_command(:put, 'v2/{+sinkName}', options)
1004
+ command.request_representation = Google::Apis::LoggingV2::LogSink::Representation
1005
+ command.request_object = log_sink_object
1006
+ command.response_representation = Google::Apis::LoggingV2::LogSink::Representation
1007
+ command.response_class = Google::Apis::LoggingV2::LogSink
1008
+ command.params['sinkName'] = sink_name unless sink_name.nil?
1009
+ command.query['uniqueWriterIdentity'] = unique_writer_identity unless unique_writer_identity.nil?
1010
+ command.query['fields'] = fields unless fields.nil?
1011
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1012
+ execute_or_queue_command(command, &block)
1013
+ end
1014
+
1015
+ # Lists log entries. Use this method to retrieve log entries from Stackdriver
1016
+ # Logging. For ways to export log entries, see Exporting Logs.
1017
+ # @param [Google::Apis::LoggingV2::ListLogEntriesRequest] list_log_entries_request_object
1018
+ # @param [String] fields
1019
+ # Selector specifying which fields to include in a partial response.
1020
+ # @param [String] quota_user
1021
+ # Available to use for quota purposes for server-side applications. Can be any
1022
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1023
+ # @param [Google::Apis::RequestOptions] options
1024
+ # Request-specific options
1025
+ #
1026
+ # @yield [result, err] Result & error if block supplied
1027
+ # @yieldparam result [Google::Apis::LoggingV2::ListLogEntriesResponse] parsed result object
1028
+ # @yieldparam err [StandardError] error object if request failed
1029
+ #
1030
+ # @return [Google::Apis::LoggingV2::ListLogEntriesResponse]
1031
+ #
1032
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1033
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1034
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1035
+ def list_entry_log_entries(list_log_entries_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1036
+ command = make_simple_command(:post, 'v2/entries:list', options)
1037
+ command.request_representation = Google::Apis::LoggingV2::ListLogEntriesRequest::Representation
1038
+ command.request_object = list_log_entries_request_object
1039
+ command.response_representation = Google::Apis::LoggingV2::ListLogEntriesResponse::Representation
1040
+ command.response_class = Google::Apis::LoggingV2::ListLogEntriesResponse
1041
+ command.query['fields'] = fields unless fields.nil?
1042
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1043
+ execute_or_queue_command(command, &block)
1044
+ end
1045
+
1046
+ # Writes log entries to Stackdriver Logging.
1047
+ # @param [Google::Apis::LoggingV2::WriteLogEntriesRequest] write_log_entries_request_object
1048
+ # @param [String] fields
1049
+ # Selector specifying which fields to include in a partial response.
1050
+ # @param [String] quota_user
1051
+ # Available to use for quota purposes for server-side applications. Can be any
1052
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1053
+ # @param [Google::Apis::RequestOptions] options
1054
+ # Request-specific options
1055
+ #
1056
+ # @yield [result, err] Result & error if block supplied
1057
+ # @yieldparam result [Google::Apis::LoggingV2::WriteLogEntriesResponse] parsed result object
1058
+ # @yieldparam err [StandardError] error object if request failed
1059
+ #
1060
+ # @return [Google::Apis::LoggingV2::WriteLogEntriesResponse]
1061
+ #
1062
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1063
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1064
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1065
+ def write_entry_log_entries(write_log_entries_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1066
+ command = make_simple_command(:post, 'v2/entries:write', options)
1067
+ command.request_representation = Google::Apis::LoggingV2::WriteLogEntriesRequest::Representation
1068
+ command.request_object = write_log_entries_request_object
1069
+ command.response_representation = Google::Apis::LoggingV2::WriteLogEntriesResponse::Representation
1070
+ command.response_class = Google::Apis::LoggingV2::WriteLogEntriesResponse
1071
+ command.query['fields'] = fields unless fields.nil?
1072
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1073
+ execute_or_queue_command(command, &block)
1074
+ end
1075
+
1076
+ # Lists the logs in projects, organizations, folders, or billing accounts. Only
1077
+ # logs that have entries are listed.
1078
+ # @param [String] parent
1079
+ # Required. The resource name that owns the logs:
1080
+ # "projects/[PROJECT_ID]"
1081
+ # "organizations/[ORGANIZATION_ID]"
1082
+ # "billingAccounts/[BILLING_ACCOUNT_ID]"
1083
+ # "folders/[FOLDER_ID]"
1154
1084
  # @param [String] page_token
1155
1085
  # Optional. If present, then retrieve the next batch of results from the
1156
1086
  # preceding call to this method. pageToken must be the value of nextPageToken
@@ -1169,18 +1099,19 @@ module Google
1169
1099
  # Request-specific options
1170
1100
  #
1171
1101
  # @yield [result, err] Result & error if block supplied
1172
- # @yieldparam result [Google::Apis::LoggingV2::ListMonitoredResourceDescriptorsResponse] parsed result object
1102
+ # @yieldparam result [Google::Apis::LoggingV2::ListLogsResponse] parsed result object
1173
1103
  # @yieldparam err [StandardError] error object if request failed
1174
1104
  #
1175
- # @return [Google::Apis::LoggingV2::ListMonitoredResourceDescriptorsResponse]
1105
+ # @return [Google::Apis::LoggingV2::ListLogsResponse]
1176
1106
  #
1177
1107
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1178
1108
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1179
1109
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1180
- def list_monitored_resource_descriptors(page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
1181
- command = make_simple_command(:get, 'v2/monitoredResourceDescriptors', options)
1182
- command.response_representation = Google::Apis::LoggingV2::ListMonitoredResourceDescriptorsResponse::Representation
1183
- command.response_class = Google::Apis::LoggingV2::ListMonitoredResourceDescriptorsResponse
1110
+ def list_project_logs(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
1111
+ command = make_simple_command(:get, 'v2/{+parent}/logs', options)
1112
+ command.response_representation = Google::Apis::LoggingV2::ListLogsResponse::Representation
1113
+ command.response_class = Google::Apis::LoggingV2::ListLogsResponse
1114
+ command.params['parent'] = parent unless parent.nil?
1184
1115
  command.query['pageToken'] = page_token unless page_token.nil?
1185
1116
  command.query['pageSize'] = page_size unless page_size.nil?
1186
1117
  command.query['fields'] = fields unless fields.nil?
@@ -1217,7 +1148,7 @@ module Google
1217
1148
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1218
1149
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1219
1150
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1220
- def delete_organization_log(log_name, fields: nil, quota_user: nil, options: nil, &block)
1151
+ def delete_project_log(log_name, fields: nil, quota_user: nil, options: nil, &block)
1221
1152
  command = make_simple_command(:delete, 'v2/{+logName}', options)
1222
1153
  command.response_representation = Google::Apis::LoggingV2::Empty::Representation
1223
1154
  command.response_class = Google::Apis::LoggingV2::Empty
@@ -1227,23 +1158,30 @@ module Google
1227
1158
  execute_or_queue_command(command, &block)
1228
1159
  end
1229
1160
 
1230
- # Lists the logs in projects, organizations, folders, or billing accounts. Only
1231
- # logs that have entries are listed.
1232
- # @param [String] parent
1233
- # Required. The resource name that owns the logs:
1234
- # "projects/[PROJECT_ID]"
1235
- # "organizations/[ORGANIZATION_ID]"
1236
- # "billingAccounts/[BILLING_ACCOUNT_ID]"
1237
- # "folders/[FOLDER_ID]"
1238
- # @param [String] page_token
1239
- # Optional. If present, then retrieve the next batch of results from the
1240
- # preceding call to this method. pageToken must be the value of nextPageToken
1241
- # from the previous response. The values of other method parameters should be
1242
- # identical to those in the previous call.
1243
- # @param [Fixnum] page_size
1244
- # Optional. The maximum number of results to return from this request. Non-
1245
- # positive values are ignored. The presence of nextPageToken in the response
1246
- # indicates that more results might be available.
1161
+ # Updates a sink. If the named sink doesn't exist, then this method is identical
1162
+ # to sinks.create. If the named sink does exist, then this method replaces the
1163
+ # following fields in the existing sink with values from the new sink:
1164
+ # destination, filter, output_version_format, start_time, and end_time. The
1165
+ # updated filter might also have a new writer_identity; see the
1166
+ # unique_writer_identity field.
1167
+ # @param [String] sink_name
1168
+ # Required. The full resource name of the sink to update, including the parent
1169
+ # resource and the sink identifier:
1170
+ # "projects/[PROJECT_ID]/sinks/[SINK_ID]"
1171
+ # "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
1172
+ # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
1173
+ # "folders/[FOLDER_ID]/sinks/[SINK_ID]"
1174
+ # Example: "projects/my-project-id/sinks/my-sink-id".
1175
+ # @param [Google::Apis::LoggingV2::LogSink] log_sink_object
1176
+ # @param [Boolean] unique_writer_identity
1177
+ # Optional. See sinks.create for a description of this field. When updating a
1178
+ # sink, the effect of this field on the value of writer_identity in the updated
1179
+ # sink depends on both the old and new values of this field:
1180
+ # If the old and new values of this field are both false or both true, then
1181
+ # there is no change to the sink's writer_identity.
1182
+ # If the old value is false and the new value is true, then writer_identity is
1183
+ # changed to a unique service account.
1184
+ # It is an error if the old value is true and the new value is false.
1247
1185
  # @param [String] fields
1248
1186
  # Selector specifying which fields to include in a partial response.
1249
1187
  # @param [String] quota_user
@@ -1253,21 +1191,22 @@ module Google
1253
1191
  # Request-specific options
1254
1192
  #
1255
1193
  # @yield [result, err] Result & error if block supplied
1256
- # @yieldparam result [Google::Apis::LoggingV2::ListLogsResponse] parsed result object
1194
+ # @yieldparam result [Google::Apis::LoggingV2::LogSink] parsed result object
1257
1195
  # @yieldparam err [StandardError] error object if request failed
1258
1196
  #
1259
- # @return [Google::Apis::LoggingV2::ListLogsResponse]
1197
+ # @return [Google::Apis::LoggingV2::LogSink]
1260
1198
  #
1261
1199
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1262
1200
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1263
1201
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1264
- def list_organization_logs(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
1265
- command = make_simple_command(:get, 'v2/{+parent}/logs', options)
1266
- command.response_representation = Google::Apis::LoggingV2::ListLogsResponse::Representation
1267
- command.response_class = Google::Apis::LoggingV2::ListLogsResponse
1268
- command.params['parent'] = parent unless parent.nil?
1269
- command.query['pageToken'] = page_token unless page_token.nil?
1270
- command.query['pageSize'] = page_size unless page_size.nil?
1202
+ def update_project_sink(sink_name, log_sink_object = nil, unique_writer_identity: nil, fields: nil, quota_user: nil, options: nil, &block)
1203
+ command = make_simple_command(:put, 'v2/{+sinkName}', options)
1204
+ command.request_representation = Google::Apis::LoggingV2::LogSink::Representation
1205
+ command.request_object = log_sink_object
1206
+ command.response_representation = Google::Apis::LoggingV2::LogSink::Representation
1207
+ command.response_class = Google::Apis::LoggingV2::LogSink
1208
+ command.params['sinkName'] = sink_name unless sink_name.nil?
1209
+ command.query['uniqueWriterIdentity'] = unique_writer_identity unless unique_writer_identity.nil?
1271
1210
  command.query['fields'] = fields unless fields.nil?
1272
1211
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1273
1212
  execute_or_queue_command(command, &block)
@@ -1313,7 +1252,7 @@ module Google
1313
1252
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1314
1253
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1315
1254
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1316
- def create_organization_sink(parent, log_sink_object = nil, unique_writer_identity: nil, fields: nil, quota_user: nil, options: nil, &block)
1255
+ def create_project_sink(parent, log_sink_object = nil, unique_writer_identity: nil, fields: nil, quota_user: nil, options: nil, &block)
1317
1256
  command = make_simple_command(:post, 'v2/{+parent}/sinks', options)
1318
1257
  command.request_representation = Google::Apis::LoggingV2::LogSink::Representation
1319
1258
  command.request_object = log_sink_object
@@ -1353,7 +1292,7 @@ module Google
1353
1292
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1354
1293
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1355
1294
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1356
- def delete_organization_sink(sink_name, fields: nil, quota_user: nil, options: nil, &block)
1295
+ def delete_project_sink(sink_name, fields: nil, quota_user: nil, options: nil, &block)
1357
1296
  command = make_simple_command(:delete, 'v2/{+sinkName}', options)
1358
1297
  command.response_representation = Google::Apis::LoggingV2::Empty::Representation
1359
1298
  command.response_class = Google::Apis::LoggingV2::Empty
@@ -1396,7 +1335,7 @@ module Google
1396
1335
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1397
1336
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1398
1337
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1399
- def list_organization_sinks(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
1338
+ def list_project_sinks(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
1400
1339
  command = make_simple_command(:get, 'v2/{+parent}/sinks', options)
1401
1340
  command.response_representation = Google::Apis::LoggingV2::ListSinksResponse::Representation
1402
1341
  command.response_class = Google::Apis::LoggingV2::ListSinksResponse
@@ -1433,7 +1372,7 @@ module Google
1433
1372
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1434
1373
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1435
1374
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1436
- def get_organization_sink(sink_name, fields: nil, quota_user: nil, options: nil, &block)
1375
+ def get_project_sink(sink_name, fields: nil, quota_user: nil, options: nil, &block)
1437
1376
  command = make_simple_command(:get, 'v2/{+sinkName}', options)
1438
1377
  command.response_representation = Google::Apis::LoggingV2::LogSink::Representation
1439
1378
  command.response_class = Google::Apis::LoggingV2::LogSink
@@ -1443,30 +1382,12 @@ module Google
1443
1382
  execute_or_queue_command(command, &block)
1444
1383
  end
1445
1384
 
1446
- # Updates a sink. If the named sink doesn't exist, then this method is identical
1447
- # to sinks.create. If the named sink does exist, then this method replaces the
1448
- # following fields in the existing sink with values from the new sink:
1449
- # destination, filter, output_version_format, start_time, and end_time. The
1450
- # updated filter might also have a new writer_identity; see the
1451
- # unique_writer_identity field.
1452
- # @param [String] sink_name
1453
- # Required. The full resource name of the sink to update, including the parent
1454
- # resource and the sink identifier:
1455
- # "projects/[PROJECT_ID]/sinks/[SINK_ID]"
1456
- # "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
1457
- # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
1458
- # "folders/[FOLDER_ID]/sinks/[SINK_ID]"
1459
- # Example: "projects/my-project-id/sinks/my-sink-id".
1460
- # @param [Google::Apis::LoggingV2::LogSink] log_sink_object
1461
- # @param [Boolean] unique_writer_identity
1462
- # Optional. See sinks.create for a description of this field. When updating a
1463
- # sink, the effect of this field on the value of writer_identity in the updated
1464
- # sink depends on both the old and new values of this field:
1465
- # If the old and new values of this field are both false or both true, then
1466
- # there is no change to the sink's writer_identity.
1467
- # If the old value is false and the new value is true, then writer_identity is
1468
- # changed to a unique service account.
1469
- # It is an error if the old value is true and the new value is false.
1385
+ # Creates a logs-based metric.
1386
+ # @param [String] parent
1387
+ # The resource name of the project in which to create the metric:
1388
+ # "projects/[PROJECT_ID]"
1389
+ # The new metric must be provided in the request.
1390
+ # @param [Google::Apis::LoggingV2::LogMetric] log_metric_object
1470
1391
  # @param [String] fields
1471
1392
  # Selector specifying which fields to include in a partial response.
1472
1393
  # @param [String] quota_user
@@ -1476,30 +1397,30 @@ module Google
1476
1397
  # Request-specific options
1477
1398
  #
1478
1399
  # @yield [result, err] Result & error if block supplied
1479
- # @yieldparam result [Google::Apis::LoggingV2::LogSink] parsed result object
1400
+ # @yieldparam result [Google::Apis::LoggingV2::LogMetric] parsed result object
1480
1401
  # @yieldparam err [StandardError] error object if request failed
1481
1402
  #
1482
- # @return [Google::Apis::LoggingV2::LogSink]
1403
+ # @return [Google::Apis::LoggingV2::LogMetric]
1483
1404
  #
1484
1405
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1485
1406
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1486
1407
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1487
- def update_organization_sink(sink_name, log_sink_object = nil, unique_writer_identity: nil, fields: nil, quota_user: nil, options: nil, &block)
1488
- command = make_simple_command(:put, 'v2/{+sinkName}', options)
1489
- command.request_representation = Google::Apis::LoggingV2::LogSink::Representation
1490
- command.request_object = log_sink_object
1491
- command.response_representation = Google::Apis::LoggingV2::LogSink::Representation
1492
- command.response_class = Google::Apis::LoggingV2::LogSink
1493
- command.params['sinkName'] = sink_name unless sink_name.nil?
1494
- command.query['uniqueWriterIdentity'] = unique_writer_identity unless unique_writer_identity.nil?
1408
+ def create_project_metric(parent, log_metric_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1409
+ command = make_simple_command(:post, 'v2/{+parent}/metrics', options)
1410
+ command.request_representation = Google::Apis::LoggingV2::LogMetric::Representation
1411
+ command.request_object = log_metric_object
1412
+ command.response_representation = Google::Apis::LoggingV2::LogMetric::Representation
1413
+ command.response_class = Google::Apis::LoggingV2::LogMetric
1414
+ command.params['parent'] = parent unless parent.nil?
1495
1415
  command.query['fields'] = fields unless fields.nil?
1496
1416
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1497
1417
  execute_or_queue_command(command, &block)
1498
1418
  end
1499
1419
 
1500
- # Lists log entries. Use this method to retrieve log entries from Stackdriver
1501
- # Logging. For ways to export log entries, see Exporting Logs.
1502
- # @param [Google::Apis::LoggingV2::ListLogEntriesRequest] list_log_entries_request_object
1420
+ # Deletes a logs-based metric.
1421
+ # @param [String] metric_name
1422
+ # The resource name of the metric to delete:
1423
+ # "projects/[PROJECT_ID]/metrics/[METRIC_ID]"
1503
1424
  # @param [String] fields
1504
1425
  # Selector specifying which fields to include in a partial response.
1505
1426
  # @param [String] quota_user
@@ -1509,27 +1430,37 @@ module Google
1509
1430
  # Request-specific options
1510
1431
  #
1511
1432
  # @yield [result, err] Result & error if block supplied
1512
- # @yieldparam result [Google::Apis::LoggingV2::ListLogEntriesResponse] parsed result object
1433
+ # @yieldparam result [Google::Apis::LoggingV2::Empty] parsed result object
1513
1434
  # @yieldparam err [StandardError] error object if request failed
1514
1435
  #
1515
- # @return [Google::Apis::LoggingV2::ListLogEntriesResponse]
1436
+ # @return [Google::Apis::LoggingV2::Empty]
1516
1437
  #
1517
1438
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1518
1439
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1519
1440
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1520
- def list_entry_log_entries(list_log_entries_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1521
- command = make_simple_command(:post, 'v2/entries:list', options)
1522
- command.request_representation = Google::Apis::LoggingV2::ListLogEntriesRequest::Representation
1523
- command.request_object = list_log_entries_request_object
1524
- command.response_representation = Google::Apis::LoggingV2::ListLogEntriesResponse::Representation
1525
- command.response_class = Google::Apis::LoggingV2::ListLogEntriesResponse
1441
+ def delete_project_metric(metric_name, fields: nil, quota_user: nil, options: nil, &block)
1442
+ command = make_simple_command(:delete, 'v2/{+metricName}', options)
1443
+ command.response_representation = Google::Apis::LoggingV2::Empty::Representation
1444
+ command.response_class = Google::Apis::LoggingV2::Empty
1445
+ command.params['metricName'] = metric_name unless metric_name.nil?
1526
1446
  command.query['fields'] = fields unless fields.nil?
1527
1447
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1528
1448
  execute_or_queue_command(command, &block)
1529
1449
  end
1530
1450
 
1531
- # Writes log entries to Stackdriver Logging.
1532
- # @param [Google::Apis::LoggingV2::WriteLogEntriesRequest] write_log_entries_request_object
1451
+ # Lists logs-based metrics.
1452
+ # @param [String] parent
1453
+ # Required. The name of the project containing the metrics:
1454
+ # "projects/[PROJECT_ID]"
1455
+ # @param [String] page_token
1456
+ # Optional. If present, then retrieve the next batch of results from the
1457
+ # preceding call to this method. pageToken must be the value of nextPageToken
1458
+ # from the previous response. The values of other method parameters should be
1459
+ # identical to those in the previous call.
1460
+ # @param [Fixnum] page_size
1461
+ # Optional. The maximum number of results to return from this request. Non-
1462
+ # positive values are ignored. The presence of nextPageToken in the response
1463
+ # indicates that more results might be available.
1533
1464
  # @param [String] fields
1534
1465
  # Selector specifying which fields to include in a partial response.
1535
1466
  # @param [String] quota_user
@@ -1539,20 +1470,89 @@ module Google
1539
1470
  # Request-specific options
1540
1471
  #
1541
1472
  # @yield [result, err] Result & error if block supplied
1542
- # @yieldparam result [Google::Apis::LoggingV2::WriteLogEntriesResponse] parsed result object
1473
+ # @yieldparam result [Google::Apis::LoggingV2::ListLogMetricsResponse] parsed result object
1543
1474
  # @yieldparam err [StandardError] error object if request failed
1544
1475
  #
1545
- # @return [Google::Apis::LoggingV2::WriteLogEntriesResponse]
1476
+ # @return [Google::Apis::LoggingV2::ListLogMetricsResponse]
1546
1477
  #
1547
1478
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1548
1479
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1549
1480
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1550
- def write_entry_log_entries(write_log_entries_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1551
- command = make_simple_command(:post, 'v2/entries:write', options)
1552
- command.request_representation = Google::Apis::LoggingV2::WriteLogEntriesRequest::Representation
1553
- command.request_object = write_log_entries_request_object
1554
- command.response_representation = Google::Apis::LoggingV2::WriteLogEntriesResponse::Representation
1555
- command.response_class = Google::Apis::LoggingV2::WriteLogEntriesResponse
1481
+ def list_project_metrics(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
1482
+ command = make_simple_command(:get, 'v2/{+parent}/metrics', options)
1483
+ command.response_representation = Google::Apis::LoggingV2::ListLogMetricsResponse::Representation
1484
+ command.response_class = Google::Apis::LoggingV2::ListLogMetricsResponse
1485
+ command.params['parent'] = parent unless parent.nil?
1486
+ command.query['pageToken'] = page_token unless page_token.nil?
1487
+ command.query['pageSize'] = page_size unless page_size.nil?
1488
+ command.query['fields'] = fields unless fields.nil?
1489
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1490
+ execute_or_queue_command(command, &block)
1491
+ end
1492
+
1493
+ # Gets a logs-based metric.
1494
+ # @param [String] metric_name
1495
+ # The resource name of the desired metric:
1496
+ # "projects/[PROJECT_ID]/metrics/[METRIC_ID]"
1497
+ # @param [String] fields
1498
+ # Selector specifying which fields to include in a partial response.
1499
+ # @param [String] quota_user
1500
+ # Available to use for quota purposes for server-side applications. Can be any
1501
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1502
+ # @param [Google::Apis::RequestOptions] options
1503
+ # Request-specific options
1504
+ #
1505
+ # @yield [result, err] Result & error if block supplied
1506
+ # @yieldparam result [Google::Apis::LoggingV2::LogMetric] parsed result object
1507
+ # @yieldparam err [StandardError] error object if request failed
1508
+ #
1509
+ # @return [Google::Apis::LoggingV2::LogMetric]
1510
+ #
1511
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1512
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1513
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1514
+ def get_project_metric(metric_name, fields: nil, quota_user: nil, options: nil, &block)
1515
+ command = make_simple_command(:get, 'v2/{+metricName}', options)
1516
+ command.response_representation = Google::Apis::LoggingV2::LogMetric::Representation
1517
+ command.response_class = Google::Apis::LoggingV2::LogMetric
1518
+ command.params['metricName'] = metric_name unless metric_name.nil?
1519
+ command.query['fields'] = fields unless fields.nil?
1520
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1521
+ execute_or_queue_command(command, &block)
1522
+ end
1523
+
1524
+ # Creates or updates a logs-based metric.
1525
+ # @param [String] metric_name
1526
+ # The resource name of the metric to update:
1527
+ # "projects/[PROJECT_ID]/metrics/[METRIC_ID]"
1528
+ # The updated metric must be provided in the request and it's name field must be
1529
+ # the same as [METRIC_ID] If the metric does not exist in [PROJECT_ID], then a
1530
+ # new metric is created.
1531
+ # @param [Google::Apis::LoggingV2::LogMetric] log_metric_object
1532
+ # @param [String] fields
1533
+ # Selector specifying which fields to include in a partial response.
1534
+ # @param [String] quota_user
1535
+ # Available to use for quota purposes for server-side applications. Can be any
1536
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1537
+ # @param [Google::Apis::RequestOptions] options
1538
+ # Request-specific options
1539
+ #
1540
+ # @yield [result, err] Result & error if block supplied
1541
+ # @yieldparam result [Google::Apis::LoggingV2::LogMetric] parsed result object
1542
+ # @yieldparam err [StandardError] error object if request failed
1543
+ #
1544
+ # @return [Google::Apis::LoggingV2::LogMetric]
1545
+ #
1546
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1547
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1548
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1549
+ def update_project_metric(metric_name, log_metric_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1550
+ command = make_simple_command(:put, 'v2/{+metricName}', options)
1551
+ command.request_representation = Google::Apis::LoggingV2::LogMetric::Representation
1552
+ command.request_object = log_metric_object
1553
+ command.response_representation = Google::Apis::LoggingV2::LogMetric::Representation
1554
+ command.response_class = Google::Apis::LoggingV2::LogMetric
1555
+ command.params['metricName'] = metric_name unless metric_name.nil?
1556
1556
  command.query['fields'] = fields unless fields.nil?
1557
1557
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1558
1558
  execute_or_queue_command(command, &block)