google-api-client 0.16.0 → 0.17.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +18 -0
  3. data/generated/google/apis/adexchangebuyer2_v2beta1.rb +1 -1
  4. data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +13 -0
  5. data/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +1 -0
  6. data/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +6 -1
  7. data/generated/google/apis/bigquery_v2.rb +1 -1
  8. data/generated/google/apis/bigquery_v2/classes.rb +1 -1
  9. data/generated/google/apis/cloudfunctions_v1.rb +1 -1
  10. data/generated/google/apis/cloudfunctions_v1/classes.rb +13 -1
  11. data/generated/google/apis/cloudfunctions_v1/representations.rb +2 -0
  12. data/generated/google/apis/cloudfunctions_v1beta2.rb +1 -1
  13. data/generated/google/apis/cloudfunctions_v1beta2/classes.rb +13 -1
  14. data/generated/google/apis/cloudfunctions_v1beta2/representations.rb +2 -0
  15. data/generated/google/apis/container_v1beta1.rb +1 -1
  16. data/generated/google/apis/container_v1beta1/classes.rb +52 -0
  17. data/generated/google/apis/container_v1beta1/representations.rb +17 -0
  18. data/generated/google/apis/container_v1beta1/service.rb +78 -0
  19. data/generated/google/apis/content_v2.rb +1 -1
  20. data/generated/google/apis/content_v2/classes.rb +6 -11
  21. data/generated/google/apis/content_v2/representations.rb +0 -1
  22. data/generated/google/apis/content_v2sandbox.rb +1 -1
  23. data/generated/google/apis/content_v2sandbox/classes.rb +6 -11
  24. data/generated/google/apis/content_v2sandbox/representations.rb +0 -1
  25. data/generated/google/apis/dataproc_v1.rb +1 -1
  26. data/generated/google/apis/dataproc_v1/service.rb +3 -3
  27. data/generated/google/apis/dataproc_v1beta2.rb +1 -1
  28. data/generated/google/apis/dataproc_v1beta2/service.rb +3 -3
  29. data/generated/google/apis/videointelligence_v1beta1.rb +1 -1
  30. data/generated/google/apis/videointelligence_v1beta1/classes.rb +149 -51
  31. data/generated/google/apis/videointelligence_v1beta1/representations.rb +66 -16
  32. data/generated/google/apis/vision_v1.rb +1 -1
  33. data/generated/google/apis/vision_v1/classes.rb +439 -563
  34. data/generated/google/apis/vision_v1/representations.rb +178 -178
  35. data/generated/google/apis/vision_v1/service.rb +8 -8
  36. data/generated/google/apis/youtube_partner_v1.rb +1 -1
  37. data/generated/google/apis/youtube_v3.rb +1 -1
  38. data/lib/google/apis/version.rb +1 -1
  39. metadata +2 -6
  40. data/generated/google/apis/cloudmonitoring_v2beta2.rb +0 -37
  41. data/generated/google/apis/cloudmonitoring_v2beta2/classes.rb +0 -679
  42. data/generated/google/apis/cloudmonitoring_v2beta2/representations.rb +0 -353
  43. data/generated/google/apis/cloudmonitoring_v2beta2/service.rb +0 -453
@@ -1,353 +0,0 @@
1
- # Copyright 2015 Google Inc.
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
- require 'date'
16
- require 'google/apis/core/base_service'
17
- require 'google/apis/core/json_representation'
18
- require 'google/apis/core/hashable'
19
- require 'google/apis/errors'
20
-
21
- module Google
22
- module Apis
23
- module CloudmonitoringV2beta2
24
-
25
- class DeleteMetricDescriptorResponse
26
- class Representation < Google::Apis::Core::JsonRepresentation; end
27
-
28
- include Google::Apis::Core::JsonObjectSupport
29
- end
30
-
31
- class ListMetricDescriptorsRequest
32
- class Representation < Google::Apis::Core::JsonRepresentation; end
33
-
34
- include Google::Apis::Core::JsonObjectSupport
35
- end
36
-
37
- class ListMetricDescriptorsResponse
38
- class Representation < Google::Apis::Core::JsonRepresentation; end
39
-
40
- include Google::Apis::Core::JsonObjectSupport
41
- end
42
-
43
- class ListTimeseriesDescriptorsRequest
44
- class Representation < Google::Apis::Core::JsonRepresentation; end
45
-
46
- include Google::Apis::Core::JsonObjectSupport
47
- end
48
-
49
- class ListTimeseriesDescriptorsResponse
50
- class Representation < Google::Apis::Core::JsonRepresentation; end
51
-
52
- include Google::Apis::Core::JsonObjectSupport
53
- end
54
-
55
- class ListTimeseriesRequest
56
- class Representation < Google::Apis::Core::JsonRepresentation; end
57
-
58
- include Google::Apis::Core::JsonObjectSupport
59
- end
60
-
61
- class ListTimeseriesResponse
62
- class Representation < Google::Apis::Core::JsonRepresentation; end
63
-
64
- include Google::Apis::Core::JsonObjectSupport
65
- end
66
-
67
- class MetricDescriptor
68
- class Representation < Google::Apis::Core::JsonRepresentation; end
69
-
70
- include Google::Apis::Core::JsonObjectSupport
71
- end
72
-
73
- class MetricDescriptorLabelDescriptor
74
- class Representation < Google::Apis::Core::JsonRepresentation; end
75
-
76
- include Google::Apis::Core::JsonObjectSupport
77
- end
78
-
79
- class MetricDescriptorTypeDescriptor
80
- class Representation < Google::Apis::Core::JsonRepresentation; end
81
-
82
- include Google::Apis::Core::JsonObjectSupport
83
- end
84
-
85
- class Point
86
- class Representation < Google::Apis::Core::JsonRepresentation; end
87
-
88
- include Google::Apis::Core::JsonObjectSupport
89
- end
90
-
91
- class PointDistribution
92
- class Representation < Google::Apis::Core::JsonRepresentation; end
93
-
94
- include Google::Apis::Core::JsonObjectSupport
95
- end
96
-
97
- class PointDistributionBucket
98
- class Representation < Google::Apis::Core::JsonRepresentation; end
99
-
100
- include Google::Apis::Core::JsonObjectSupport
101
- end
102
-
103
- class PointDistributionOverflowBucket
104
- class Representation < Google::Apis::Core::JsonRepresentation; end
105
-
106
- include Google::Apis::Core::JsonObjectSupport
107
- end
108
-
109
- class PointDistributionUnderflowBucket
110
- class Representation < Google::Apis::Core::JsonRepresentation; end
111
-
112
- include Google::Apis::Core::JsonObjectSupport
113
- end
114
-
115
- class Timeseries
116
- class Representation < Google::Apis::Core::JsonRepresentation; end
117
-
118
- include Google::Apis::Core::JsonObjectSupport
119
- end
120
-
121
- class TimeseriesDescriptor
122
- class Representation < Google::Apis::Core::JsonRepresentation; end
123
-
124
- include Google::Apis::Core::JsonObjectSupport
125
- end
126
-
127
- class TimeseriesDescriptorLabel
128
- class Representation < Google::Apis::Core::JsonRepresentation; end
129
-
130
- include Google::Apis::Core::JsonObjectSupport
131
- end
132
-
133
- class TimeseriesPoint
134
- class Representation < Google::Apis::Core::JsonRepresentation; end
135
-
136
- include Google::Apis::Core::JsonObjectSupport
137
- end
138
-
139
- class WriteTimeseriesRequest
140
- class Representation < Google::Apis::Core::JsonRepresentation; end
141
-
142
- include Google::Apis::Core::JsonObjectSupport
143
- end
144
-
145
- class WriteTimeseriesResponse
146
- class Representation < Google::Apis::Core::JsonRepresentation; end
147
-
148
- include Google::Apis::Core::JsonObjectSupport
149
- end
150
-
151
- class DeleteMetricDescriptorResponse
152
- # @private
153
- class Representation < Google::Apis::Core::JsonRepresentation
154
- property :kind, as: 'kind'
155
- end
156
- end
157
-
158
- class ListMetricDescriptorsRequest
159
- # @private
160
- class Representation < Google::Apis::Core::JsonRepresentation
161
- property :kind, as: 'kind'
162
- end
163
- end
164
-
165
- class ListMetricDescriptorsResponse
166
- # @private
167
- class Representation < Google::Apis::Core::JsonRepresentation
168
- property :kind, as: 'kind'
169
- collection :metrics, as: 'metrics', class: Google::Apis::CloudmonitoringV2beta2::MetricDescriptor, decorator: Google::Apis::CloudmonitoringV2beta2::MetricDescriptor::Representation
170
-
171
- property :next_page_token, as: 'nextPageToken'
172
- end
173
- end
174
-
175
- class ListTimeseriesDescriptorsRequest
176
- # @private
177
- class Representation < Google::Apis::Core::JsonRepresentation
178
- property :kind, as: 'kind'
179
- end
180
- end
181
-
182
- class ListTimeseriesDescriptorsResponse
183
- # @private
184
- class Representation < Google::Apis::Core::JsonRepresentation
185
- property :kind, as: 'kind'
186
- property :next_page_token, as: 'nextPageToken'
187
- property :oldest, as: 'oldest', type: DateTime
188
-
189
- collection :timeseries, as: 'timeseries', class: Google::Apis::CloudmonitoringV2beta2::TimeseriesDescriptor, decorator: Google::Apis::CloudmonitoringV2beta2::TimeseriesDescriptor::Representation
190
-
191
- property :youngest, as: 'youngest', type: DateTime
192
-
193
- end
194
- end
195
-
196
- class ListTimeseriesRequest
197
- # @private
198
- class Representation < Google::Apis::Core::JsonRepresentation
199
- property :kind, as: 'kind'
200
- end
201
- end
202
-
203
- class ListTimeseriesResponse
204
- # @private
205
- class Representation < Google::Apis::Core::JsonRepresentation
206
- property :kind, as: 'kind'
207
- property :next_page_token, as: 'nextPageToken'
208
- property :oldest, as: 'oldest', type: DateTime
209
-
210
- collection :timeseries, as: 'timeseries', class: Google::Apis::CloudmonitoringV2beta2::Timeseries, decorator: Google::Apis::CloudmonitoringV2beta2::Timeseries::Representation
211
-
212
- property :youngest, as: 'youngest', type: DateTime
213
-
214
- end
215
- end
216
-
217
- class MetricDescriptor
218
- # @private
219
- class Representation < Google::Apis::Core::JsonRepresentation
220
- property :description, as: 'description'
221
- collection :labels, as: 'labels', class: Google::Apis::CloudmonitoringV2beta2::MetricDescriptorLabelDescriptor, decorator: Google::Apis::CloudmonitoringV2beta2::MetricDescriptorLabelDescriptor::Representation
222
-
223
- property :name, as: 'name'
224
- property :project, as: 'project'
225
- property :type_descriptor, as: 'typeDescriptor', class: Google::Apis::CloudmonitoringV2beta2::MetricDescriptorTypeDescriptor, decorator: Google::Apis::CloudmonitoringV2beta2::MetricDescriptorTypeDescriptor::Representation
226
-
227
- end
228
- end
229
-
230
- class MetricDescriptorLabelDescriptor
231
- # @private
232
- class Representation < Google::Apis::Core::JsonRepresentation
233
- property :description, as: 'description'
234
- property :key, as: 'key'
235
- end
236
- end
237
-
238
- class MetricDescriptorTypeDescriptor
239
- # @private
240
- class Representation < Google::Apis::Core::JsonRepresentation
241
- property :metric_type, as: 'metricType'
242
- property :value_type, as: 'valueType'
243
- end
244
- end
245
-
246
- class Point
247
- # @private
248
- class Representation < Google::Apis::Core::JsonRepresentation
249
- property :bool_value, as: 'boolValue'
250
- property :distribution_value, as: 'distributionValue', class: Google::Apis::CloudmonitoringV2beta2::PointDistribution, decorator: Google::Apis::CloudmonitoringV2beta2::PointDistribution::Representation
251
-
252
- property :double_value, as: 'doubleValue'
253
- property :end, as: 'end', type: DateTime
254
-
255
- property :int64_value, :numeric_string => true, as: 'int64Value'
256
- property :start, as: 'start', type: DateTime
257
-
258
- property :string_value, as: 'stringValue'
259
- end
260
- end
261
-
262
- class PointDistribution
263
- # @private
264
- class Representation < Google::Apis::Core::JsonRepresentation
265
- collection :buckets, as: 'buckets', class: Google::Apis::CloudmonitoringV2beta2::PointDistributionBucket, decorator: Google::Apis::CloudmonitoringV2beta2::PointDistributionBucket::Representation
266
-
267
- property :overflow_bucket, as: 'overflowBucket', class: Google::Apis::CloudmonitoringV2beta2::PointDistributionOverflowBucket, decorator: Google::Apis::CloudmonitoringV2beta2::PointDistributionOverflowBucket::Representation
268
-
269
- property :underflow_bucket, as: 'underflowBucket', class: Google::Apis::CloudmonitoringV2beta2::PointDistributionUnderflowBucket, decorator: Google::Apis::CloudmonitoringV2beta2::PointDistributionUnderflowBucket::Representation
270
-
271
- end
272
- end
273
-
274
- class PointDistributionBucket
275
- # @private
276
- class Representation < Google::Apis::Core::JsonRepresentation
277
- property :count, :numeric_string => true, as: 'count'
278
- property :lower_bound, as: 'lowerBound'
279
- property :upper_bound, as: 'upperBound'
280
- end
281
- end
282
-
283
- class PointDistributionOverflowBucket
284
- # @private
285
- class Representation < Google::Apis::Core::JsonRepresentation
286
- property :count, :numeric_string => true, as: 'count'
287
- property :lower_bound, as: 'lowerBound'
288
- end
289
- end
290
-
291
- class PointDistributionUnderflowBucket
292
- # @private
293
- class Representation < Google::Apis::Core::JsonRepresentation
294
- property :count, :numeric_string => true, as: 'count'
295
- property :upper_bound, as: 'upperBound'
296
- end
297
- end
298
-
299
- class Timeseries
300
- # @private
301
- class Representation < Google::Apis::Core::JsonRepresentation
302
- collection :points, as: 'points', class: Google::Apis::CloudmonitoringV2beta2::Point, decorator: Google::Apis::CloudmonitoringV2beta2::Point::Representation
303
-
304
- property :timeseries_desc, as: 'timeseriesDesc', class: Google::Apis::CloudmonitoringV2beta2::TimeseriesDescriptor, decorator: Google::Apis::CloudmonitoringV2beta2::TimeseriesDescriptor::Representation
305
-
306
- end
307
- end
308
-
309
- class TimeseriesDescriptor
310
- # @private
311
- class Representation < Google::Apis::Core::JsonRepresentation
312
- hash :labels, as: 'labels'
313
- property :metric, as: 'metric'
314
- property :project, as: 'project'
315
- end
316
- end
317
-
318
- class TimeseriesDescriptorLabel
319
- # @private
320
- class Representation < Google::Apis::Core::JsonRepresentation
321
- property :key, as: 'key'
322
- property :value, as: 'value'
323
- end
324
- end
325
-
326
- class TimeseriesPoint
327
- # @private
328
- class Representation < Google::Apis::Core::JsonRepresentation
329
- property :point, as: 'point', class: Google::Apis::CloudmonitoringV2beta2::Point, decorator: Google::Apis::CloudmonitoringV2beta2::Point::Representation
330
-
331
- property :timeseries_desc, as: 'timeseriesDesc', class: Google::Apis::CloudmonitoringV2beta2::TimeseriesDescriptor, decorator: Google::Apis::CloudmonitoringV2beta2::TimeseriesDescriptor::Representation
332
-
333
- end
334
- end
335
-
336
- class WriteTimeseriesRequest
337
- # @private
338
- class Representation < Google::Apis::Core::JsonRepresentation
339
- hash :common_labels, as: 'commonLabels'
340
- collection :timeseries, as: 'timeseries', class: Google::Apis::CloudmonitoringV2beta2::TimeseriesPoint, decorator: Google::Apis::CloudmonitoringV2beta2::TimeseriesPoint::Representation
341
-
342
- end
343
- end
344
-
345
- class WriteTimeseriesResponse
346
- # @private
347
- class Representation < Google::Apis::Core::JsonRepresentation
348
- property :kind, as: 'kind'
349
- end
350
- end
351
- end
352
- end
353
- end
@@ -1,453 +0,0 @@
1
- # Copyright 2015 Google Inc.
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
- require 'google/apis/core/base_service'
16
- require 'google/apis/core/json_representation'
17
- require 'google/apis/core/hashable'
18
- require 'google/apis/errors'
19
-
20
- module Google
21
- module Apis
22
- module CloudmonitoringV2beta2
23
- # Cloud Monitoring API
24
- #
25
- # Accesses Google Cloud Monitoring data.
26
- #
27
- # @example
28
- # require 'google/apis/cloudmonitoring_v2beta2'
29
- #
30
- # Cloudmonitoring = Google::Apis::CloudmonitoringV2beta2 # Alias the module
31
- # service = Cloudmonitoring::CloudMonitoringService.new
32
- #
33
- # @see https://cloud.google.com/monitoring/v2beta2/
34
- class CloudMonitoringService < Google::Apis::Core::BaseService
35
- # @return [String]
36
- # API key. Your API key identifies your project and provides you with API access,
37
- # quota, and reports. Required unless you provide an OAuth 2.0 token.
38
- attr_accessor :key
39
-
40
- # @return [String]
41
- # Available to use for quota purposes for server-side applications. Can be any
42
- # arbitrary string assigned to a user, but should not exceed 40 characters.
43
- # Overrides userIp if both are provided.
44
- attr_accessor :quota_user
45
-
46
- # @return [String]
47
- # IP address of the site where the request originates. Use this if you want to
48
- # enforce per-user limits.
49
- attr_accessor :user_ip
50
-
51
- def initialize
52
- super('https://www.googleapis.com/', 'cloudmonitoring/v2beta2/projects/')
53
- @batch_path = 'batch/cloudmonitoring/v2beta2'
54
- end
55
-
56
- # Create a new metric.
57
- # @param [String] project
58
- # The project id. The value can be the numeric project ID or string-based
59
- # project name.
60
- # @param [Google::Apis::CloudmonitoringV2beta2::MetricDescriptor] metric_descriptor_object
61
- # @param [String] fields
62
- # Selector specifying which fields to include in a partial response.
63
- # @param [String] quota_user
64
- # Available to use for quota purposes for server-side applications. Can be any
65
- # arbitrary string assigned to a user, but should not exceed 40 characters.
66
- # Overrides userIp if both are provided.
67
- # @param [String] user_ip
68
- # IP address of the site where the request originates. Use this if you want to
69
- # enforce per-user limits.
70
- # @param [Google::Apis::RequestOptions] options
71
- # Request-specific options
72
- #
73
- # @yield [result, err] Result & error if block supplied
74
- # @yieldparam result [Google::Apis::CloudmonitoringV2beta2::MetricDescriptor] parsed result object
75
- # @yieldparam err [StandardError] error object if request failed
76
- #
77
- # @return [Google::Apis::CloudmonitoringV2beta2::MetricDescriptor]
78
- #
79
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
80
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
81
- # @raise [Google::Apis::AuthorizationError] Authorization is required
82
- def create_metric_descriptor(project, metric_descriptor_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
83
- command = make_simple_command(:post, '{project}/metricDescriptors', options)
84
- command.request_representation = Google::Apis::CloudmonitoringV2beta2::MetricDescriptor::Representation
85
- command.request_object = metric_descriptor_object
86
- command.response_representation = Google::Apis::CloudmonitoringV2beta2::MetricDescriptor::Representation
87
- command.response_class = Google::Apis::CloudmonitoringV2beta2::MetricDescriptor
88
- command.params['project'] = project unless project.nil?
89
- command.query['fields'] = fields unless fields.nil?
90
- command.query['quotaUser'] = quota_user unless quota_user.nil?
91
- command.query['userIp'] = user_ip unless user_ip.nil?
92
- execute_or_queue_command(command, &block)
93
- end
94
-
95
- # Delete an existing metric.
96
- # @param [String] project
97
- # The project ID to which the metric belongs.
98
- # @param [String] metric
99
- # Name of the metric.
100
- # @param [String] fields
101
- # Selector specifying which fields to include in a partial response.
102
- # @param [String] quota_user
103
- # Available to use for quota purposes for server-side applications. Can be any
104
- # arbitrary string assigned to a user, but should not exceed 40 characters.
105
- # Overrides userIp if both are provided.
106
- # @param [String] user_ip
107
- # IP address of the site where the request originates. Use this if you want to
108
- # enforce per-user limits.
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::CloudmonitoringV2beta2::DeleteMetricDescriptorResponse] parsed result object
114
- # @yieldparam err [StandardError] error object if request failed
115
- #
116
- # @return [Google::Apis::CloudmonitoringV2beta2::DeleteMetricDescriptorResponse]
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 delete_metric_descriptor(project, metric, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
122
- command = make_simple_command(:delete, '{project}/metricDescriptors/{metric}', options)
123
- command.response_representation = Google::Apis::CloudmonitoringV2beta2::DeleteMetricDescriptorResponse::Representation
124
- command.response_class = Google::Apis::CloudmonitoringV2beta2::DeleteMetricDescriptorResponse
125
- command.params['project'] = project unless project.nil?
126
- command.params['metric'] = metric unless metric.nil?
127
- command.query['fields'] = fields unless fields.nil?
128
- command.query['quotaUser'] = quota_user unless quota_user.nil?
129
- command.query['userIp'] = user_ip unless user_ip.nil?
130
- execute_or_queue_command(command, &block)
131
- end
132
-
133
- # List metric descriptors that match the query. If the query is not set, then
134
- # all of the metric descriptors will be returned. Large responses will be
135
- # paginated, use the nextPageToken returned in the response to request
136
- # subsequent pages of results by setting the pageToken query parameter to the
137
- # value of the nextPageToken.
138
- # @param [String] project
139
- # The project id. The value can be the numeric project ID or string-based
140
- # project name.
141
- # @param [Google::Apis::CloudmonitoringV2beta2::ListMetricDescriptorsRequest] list_metric_descriptors_request_object
142
- # @param [Fixnum] count
143
- # Maximum number of metric descriptors per page. Used for pagination. If not
144
- # specified, count = 100.
145
- # @param [String] page_token
146
- # The pagination token, which is used to page through large result sets. Set
147
- # this value to the value of the nextPageToken to retrieve the next page of
148
- # results.
149
- # @param [String] query
150
- # The query used to search against existing metrics. Separate keywords with a
151
- # space; the service joins all keywords with AND, meaning that all keywords must
152
- # match for a metric to be returned. If this field is omitted, all metrics are
153
- # returned. If an empty string is passed with this field, no metrics are
154
- # returned.
155
- # @param [String] fields
156
- # Selector specifying which fields to include in a partial response.
157
- # @param [String] quota_user
158
- # Available to use for quota purposes for server-side applications. Can be any
159
- # arbitrary string assigned to a user, but should not exceed 40 characters.
160
- # Overrides userIp if both are provided.
161
- # @param [String] user_ip
162
- # IP address of the site where the request originates. Use this if you want to
163
- # enforce per-user limits.
164
- # @param [Google::Apis::RequestOptions] options
165
- # Request-specific options
166
- #
167
- # @yield [result, err] Result & error if block supplied
168
- # @yieldparam result [Google::Apis::CloudmonitoringV2beta2::ListMetricDescriptorsResponse] parsed result object
169
- # @yieldparam err [StandardError] error object if request failed
170
- #
171
- # @return [Google::Apis::CloudmonitoringV2beta2::ListMetricDescriptorsResponse]
172
- #
173
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
174
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
175
- # @raise [Google::Apis::AuthorizationError] Authorization is required
176
- def list_metric_descriptors(project, list_metric_descriptors_request_object = nil, count: nil, page_token: nil, query: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
177
- command = make_simple_command(:get, '{project}/metricDescriptors', options)
178
- command.request_representation = Google::Apis::CloudmonitoringV2beta2::ListMetricDescriptorsRequest::Representation
179
- command.request_object = list_metric_descriptors_request_object
180
- command.response_representation = Google::Apis::CloudmonitoringV2beta2::ListMetricDescriptorsResponse::Representation
181
- command.response_class = Google::Apis::CloudmonitoringV2beta2::ListMetricDescriptorsResponse
182
- command.params['project'] = project unless project.nil?
183
- command.query['count'] = count unless count.nil?
184
- command.query['pageToken'] = page_token unless page_token.nil?
185
- command.query['query'] = query unless query.nil?
186
- command.query['fields'] = fields unless fields.nil?
187
- command.query['quotaUser'] = quota_user unless quota_user.nil?
188
- command.query['userIp'] = user_ip unless user_ip.nil?
189
- execute_or_queue_command(command, &block)
190
- end
191
-
192
- # List the data points of the time series that match the metric and labels
193
- # values and that have data points in the interval. Large responses are
194
- # paginated; use the nextPageToken returned in the response to request
195
- # subsequent pages of results by setting the pageToken query parameter to the
196
- # value of the nextPageToken.
197
- # @param [String] project
198
- # The project ID to which this time series belongs. The value can be the numeric
199
- # project ID or string-based project name.
200
- # @param [String] metric
201
- # Metric names are protocol-free URLs as listed in the Supported Metrics page.
202
- # For example, compute.googleapis.com/instance/disk/read_ops_count.
203
- # @param [String] youngest
204
- # End of the time interval (inclusive), which is expressed as an RFC 3339
205
- # timestamp.
206
- # @param [Google::Apis::CloudmonitoringV2beta2::ListTimeseriesRequest] list_timeseries_request_object
207
- # @param [String] aggregator
208
- # The aggregation function that will reduce the data points in each window to a
209
- # single point. This parameter is only valid for non-cumulative metrics with a
210
- # value type of INT64 or DOUBLE.
211
- # @param [Fixnum] count
212
- # Maximum number of data points per page, which is used for pagination of
213
- # results.
214
- # @param [Array<String>, String] labels
215
- # A collection of labels for the matching time series, which are represented as:
216
- #
217
- # - key==value: key equals the value
218
- # - key=~value: key regex matches the value
219
- # - key!=value: key does not equal the value
220
- # - key!~value: key regex does not match the value For example, to list all of
221
- # the time series descriptors for the region us-central1, you could specify:
222
- # label=cloud.googleapis.com%2Flocation=~us-central1.*
223
- # @param [String] oldest
224
- # Start of the time interval (exclusive), which is expressed as an RFC 3339
225
- # timestamp. If neither oldest nor timespan is specified, the default time
226
- # interval will be (youngest - 4 hours, youngest]
227
- # @param [String] page_token
228
- # The pagination token, which is used to page through large result sets. Set
229
- # this value to the value of the nextPageToken to retrieve the next page of
230
- # results.
231
- # @param [String] timespan
232
- # Length of the time interval to query, which is an alternative way to declare
233
- # the interval: (youngest - timespan, youngest]. The timespan and oldest
234
- # parameters should not be used together. Units:
235
- # - s: second
236
- # - m: minute
237
- # - h: hour
238
- # - d: day
239
- # - w: week Examples: 2s, 3m, 4w. Only one unit is allowed, for example: 2w3d
240
- # is not allowed; you should use 17d instead.
241
- # If neither oldest nor timespan is specified, the default time interval will be
242
- # (youngest - 4 hours, youngest].
243
- # @param [String] window
244
- # The sampling window. At most one data point will be returned for each window
245
- # in the requested time interval. This parameter is only valid for non-
246
- # cumulative metric types. Units:
247
- # - m: minute
248
- # - h: hour
249
- # - d: day
250
- # - w: week Examples: 3m, 4w. Only one unit is allowed, for example: 2w3d is
251
- # not allowed; you should use 17d instead.
252
- # @param [String] fields
253
- # Selector specifying which fields to include in a partial response.
254
- # @param [String] quota_user
255
- # Available to use for quota purposes for server-side applications. Can be any
256
- # arbitrary string assigned to a user, but should not exceed 40 characters.
257
- # Overrides userIp if both are provided.
258
- # @param [String] user_ip
259
- # IP address of the site where the request originates. Use this if you want to
260
- # enforce per-user limits.
261
- # @param [Google::Apis::RequestOptions] options
262
- # Request-specific options
263
- #
264
- # @yield [result, err] Result & error if block supplied
265
- # @yieldparam result [Google::Apis::CloudmonitoringV2beta2::ListTimeseriesResponse] parsed result object
266
- # @yieldparam err [StandardError] error object if request failed
267
- #
268
- # @return [Google::Apis::CloudmonitoringV2beta2::ListTimeseriesResponse]
269
- #
270
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
271
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
272
- # @raise [Google::Apis::AuthorizationError] Authorization is required
273
- def list_timeseries(project, metric, youngest, list_timeseries_request_object = nil, aggregator: nil, count: nil, labels: nil, oldest: nil, page_token: nil, timespan: nil, window: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
274
- command = make_simple_command(:get, '{project}/timeseries/{metric}', options)
275
- command.request_representation = Google::Apis::CloudmonitoringV2beta2::ListTimeseriesRequest::Representation
276
- command.request_object = list_timeseries_request_object
277
- command.response_representation = Google::Apis::CloudmonitoringV2beta2::ListTimeseriesResponse::Representation
278
- command.response_class = Google::Apis::CloudmonitoringV2beta2::ListTimeseriesResponse
279
- command.params['project'] = project unless project.nil?
280
- command.params['metric'] = metric unless metric.nil?
281
- command.query['aggregator'] = aggregator unless aggregator.nil?
282
- command.query['count'] = count unless count.nil?
283
- command.query['labels'] = labels unless labels.nil?
284
- command.query['oldest'] = oldest unless oldest.nil?
285
- command.query['pageToken'] = page_token unless page_token.nil?
286
- command.query['timespan'] = timespan unless timespan.nil?
287
- command.query['window'] = window unless window.nil?
288
- command.query['youngest'] = youngest unless youngest.nil?
289
- command.query['fields'] = fields unless fields.nil?
290
- command.query['quotaUser'] = quota_user unless quota_user.nil?
291
- command.query['userIp'] = user_ip unless user_ip.nil?
292
- execute_or_queue_command(command, &block)
293
- end
294
-
295
- # Put data points to one or more time series for one or more metrics. If a time
296
- # series does not exist, a new time series will be created. It is not allowed to
297
- # write a time series point that is older than the existing youngest point of
298
- # that time series. Points that are older than the existing youngest point of
299
- # that time series will be discarded silently. Therefore, users should make sure
300
- # that points of a time series are written sequentially in the order of their
301
- # end time.
302
- # @param [String] project
303
- # The project ID. The value can be the numeric project ID or string-based
304
- # project name.
305
- # @param [Google::Apis::CloudmonitoringV2beta2::WriteTimeseriesRequest] write_timeseries_request_object
306
- # @param [String] fields
307
- # Selector specifying which fields to include in a partial response.
308
- # @param [String] quota_user
309
- # Available to use for quota purposes for server-side applications. Can be any
310
- # arbitrary string assigned to a user, but should not exceed 40 characters.
311
- # Overrides userIp if both are provided.
312
- # @param [String] user_ip
313
- # IP address of the site where the request originates. Use this if you want to
314
- # enforce per-user limits.
315
- # @param [Google::Apis::RequestOptions] options
316
- # Request-specific options
317
- #
318
- # @yield [result, err] Result & error if block supplied
319
- # @yieldparam result [Google::Apis::CloudmonitoringV2beta2::WriteTimeseriesResponse] parsed result object
320
- # @yieldparam err [StandardError] error object if request failed
321
- #
322
- # @return [Google::Apis::CloudmonitoringV2beta2::WriteTimeseriesResponse]
323
- #
324
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
325
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
326
- # @raise [Google::Apis::AuthorizationError] Authorization is required
327
- def write_timeseries(project, write_timeseries_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
328
- command = make_simple_command(:post, '{project}/timeseries:write', options)
329
- command.request_representation = Google::Apis::CloudmonitoringV2beta2::WriteTimeseriesRequest::Representation
330
- command.request_object = write_timeseries_request_object
331
- command.response_representation = Google::Apis::CloudmonitoringV2beta2::WriteTimeseriesResponse::Representation
332
- command.response_class = Google::Apis::CloudmonitoringV2beta2::WriteTimeseriesResponse
333
- command.params['project'] = project unless project.nil?
334
- command.query['fields'] = fields unless fields.nil?
335
- command.query['quotaUser'] = quota_user unless quota_user.nil?
336
- command.query['userIp'] = user_ip unless user_ip.nil?
337
- execute_or_queue_command(command, &block)
338
- end
339
-
340
- # List the descriptors of the time series that match the metric and labels
341
- # values and that have data points in the interval. Large responses are
342
- # paginated; use the nextPageToken returned in the response to request
343
- # subsequent pages of results by setting the pageToken query parameter to the
344
- # value of the nextPageToken.
345
- # @param [String] project
346
- # The project ID to which this time series belongs. The value can be the numeric
347
- # project ID or string-based project name.
348
- # @param [String] metric
349
- # Metric names are protocol-free URLs as listed in the Supported Metrics page.
350
- # For example, compute.googleapis.com/instance/disk/read_ops_count.
351
- # @param [String] youngest
352
- # End of the time interval (inclusive), which is expressed as an RFC 3339
353
- # timestamp.
354
- # @param [Google::Apis::CloudmonitoringV2beta2::ListTimeseriesDescriptorsRequest] list_timeseries_descriptors_request_object
355
- # @param [String] aggregator
356
- # The aggregation function that will reduce the data points in each window to a
357
- # single point. This parameter is only valid for non-cumulative metrics with a
358
- # value type of INT64 or DOUBLE.
359
- # @param [Fixnum] count
360
- # Maximum number of time series descriptors per page. Used for pagination. If
361
- # not specified, count = 100.
362
- # @param [Array<String>, String] labels
363
- # A collection of labels for the matching time series, which are represented as:
364
- #
365
- # - key==value: key equals the value
366
- # - key=~value: key regex matches the value
367
- # - key!=value: key does not equal the value
368
- # - key!~value: key regex does not match the value For example, to list all of
369
- # the time series descriptors for the region us-central1, you could specify:
370
- # label=cloud.googleapis.com%2Flocation=~us-central1.*
371
- # @param [String] oldest
372
- # Start of the time interval (exclusive), which is expressed as an RFC 3339
373
- # timestamp. If neither oldest nor timespan is specified, the default time
374
- # interval will be (youngest - 4 hours, youngest]
375
- # @param [String] page_token
376
- # The pagination token, which is used to page through large result sets. Set
377
- # this value to the value of the nextPageToken to retrieve the next page of
378
- # results.
379
- # @param [String] timespan
380
- # Length of the time interval to query, which is an alternative way to declare
381
- # the interval: (youngest - timespan, youngest]. The timespan and oldest
382
- # parameters should not be used together. Units:
383
- # - s: second
384
- # - m: minute
385
- # - h: hour
386
- # - d: day
387
- # - w: week Examples: 2s, 3m, 4w. Only one unit is allowed, for example: 2w3d
388
- # is not allowed; you should use 17d instead.
389
- # If neither oldest nor timespan is specified, the default time interval will be
390
- # (youngest - 4 hours, youngest].
391
- # @param [String] window
392
- # The sampling window. At most one data point will be returned for each window
393
- # in the requested time interval. This parameter is only valid for non-
394
- # cumulative metric types. Units:
395
- # - m: minute
396
- # - h: hour
397
- # - d: day
398
- # - w: week Examples: 3m, 4w. Only one unit is allowed, for example: 2w3d is
399
- # not allowed; you should use 17d instead.
400
- # @param [String] fields
401
- # Selector specifying which fields to include in a partial response.
402
- # @param [String] quota_user
403
- # Available to use for quota purposes for server-side applications. Can be any
404
- # arbitrary string assigned to a user, but should not exceed 40 characters.
405
- # Overrides userIp if both are provided.
406
- # @param [String] user_ip
407
- # IP address of the site where the request originates. Use this if you want to
408
- # enforce per-user limits.
409
- # @param [Google::Apis::RequestOptions] options
410
- # Request-specific options
411
- #
412
- # @yield [result, err] Result & error if block supplied
413
- # @yieldparam result [Google::Apis::CloudmonitoringV2beta2::ListTimeseriesDescriptorsResponse] parsed result object
414
- # @yieldparam err [StandardError] error object if request failed
415
- #
416
- # @return [Google::Apis::CloudmonitoringV2beta2::ListTimeseriesDescriptorsResponse]
417
- #
418
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
419
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
420
- # @raise [Google::Apis::AuthorizationError] Authorization is required
421
- def list_timeseries_descriptors(project, metric, youngest, list_timeseries_descriptors_request_object = nil, aggregator: nil, count: nil, labels: nil, oldest: nil, page_token: nil, timespan: nil, window: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
422
- command = make_simple_command(:get, '{project}/timeseriesDescriptors/{metric}', options)
423
- command.request_representation = Google::Apis::CloudmonitoringV2beta2::ListTimeseriesDescriptorsRequest::Representation
424
- command.request_object = list_timeseries_descriptors_request_object
425
- command.response_representation = Google::Apis::CloudmonitoringV2beta2::ListTimeseriesDescriptorsResponse::Representation
426
- command.response_class = Google::Apis::CloudmonitoringV2beta2::ListTimeseriesDescriptorsResponse
427
- command.params['project'] = project unless project.nil?
428
- command.params['metric'] = metric unless metric.nil?
429
- command.query['aggregator'] = aggregator unless aggregator.nil?
430
- command.query['count'] = count unless count.nil?
431
- command.query['labels'] = labels unless labels.nil?
432
- command.query['oldest'] = oldest unless oldest.nil?
433
- command.query['pageToken'] = page_token unless page_token.nil?
434
- command.query['timespan'] = timespan unless timespan.nil?
435
- command.query['window'] = window unless window.nil?
436
- command.query['youngest'] = youngest unless youngest.nil?
437
- command.query['fields'] = fields unless fields.nil?
438
- command.query['quotaUser'] = quota_user unless quota_user.nil?
439
- command.query['userIp'] = user_ip unless user_ip.nil?
440
- execute_or_queue_command(command, &block)
441
- end
442
-
443
- protected
444
-
445
- def apply_command_defaults(command)
446
- command.query['key'] = key unless key.nil?
447
- command.query['quotaUser'] = quota_user unless quota_user.nil?
448
- command.query['userIp'] = user_ip unless user_ip.nil?
449
- end
450
- end
451
- end
452
- end
453
- end