google-api-client 0.10.1 → 0.10.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (176) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +3 -0
  3. data/api_names.yaml +395 -0
  4. data/generated/google/apis/adexchangebuyer2_v2beta1.rb +1 -1
  5. data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +254 -254
  6. data/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +65 -65
  7. data/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +220 -220
  8. data/generated/google/apis/admin_directory_v1.rb +1 -1
  9. data/generated/google/apis/admin_directory_v1/classes.rb +106 -0
  10. data/generated/google/apis/admin_directory_v1/representations.rb +37 -0
  11. data/generated/google/apis/admin_reports_v1.rb +3 -3
  12. data/generated/google/apis/admin_reports_v1/service.rb +6 -6
  13. data/generated/google/apis/adsense_v1_4.rb +1 -1
  14. data/generated/google/apis/adsensehost_v4_1.rb +1 -1
  15. data/generated/google/apis/analytics_v3.rb +1 -1
  16. data/generated/google/apis/analytics_v3/service.rb +39 -0
  17. data/generated/google/apis/analyticsreporting_v4/classes.rb +920 -920
  18. data/generated/google/apis/analyticsreporting_v4/representations.rb +197 -197
  19. data/generated/google/apis/analyticsreporting_v4/service.rb +4 -4
  20. data/generated/google/apis/androidenterprise_v1.rb +1 -1
  21. data/generated/google/apis/androidenterprise_v1/classes.rb +8 -13
  22. data/generated/google/apis/androidenterprise_v1/service.rb +3 -3
  23. data/generated/google/apis/appengine_v1beta5.rb +1 -1
  24. data/generated/google/apis/appengine_v1beta5/classes.rb +115 -5
  25. data/generated/google/apis/appengine_v1beta5/representations.rb +37 -0
  26. data/generated/google/apis/appengine_v1beta5/service.rb +12 -9
  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 +32 -37
  30. data/generated/google/apis/bigquery_v2/service.rb +10 -2
  31. data/generated/google/apis/calendar_v3.rb +1 -1
  32. data/generated/google/apis/calendar_v3/classes.rb +205 -0
  33. data/generated/google/apis/calendar_v3/representations.rb +97 -0
  34. data/generated/google/apis/classroom_v1.rb +22 -25
  35. data/generated/google/apis/classroom_v1/classes.rb +998 -907
  36. data/generated/google/apis/classroom_v1/representations.rb +240 -240
  37. data/generated/google/apis/classroom_v1/service.rb +1269 -1061
  38. data/generated/google/apis/cloudbuild_v1.rb +1 -1
  39. data/generated/google/apis/cloudbuild_v1/classes.rb +164 -163
  40. data/generated/google/apis/cloudbuild_v1/representations.rb +31 -31
  41. data/generated/google/apis/cloudbuild_v1/service.rb +114 -114
  42. data/generated/google/apis/clouddebugger_v2.rb +1 -1
  43. data/generated/google/apis/clouddebugger_v2/classes.rb +687 -687
  44. data/generated/google/apis/clouddebugger_v2/representations.rb +147 -147
  45. data/generated/google/apis/clouddebugger_v2/service.rb +132 -132
  46. data/generated/google/apis/cloudkms_v1.rb +1 -1
  47. data/generated/google/apis/cloudkms_v1/classes.rb +231 -248
  48. data/generated/google/apis/cloudkms_v1/representations.rb +74 -74
  49. data/generated/google/apis/cloudkms_v1/service.rb +228 -228
  50. data/generated/google/apis/cloudmonitoring_v2beta2.rb +1 -1
  51. data/generated/google/apis/cloudresourcemanager_v1.rb +1 -1
  52. data/generated/google/apis/cloudresourcemanager_v1/classes.rb +738 -128
  53. data/generated/google/apis/cloudresourcemanager_v1/representations.rb +245 -23
  54. data/generated/google/apis/cloudresourcemanager_v1/service.rb +1293 -249
  55. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +4 -4
  56. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +982 -372
  57. data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +293 -71
  58. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +626 -277
  59. data/generated/google/apis/cloudtrace_v1.rb +1 -1
  60. data/generated/google/apis/cloudtrace_v1/classes.rb +19 -19
  61. data/generated/google/apis/cloudtrace_v1/representations.rb +2 -2
  62. data/generated/google/apis/cloudtrace_v1/service.rb +30 -30
  63. data/generated/google/apis/compute_beta.rb +1 -1
  64. data/generated/google/apis/compute_beta/classes.rb +116 -0
  65. data/generated/google/apis/compute_beta/representations.rb +48 -0
  66. data/generated/google/apis/compute_beta/service.rb +46 -1
  67. data/generated/google/apis/compute_v1.rb +1 -1
  68. data/generated/google/apis/dataflow_v1b3.rb +1 -1
  69. data/generated/google/apis/dataflow_v1b3/classes.rb +3276 -3320
  70. data/generated/google/apis/dataflow_v1b3/representations.rb +779 -781
  71. data/generated/google/apis/dataflow_v1b3/service.rb +225 -225
  72. data/generated/google/apis/dataproc_v1.rb +1 -1
  73. data/generated/google/apis/dataproc_v1/classes.rb +1221 -1207
  74. data/generated/google/apis/dataproc_v1/representations.rb +255 -253
  75. data/generated/google/apis/dataproc_v1/service.rb +100 -100
  76. data/generated/google/apis/deploymentmanager_v2.rb +1 -1
  77. data/generated/google/apis/deploymentmanager_v2/classes.rb +5 -5
  78. data/generated/google/apis/dns_v1.rb +1 -1
  79. data/generated/google/apis/dns_v2beta1.rb +1 -1
  80. data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
  81. data/generated/google/apis/drive_v2.rb +1 -1
  82. data/generated/google/apis/drive_v2/classes.rb +3 -1
  83. data/generated/google/apis/drive_v3.rb +1 -1
  84. data/generated/google/apis/drive_v3/classes.rb +3 -1
  85. data/generated/google/apis/fusiontables_v2.rb +1 -1
  86. data/generated/google/apis/games_configuration_v1configuration.rb +1 -1
  87. data/generated/google/apis/games_management_v1management.rb +1 -1
  88. data/generated/google/apis/games_v1.rb +1 -1
  89. data/generated/google/apis/genomics_v1.rb +7 -7
  90. data/generated/google/apis/genomics_v1/classes.rb +959 -959
  91. data/generated/google/apis/genomics_v1/representations.rb +238 -238
  92. data/generated/google/apis/genomics_v1/service.rb +996 -996
  93. data/generated/google/apis/iam_v1.rb +1 -1
  94. data/generated/google/apis/iam_v1/classes.rb +440 -440
  95. data/generated/google/apis/iam_v1/representations.rb +94 -94
  96. data/generated/google/apis/iam_v1/service.rb +170 -173
  97. data/generated/google/apis/identitytoolkit_v3.rb +1 -1
  98. data/generated/google/apis/identitytoolkit_v3/classes.rb +55 -0
  99. data/generated/google/apis/identitytoolkit_v3/representations.rb +8 -0
  100. data/generated/google/apis/kgsearch_v1/service.rb +4 -4
  101. data/generated/google/apis/language_v1beta1.rb +1 -1
  102. data/generated/google/apis/language_v1beta1/classes.rb +427 -427
  103. data/generated/google/apis/language_v1beta1/representations.rb +113 -113
  104. data/generated/google/apis/language_v1beta1/service.rb +25 -24
  105. data/generated/google/apis/licensing_v1.rb +2 -2
  106. data/generated/google/apis/licensing_v1/classes.rb +14 -2
  107. data/generated/google/apis/licensing_v1/representations.rb +2 -0
  108. data/generated/google/apis/licensing_v1/service.rb +1 -1
  109. data/generated/google/apis/logging_v2beta1.rb +1 -1
  110. data/generated/google/apis/logging_v2beta1/classes.rb +864 -864
  111. data/generated/google/apis/logging_v2beta1/representations.rb +168 -168
  112. data/generated/google/apis/logging_v2beta1/service.rb +261 -261
  113. data/generated/google/apis/manufacturers_v1.rb +1 -1
  114. data/generated/google/apis/manufacturers_v1/classes.rb +452 -105
  115. data/generated/google/apis/manufacturers_v1/representations.rb +138 -18
  116. data/generated/google/apis/manufacturers_v1/service.rb +11 -11
  117. data/generated/google/apis/mirror_v1.rb +1 -1
  118. data/generated/google/apis/monitoring_v3.rb +7 -7
  119. data/generated/google/apis/monitoring_v3/classes.rb +668 -670
  120. data/generated/google/apis/monitoring_v3/representations.rb +140 -140
  121. data/generated/google/apis/monitoring_v3/service.rb +208 -208
  122. data/generated/google/apis/partners_v2.rb +1 -1
  123. data/generated/google/apis/partners_v2/classes.rb +505 -505
  124. data/generated/google/apis/partners_v2/representations.rb +118 -118
  125. data/generated/google/apis/partners_v2/service.rb +275 -275
  126. data/generated/google/apis/people_v1.rb +1 -1
  127. data/generated/google/apis/people_v1/classes.rb +1037 -1031
  128. data/generated/google/apis/people_v1/representations.rb +247 -246
  129. data/generated/google/apis/people_v1/service.rb +20 -20
  130. data/generated/google/apis/plus_domains_v1.rb +1 -1
  131. data/generated/google/apis/plus_v1.rb +1 -1
  132. data/generated/google/apis/proximitybeacon_v1beta1.rb +1 -1
  133. data/generated/google/apis/proximitybeacon_v1beta1/classes.rb +392 -392
  134. data/generated/google/apis/proximitybeacon_v1beta1/representations.rb +93 -93
  135. data/generated/google/apis/proximitybeacon_v1beta1/service.rb +381 -381
  136. data/generated/google/apis/pubsub_v1.rb +4 -4
  137. data/generated/google/apis/pubsub_v1/classes.rb +131 -132
  138. data/generated/google/apis/pubsub_v1/representations.rb +35 -35
  139. data/generated/google/apis/pubsub_v1/service.rb +399 -408
  140. data/generated/google/apis/reseller_v1.rb +1 -1
  141. data/generated/google/apis/reseller_v1/classes.rb +9 -0
  142. data/generated/google/apis/reseller_v1/representations.rb +1 -0
  143. data/generated/google/apis/script_v1.rb +9 -9
  144. data/generated/google/apis/script_v1/classes.rb +110 -110
  145. data/generated/google/apis/script_v1/representations.rb +26 -26
  146. data/generated/google/apis/sheets_v4.rb +4 -4
  147. data/generated/google/apis/sheets_v4/classes.rb +4329 -4329
  148. data/generated/google/apis/sheets_v4/representations.rb +856 -856
  149. data/generated/google/apis/sheets_v4/service.rb +106 -106
  150. data/generated/google/apis/slides_v1.rb +4 -4
  151. data/generated/google/apis/slides_v1/classes.rb +2923 -2841
  152. data/generated/google/apis/slides_v1/representations.rb +722 -691
  153. data/generated/google/apis/slides_v1/service.rb +58 -15
  154. data/generated/google/apis/speech_v1beta1.rb +1 -1
  155. data/generated/google/apis/speech_v1beta1/classes.rb +191 -191
  156. data/generated/google/apis/speech_v1beta1/representations.rb +57 -57
  157. data/generated/google/apis/speech_v1beta1/service.rb +70 -70
  158. data/generated/google/apis/storage_v1.rb +1 -1
  159. data/generated/google/apis/storage_v1/classes.rb +151 -0
  160. data/generated/google/apis/storage_v1/representations.rb +45 -0
  161. data/generated/google/apis/storage_v1/service.rb +248 -0
  162. data/generated/google/apis/vision_v1.rb +1 -1
  163. data/generated/google/apis/vision_v1/classes.rb +1227 -1221
  164. data/generated/google/apis/vision_v1/representations.rb +217 -215
  165. data/generated/google/apis/webmasters_v3.rb +1 -1
  166. data/generated/google/apis/youtube_analytics_v1.rb +1 -1
  167. data/generated/google/apis/youtube_partner_v1.rb +1 -1
  168. data/generated/google/apis/youtube_partner_v1/classes.rb +78 -0
  169. data/generated/google/apis/youtube_partner_v1/representations.rb +34 -0
  170. data/generated/google/apis/youtube_partner_v1/service.rb +40 -0
  171. data/generated/google/apis/youtubereporting_v1.rb +4 -4
  172. data/generated/google/apis/youtubereporting_v1/classes.rb +65 -65
  173. data/generated/google/apis/youtubereporting_v1/representations.rb +18 -18
  174. data/generated/google/apis/youtubereporting_v1/service.rb +111 -111
  175. data/lib/google/apis/version.rb +1 -1
  176. metadata +2 -2
@@ -84,52 +84,6 @@ module Google
84
84
  execute_or_queue_command(command, &block)
85
85
  end
86
86
 
87
- # Lists the logs in projects, organizations, folders, or billing accounts. Only
88
- # logs that have entries are listed.
89
- # @param [String] parent
90
- # Required. The resource name that owns the logs:
91
- # "projects/[PROJECT_ID]"
92
- # "organizations/[ORGANIZATION_ID]"
93
- # "billingAccounts/[BILLING_ACCOUNT_ID]"
94
- # "folders/[FOLDER_ID]"
95
- # @param [String] page_token
96
- # Optional. If present, then retrieve the next batch of results from the
97
- # preceding call to this method. pageToken must be the value of nextPageToken
98
- # from the previous response. The values of other method parameters should be
99
- # identical to those in the previous call.
100
- # @param [Fixnum] page_size
101
- # Optional. The maximum number of results to return from this request. Non-
102
- # positive values are ignored. The presence of nextPageToken in the response
103
- # indicates that more results might be available.
104
- # @param [String] fields
105
- # Selector specifying which fields to include in a partial response.
106
- # @param [String] quota_user
107
- # Available to use for quota purposes for server-side applications. Can be any
108
- # arbitrary string assigned to a user, but should not exceed 40 characters.
109
- # @param [Google::Apis::RequestOptions] options
110
- # Request-specific options
111
- #
112
- # @yield [result, err] Result & error if block supplied
113
- # @yieldparam result [Google::Apis::LoggingV2beta1::ListLogsResponse] parsed result object
114
- # @yieldparam err [StandardError] error object if request failed
115
- #
116
- # @return [Google::Apis::LoggingV2beta1::ListLogsResponse]
117
- #
118
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
119
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
120
- # @raise [Google::Apis::AuthorizationError] Authorization is required
121
- def list_organization_logs(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
122
- command = make_simple_command(:get, 'v2beta1/{+parent}/logs', options)
123
- command.response_representation = Google::Apis::LoggingV2beta1::ListLogsResponse::Representation
124
- command.response_class = Google::Apis::LoggingV2beta1::ListLogsResponse
125
- command.params['parent'] = parent unless parent.nil?
126
- command.query['pageToken'] = page_token unless page_token.nil?
127
- command.query['pageSize'] = page_size unless page_size.nil?
128
- command.query['fields'] = fields unless fields.nil?
129
- command.query['quotaUser'] = quota_user unless quota_user.nil?
130
- execute_or_queue_command(command, &block)
131
- end
132
-
133
87
  # Deletes all the log entries in a log. The log reappears if it receives new
134
88
  # entries. Log entries written shortly before the delete operation might not be
135
89
  # deleted.
@@ -169,9 +123,23 @@ module Google
169
123
  execute_or_queue_command(command, &block)
170
124
  end
171
125
 
172
- # Lists log entries. Use this method to retrieve log entries from Stackdriver
173
- # Logging. For ways to export log entries, see Exporting Logs.
174
- # @param [Google::Apis::LoggingV2beta1::ListLogEntriesRequest] list_log_entries_request_object
126
+ # Lists the logs in projects, organizations, folders, or billing accounts. Only
127
+ # logs that have entries are listed.
128
+ # @param [String] parent
129
+ # Required. The resource name that owns the logs:
130
+ # "projects/[PROJECT_ID]"
131
+ # "organizations/[ORGANIZATION_ID]"
132
+ # "billingAccounts/[BILLING_ACCOUNT_ID]"
133
+ # "folders/[FOLDER_ID]"
134
+ # @param [String] page_token
135
+ # Optional. If present, then retrieve the next batch of results from the
136
+ # preceding call to this method. pageToken must be the value of nextPageToken
137
+ # from the previous response. The values of other method parameters should be
138
+ # identical to those in the previous call.
139
+ # @param [Fixnum] page_size
140
+ # Optional. The maximum number of results to return from this request. Non-
141
+ # positive values are ignored. The presence of nextPageToken in the response
142
+ # indicates that more results might be available.
175
143
  # @param [String] fields
176
144
  # Selector specifying which fields to include in a partial response.
177
145
  # @param [String] quota_user
@@ -181,20 +149,21 @@ module Google
181
149
  # Request-specific options
182
150
  #
183
151
  # @yield [result, err] Result & error if block supplied
184
- # @yieldparam result [Google::Apis::LoggingV2beta1::ListLogEntriesResponse] parsed result object
152
+ # @yieldparam result [Google::Apis::LoggingV2beta1::ListLogsResponse] parsed result object
185
153
  # @yieldparam err [StandardError] error object if request failed
186
154
  #
187
- # @return [Google::Apis::LoggingV2beta1::ListLogEntriesResponse]
155
+ # @return [Google::Apis::LoggingV2beta1::ListLogsResponse]
188
156
  #
189
157
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
190
158
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
191
159
  # @raise [Google::Apis::AuthorizationError] Authorization is required
192
- def list_entry_log_entries(list_log_entries_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
193
- command = make_simple_command(:post, 'v2beta1/entries:list', options)
194
- command.request_representation = Google::Apis::LoggingV2beta1::ListLogEntriesRequest::Representation
195
- command.request_object = list_log_entries_request_object
196
- command.response_representation = Google::Apis::LoggingV2beta1::ListLogEntriesResponse::Representation
197
- command.response_class = Google::Apis::LoggingV2beta1::ListLogEntriesResponse
160
+ def list_organization_logs(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
161
+ command = make_simple_command(:get, 'v2beta1/{+parent}/logs', options)
162
+ command.response_representation = Google::Apis::LoggingV2beta1::ListLogsResponse::Representation
163
+ command.response_class = Google::Apis::LoggingV2beta1::ListLogsResponse
164
+ command.params['parent'] = parent unless parent.nil?
165
+ command.query['pageToken'] = page_token unless page_token.nil?
166
+ command.query['pageSize'] = page_size unless page_size.nil?
198
167
  command.query['fields'] = fields unless fields.nil?
199
168
  command.query['quotaUser'] = quota_user unless quota_user.nil?
200
169
  execute_or_queue_command(command, &block)
@@ -230,12 +199,9 @@ module Google
230
199
  execute_or_queue_command(command, &block)
231
200
  end
232
201
 
233
- # Creates a logs-based metric.
234
- # @param [String] parent
235
- # The resource name of the project in which to create the metric:
236
- # "projects/[PROJECT_ID]"
237
- # The new metric must be provided in the request.
238
- # @param [Google::Apis::LoggingV2beta1::LogMetric] log_metric_object
202
+ # Lists log entries. Use this method to retrieve log entries from Stackdriver
203
+ # Logging. For ways to export log entries, see Exporting Logs.
204
+ # @param [Google::Apis::LoggingV2beta1::ListLogEntriesRequest] list_log_entries_request_object
239
205
  # @param [String] fields
240
206
  # Selector specifying which fields to include in a partial response.
241
207
  # @param [String] quota_user
@@ -245,30 +211,37 @@ module Google
245
211
  # Request-specific options
246
212
  #
247
213
  # @yield [result, err] Result & error if block supplied
248
- # @yieldparam result [Google::Apis::LoggingV2beta1::LogMetric] parsed result object
214
+ # @yieldparam result [Google::Apis::LoggingV2beta1::ListLogEntriesResponse] parsed result object
249
215
  # @yieldparam err [StandardError] error object if request failed
250
216
  #
251
- # @return [Google::Apis::LoggingV2beta1::LogMetric]
217
+ # @return [Google::Apis::LoggingV2beta1::ListLogEntriesResponse]
252
218
  #
253
219
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
254
220
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
255
221
  # @raise [Google::Apis::AuthorizationError] Authorization is required
256
- def create_project_metric(parent, log_metric_object = nil, fields: nil, quota_user: nil, options: nil, &block)
257
- command = make_simple_command(:post, 'v2beta1/{+parent}/metrics', options)
258
- command.request_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation
259
- command.request_object = log_metric_object
260
- command.response_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation
261
- command.response_class = Google::Apis::LoggingV2beta1::LogMetric
262
- command.params['parent'] = parent unless parent.nil?
222
+ def list_entry_log_entries(list_log_entries_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
223
+ command = make_simple_command(:post, 'v2beta1/entries:list', options)
224
+ command.request_representation = Google::Apis::LoggingV2beta1::ListLogEntriesRequest::Representation
225
+ command.request_object = list_log_entries_request_object
226
+ command.response_representation = Google::Apis::LoggingV2beta1::ListLogEntriesResponse::Representation
227
+ command.response_class = Google::Apis::LoggingV2beta1::ListLogEntriesResponse
263
228
  command.query['fields'] = fields unless fields.nil?
264
229
  command.query['quotaUser'] = quota_user unless quota_user.nil?
265
230
  execute_or_queue_command(command, &block)
266
231
  end
267
232
 
268
- # Deletes a logs-based metric.
269
- # @param [String] metric_name
270
- # The resource name of the metric to delete:
271
- # "projects/[PROJECT_ID]/metrics/[METRIC_ID]"
233
+ # Deletes all the log entries in a log. The log reappears if it receives new
234
+ # entries. Log entries written shortly before the delete operation might not be
235
+ # deleted.
236
+ # @param [String] log_name
237
+ # Required. The resource name of the log to delete:
238
+ # "projects/[PROJECT_ID]/logs/[LOG_ID]"
239
+ # "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
240
+ # "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]"
241
+ # "folders/[FOLDER_ID]/logs/[LOG_ID]"
242
+ # [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog"
243
+ # , "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%
244
+ # 2Factivity". For more information about log names, see LogEntry.
272
245
  # @param [String] fields
273
246
  # Selector specifying which fields to include in a partial response.
274
247
  # @param [String] quota_user
@@ -286,20 +259,24 @@ module Google
286
259
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
287
260
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
288
261
  # @raise [Google::Apis::AuthorizationError] Authorization is required
289
- def delete_project_metric(metric_name, fields: nil, quota_user: nil, options: nil, &block)
290
- command = make_simple_command(:delete, 'v2beta1/{+metricName}', options)
262
+ def delete_log(log_name, fields: nil, quota_user: nil, options: nil, &block)
263
+ command = make_simple_command(:delete, 'v2beta1/{+logName}', options)
291
264
  command.response_representation = Google::Apis::LoggingV2beta1::Empty::Representation
292
265
  command.response_class = Google::Apis::LoggingV2beta1::Empty
293
- command.params['metricName'] = metric_name unless metric_name.nil?
266
+ command.params['logName'] = log_name unless log_name.nil?
294
267
  command.query['fields'] = fields unless fields.nil?
295
268
  command.query['quotaUser'] = quota_user unless quota_user.nil?
296
269
  execute_or_queue_command(command, &block)
297
270
  end
298
271
 
299
- # Lists logs-based metrics.
272
+ # Lists the logs in projects, organizations, folders, or billing accounts. Only
273
+ # logs that have entries are listed.
300
274
  # @param [String] parent
301
- # Required. The name of the project containing the metrics:
275
+ # Required. The resource name that owns the logs:
302
276
  # "projects/[PROJECT_ID]"
277
+ # "organizations/[ORGANIZATION_ID]"
278
+ # "billingAccounts/[BILLING_ACCOUNT_ID]"
279
+ # "folders/[FOLDER_ID]"
303
280
  # @param [String] page_token
304
281
  # Optional. If present, then retrieve the next batch of results from the
305
282
  # preceding call to this method. pageToken must be the value of nextPageToken
@@ -318,18 +295,18 @@ module Google
318
295
  # Request-specific options
319
296
  #
320
297
  # @yield [result, err] Result & error if block supplied
321
- # @yieldparam result [Google::Apis::LoggingV2beta1::ListLogMetricsResponse] parsed result object
298
+ # @yieldparam result [Google::Apis::LoggingV2beta1::ListLogsResponse] parsed result object
322
299
  # @yieldparam err [StandardError] error object if request failed
323
300
  #
324
- # @return [Google::Apis::LoggingV2beta1::ListLogMetricsResponse]
301
+ # @return [Google::Apis::LoggingV2beta1::ListLogsResponse]
325
302
  #
326
303
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
327
304
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
328
305
  # @raise [Google::Apis::AuthorizationError] Authorization is required
329
- def list_project_metrics(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
330
- command = make_simple_command(:get, 'v2beta1/{+parent}/metrics', options)
331
- command.response_representation = Google::Apis::LoggingV2beta1::ListLogMetricsResponse::Representation
332
- command.response_class = Google::Apis::LoggingV2beta1::ListLogMetricsResponse
306
+ def list_logs(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
307
+ command = make_simple_command(:get, 'v2beta1/{+parent}/logs', options)
308
+ command.response_representation = Google::Apis::LoggingV2beta1::ListLogsResponse::Representation
309
+ command.response_class = Google::Apis::LoggingV2beta1::ListLogsResponse
333
310
  command.params['parent'] = parent unless parent.nil?
334
311
  command.query['pageToken'] = page_token unless page_token.nil?
335
312
  command.query['pageSize'] = page_size unless page_size.nil?
@@ -338,10 +315,30 @@ module Google
338
315
  execute_or_queue_command(command, &block)
339
316
  end
340
317
 
341
- # Gets a logs-based metric.
342
- # @param [String] metric_name
343
- # The resource name of the desired metric:
344
- # "projects/[PROJECT_ID]/metrics/[METRIC_ID]"
318
+ # Updates a sink. If the named sink doesn't exist, then this method is identical
319
+ # to sinks.create. If the named sink does exist, then this method replaces the
320
+ # following fields in the existing sink with values from the new sink:
321
+ # destination, filter, output_version_format, start_time, and end_time. The
322
+ # updated filter might also have a new writer_identity; see the
323
+ # unique_writer_identity field.
324
+ # @param [String] sink_name
325
+ # Required. The full resource name of the sink to update, including the parent
326
+ # resource and the sink identifier:
327
+ # "projects/[PROJECT_ID]/sinks/[SINK_ID]"
328
+ # "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
329
+ # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
330
+ # "folders/[FOLDER_ID]/sinks/[SINK_ID]"
331
+ # Example: "projects/my-project-id/sinks/my-sink-id".
332
+ # @param [Google::Apis::LoggingV2beta1::LogSink] log_sink_object
333
+ # @param [Boolean] unique_writer_identity
334
+ # Optional. See sinks.create for a description of this field. When updating a
335
+ # sink, the effect of this field on the value of writer_identity in the updated
336
+ # sink depends on both the old and new values of this field:
337
+ # If the old and new values of this field are both false or both true, then
338
+ # there is no change to the sink's writer_identity.
339
+ # If the old value is false and the new value is true, then writer_identity is
340
+ # changed to a unique service account.
341
+ # It is an error if the old value is true and the new value is false.
345
342
  # @param [String] fields
346
343
  # Selector specifying which fields to include in a partial response.
347
344
  # @param [String] quota_user
@@ -351,32 +348,50 @@ module Google
351
348
  # Request-specific options
352
349
  #
353
350
  # @yield [result, err] Result & error if block supplied
354
- # @yieldparam result [Google::Apis::LoggingV2beta1::LogMetric] parsed result object
351
+ # @yieldparam result [Google::Apis::LoggingV2beta1::LogSink] parsed result object
355
352
  # @yieldparam err [StandardError] error object if request failed
356
353
  #
357
- # @return [Google::Apis::LoggingV2beta1::LogMetric]
354
+ # @return [Google::Apis::LoggingV2beta1::LogSink]
358
355
  #
359
356
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
360
357
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
361
358
  # @raise [Google::Apis::AuthorizationError] Authorization is required
362
- def get_project_metric(metric_name, fields: nil, quota_user: nil, options: nil, &block)
363
- command = make_simple_command(:get, 'v2beta1/{+metricName}', options)
364
- command.response_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation
365
- command.response_class = Google::Apis::LoggingV2beta1::LogMetric
366
- command.params['metricName'] = metric_name unless metric_name.nil?
359
+ def update_project_sink(sink_name, log_sink_object = nil, unique_writer_identity: nil, fields: nil, quota_user: nil, options: nil, &block)
360
+ command = make_simple_command(:put, 'v2beta1/{+sinkName}', options)
361
+ command.request_representation = Google::Apis::LoggingV2beta1::LogSink::Representation
362
+ command.request_object = log_sink_object
363
+ command.response_representation = Google::Apis::LoggingV2beta1::LogSink::Representation
364
+ command.response_class = Google::Apis::LoggingV2beta1::LogSink
365
+ command.params['sinkName'] = sink_name unless sink_name.nil?
366
+ command.query['uniqueWriterIdentity'] = unique_writer_identity unless unique_writer_identity.nil?
367
367
  command.query['fields'] = fields unless fields.nil?
368
368
  command.query['quotaUser'] = quota_user unless quota_user.nil?
369
369
  execute_or_queue_command(command, &block)
370
370
  end
371
371
 
372
- # Creates or updates a logs-based metric.
373
- # @param [String] metric_name
374
- # The resource name of the metric to update:
375
- # "projects/[PROJECT_ID]/metrics/[METRIC_ID]"
376
- # The updated metric must be provided in the request and it's name field must be
377
- # the same as [METRIC_ID] If the metric does not exist in [PROJECT_ID], then a
378
- # new metric is created.
379
- # @param [Google::Apis::LoggingV2beta1::LogMetric] log_metric_object
372
+ # Creates a sink that exports specified log entries to a destination. The export
373
+ # of newly-ingested log entries begins immediately, unless the current time is
374
+ # outside the sink's start and end times or the sink's writer_identity is not
375
+ # permitted to write to the destination. A sink can export log entries only from
376
+ # the resource owning the sink.
377
+ # @param [String] parent
378
+ # Required. The resource in which to create the sink:
379
+ # "projects/[PROJECT_ID]"
380
+ # "organizations/[ORGANIZATION_ID]"
381
+ # "billingAccounts/[BILLING_ACCOUNT_ID]"
382
+ # "folders/[FOLDER_ID]"
383
+ # Examples: "projects/my-logging-project", "organizations/123456789".
384
+ # @param [Google::Apis::LoggingV2beta1::LogSink] log_sink_object
385
+ # @param [Boolean] unique_writer_identity
386
+ # Optional. Determines the kind of IAM identity returned as writer_identity in
387
+ # the new sink. If this value is omitted or set to false, and if the sink's
388
+ # parent is a project, then the value returned as writer_identity is the same
389
+ # group or service account used by Stackdriver Logging before the addition of
390
+ # writer identities to this API. The sink's destination must be in the same
391
+ # project as the sink itself.If this field is set to true, or if the sink is
392
+ # owned by a non-project resource such as an organization, then the value of
393
+ # writer_identity will be a unique service account used only for exports from
394
+ # the new sink. For more information, see writer_identity in LogSink.
380
395
  # @param [String] fields
381
396
  # Selector specifying which fields to include in a partial response.
382
397
  # @param [String] quota_user
@@ -386,38 +401,37 @@ module Google
386
401
  # Request-specific options
387
402
  #
388
403
  # @yield [result, err] Result & error if block supplied
389
- # @yieldparam result [Google::Apis::LoggingV2beta1::LogMetric] parsed result object
404
+ # @yieldparam result [Google::Apis::LoggingV2beta1::LogSink] parsed result object
390
405
  # @yieldparam err [StandardError] error object if request failed
391
406
  #
392
- # @return [Google::Apis::LoggingV2beta1::LogMetric]
407
+ # @return [Google::Apis::LoggingV2beta1::LogSink]
393
408
  #
394
409
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
395
410
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
396
411
  # @raise [Google::Apis::AuthorizationError] Authorization is required
397
- def update_project_metric(metric_name, log_metric_object = nil, fields: nil, quota_user: nil, options: nil, &block)
398
- command = make_simple_command(:put, 'v2beta1/{+metricName}', options)
399
- command.request_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation
400
- command.request_object = log_metric_object
401
- command.response_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation
402
- command.response_class = Google::Apis::LoggingV2beta1::LogMetric
403
- command.params['metricName'] = metric_name unless metric_name.nil?
412
+ def create_project_sink(parent, log_sink_object = nil, unique_writer_identity: nil, fields: nil, quota_user: nil, options: nil, &block)
413
+ command = make_simple_command(:post, 'v2beta1/{+parent}/sinks', options)
414
+ command.request_representation = Google::Apis::LoggingV2beta1::LogSink::Representation
415
+ command.request_object = log_sink_object
416
+ command.response_representation = Google::Apis::LoggingV2beta1::LogSink::Representation
417
+ command.response_class = Google::Apis::LoggingV2beta1::LogSink
418
+ command.params['parent'] = parent unless parent.nil?
419
+ command.query['uniqueWriterIdentity'] = unique_writer_identity unless unique_writer_identity.nil?
404
420
  command.query['fields'] = fields unless fields.nil?
405
421
  command.query['quotaUser'] = quota_user unless quota_user.nil?
406
422
  execute_or_queue_command(command, &block)
407
423
  end
408
424
 
409
- # Deletes all the log entries in a log. The log reappears if it receives new
410
- # entries. Log entries written shortly before the delete operation might not be
411
- # deleted.
412
- # @param [String] log_name
413
- # Required. The resource name of the log to delete:
414
- # "projects/[PROJECT_ID]/logs/[LOG_ID]"
415
- # "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
416
- # "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]"
417
- # "folders/[FOLDER_ID]/logs/[LOG_ID]"
418
- # [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog"
419
- # , "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%
420
- # 2Factivity". For more information about log names, see LogEntry.
425
+ # Deletes a sink. If the sink has a unique writer_identity, then that service
426
+ # account is also deleted.
427
+ # @param [String] sink_name
428
+ # Required. The full resource name of the sink to delete, including the parent
429
+ # resource and the sink identifier:
430
+ # "projects/[PROJECT_ID]/sinks/[SINK_ID]"
431
+ # "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
432
+ # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
433
+ # "folders/[FOLDER_ID]/sinks/[SINK_ID]"
434
+ # Example: "projects/my-project-id/sinks/my-sink-id".
421
435
  # @param [String] fields
422
436
  # Selector specifying which fields to include in a partial response.
423
437
  # @param [String] quota_user
@@ -435,20 +449,19 @@ module Google
435
449
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
436
450
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
437
451
  # @raise [Google::Apis::AuthorizationError] Authorization is required
438
- def delete_log(log_name, fields: nil, quota_user: nil, options: nil, &block)
439
- command = make_simple_command(:delete, 'v2beta1/{+logName}', options)
452
+ def delete_project_sink(sink_name, fields: nil, quota_user: nil, options: nil, &block)
453
+ command = make_simple_command(:delete, 'v2beta1/{+sinkName}', options)
440
454
  command.response_representation = Google::Apis::LoggingV2beta1::Empty::Representation
441
455
  command.response_class = Google::Apis::LoggingV2beta1::Empty
442
- command.params['logName'] = log_name unless log_name.nil?
456
+ command.params['sinkName'] = sink_name unless sink_name.nil?
443
457
  command.query['fields'] = fields unless fields.nil?
444
458
  command.query['quotaUser'] = quota_user unless quota_user.nil?
445
459
  execute_or_queue_command(command, &block)
446
460
  end
447
461
 
448
- # Lists the logs in projects, organizations, folders, or billing accounts. Only
449
- # logs that have entries are listed.
462
+ # Lists sinks.
450
463
  # @param [String] parent
451
- # Required. The resource name that owns the logs:
464
+ # Required. The parent resource whose sinks are to be listed:
452
465
  # "projects/[PROJECT_ID]"
453
466
  # "organizations/[ORGANIZATION_ID]"
454
467
  # "billingAccounts/[BILLING_ACCOUNT_ID]"
@@ -471,51 +484,6 @@ module Google
471
484
  # Request-specific options
472
485
  #
473
486
  # @yield [result, err] Result & error if block supplied
474
- # @yieldparam result [Google::Apis::LoggingV2beta1::ListLogsResponse] parsed result object
475
- # @yieldparam err [StandardError] error object if request failed
476
- #
477
- # @return [Google::Apis::LoggingV2beta1::ListLogsResponse]
478
- #
479
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
480
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
481
- # @raise [Google::Apis::AuthorizationError] Authorization is required
482
- def list_logs(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
483
- command = make_simple_command(:get, 'v2beta1/{+parent}/logs', options)
484
- command.response_representation = Google::Apis::LoggingV2beta1::ListLogsResponse::Representation
485
- command.response_class = Google::Apis::LoggingV2beta1::ListLogsResponse
486
- command.params['parent'] = parent unless parent.nil?
487
- command.query['pageToken'] = page_token unless page_token.nil?
488
- command.query['pageSize'] = page_size unless page_size.nil?
489
- command.query['fields'] = fields unless fields.nil?
490
- command.query['quotaUser'] = quota_user unless quota_user.nil?
491
- execute_or_queue_command(command, &block)
492
- end
493
-
494
- # Lists sinks.
495
- # @param [String] parent
496
- # Required. The parent resource whose sinks are to be listed:
497
- # "projects/[PROJECT_ID]"
498
- # "organizations/[ORGANIZATION_ID]"
499
- # "billingAccounts/[BILLING_ACCOUNT_ID]"
500
- # "folders/[FOLDER_ID]"
501
- # @param [Fixnum] page_size
502
- # Optional. The maximum number of results to return from this request. Non-
503
- # positive values are ignored. The presence of nextPageToken in the response
504
- # indicates that more results might be available.
505
- # @param [String] page_token
506
- # Optional. If present, then retrieve the next batch of results from the
507
- # preceding call to this method. pageToken must be the value of nextPageToken
508
- # from the previous response. The values of other method parameters should be
509
- # identical to those in the previous call.
510
- # @param [String] fields
511
- # Selector specifying which fields to include in a partial response.
512
- # @param [String] quota_user
513
- # Available to use for quota purposes for server-side applications. Can be any
514
- # arbitrary string assigned to a user, but should not exceed 40 characters.
515
- # @param [Google::Apis::RequestOptions] options
516
- # Request-specific options
517
- #
518
- # @yield [result, err] Result & error if block supplied
519
487
  # @yieldparam result [Google::Apis::LoggingV2beta1::ListSinksResponse] parsed result object
520
488
  # @yieldparam err [StandardError] error object if request failed
521
489
  #
@@ -524,13 +492,13 @@ module Google
524
492
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
525
493
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
526
494
  # @raise [Google::Apis::AuthorizationError] Authorization is required
527
- def list_project_sinks(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
495
+ def list_project_sinks(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
528
496
  command = make_simple_command(:get, 'v2beta1/{+parent}/sinks', options)
529
497
  command.response_representation = Google::Apis::LoggingV2beta1::ListSinksResponse::Representation
530
498
  command.response_class = Google::Apis::LoggingV2beta1::ListSinksResponse
531
499
  command.params['parent'] = parent unless parent.nil?
532
- command.query['pageSize'] = page_size unless page_size.nil?
533
500
  command.query['pageToken'] = page_token unless page_token.nil?
501
+ command.query['pageSize'] = page_size unless page_size.nil?
534
502
  command.query['fields'] = fields unless fields.nil?
535
503
  command.query['quotaUser'] = quota_user unless quota_user.nil?
536
504
  execute_or_queue_command(command, &block)
@@ -571,30 +539,10 @@ module Google
571
539
  execute_or_queue_command(command, &block)
572
540
  end
573
541
 
574
- # Updates a sink. If the named sink doesn't exist, then this method is identical
575
- # to sinks.create. If the named sink does exist, then this method replaces the
576
- # following fields in the existing sink with values from the new sink:
577
- # destination, filter, output_version_format, start_time, and end_time. The
578
- # updated filter might also have a new writer_identity; see the
579
- # unique_writer_identity field.
580
- # @param [String] sink_name
581
- # Required. The full resource name of the sink to update, including the parent
582
- # resource and the sink identifier:
583
- # "projects/[PROJECT_ID]/sinks/[SINK_ID]"
584
- # "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
585
- # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
586
- # "folders/[FOLDER_ID]/sinks/[SINK_ID]"
587
- # Example: "projects/my-project-id/sinks/my-sink-id".
588
- # @param [Google::Apis::LoggingV2beta1::LogSink] log_sink_object
589
- # @param [Boolean] unique_writer_identity
590
- # Optional. See sinks.create for a description of this field. When updating a
591
- # sink, the effect of this field on the value of writer_identity in the updated
592
- # sink depends on both the old and new values of this field:
593
- # If the old and new values of this field are both false or both true, then
594
- # there is no change to the sink's writer_identity.
595
- # If the old value is false and the new value is true, then writer_identity is
596
- # changed to a unique service account.
597
- # It is an error if the old value is true and the new value is false.
542
+ # Deletes a logs-based metric.
543
+ # @param [String] metric_name
544
+ # The resource name of the metric to delete:
545
+ # "projects/[PROJECT_ID]/metrics/[METRIC_ID]"
598
546
  # @param [String] fields
599
547
  # Selector specifying which fields to include in a partial response.
600
548
  # @param [String] quota_user
@@ -604,50 +552,37 @@ module Google
604
552
  # Request-specific options
605
553
  #
606
554
  # @yield [result, err] Result & error if block supplied
607
- # @yieldparam result [Google::Apis::LoggingV2beta1::LogSink] parsed result object
555
+ # @yieldparam result [Google::Apis::LoggingV2beta1::Empty] parsed result object
608
556
  # @yieldparam err [StandardError] error object if request failed
609
557
  #
610
- # @return [Google::Apis::LoggingV2beta1::LogSink]
558
+ # @return [Google::Apis::LoggingV2beta1::Empty]
611
559
  #
612
560
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
613
561
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
614
562
  # @raise [Google::Apis::AuthorizationError] Authorization is required
615
- def update_project_sink(sink_name, log_sink_object = nil, unique_writer_identity: nil, fields: nil, quota_user: nil, options: nil, &block)
616
- command = make_simple_command(:put, 'v2beta1/{+sinkName}', options)
617
- command.request_representation = Google::Apis::LoggingV2beta1::LogSink::Representation
618
- command.request_object = log_sink_object
619
- command.response_representation = Google::Apis::LoggingV2beta1::LogSink::Representation
620
- command.response_class = Google::Apis::LoggingV2beta1::LogSink
621
- command.params['sinkName'] = sink_name unless sink_name.nil?
622
- command.query['uniqueWriterIdentity'] = unique_writer_identity unless unique_writer_identity.nil?
563
+ def delete_project_metric(metric_name, fields: nil, quota_user: nil, options: nil, &block)
564
+ command = make_simple_command(:delete, 'v2beta1/{+metricName}', options)
565
+ command.response_representation = Google::Apis::LoggingV2beta1::Empty::Representation
566
+ command.response_class = Google::Apis::LoggingV2beta1::Empty
567
+ command.params['metricName'] = metric_name unless metric_name.nil?
623
568
  command.query['fields'] = fields unless fields.nil?
624
569
  command.query['quotaUser'] = quota_user unless quota_user.nil?
625
570
  execute_or_queue_command(command, &block)
626
571
  end
627
572
 
628
- # Creates a sink that exports specified log entries to a destination. The export
629
- # of newly-ingested log entries begins immediately, unless the current time is
630
- # outside the sink's start and end times or the sink's writer_identity is not
631
- # permitted to write to the destination. A sink can export log entries only from
632
- # the resource owning the sink.
573
+ # Lists logs-based metrics.
633
574
  # @param [String] parent
634
- # Required. The resource in which to create the sink:
575
+ # Required. The name of the project containing the metrics:
635
576
  # "projects/[PROJECT_ID]"
636
- # "organizations/[ORGANIZATION_ID]"
637
- # "billingAccounts/[BILLING_ACCOUNT_ID]"
638
- # "folders/[FOLDER_ID]"
639
- # Examples: "projects/my-logging-project", "organizations/123456789".
640
- # @param [Google::Apis::LoggingV2beta1::LogSink] log_sink_object
641
- # @param [Boolean] unique_writer_identity
642
- # Optional. Determines the kind of IAM identity returned as writer_identity in
643
- # the new sink. If this value is omitted or set to false, and if the sink's
644
- # parent is a project, then the value returned as writer_identity is the same
645
- # group or service account used by Stackdriver Logging before the addition of
646
- # writer identities to this API. The sink's destination must be in the same
647
- # project as the sink itself.If this field is set to true, or if the sink is
648
- # owned by a non-project resource such as an organization, then the value of
649
- # writer_identity will be a unique service account used only for exports from
650
- # the new sink. For more information, see writer_identity in LogSink.
577
+ # @param [String] page_token
578
+ # Optional. If present, then retrieve the next batch of results from the
579
+ # preceding call to this method. pageToken must be the value of nextPageToken
580
+ # from the previous response. The values of other method parameters should be
581
+ # identical to those in the previous call.
582
+ # @param [Fixnum] page_size
583
+ # Optional. The maximum number of results to return from this request. Non-
584
+ # positive values are ignored. The presence of nextPageToken in the response
585
+ # indicates that more results might be available.
651
586
  # @param [String] fields
652
587
  # Selector specifying which fields to include in a partial response.
653
588
  # @param [String] quota_user
@@ -657,37 +592,30 @@ module Google
657
592
  # Request-specific options
658
593
  #
659
594
  # @yield [result, err] Result & error if block supplied
660
- # @yieldparam result [Google::Apis::LoggingV2beta1::LogSink] parsed result object
595
+ # @yieldparam result [Google::Apis::LoggingV2beta1::ListLogMetricsResponse] parsed result object
661
596
  # @yieldparam err [StandardError] error object if request failed
662
597
  #
663
- # @return [Google::Apis::LoggingV2beta1::LogSink]
598
+ # @return [Google::Apis::LoggingV2beta1::ListLogMetricsResponse]
664
599
  #
665
600
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
666
601
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
667
602
  # @raise [Google::Apis::AuthorizationError] Authorization is required
668
- def create_project_sink(parent, log_sink_object = nil, unique_writer_identity: nil, fields: nil, quota_user: nil, options: nil, &block)
669
- command = make_simple_command(:post, 'v2beta1/{+parent}/sinks', options)
670
- command.request_representation = Google::Apis::LoggingV2beta1::LogSink::Representation
671
- command.request_object = log_sink_object
672
- command.response_representation = Google::Apis::LoggingV2beta1::LogSink::Representation
673
- command.response_class = Google::Apis::LoggingV2beta1::LogSink
603
+ def list_project_metrics(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
604
+ command = make_simple_command(:get, 'v2beta1/{+parent}/metrics', options)
605
+ command.response_representation = Google::Apis::LoggingV2beta1::ListLogMetricsResponse::Representation
606
+ command.response_class = Google::Apis::LoggingV2beta1::ListLogMetricsResponse
674
607
  command.params['parent'] = parent unless parent.nil?
675
- command.query['uniqueWriterIdentity'] = unique_writer_identity unless unique_writer_identity.nil?
608
+ command.query['pageToken'] = page_token unless page_token.nil?
609
+ command.query['pageSize'] = page_size unless page_size.nil?
676
610
  command.query['fields'] = fields unless fields.nil?
677
611
  command.query['quotaUser'] = quota_user unless quota_user.nil?
678
612
  execute_or_queue_command(command, &block)
679
613
  end
680
614
 
681
- # Deletes a sink. If the sink has a unique writer_identity, then that service
682
- # account is also deleted.
683
- # @param [String] sink_name
684
- # Required. The full resource name of the sink to delete, including the parent
685
- # resource and the sink identifier:
686
- # "projects/[PROJECT_ID]/sinks/[SINK_ID]"
687
- # "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
688
- # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
689
- # "folders/[FOLDER_ID]/sinks/[SINK_ID]"
690
- # Example: "projects/my-project-id/sinks/my-sink-id".
615
+ # Gets a logs-based metric.
616
+ # @param [String] metric_name
617
+ # The resource name of the desired metric:
618
+ # "projects/[PROJECT_ID]/metrics/[METRIC_ID]"
691
619
  # @param [String] fields
692
620
  # Selector specifying which fields to include in a partial response.
693
621
  # @param [String] quota_user
@@ -697,19 +625,91 @@ module Google
697
625
  # Request-specific options
698
626
  #
699
627
  # @yield [result, err] Result & error if block supplied
700
- # @yieldparam result [Google::Apis::LoggingV2beta1::Empty] parsed result object
628
+ # @yieldparam result [Google::Apis::LoggingV2beta1::LogMetric] parsed result object
701
629
  # @yieldparam err [StandardError] error object if request failed
702
630
  #
703
- # @return [Google::Apis::LoggingV2beta1::Empty]
631
+ # @return [Google::Apis::LoggingV2beta1::LogMetric]
704
632
  #
705
633
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
706
634
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
707
635
  # @raise [Google::Apis::AuthorizationError] Authorization is required
708
- def delete_project_sink(sink_name, fields: nil, quota_user: nil, options: nil, &block)
709
- command = make_simple_command(:delete, 'v2beta1/{+sinkName}', options)
710
- command.response_representation = Google::Apis::LoggingV2beta1::Empty::Representation
711
- command.response_class = Google::Apis::LoggingV2beta1::Empty
712
- command.params['sinkName'] = sink_name unless sink_name.nil?
636
+ def get_project_metric(metric_name, fields: nil, quota_user: nil, options: nil, &block)
637
+ command = make_simple_command(:get, 'v2beta1/{+metricName}', options)
638
+ command.response_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation
639
+ command.response_class = Google::Apis::LoggingV2beta1::LogMetric
640
+ command.params['metricName'] = metric_name unless metric_name.nil?
641
+ command.query['fields'] = fields unless fields.nil?
642
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
643
+ execute_or_queue_command(command, &block)
644
+ end
645
+
646
+ # Creates or updates a logs-based metric.
647
+ # @param [String] metric_name
648
+ # The resource name of the metric to update:
649
+ # "projects/[PROJECT_ID]/metrics/[METRIC_ID]"
650
+ # The updated metric must be provided in the request and it's name field must be
651
+ # the same as [METRIC_ID] If the metric does not exist in [PROJECT_ID], then a
652
+ # new metric is created.
653
+ # @param [Google::Apis::LoggingV2beta1::LogMetric] log_metric_object
654
+ # @param [String] fields
655
+ # Selector specifying which fields to include in a partial response.
656
+ # @param [String] quota_user
657
+ # Available to use for quota purposes for server-side applications. Can be any
658
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
659
+ # @param [Google::Apis::RequestOptions] options
660
+ # Request-specific options
661
+ #
662
+ # @yield [result, err] Result & error if block supplied
663
+ # @yieldparam result [Google::Apis::LoggingV2beta1::LogMetric] parsed result object
664
+ # @yieldparam err [StandardError] error object if request failed
665
+ #
666
+ # @return [Google::Apis::LoggingV2beta1::LogMetric]
667
+ #
668
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
669
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
670
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
671
+ def update_project_metric(metric_name, log_metric_object = nil, fields: nil, quota_user: nil, options: nil, &block)
672
+ command = make_simple_command(:put, 'v2beta1/{+metricName}', options)
673
+ command.request_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation
674
+ command.request_object = log_metric_object
675
+ command.response_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation
676
+ command.response_class = Google::Apis::LoggingV2beta1::LogMetric
677
+ command.params['metricName'] = metric_name unless metric_name.nil?
678
+ command.query['fields'] = fields unless fields.nil?
679
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
680
+ execute_or_queue_command(command, &block)
681
+ end
682
+
683
+ # Creates a logs-based metric.
684
+ # @param [String] parent
685
+ # The resource name of the project in which to create the metric:
686
+ # "projects/[PROJECT_ID]"
687
+ # The new metric must be provided in the request.
688
+ # @param [Google::Apis::LoggingV2beta1::LogMetric] log_metric_object
689
+ # @param [String] fields
690
+ # Selector specifying which fields to include in a partial response.
691
+ # @param [String] quota_user
692
+ # Available to use for quota purposes for server-side applications. Can be any
693
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
694
+ # @param [Google::Apis::RequestOptions] options
695
+ # Request-specific options
696
+ #
697
+ # @yield [result, err] Result & error if block supplied
698
+ # @yieldparam result [Google::Apis::LoggingV2beta1::LogMetric] parsed result object
699
+ # @yieldparam err [StandardError] error object if request failed
700
+ #
701
+ # @return [Google::Apis::LoggingV2beta1::LogMetric]
702
+ #
703
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
704
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
705
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
706
+ def create_project_metric(parent, log_metric_object = nil, fields: nil, quota_user: nil, options: nil, &block)
707
+ command = make_simple_command(:post, 'v2beta1/{+parent}/metrics', options)
708
+ command.request_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation
709
+ command.request_object = log_metric_object
710
+ command.response_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation
711
+ command.response_class = Google::Apis::LoggingV2beta1::LogMetric
712
+ command.params['parent'] = parent unless parent.nil?
713
713
  command.query['fields'] = fields unless fields.nil?
714
714
  command.query['quotaUser'] = quota_user unless quota_user.nil?
715
715
  execute_or_queue_command(command, &block)