smplkit 2.0.11 → 2.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/smplkit/_generated/logging/lib/smplkit_logging_client/api/log_groups_api.rb +28 -28
- data/lib/smplkit/_generated/logging/lib/smplkit_logging_client/api/logger_sources_api.rb +4 -4
- data/lib/smplkit/_generated/logging/lib/smplkit_logging_client/api/loggers_api.rb +19 -19
- data/lib/smplkit/_generated/logging/lib/smplkit_logging_client/api/services_api.rb +2 -2
- data/lib/smplkit/_generated/logging/lib/smplkit_logging_client/api/usage_api.rb +2 -2
- data/lib/smplkit/_generated/logging/lib/smplkit_logging_client/models/log_group.rb +36 -10
- data/lib/smplkit/_generated/logging/lib/smplkit_logging_client/models/log_group_list_response.rb +1 -0
- data/lib/smplkit/_generated/logging/lib/smplkit_logging_client/models/log_group_request.rb +165 -0
- data/lib/smplkit/_generated/logging/lib/smplkit_logging_client/models/log_group_resource.rb +1 -0
- data/lib/smplkit/_generated/logging/lib/smplkit_logging_client/models/log_group_response.rb +1 -0
- data/lib/smplkit/_generated/logging/lib/smplkit_logging_client/models/logger.rb +39 -10
- data/lib/smplkit/_generated/logging/lib/smplkit_logging_client/models/logger_bulk_item.rb +6 -5
- data/lib/smplkit/_generated/logging/lib/smplkit_logging_client/models/logger_bulk_request.rb +2 -0
- data/lib/smplkit/_generated/logging/lib/smplkit_logging_client/models/logger_bulk_response.rb +2 -0
- data/lib/smplkit/_generated/logging/lib/smplkit_logging_client/models/logger_list_response.rb +1 -0
- data/lib/smplkit/_generated/logging/lib/smplkit_logging_client/models/logger_request.rb +165 -0
- data/lib/smplkit/_generated/logging/lib/smplkit_logging_client/models/logger_resource.rb +1 -0
- data/lib/smplkit/_generated/logging/lib/smplkit_logging_client/models/logger_response.rb +1 -0
- data/lib/smplkit/_generated/logging/lib/smplkit_logging_client/models/logger_source.rb +9 -0
- data/lib/smplkit/_generated/logging/lib/smplkit_logging_client/models/logger_source_list_response.rb +1 -0
- data/lib/smplkit/_generated/logging/lib/smplkit_logging_client/models/logger_source_resource.rb +1 -0
- data/lib/smplkit/_generated/logging/lib/smplkit_logging_client/models/service_list_response.rb +1 -0
- data/lib/smplkit/_generated/logging/lib/smplkit_logging_client/models/service_resource.rb +2 -0
- data/lib/smplkit/_generated/logging/lib/smplkit_logging_client/models/usage_attributes.rb +4 -0
- data/lib/smplkit/_generated/logging/lib/smplkit_logging_client/models/usage_list_response.rb +1 -0
- data/lib/smplkit/_generated/logging/lib/smplkit_logging_client/models/usage_resource.rb +1 -0
- data/lib/smplkit/_generated/logging/lib/smplkit_logging_client.rb +2 -0
- data/lib/smplkit/_generated/logging/spec/api/log_groups_api_spec.rb +7 -7
- data/lib/smplkit/_generated/logging/spec/api/logger_sources_api_spec.rb +2 -2
- data/lib/smplkit/_generated/logging/spec/api/loggers_api_spec.rb +6 -6
- data/lib/smplkit/_generated/logging/spec/api/services_api_spec.rb +1 -1
- data/lib/smplkit/_generated/logging/spec/api/usage_api_spec.rb +1 -1
- data/lib/smplkit/_generated/logging/spec/models/log_group_request_spec.rb +36 -0
- data/lib/smplkit/_generated/logging/spec/models/log_group_spec.rb +4 -0
- data/lib/smplkit/_generated/logging/spec/models/logger_request_spec.rb +36 -0
- data/lib/smplkit/_generated/logging/spec/models/logger_spec.rb +4 -0
- metadata +5 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9bc05d3192320fd1b2c4abee57b805383aa0dffb8b7d2a0a61c479ac18763d85
|
|
4
|
+
data.tar.gz: b9d40fb705d46129a8f4cf32350c3d82c2f6fdc430c20d36be1ca030e3130e0f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 04d4ca3bd2849d284179c60406c76f725d8056b2434da699c87625d95f9fc80e5b24bf4810a60977a3296b1483e56010851fc3648047ec7ae975536b3eab38a8
|
|
7
|
+
data.tar.gz: 637480b2da969e94dc1f87260539b546253a908499369b3f1f16685f1adabaa3d22c8d3e95d53d453a0adbb99947d4146e3e2506dda790229b5d3b9f2a5bf3fe
|
|
@@ -20,27 +20,27 @@ module SmplkitGeneratedClient::Logging
|
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
22
|
# Create Log Group
|
|
23
|
-
# Create a
|
|
24
|
-
# @param
|
|
23
|
+
# Create a log group. The caller may supply a key in `data.id`; if omitted, the server generates one from `name`.
|
|
24
|
+
# @param log_group_request [LogGroupRequest]
|
|
25
25
|
# @param [Hash] opts the optional parameters
|
|
26
26
|
# @return [LogGroupResponse]
|
|
27
|
-
def create_log_group(
|
|
28
|
-
data, _status_code, _headers = create_log_group_with_http_info(
|
|
27
|
+
def create_log_group(log_group_request, opts = {})
|
|
28
|
+
data, _status_code, _headers = create_log_group_with_http_info(log_group_request, opts)
|
|
29
29
|
data
|
|
30
30
|
end
|
|
31
31
|
|
|
32
32
|
# Create Log Group
|
|
33
|
-
# Create a
|
|
34
|
-
# @param
|
|
33
|
+
# Create a log group. The caller may supply a key in `data.id`; if omitted, the server generates one from `name`.
|
|
34
|
+
# @param log_group_request [LogGroupRequest]
|
|
35
35
|
# @param [Hash] opts the optional parameters
|
|
36
36
|
# @return [Array<(LogGroupResponse, Integer, Hash)>] LogGroupResponse data, response status code and response headers
|
|
37
|
-
def create_log_group_with_http_info(
|
|
37
|
+
def create_log_group_with_http_info(log_group_request, opts = {})
|
|
38
38
|
if @api_client.config.debugging
|
|
39
39
|
@api_client.config.logger.debug 'Calling API: LogGroupsApi.create_log_group ...'
|
|
40
40
|
end
|
|
41
|
-
# verify the required parameter '
|
|
42
|
-
if @api_client.config.client_side_validation &&
|
|
43
|
-
fail ArgumentError, "Missing the required parameter '
|
|
41
|
+
# verify the required parameter 'log_group_request' is set
|
|
42
|
+
if @api_client.config.client_side_validation && log_group_request.nil?
|
|
43
|
+
fail ArgumentError, "Missing the required parameter 'log_group_request' when calling LogGroupsApi.create_log_group"
|
|
44
44
|
end
|
|
45
45
|
# resource path
|
|
46
46
|
local_var_path = '/api/v1/log_groups'
|
|
@@ -62,7 +62,7 @@ module SmplkitGeneratedClient::Logging
|
|
|
62
62
|
form_params = opts[:form_params] || {}
|
|
63
63
|
|
|
64
64
|
# http body (model)
|
|
65
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
|
65
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(log_group_request)
|
|
66
66
|
|
|
67
67
|
# return_type
|
|
68
68
|
return_type = opts[:debug_return_type] || 'LogGroupResponse'
|
|
@@ -88,7 +88,7 @@ module SmplkitGeneratedClient::Logging
|
|
|
88
88
|
end
|
|
89
89
|
|
|
90
90
|
# Delete Log Group
|
|
91
|
-
# Delete a log group
|
|
91
|
+
# Delete a log group. Loggers that referenced this group are detached; they remain in the account with no group assignment.
|
|
92
92
|
# @param id [String]
|
|
93
93
|
# @param [Hash] opts the optional parameters
|
|
94
94
|
# @return [nil]
|
|
@@ -98,7 +98,7 @@ module SmplkitGeneratedClient::Logging
|
|
|
98
98
|
end
|
|
99
99
|
|
|
100
100
|
# Delete Log Group
|
|
101
|
-
# Delete a log group
|
|
101
|
+
# Delete a log group. Loggers that referenced this group are detached; they remain in the account with no group assignment.
|
|
102
102
|
# @param id [String]
|
|
103
103
|
# @param [Hash] opts the optional parameters
|
|
104
104
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
@@ -151,7 +151,7 @@ module SmplkitGeneratedClient::Logging
|
|
|
151
151
|
end
|
|
152
152
|
|
|
153
153
|
# Get Log Group
|
|
154
|
-
#
|
|
154
|
+
# Retrieve a log group by its key.
|
|
155
155
|
# @param id [String]
|
|
156
156
|
# @param [Hash] opts the optional parameters
|
|
157
157
|
# @return [LogGroupResponse]
|
|
@@ -161,7 +161,7 @@ module SmplkitGeneratedClient::Logging
|
|
|
161
161
|
end
|
|
162
162
|
|
|
163
163
|
# Get Log Group
|
|
164
|
-
#
|
|
164
|
+
# Retrieve a log group by its key.
|
|
165
165
|
# @param id [String]
|
|
166
166
|
# @param [Hash] opts the optional parameters
|
|
167
167
|
# @return [Array<(LogGroupResponse, Integer, Hash)>] LogGroupResponse data, response status code and response headers
|
|
@@ -214,7 +214,7 @@ module SmplkitGeneratedClient::Logging
|
|
|
214
214
|
end
|
|
215
215
|
|
|
216
216
|
# List Log Groups
|
|
217
|
-
# List
|
|
217
|
+
# List log groups for this account.
|
|
218
218
|
# @param [Hash] opts the optional parameters
|
|
219
219
|
# @return [LogGroupListResponse]
|
|
220
220
|
def list_log_groups(opts = {})
|
|
@@ -223,7 +223,7 @@ module SmplkitGeneratedClient::Logging
|
|
|
223
223
|
end
|
|
224
224
|
|
|
225
225
|
# List Log Groups
|
|
226
|
-
# List
|
|
226
|
+
# List log groups for this account.
|
|
227
227
|
# @param [Hash] opts the optional parameters
|
|
228
228
|
# @return [Array<(LogGroupListResponse, Integer, Hash)>] LogGroupListResponse data, response status code and response headers
|
|
229
229
|
def list_log_groups_with_http_info(opts = {})
|
|
@@ -271,23 +271,23 @@ module SmplkitGeneratedClient::Logging
|
|
|
271
271
|
end
|
|
272
272
|
|
|
273
273
|
# Update Log Group
|
|
274
|
-
# Replace a log group
|
|
274
|
+
# Replace a log group. Every writable field is overwritten.
|
|
275
275
|
# @param id [String]
|
|
276
|
-
# @param
|
|
276
|
+
# @param log_group_request [LogGroupRequest]
|
|
277
277
|
# @param [Hash] opts the optional parameters
|
|
278
278
|
# @return [LogGroupResponse]
|
|
279
|
-
def update_log_group(id,
|
|
280
|
-
data, _status_code, _headers = update_log_group_with_http_info(id,
|
|
279
|
+
def update_log_group(id, log_group_request, opts = {})
|
|
280
|
+
data, _status_code, _headers = update_log_group_with_http_info(id, log_group_request, opts)
|
|
281
281
|
data
|
|
282
282
|
end
|
|
283
283
|
|
|
284
284
|
# Update Log Group
|
|
285
|
-
# Replace a log group
|
|
285
|
+
# Replace a log group. Every writable field is overwritten.
|
|
286
286
|
# @param id [String]
|
|
287
|
-
# @param
|
|
287
|
+
# @param log_group_request [LogGroupRequest]
|
|
288
288
|
# @param [Hash] opts the optional parameters
|
|
289
289
|
# @return [Array<(LogGroupResponse, Integer, Hash)>] LogGroupResponse data, response status code and response headers
|
|
290
|
-
def update_log_group_with_http_info(id,
|
|
290
|
+
def update_log_group_with_http_info(id, log_group_request, opts = {})
|
|
291
291
|
if @api_client.config.debugging
|
|
292
292
|
@api_client.config.logger.debug 'Calling API: LogGroupsApi.update_log_group ...'
|
|
293
293
|
end
|
|
@@ -295,9 +295,9 @@ module SmplkitGeneratedClient::Logging
|
|
|
295
295
|
if @api_client.config.client_side_validation && id.nil?
|
|
296
296
|
fail ArgumentError, "Missing the required parameter 'id' when calling LogGroupsApi.update_log_group"
|
|
297
297
|
end
|
|
298
|
-
# verify the required parameter '
|
|
299
|
-
if @api_client.config.client_side_validation &&
|
|
300
|
-
fail ArgumentError, "Missing the required parameter '
|
|
298
|
+
# verify the required parameter 'log_group_request' is set
|
|
299
|
+
if @api_client.config.client_side_validation && log_group_request.nil?
|
|
300
|
+
fail ArgumentError, "Missing the required parameter 'log_group_request' when calling LogGroupsApi.update_log_group"
|
|
301
301
|
end
|
|
302
302
|
# resource path
|
|
303
303
|
local_var_path = '/api/v1/log_groups/{id}'.sub('{id}', CGI.escape(id.to_s))
|
|
@@ -319,7 +319,7 @@ module SmplkitGeneratedClient::Logging
|
|
|
319
319
|
form_params = opts[:form_params] || {}
|
|
320
320
|
|
|
321
321
|
# http body (model)
|
|
322
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
|
322
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(log_group_request)
|
|
323
323
|
|
|
324
324
|
# return_type
|
|
325
325
|
return_type = opts[:debug_return_type] || 'LogGroupResponse'
|
|
@@ -20,7 +20,7 @@ module SmplkitGeneratedClient::Logging
|
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
22
|
# List All Logger Sources
|
|
23
|
-
# List
|
|
23
|
+
# List every logger source observation for this account. Supports `filter[environment]` and `filter[service]` to narrow to a specific environment or service.
|
|
24
24
|
# @param [Hash] opts the optional parameters
|
|
25
25
|
# @option opts [String] :filter_environment
|
|
26
26
|
# @option opts [String] :filter_service
|
|
@@ -31,7 +31,7 @@ module SmplkitGeneratedClient::Logging
|
|
|
31
31
|
end
|
|
32
32
|
|
|
33
33
|
# List All Logger Sources
|
|
34
|
-
# List
|
|
34
|
+
# List every logger source observation for this account. Supports `filter[environment]` and `filter[service]` to narrow to a specific environment or service.
|
|
35
35
|
# @param [Hash] opts the optional parameters
|
|
36
36
|
# @option opts [String] :filter_environment
|
|
37
37
|
# @option opts [String] :filter_service
|
|
@@ -83,7 +83,7 @@ module SmplkitGeneratedClient::Logging
|
|
|
83
83
|
end
|
|
84
84
|
|
|
85
85
|
# List Logger Sources
|
|
86
|
-
# List
|
|
86
|
+
# List the service / environment observations recorded for a logger.
|
|
87
87
|
# @param id [String]
|
|
88
88
|
# @param [Hash] opts the optional parameters
|
|
89
89
|
# @return [LoggerSourceListResponse]
|
|
@@ -93,7 +93,7 @@ module SmplkitGeneratedClient::Logging
|
|
|
93
93
|
end
|
|
94
94
|
|
|
95
95
|
# List Logger Sources
|
|
96
|
-
# List
|
|
96
|
+
# List the service / environment observations recorded for a logger.
|
|
97
97
|
# @param id [String]
|
|
98
98
|
# @param [Hash] opts the optional parameters
|
|
99
99
|
# @return [Array<(LoggerSourceListResponse, Integer, Hash)>] LoggerSourceListResponse data, response status code and response headers
|
|
@@ -20,7 +20,7 @@ module SmplkitGeneratedClient::Logging
|
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
22
|
# Bulk Register Loggers
|
|
23
|
-
# Register loggers discovered by an SDK.
|
|
23
|
+
# Register loggers discovered by an SDK. Creates new logger entries for previously unseen keys and refreshes the per-(service, environment) observation for keys already known. Returns the number of items processed.
|
|
24
24
|
# @param logger_bulk_request [LoggerBulkRequest]
|
|
25
25
|
# @param [Hash] opts the optional parameters
|
|
26
26
|
# @return [LoggerBulkResponse]
|
|
@@ -30,7 +30,7 @@ module SmplkitGeneratedClient::Logging
|
|
|
30
30
|
end
|
|
31
31
|
|
|
32
32
|
# Bulk Register Loggers
|
|
33
|
-
# Register loggers discovered by an SDK.
|
|
33
|
+
# Register loggers discovered by an SDK. Creates new logger entries for previously unseen keys and refreshes the per-(service, environment) observation for keys already known. Returns the number of items processed.
|
|
34
34
|
# @param logger_bulk_request [LoggerBulkRequest]
|
|
35
35
|
# @param [Hash] opts the optional parameters
|
|
36
36
|
# @return [Array<(LoggerBulkResponse, Integer, Hash)>] LoggerBulkResponse data, response status code and response headers
|
|
@@ -88,7 +88,7 @@ module SmplkitGeneratedClient::Logging
|
|
|
88
88
|
end
|
|
89
89
|
|
|
90
90
|
# Delete Logger
|
|
91
|
-
# Delete a logger
|
|
91
|
+
# Delete a logger.
|
|
92
92
|
# @param id [String]
|
|
93
93
|
# @param [Hash] opts the optional parameters
|
|
94
94
|
# @return [nil]
|
|
@@ -98,7 +98,7 @@ module SmplkitGeneratedClient::Logging
|
|
|
98
98
|
end
|
|
99
99
|
|
|
100
100
|
# Delete Logger
|
|
101
|
-
# Delete a logger
|
|
101
|
+
# Delete a logger.
|
|
102
102
|
# @param id [String]
|
|
103
103
|
# @param [Hash] opts the optional parameters
|
|
104
104
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
@@ -151,7 +151,7 @@ module SmplkitGeneratedClient::Logging
|
|
|
151
151
|
end
|
|
152
152
|
|
|
153
153
|
# Get Logger
|
|
154
|
-
#
|
|
154
|
+
# Retrieve a logger by its key.
|
|
155
155
|
# @param id [String]
|
|
156
156
|
# @param [Hash] opts the optional parameters
|
|
157
157
|
# @return [LoggerResponse]
|
|
@@ -161,7 +161,7 @@ module SmplkitGeneratedClient::Logging
|
|
|
161
161
|
end
|
|
162
162
|
|
|
163
163
|
# Get Logger
|
|
164
|
-
#
|
|
164
|
+
# Retrieve a logger by its key.
|
|
165
165
|
# @param id [String]
|
|
166
166
|
# @param [Hash] opts the optional parameters
|
|
167
167
|
# @return [Array<(LoggerResponse, Integer, Hash)>] LoggerResponse data, response status code and response headers
|
|
@@ -214,7 +214,7 @@ module SmplkitGeneratedClient::Logging
|
|
|
214
214
|
end
|
|
215
215
|
|
|
216
216
|
# List Loggers
|
|
217
|
-
# List
|
|
217
|
+
# List loggers for this account. Supports `filter[managed]` to narrow to managed (or unmanaged) loggers, `filter[service]` to keep only loggers observed in a specific service, and `filter[last_seen]` (interval notation `[<from>,*)`) to keep only loggers with a source observation at or after the given timestamp.
|
|
218
218
|
# @param [Hash] opts the optional parameters
|
|
219
219
|
# @option opts [Boolean] :filter_managed
|
|
220
220
|
# @option opts [String] :filter_service
|
|
@@ -226,7 +226,7 @@ module SmplkitGeneratedClient::Logging
|
|
|
226
226
|
end
|
|
227
227
|
|
|
228
228
|
# List Loggers
|
|
229
|
-
# List
|
|
229
|
+
# List loggers for this account. Supports `filter[managed]` to narrow to managed (or unmanaged) loggers, `filter[service]` to keep only loggers observed in a specific service, and `filter[last_seen]` (interval notation `[<from>,*)`) to keep only loggers with a source observation at or after the given timestamp.
|
|
230
230
|
# @param [Hash] opts the optional parameters
|
|
231
231
|
# @option opts [Boolean] :filter_managed
|
|
232
232
|
# @option opts [String] :filter_service
|
|
@@ -280,23 +280,23 @@ module SmplkitGeneratedClient::Logging
|
|
|
280
280
|
end
|
|
281
281
|
|
|
282
282
|
# Update or Create Logger
|
|
283
|
-
# Create or
|
|
283
|
+
# Create or replace a logger at the given key. If the logger does not yet exist, it is created. Fields omitted from the request body are preserved; explicit `null` clears them. Setting `level`, `group`, or `environments` on an unmanaged logger promotes it to managed automatically.
|
|
284
284
|
# @param id [String]
|
|
285
|
-
# @param
|
|
285
|
+
# @param logger_request [LoggerRequest]
|
|
286
286
|
# @param [Hash] opts the optional parameters
|
|
287
287
|
# @return [LoggerResponse]
|
|
288
|
-
def update_logger(id,
|
|
289
|
-
data, _status_code, _headers = update_logger_with_http_info(id,
|
|
288
|
+
def update_logger(id, logger_request, opts = {})
|
|
289
|
+
data, _status_code, _headers = update_logger_with_http_info(id, logger_request, opts)
|
|
290
290
|
data
|
|
291
291
|
end
|
|
292
292
|
|
|
293
293
|
# Update or Create Logger
|
|
294
|
-
# Create or
|
|
294
|
+
# Create or replace a logger at the given key. If the logger does not yet exist, it is created. Fields omitted from the request body are preserved; explicit `null` clears them. Setting `level`, `group`, or `environments` on an unmanaged logger promotes it to managed automatically.
|
|
295
295
|
# @param id [String]
|
|
296
|
-
# @param
|
|
296
|
+
# @param logger_request [LoggerRequest]
|
|
297
297
|
# @param [Hash] opts the optional parameters
|
|
298
298
|
# @return [Array<(LoggerResponse, Integer, Hash)>] LoggerResponse data, response status code and response headers
|
|
299
|
-
def update_logger_with_http_info(id,
|
|
299
|
+
def update_logger_with_http_info(id, logger_request, opts = {})
|
|
300
300
|
if @api_client.config.debugging
|
|
301
301
|
@api_client.config.logger.debug 'Calling API: LoggersApi.update_logger ...'
|
|
302
302
|
end
|
|
@@ -304,9 +304,9 @@ module SmplkitGeneratedClient::Logging
|
|
|
304
304
|
if @api_client.config.client_side_validation && id.nil?
|
|
305
305
|
fail ArgumentError, "Missing the required parameter 'id' when calling LoggersApi.update_logger"
|
|
306
306
|
end
|
|
307
|
-
# verify the required parameter '
|
|
308
|
-
if @api_client.config.client_side_validation &&
|
|
309
|
-
fail ArgumentError, "Missing the required parameter '
|
|
307
|
+
# verify the required parameter 'logger_request' is set
|
|
308
|
+
if @api_client.config.client_side_validation && logger_request.nil?
|
|
309
|
+
fail ArgumentError, "Missing the required parameter 'logger_request' when calling LoggersApi.update_logger"
|
|
310
310
|
end
|
|
311
311
|
# resource path
|
|
312
312
|
local_var_path = '/api/v1/loggers/{id}'.sub('{id}', CGI.escape(id.to_s))
|
|
@@ -328,7 +328,7 @@ module SmplkitGeneratedClient::Logging
|
|
|
328
328
|
form_params = opts[:form_params] || {}
|
|
329
329
|
|
|
330
330
|
# http body (model)
|
|
331
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
|
331
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(logger_request)
|
|
332
332
|
|
|
333
333
|
# return_type
|
|
334
334
|
return_type = opts[:debug_return_type] || 'LoggerResponse'
|
|
@@ -20,7 +20,7 @@ module SmplkitGeneratedClient::Logging
|
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
22
|
# List Services
|
|
23
|
-
#
|
|
23
|
+
# List the services that have reported a logger for this account.
|
|
24
24
|
# @param [Hash] opts the optional parameters
|
|
25
25
|
# @return [ServiceListResponse]
|
|
26
26
|
def list_services(opts = {})
|
|
@@ -29,7 +29,7 @@ module SmplkitGeneratedClient::Logging
|
|
|
29
29
|
end
|
|
30
30
|
|
|
31
31
|
# List Services
|
|
32
|
-
#
|
|
32
|
+
# List the services that have reported a logger for this account.
|
|
33
33
|
# @param [Hash] opts the optional parameters
|
|
34
34
|
# @return [Array<(ServiceListResponse, Integer, Hash)>] ServiceListResponse data, response status code and response headers
|
|
35
35
|
def list_services_with_http_info(opts = {})
|
|
@@ -20,7 +20,7 @@ module SmplkitGeneratedClient::Logging
|
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
22
|
# List Logging Usage
|
|
23
|
-
#
|
|
23
|
+
# Report the current-period usage counters for this account.
|
|
24
24
|
# @param [Hash] opts the optional parameters
|
|
25
25
|
# @option opts [String] :filter_period
|
|
26
26
|
# @return [UsageListResponse]
|
|
@@ -30,7 +30,7 @@ module SmplkitGeneratedClient::Logging
|
|
|
30
30
|
end
|
|
31
31
|
|
|
32
32
|
# List Logging Usage
|
|
33
|
-
#
|
|
33
|
+
# Report the current-period usage counters for this account.
|
|
34
34
|
# @param [Hash] opts the optional parameters
|
|
35
35
|
# @option opts [String] :filter_period
|
|
36
36
|
# @return [Array<(UsageListResponse, Integer, Hash)>] UsageListResponse data, response status code and response headers
|
|
@@ -14,19 +14,48 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module SmplkitGeneratedClient::Logging
|
|
17
|
+
# A named collection of loggers that share a level configuration. Assigning a logger to a group ties the logger's effective level to the group's level (and per-environment overrides). Loggers can move between groups or be detached from a group entirely.
|
|
17
18
|
class LogGroup < ApiModelBase
|
|
19
|
+
# Human-readable label for the group.
|
|
18
20
|
attr_accessor :name
|
|
19
21
|
|
|
22
|
+
# Default level applied to every logger in the group. `null` leaves member loggers to inherit from elsewhere.
|
|
20
23
|
attr_accessor :level
|
|
21
24
|
|
|
25
|
+
# Reserved for nested groups. Must be `null` in this version; nested groups are not yet supported.
|
|
22
26
|
attr_accessor :parent_id
|
|
23
27
|
|
|
28
|
+
# Per-environment level overrides keyed by environment name. Each value is an object with an optional `level` field, e.g. `{\"production\": {\"level\": \"ERROR\"}}`. Member loggers inherit the per-environment level unless they set their own override.
|
|
24
29
|
attr_accessor :environments
|
|
25
30
|
|
|
31
|
+
# When the group was created.
|
|
26
32
|
attr_accessor :created_at
|
|
27
33
|
|
|
34
|
+
# When the group was last modified.
|
|
28
35
|
attr_accessor :updated_at
|
|
29
36
|
|
|
37
|
+
class EnumAttributeValidator
|
|
38
|
+
attr_reader :datatype
|
|
39
|
+
attr_reader :allowable_values
|
|
40
|
+
|
|
41
|
+
def initialize(datatype, allowable_values)
|
|
42
|
+
@allowable_values = allowable_values.map do |value|
|
|
43
|
+
case datatype.to_s
|
|
44
|
+
when /Integer/i
|
|
45
|
+
value.to_i
|
|
46
|
+
when /Float/i
|
|
47
|
+
value.to_f
|
|
48
|
+
else
|
|
49
|
+
value
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
def valid?(value)
|
|
55
|
+
!value || allowable_values.include?(value)
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
|
|
30
59
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
31
60
|
def self.attribute_map
|
|
32
61
|
{
|
|
@@ -130,10 +159,6 @@ module SmplkitGeneratedClient::Logging
|
|
|
130
159
|
invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 255.')
|
|
131
160
|
end
|
|
132
161
|
|
|
133
|
-
if !@level.nil? && @level.to_s.length > 10
|
|
134
|
-
invalid_properties.push('invalid value for "level", the character length must be smaller than or equal to 10.')
|
|
135
|
-
end
|
|
136
|
-
|
|
137
162
|
invalid_properties
|
|
138
163
|
end
|
|
139
164
|
|
|
@@ -143,7 +168,8 @@ module SmplkitGeneratedClient::Logging
|
|
|
143
168
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
144
169
|
return false if @name.nil?
|
|
145
170
|
return false if @name.to_s.length > 255
|
|
146
|
-
|
|
171
|
+
level_validator = EnumAttributeValidator.new('String', ["TRACE", "DEBUG", "INFO", "WARN", "ERROR", "FATAL", "SILENT"])
|
|
172
|
+
return false unless level_validator.valid?(@level)
|
|
147
173
|
true
|
|
148
174
|
end
|
|
149
175
|
|
|
@@ -161,13 +187,13 @@ module SmplkitGeneratedClient::Logging
|
|
|
161
187
|
@name = name
|
|
162
188
|
end
|
|
163
189
|
|
|
164
|
-
# Custom attribute writer method
|
|
165
|
-
# @param [Object] level
|
|
190
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
191
|
+
# @param [Object] level Object to be assigned
|
|
166
192
|
def level=(level)
|
|
167
|
-
|
|
168
|
-
|
|
193
|
+
validator = EnumAttributeValidator.new('String', ["TRACE", "DEBUG", "INFO", "WARN", "ERROR", "FATAL", "SILENT"])
|
|
194
|
+
unless validator.valid?(level)
|
|
195
|
+
fail ArgumentError, "invalid value for \"level\", must be one of #{validator.allowable_values}."
|
|
169
196
|
end
|
|
170
|
-
|
|
171
197
|
@level = level
|
|
172
198
|
end
|
|
173
199
|
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#smplkit Logging API
|
|
3
|
+
|
|
4
|
+
#API for the smplkit logging service.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.1.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.22.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module SmplkitGeneratedClient::Logging
|
|
17
|
+
# JSON:API request envelope for creating or updating a log group.
|
|
18
|
+
class LogGroupRequest < ApiModelBase
|
|
19
|
+
attr_accessor :data
|
|
20
|
+
|
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
22
|
+
def self.attribute_map
|
|
23
|
+
{
|
|
24
|
+
:'data' => :'data'
|
|
25
|
+
}
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# Returns attribute mapping this model knows about
|
|
29
|
+
def self.acceptable_attribute_map
|
|
30
|
+
attribute_map
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Returns all the JSON keys this model knows about
|
|
34
|
+
def self.acceptable_attributes
|
|
35
|
+
acceptable_attribute_map.values
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Attribute type mapping.
|
|
39
|
+
def self.openapi_types
|
|
40
|
+
{
|
|
41
|
+
:'data' => :'LogGroupResource'
|
|
42
|
+
}
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# List of attributes with nullable: true
|
|
46
|
+
def self.openapi_nullable
|
|
47
|
+
Set.new([
|
|
48
|
+
])
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Initializes the object
|
|
52
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
53
|
+
def initialize(attributes = {})
|
|
54
|
+
if (!attributes.is_a?(Hash))
|
|
55
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SmplkitGeneratedClient::Logging::LogGroupRequest` initialize method"
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
59
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
60
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
61
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
62
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SmplkitGeneratedClient::Logging::LogGroupRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
63
|
+
end
|
|
64
|
+
h[k.to_sym] = v
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if attributes.key?(:'data')
|
|
68
|
+
self.data = attributes[:'data']
|
|
69
|
+
else
|
|
70
|
+
self.data = nil
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
75
|
+
# @return Array for valid properties with the reasons
|
|
76
|
+
def list_invalid_properties
|
|
77
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
78
|
+
invalid_properties = Array.new
|
|
79
|
+
if @data.nil?
|
|
80
|
+
invalid_properties.push('invalid value for "data", data cannot be nil.')
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
invalid_properties
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Check to see if the all the properties in the model are valid
|
|
87
|
+
# @return true if the model is valid
|
|
88
|
+
def valid?
|
|
89
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
90
|
+
return false if @data.nil?
|
|
91
|
+
true
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Custom attribute writer method with validation
|
|
95
|
+
# @param [Object] data Value to be assigned
|
|
96
|
+
def data=(data)
|
|
97
|
+
if data.nil?
|
|
98
|
+
fail ArgumentError, 'data cannot be nil'
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
@data = data
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# Checks equality by comparing each attribute.
|
|
105
|
+
# @param [Object] Object to be compared
|
|
106
|
+
def ==(o)
|
|
107
|
+
return true if self.equal?(o)
|
|
108
|
+
self.class == o.class &&
|
|
109
|
+
data == o.data
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# @see the `==` method
|
|
113
|
+
# @param [Object] Object to be compared
|
|
114
|
+
def eql?(o)
|
|
115
|
+
self == o
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Calculates hash code according to all attributes.
|
|
119
|
+
# @return [Integer] Hash code
|
|
120
|
+
def hash
|
|
121
|
+
[data].hash
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# Builds the object from hash
|
|
125
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
126
|
+
# @return [Object] Returns the model itself
|
|
127
|
+
def self.build_from_hash(attributes)
|
|
128
|
+
return nil unless attributes.is_a?(Hash)
|
|
129
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
130
|
+
transformed_hash = {}
|
|
131
|
+
openapi_types.each_pair do |key, type|
|
|
132
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
133
|
+
transformed_hash["#{key}"] = nil
|
|
134
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
135
|
+
# check to ensure the input is an array given that the attribute
|
|
136
|
+
# is documented as an array but the input is not
|
|
137
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
138
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
139
|
+
end
|
|
140
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
141
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
142
|
+
end
|
|
143
|
+
end
|
|
144
|
+
new(transformed_hash)
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# Returns the object in the form of hash
|
|
148
|
+
# @return [Hash] Returns the object in the form of hash
|
|
149
|
+
def to_hash
|
|
150
|
+
hash = {}
|
|
151
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
152
|
+
value = self.send(attr)
|
|
153
|
+
if value.nil?
|
|
154
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
155
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
hash[param] = _to_hash(value)
|
|
159
|
+
end
|
|
160
|
+
hash
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
end
|
|
@@ -14,6 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module SmplkitGeneratedClient::Logging
|
|
17
|
+
# JSON:API resource envelope for a log group. `id` is the group's key (e.g. `database-loggers`). On a create request the id may be supplied; if omitted, the server generates one from `name`.
|
|
17
18
|
class LogGroupResource < ApiModelBase
|
|
18
19
|
attr_accessor :id
|
|
19
20
|
|