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
|
@@ -14,25 +14,57 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module SmplkitGeneratedClient::Logging
|
|
17
|
+
# A logger configured for the account. Loggers are organized by dot-separated key (for example, `sqlalchemy.engine`), matching the hierarchical naming convention used by most logging frameworks. A managed logger applies the configured level to every runtime where the logger appears; unmanaged loggers are tracked only as observations from SDKs.
|
|
17
18
|
class Logger < ApiModelBase
|
|
19
|
+
# Human-readable label for the logger.
|
|
18
20
|
attr_accessor :name
|
|
19
21
|
|
|
22
|
+
# Account-wide log level applied to this logger. `null` means no override at the logger level — the level is inherited from the logger's group or the framework default.
|
|
20
23
|
attr_accessor :level
|
|
21
24
|
|
|
25
|
+
# Key of the log group this logger belongs to, or `null` if the logger is not grouped. Assigning a logger to a group promotes it to managed; assigning a group cascades to unmanaged descendants by clearing their group reference.
|
|
22
26
|
attr_accessor :group
|
|
23
27
|
|
|
28
|
+
# When `true`, the logger is part of the account's managed configuration and counts toward the managed-loggers usage counter. Setting `level`, `group`, or `environments` on an unmanaged logger promotes it to managed automatically.
|
|
24
29
|
attr_accessor :managed
|
|
25
30
|
|
|
31
|
+
# Service / environment observations reported by SDKs for this logger. Each entry carries the service name, environment, the level the SDK saw, the resolved level after framework inheritance, and timestamps for the first and most recent sighting.
|
|
26
32
|
attr_accessor :sources
|
|
27
33
|
|
|
34
|
+
# Per-environment level overrides keyed by environment name. Each value is an object with an optional `level` field, e.g. `{\"production\": {\"level\": \"WARN\"}}`. An environment may be present with no `level` to record that the logger applies there without changing the resolved level.
|
|
28
35
|
attr_accessor :environments
|
|
29
36
|
|
|
37
|
+
# Per-environment summary of what runtimes are reporting for this logger. Keyed by environment name; each entry is one of `{\"status\": \"none\"}`, `{\"status\": \"agrees\", \"level\": \"<LEVEL>\"}`, or `{\"status\": \"varies\"}`. `agrees` means every observed source in that environment reports the same resolved level; `varies` means at least two sources disagree.
|
|
30
38
|
attr_accessor :effective_levels
|
|
31
39
|
|
|
40
|
+
# When the logger was first created or discovered.
|
|
32
41
|
attr_accessor :created_at
|
|
33
42
|
|
|
43
|
+
# When the logger was last modified.
|
|
34
44
|
attr_accessor :updated_at
|
|
35
45
|
|
|
46
|
+
class EnumAttributeValidator
|
|
47
|
+
attr_reader :datatype
|
|
48
|
+
attr_reader :allowable_values
|
|
49
|
+
|
|
50
|
+
def initialize(datatype, allowable_values)
|
|
51
|
+
@allowable_values = allowable_values.map do |value|
|
|
52
|
+
case datatype.to_s
|
|
53
|
+
when /Integer/i
|
|
54
|
+
value.to_i
|
|
55
|
+
when /Float/i
|
|
56
|
+
value.to_f
|
|
57
|
+
else
|
|
58
|
+
value
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
def valid?(value)
|
|
64
|
+
!value || allowable_values.include?(value)
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
|
|
36
68
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
37
69
|
def self.attribute_map
|
|
38
70
|
{
|
|
@@ -161,10 +193,6 @@ module SmplkitGeneratedClient::Logging
|
|
|
161
193
|
invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 255.')
|
|
162
194
|
end
|
|
163
195
|
|
|
164
|
-
if !@level.nil? && @level.to_s.length > 10
|
|
165
|
-
invalid_properties.push('invalid value for "level", the character length must be smaller than or equal to 10.')
|
|
166
|
-
end
|
|
167
|
-
|
|
168
196
|
invalid_properties
|
|
169
197
|
end
|
|
170
198
|
|
|
@@ -174,7 +202,8 @@ module SmplkitGeneratedClient::Logging
|
|
|
174
202
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
175
203
|
return false if @name.nil?
|
|
176
204
|
return false if @name.to_s.length > 255
|
|
177
|
-
|
|
205
|
+
level_validator = EnumAttributeValidator.new('String', ["TRACE", "DEBUG", "INFO", "WARN", "ERROR", "FATAL", "SILENT"])
|
|
206
|
+
return false unless level_validator.valid?(@level)
|
|
178
207
|
true
|
|
179
208
|
end
|
|
180
209
|
|
|
@@ -192,13 +221,13 @@ module SmplkitGeneratedClient::Logging
|
|
|
192
221
|
@name = name
|
|
193
222
|
end
|
|
194
223
|
|
|
195
|
-
# Custom attribute writer method
|
|
196
|
-
# @param [Object] level
|
|
224
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
225
|
+
# @param [Object] level Object to be assigned
|
|
197
226
|
def level=(level)
|
|
198
|
-
|
|
199
|
-
|
|
227
|
+
validator = EnumAttributeValidator.new('String', ["TRACE", "DEBUG", "INFO", "WARN", "ERROR", "FATAL", "SILENT"])
|
|
228
|
+
unless validator.valid?(level)
|
|
229
|
+
fail ArgumentError, "invalid value for \"level\", must be one of #{validator.allowable_values}."
|
|
200
230
|
end
|
|
201
|
-
|
|
202
231
|
@level = level
|
|
203
232
|
end
|
|
204
233
|
|
|
@@ -14,20 +14,21 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module SmplkitGeneratedClient::Logging
|
|
17
|
+
# One logger discovered by an SDK during a bulk registration call.
|
|
17
18
|
class LoggerBulkItem < ApiModelBase
|
|
18
|
-
#
|
|
19
|
+
# Dot-separated logger key as the SDK saw it.
|
|
19
20
|
attr_accessor :id
|
|
20
21
|
|
|
21
|
-
#
|
|
22
|
+
# Level explicitly set on the logger by application code. `null` when the level is inherited.
|
|
22
23
|
attr_accessor :level
|
|
23
24
|
|
|
24
|
-
#
|
|
25
|
+
# Effective level after framework inheritance. SDKs should always report this; the server falls back to `level` when `resolved_level` is missing.
|
|
25
26
|
attr_accessor :resolved_level
|
|
26
27
|
|
|
27
|
-
# Service name that
|
|
28
|
+
# Service name that observed the logger.
|
|
28
29
|
attr_accessor :service
|
|
29
30
|
|
|
30
|
-
# Environment where
|
|
31
|
+
# Environment where the logger was observed.
|
|
31
32
|
attr_accessor :environment
|
|
32
33
|
|
|
33
34
|
# Attribute mapping from ruby-style variable name to JSON key.
|
data/lib/smplkit/_generated/logging/lib/smplkit_logging_client/models/logger_bulk_request.rb
CHANGED
|
@@ -14,7 +14,9 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module SmplkitGeneratedClient::Logging
|
|
17
|
+
# Payload for bulk registration of loggers discovered by an SDK.
|
|
17
18
|
class LoggerBulkRequest < ApiModelBase
|
|
19
|
+
# Loggers to register or refresh observations for.
|
|
18
20
|
attr_accessor :loggers
|
|
19
21
|
|
|
20
22
|
# Attribute mapping from ruby-style variable name to JSON key.
|
data/lib/smplkit/_generated/logging/lib/smplkit_logging_client/models/logger_bulk_response.rb
CHANGED
|
@@ -14,7 +14,9 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module SmplkitGeneratedClient::Logging
|
|
17
|
+
# Result of a bulk registration call.
|
|
17
18
|
class LoggerBulkResponse < ApiModelBase
|
|
19
|
+
# Number of loggers that were created or had a source observation refreshed.
|
|
18
20
|
attr_accessor :registered
|
|
19
21
|
|
|
20
22
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -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 logger.
|
|
18
|
+
class LoggerRequest < 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' => :'LoggerResource'
|
|
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::LoggerRequest` 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::LoggerRequest`. 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 logger. `id` is the logger's dot-separated key (e.g. `sqlalchemy.engine`). On a `PUT /api/v1/loggers/{id}` create, the id is taken from the URL path; on update, an `id` in the body renames the logger.
|
|
17
18
|
class LoggerResource < ApiModelBase
|
|
18
19
|
attr_accessor :id
|
|
19
20
|
|
|
@@ -14,21 +14,30 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module SmplkitGeneratedClient::Logging
|
|
17
|
+
# A single service / environment observation of a logger. A source row exists for every (service, environment) pair that has reported the logger via the bulk registration endpoint. The row's levels reflect what the SDK saw on the most recent report.
|
|
17
18
|
class LoggerSource < ApiModelBase
|
|
19
|
+
# Service that reported the logger.
|
|
18
20
|
attr_accessor :service
|
|
19
21
|
|
|
22
|
+
# Environment the service was running in when it reported the logger.
|
|
20
23
|
attr_accessor :environment
|
|
21
24
|
|
|
25
|
+
# Level explicitly set on the logger in the source runtime. `null` when the runtime inherits its level.
|
|
22
26
|
attr_accessor :level
|
|
23
27
|
|
|
28
|
+
# Effective level the runtime resolved for the logger.
|
|
24
29
|
attr_accessor :resolved_level
|
|
25
30
|
|
|
31
|
+
# When this service / environment combination first reported the logger.
|
|
26
32
|
attr_accessor :first_observed
|
|
27
33
|
|
|
34
|
+
# Most recent report received for this service / environment combination.
|
|
28
35
|
attr_accessor :last_seen
|
|
29
36
|
|
|
37
|
+
# When the source row was created.
|
|
30
38
|
attr_accessor :created_at
|
|
31
39
|
|
|
40
|
+
# When the source row was last refreshed.
|
|
32
41
|
attr_accessor :updated_at
|
|
33
42
|
|
|
34
43
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -14,11 +14,13 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module SmplkitGeneratedClient::Logging
|
|
17
|
+
# JSON:API resource envelope for a discovered service. `id` is the service name as reported by an SDK during bulk registration. The resource carries no additional attributes — it represents the existence of the service in the account's observations, nothing more.
|
|
17
18
|
class ServiceResource < ApiModelBase
|
|
18
19
|
attr_accessor :id
|
|
19
20
|
|
|
20
21
|
attr_accessor :type
|
|
21
22
|
|
|
23
|
+
# A discovered service has no attributes beyond its name (the `id`).
|
|
22
24
|
attr_accessor :attributes
|
|
23
25
|
|
|
24
26
|
class EnumAttributeValidator
|
|
@@ -14,11 +14,15 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module SmplkitGeneratedClient::Logging
|
|
17
|
+
# Usage counter for a single metered limit.
|
|
17
18
|
class UsageAttributes < ApiModelBase
|
|
19
|
+
# Identifier of the metered limit, e.g. `logging.managed_loggers` or `logging.groups`.
|
|
18
20
|
attr_accessor :limit_key
|
|
19
21
|
|
|
22
|
+
# Period the counter covers. `current` is the only supported value.
|
|
20
23
|
attr_accessor :period
|
|
21
24
|
|
|
25
|
+
# Count for the period.
|
|
22
26
|
attr_accessor :value
|
|
23
27
|
|
|
24
28
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -22,6 +22,7 @@ require 'smplkit_logging_client/models/error'
|
|
|
22
22
|
require 'smplkit_logging_client/models/error_response'
|
|
23
23
|
require 'smplkit_logging_client/models/log_group'
|
|
24
24
|
require 'smplkit_logging_client/models/log_group_list_response'
|
|
25
|
+
require 'smplkit_logging_client/models/log_group_request'
|
|
25
26
|
require 'smplkit_logging_client/models/log_group_resource'
|
|
26
27
|
require 'smplkit_logging_client/models/log_group_response'
|
|
27
28
|
require 'smplkit_logging_client/models/logger'
|
|
@@ -29,6 +30,7 @@ require 'smplkit_logging_client/models/logger_bulk_item'
|
|
|
29
30
|
require 'smplkit_logging_client/models/logger_bulk_request'
|
|
30
31
|
require 'smplkit_logging_client/models/logger_bulk_response'
|
|
31
32
|
require 'smplkit_logging_client/models/logger_list_response'
|
|
33
|
+
require 'smplkit_logging_client/models/logger_request'
|
|
32
34
|
require 'smplkit_logging_client/models/logger_resource'
|
|
33
35
|
require 'smplkit_logging_client/models/logger_response'
|
|
34
36
|
require 'smplkit_logging_client/models/logger_source'
|
|
@@ -34,8 +34,8 @@ describe 'LogGroupsApi' do
|
|
|
34
34
|
|
|
35
35
|
# unit tests for create_log_group
|
|
36
36
|
# Create Log Group
|
|
37
|
-
# Create a
|
|
38
|
-
# @param
|
|
37
|
+
# Create a log group. The caller may supply a key in `data.id`; if omitted, the server generates one from `name`.
|
|
38
|
+
# @param log_group_request
|
|
39
39
|
# @param [Hash] opts the optional parameters
|
|
40
40
|
# @return [LogGroupResponse]
|
|
41
41
|
describe 'create_log_group test' do
|
|
@@ -46,7 +46,7 @@ describe 'LogGroupsApi' do
|
|
|
46
46
|
|
|
47
47
|
# unit tests for delete_log_group
|
|
48
48
|
# Delete Log Group
|
|
49
|
-
# Delete a log group
|
|
49
|
+
# Delete a log group. Loggers that referenced this group are detached; they remain in the account with no group assignment.
|
|
50
50
|
# @param id
|
|
51
51
|
# @param [Hash] opts the optional parameters
|
|
52
52
|
# @return [nil]
|
|
@@ -58,7 +58,7 @@ describe 'LogGroupsApi' do
|
|
|
58
58
|
|
|
59
59
|
# unit tests for get_log_group
|
|
60
60
|
# Get Log Group
|
|
61
|
-
#
|
|
61
|
+
# Retrieve a log group by its key.
|
|
62
62
|
# @param id
|
|
63
63
|
# @param [Hash] opts the optional parameters
|
|
64
64
|
# @return [LogGroupResponse]
|
|
@@ -70,7 +70,7 @@ describe 'LogGroupsApi' do
|
|
|
70
70
|
|
|
71
71
|
# unit tests for list_log_groups
|
|
72
72
|
# List Log Groups
|
|
73
|
-
# List
|
|
73
|
+
# List log groups for this account.
|
|
74
74
|
# @param [Hash] opts the optional parameters
|
|
75
75
|
# @return [LogGroupListResponse]
|
|
76
76
|
describe 'list_log_groups test' do
|
|
@@ -81,9 +81,9 @@ describe 'LogGroupsApi' do
|
|
|
81
81
|
|
|
82
82
|
# unit tests for update_log_group
|
|
83
83
|
# Update Log Group
|
|
84
|
-
# Replace a log group
|
|
84
|
+
# Replace a log group. Every writable field is overwritten.
|
|
85
85
|
# @param id
|
|
86
|
-
# @param
|
|
86
|
+
# @param log_group_request
|
|
87
87
|
# @param [Hash] opts the optional parameters
|
|
88
88
|
# @return [LogGroupResponse]
|
|
89
89
|
describe 'update_log_group test' do
|
|
@@ -34,7 +34,7 @@ describe 'LoggerSourcesApi' do
|
|
|
34
34
|
|
|
35
35
|
# unit tests for list_all_logger_sources
|
|
36
36
|
# List All Logger Sources
|
|
37
|
-
# List
|
|
37
|
+
# List every logger source observation for this account. Supports `filter[environment]` and `filter[service]` to narrow to a specific environment or service.
|
|
38
38
|
# @param [Hash] opts the optional parameters
|
|
39
39
|
# @option opts [String] :filter_environment
|
|
40
40
|
# @option opts [String] :filter_service
|
|
@@ -47,7 +47,7 @@ describe 'LoggerSourcesApi' do
|
|
|
47
47
|
|
|
48
48
|
# unit tests for list_logger_sources
|
|
49
49
|
# List Logger Sources
|
|
50
|
-
# List
|
|
50
|
+
# List the service / environment observations recorded for a logger.
|
|
51
51
|
# @param id
|
|
52
52
|
# @param [Hash] opts the optional parameters
|
|
53
53
|
# @return [LoggerSourceListResponse]
|
|
@@ -34,7 +34,7 @@ describe 'LoggersApi' do
|
|
|
34
34
|
|
|
35
35
|
# unit tests for bulk_register_loggers
|
|
36
36
|
# Bulk Register Loggers
|
|
37
|
-
# Register loggers discovered by an SDK.
|
|
37
|
+
# 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.
|
|
38
38
|
# @param logger_bulk_request
|
|
39
39
|
# @param [Hash] opts the optional parameters
|
|
40
40
|
# @return [LoggerBulkResponse]
|
|
@@ -46,7 +46,7 @@ describe 'LoggersApi' do
|
|
|
46
46
|
|
|
47
47
|
# unit tests for delete_logger
|
|
48
48
|
# Delete Logger
|
|
49
|
-
# Delete a logger
|
|
49
|
+
# Delete a logger.
|
|
50
50
|
# @param id
|
|
51
51
|
# @param [Hash] opts the optional parameters
|
|
52
52
|
# @return [nil]
|
|
@@ -58,7 +58,7 @@ describe 'LoggersApi' do
|
|
|
58
58
|
|
|
59
59
|
# unit tests for get_logger
|
|
60
60
|
# Get Logger
|
|
61
|
-
#
|
|
61
|
+
# Retrieve a logger by its key.
|
|
62
62
|
# @param id
|
|
63
63
|
# @param [Hash] opts the optional parameters
|
|
64
64
|
# @return [LoggerResponse]
|
|
@@ -70,7 +70,7 @@ describe 'LoggersApi' do
|
|
|
70
70
|
|
|
71
71
|
# unit tests for list_loggers
|
|
72
72
|
# List Loggers
|
|
73
|
-
# List
|
|
73
|
+
# 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.
|
|
74
74
|
# @param [Hash] opts the optional parameters
|
|
75
75
|
# @option opts [Boolean] :filter_managed
|
|
76
76
|
# @option opts [String] :filter_service
|
|
@@ -84,9 +84,9 @@ describe 'LoggersApi' do
|
|
|
84
84
|
|
|
85
85
|
# unit tests for update_logger
|
|
86
86
|
# Update or Create Logger
|
|
87
|
-
# Create or
|
|
87
|
+
# 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.
|
|
88
88
|
# @param id
|
|
89
|
-
# @param
|
|
89
|
+
# @param logger_request
|
|
90
90
|
# @param [Hash] opts the optional parameters
|
|
91
91
|
# @return [LoggerResponse]
|
|
92
92
|
describe 'update_logger test' do
|
|
@@ -34,7 +34,7 @@ describe 'ServicesApi' do
|
|
|
34
34
|
|
|
35
35
|
# unit tests for list_services
|
|
36
36
|
# List Services
|
|
37
|
-
#
|
|
37
|
+
# List the services that have reported a logger for this account.
|
|
38
38
|
# @param [Hash] opts the optional parameters
|
|
39
39
|
# @return [ServiceListResponse]
|
|
40
40
|
describe 'list_services test' do
|
|
@@ -34,7 +34,7 @@ describe 'UsageApi' do
|
|
|
34
34
|
|
|
35
35
|
# unit tests for list_logging_usage
|
|
36
36
|
# List Logging Usage
|
|
37
|
-
#
|
|
37
|
+
# Report the current-period usage counters for this account.
|
|
38
38
|
# @param [Hash] opts the optional parameters
|
|
39
39
|
# @option opts [String] :filter_period
|
|
40
40
|
# @return [UsageListResponse]
|
|
@@ -0,0 +1,36 @@
|
|
|
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 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for SmplkitGeneratedClient::Logging::LogGroupRequest
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe SmplkitGeneratedClient::Logging::LogGroupRequest do
|
|
21
|
+
#let(:instance) { SmplkitGeneratedClient::Logging::LogGroupRequest.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of LogGroupRequest' do
|
|
24
|
+
it 'should create an instance of LogGroupRequest' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(SmplkitGeneratedClient::Logging::LogGroupRequest)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "data"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
end
|
|
@@ -36,6 +36,10 @@ describe SmplkitGeneratedClient::Logging::LogGroup do
|
|
|
36
36
|
describe 'test attribute "level"' do
|
|
37
37
|
it 'should work' do
|
|
38
38
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["TRACE", "DEBUG", "INFO", "WARN", "ERROR", "FATAL", "SILENT"])
|
|
40
|
+
# validator.allowable_values.each do |value|
|
|
41
|
+
# expect { instance.level = value }.not_to raise_error
|
|
42
|
+
# end
|
|
39
43
|
end
|
|
40
44
|
end
|
|
41
45
|
|