smplkit 1.0.19 → 1.0.21

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.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/api/{default_api.rb → events_api.rb} +38 -102
  3. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/api/forwarders_api.rb +640 -0
  4. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/api/usage_api.rb +86 -0
  5. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/event.rb +13 -1
  6. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder.rb +353 -0
  7. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder_delivery.rb +329 -0
  8. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder_delivery_list_response.rb +202 -0
  9. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder_delivery_resource.rb +201 -0
  10. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder_delivery_response.rb +164 -0
  11. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder_http.rb +239 -0
  12. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder_list_links.rb +148 -0
  13. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder_list_meta.rb +164 -0
  14. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder_list_response.rb +202 -0
  15. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder_resource.rb +201 -0
  16. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder_response.rb +164 -0
  17. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/http_header.rb +218 -0
  18. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/retry_failed_deliveries_summary.rb +216 -0
  19. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/success_status.rb +103 -0
  20. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/test_forwarder_request.rb +273 -0
  21. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/test_forwarder_response.rb +220 -0
  22. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client.rb +19 -1
  23. data/lib/smplkit/_generated/audit/spec/api/{default_api_spec.rb → events_api_spec.rb} +13 -25
  24. data/lib/smplkit/_generated/audit/spec/api/forwarders_api_spec.rb +152 -0
  25. data/lib/smplkit/_generated/audit/spec/api/usage_api_spec.rb +47 -0
  26. data/lib/smplkit/_generated/audit/spec/models/event_spec.rb +6 -0
  27. data/lib/smplkit/_generated/audit/spec/models/forwarder_delivery_list_response_spec.rb +48 -0
  28. data/lib/smplkit/_generated/audit/spec/models/forwarder_delivery_resource_spec.rb +48 -0
  29. data/lib/smplkit/_generated/audit/spec/models/forwarder_delivery_response_spec.rb +36 -0
  30. data/lib/smplkit/_generated/audit/spec/models/forwarder_delivery_spec.rb +94 -0
  31. data/lib/smplkit/_generated/audit/spec/models/forwarder_http_spec.rb +60 -0
  32. data/lib/smplkit/_generated/audit/spec/models/forwarder_list_links_spec.rb +36 -0
  33. data/lib/smplkit/_generated/audit/spec/models/forwarder_list_meta_spec.rb +36 -0
  34. data/lib/smplkit/_generated/audit/spec/models/forwarder_list_response_spec.rb +48 -0
  35. data/lib/smplkit/_generated/audit/spec/models/forwarder_resource_spec.rb +48 -0
  36. data/lib/smplkit/_generated/audit/spec/models/forwarder_response_spec.rb +36 -0
  37. data/lib/smplkit/_generated/audit/spec/models/forwarder_spec.rb +102 -0
  38. data/lib/smplkit/_generated/audit/spec/models/http_header_spec.rb +42 -0
  39. data/lib/smplkit/_generated/audit/spec/models/retry_failed_deliveries_summary_spec.rb +48 -0
  40. data/lib/smplkit/_generated/audit/spec/models/success_status_spec.rb +21 -0
  41. data/lib/smplkit/_generated/audit/spec/models/test_forwarder_request_spec.rb +66 -0
  42. data/lib/smplkit/_generated/audit/spec/models/test_forwarder_response_spec.rb +66 -0
  43. data/lib/smplkit/audit/buffer.rb +15 -6
  44. data/lib/smplkit/audit/client.rb +1 -1
  45. data/lib/smplkit/audit/events.rb +1 -1
  46. metadata +39 -3
@@ -0,0 +1,273 @@
1
+ =begin
2
+ #smplkit Audit API
3
+
4
+ #Append-only change-history substrate for smpl.* resources and customer-application events. ADR-047.
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::Audit
17
+ # Plain-JSON body for the test_forwarder execute action. Mirrors the encrypted ``ForwarderHttp`` shape with one addition — ``timeout_ms``, capped server-side.
18
+ class TestForwarderRequest < ApiModelBase
19
+ attr_accessor :method
20
+
21
+ attr_accessor :url
22
+
23
+ attr_accessor :headers
24
+
25
+ attr_accessor :body
26
+
27
+ attr_accessor :success_status
28
+
29
+ attr_accessor :timeout_ms
30
+
31
+ # Attribute mapping from ruby-style variable name to JSON key.
32
+ def self.attribute_map
33
+ {
34
+ :'method' => :'method',
35
+ :'url' => :'url',
36
+ :'headers' => :'headers',
37
+ :'body' => :'body',
38
+ :'success_status' => :'success_status',
39
+ :'timeout_ms' => :'timeout_ms'
40
+ }
41
+ end
42
+
43
+ # Returns attribute mapping this model knows about
44
+ def self.acceptable_attribute_map
45
+ attribute_map
46
+ end
47
+
48
+ # Returns all the JSON keys this model knows about
49
+ def self.acceptable_attributes
50
+ acceptable_attribute_map.values
51
+ end
52
+
53
+ # Attribute type mapping.
54
+ def self.openapi_types
55
+ {
56
+ :'method' => :'String',
57
+ :'url' => :'String',
58
+ :'headers' => :'Array<HttpHeader>',
59
+ :'body' => :'String',
60
+ :'success_status' => :'SuccessStatus',
61
+ :'timeout_ms' => :'Integer'
62
+ }
63
+ end
64
+
65
+ # List of attributes with nullable: true
66
+ def self.openapi_nullable
67
+ Set.new([
68
+ :'body',
69
+ :'timeout_ms'
70
+ ])
71
+ end
72
+
73
+ # Initializes the object
74
+ # @param [Hash] attributes Model attributes in the form of hash
75
+ def initialize(attributes = {})
76
+ if (!attributes.is_a?(Hash))
77
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SmplkitGeneratedClient::Audit::TestForwarderRequest` initialize method"
78
+ end
79
+
80
+ # check to see if the attribute exists and convert string to symbol for hash key
81
+ acceptable_attribute_map = self.class.acceptable_attribute_map
82
+ attributes = attributes.each_with_object({}) { |(k, v), h|
83
+ if (!acceptable_attribute_map.key?(k.to_sym))
84
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SmplkitGeneratedClient::Audit::TestForwarderRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
85
+ end
86
+ h[k.to_sym] = v
87
+ }
88
+
89
+ if attributes.key?(:'method')
90
+ self.method = attributes[:'method']
91
+ else
92
+ self.method = 'POST'
93
+ end
94
+
95
+ if attributes.key?(:'url')
96
+ self.url = attributes[:'url']
97
+ else
98
+ self.url = nil
99
+ end
100
+
101
+ if attributes.key?(:'headers')
102
+ if (value = attributes[:'headers']).is_a?(Array)
103
+ self.headers = value
104
+ end
105
+ end
106
+
107
+ if attributes.key?(:'body')
108
+ self.body = attributes[:'body']
109
+ end
110
+
111
+ if attributes.key?(:'success_status')
112
+ self.success_status = attributes[:'success_status']
113
+ end
114
+
115
+ if attributes.key?(:'timeout_ms')
116
+ self.timeout_ms = attributes[:'timeout_ms']
117
+ end
118
+ end
119
+
120
+ # Show invalid properties with the reasons. Usually used together with valid?
121
+ # @return Array for valid properties with the reasons
122
+ def list_invalid_properties
123
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
124
+ invalid_properties = Array.new
125
+ if @url.nil?
126
+ invalid_properties.push('invalid value for "url", url cannot be nil.')
127
+ end
128
+
129
+ if @url.to_s.length > 2048
130
+ invalid_properties.push('invalid value for "url", the character length must be smaller than or equal to 2048.')
131
+ end
132
+
133
+ if @url.to_s.length < 1
134
+ invalid_properties.push('invalid value for "url", the character length must be greater than or equal to 1.')
135
+ end
136
+
137
+ if !@body.nil? && @body.to_s.length > 65536
138
+ invalid_properties.push('invalid value for "body", the character length must be smaller than or equal to 65536.')
139
+ end
140
+
141
+ if !@timeout_ms.nil? && @timeout_ms > 30000
142
+ invalid_properties.push('invalid value for "timeout_ms", must be smaller than or equal to 30000.')
143
+ end
144
+
145
+ if !@timeout_ms.nil? && @timeout_ms < 1
146
+ invalid_properties.push('invalid value for "timeout_ms", must be greater than or equal to 1.')
147
+ end
148
+
149
+ invalid_properties
150
+ end
151
+
152
+ # Check to see if the all the properties in the model are valid
153
+ # @return true if the model is valid
154
+ def valid?
155
+ warn '[DEPRECATED] the `valid?` method is obsolete'
156
+ return false if @url.nil?
157
+ return false if @url.to_s.length > 2048
158
+ return false if @url.to_s.length < 1
159
+ return false if !@body.nil? && @body.to_s.length > 65536
160
+ return false if !@timeout_ms.nil? && @timeout_ms > 30000
161
+ return false if !@timeout_ms.nil? && @timeout_ms < 1
162
+ true
163
+ end
164
+
165
+ # Custom attribute writer method with validation
166
+ # @param [Object] url Value to be assigned
167
+ def url=(url)
168
+ if url.nil?
169
+ fail ArgumentError, 'url cannot be nil'
170
+ end
171
+
172
+ if url.to_s.length > 2048
173
+ fail ArgumentError, 'invalid value for "url", the character length must be smaller than or equal to 2048.'
174
+ end
175
+
176
+ if url.to_s.length < 1
177
+ fail ArgumentError, 'invalid value for "url", the character length must be greater than or equal to 1.'
178
+ end
179
+
180
+ @url = url
181
+ end
182
+
183
+ # Custom attribute writer method with validation
184
+ # @param [Object] body Value to be assigned
185
+ def body=(body)
186
+ if !body.nil? && body.to_s.length > 65536
187
+ fail ArgumentError, 'invalid value for "body", the character length must be smaller than or equal to 65536.'
188
+ end
189
+
190
+ @body = body
191
+ end
192
+
193
+ # Custom attribute writer method with validation
194
+ # @param [Object] timeout_ms Value to be assigned
195
+ def timeout_ms=(timeout_ms)
196
+ if !timeout_ms.nil? && timeout_ms > 30000
197
+ fail ArgumentError, 'invalid value for "timeout_ms", must be smaller than or equal to 30000.'
198
+ end
199
+
200
+ if !timeout_ms.nil? && timeout_ms < 1
201
+ fail ArgumentError, 'invalid value for "timeout_ms", must be greater than or equal to 1.'
202
+ end
203
+
204
+ @timeout_ms = timeout_ms
205
+ end
206
+
207
+ # Checks equality by comparing each attribute.
208
+ # @param [Object] Object to be compared
209
+ def ==(o)
210
+ return true if self.equal?(o)
211
+ self.class == o.class &&
212
+ method == o.method &&
213
+ url == o.url &&
214
+ headers == o.headers &&
215
+ body == o.body &&
216
+ success_status == o.success_status &&
217
+ timeout_ms == o.timeout_ms
218
+ end
219
+
220
+ # @see the `==` method
221
+ # @param [Object] Object to be compared
222
+ def eql?(o)
223
+ self == o
224
+ end
225
+
226
+ # Calculates hash code according to all attributes.
227
+ # @return [Integer] Hash code
228
+ def hash
229
+ [method, url, headers, body, success_status, timeout_ms].hash
230
+ end
231
+
232
+ # Builds the object from hash
233
+ # @param [Hash] attributes Model attributes in the form of hash
234
+ # @return [Object] Returns the model itself
235
+ def self.build_from_hash(attributes)
236
+ return nil unless attributes.is_a?(Hash)
237
+ attributes = attributes.transform_keys(&:to_sym)
238
+ transformed_hash = {}
239
+ openapi_types.each_pair do |key, type|
240
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
241
+ transformed_hash["#{key}"] = nil
242
+ elsif type =~ /\AArray<(.*)>/i
243
+ # check to ensure the input is an array given that the attribute
244
+ # is documented as an array but the input is not
245
+ if attributes[attribute_map[key]].is_a?(Array)
246
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
247
+ end
248
+ elsif !attributes[attribute_map[key]].nil?
249
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
250
+ end
251
+ end
252
+ new(transformed_hash)
253
+ end
254
+
255
+ # Returns the object in the form of hash
256
+ # @return [Hash] Returns the object in the form of hash
257
+ def to_hash
258
+ hash = {}
259
+ self.class.attribute_map.each_pair do |attr, param|
260
+ value = self.send(attr)
261
+ if value.nil?
262
+ is_nullable = self.class.openapi_nullable.include?(attr)
263
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
264
+ end
265
+
266
+ hash[param] = _to_hash(value)
267
+ end
268
+ hash
269
+ end
270
+
271
+ end
272
+
273
+ end
@@ -0,0 +1,220 @@
1
+ =begin
2
+ #smplkit Audit API
3
+
4
+ #Append-only change-history substrate for smpl.* resources and customer-application events. ADR-047.
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::Audit
17
+ # Plain-JSON response body. Headers are echoed back unredacted because the caller already supplied them — the response is for the caller, not persisted into the delivery log.
18
+ class TestForwarderResponse < ApiModelBase
19
+ attr_accessor :succeeded
20
+
21
+ attr_accessor :response_status
22
+
23
+ attr_accessor :response_headers
24
+
25
+ attr_accessor :response_body
26
+
27
+ attr_accessor :latency_ms
28
+
29
+ attr_accessor :error
30
+
31
+ # Attribute mapping from ruby-style variable name to JSON key.
32
+ def self.attribute_map
33
+ {
34
+ :'succeeded' => :'succeeded',
35
+ :'response_status' => :'response_status',
36
+ :'response_headers' => :'response_headers',
37
+ :'response_body' => :'response_body',
38
+ :'latency_ms' => :'latency_ms',
39
+ :'error' => :'error'
40
+ }
41
+ end
42
+
43
+ # Returns attribute mapping this model knows about
44
+ def self.acceptable_attribute_map
45
+ attribute_map
46
+ end
47
+
48
+ # Returns all the JSON keys this model knows about
49
+ def self.acceptable_attributes
50
+ acceptable_attribute_map.values
51
+ end
52
+
53
+ # Attribute type mapping.
54
+ def self.openapi_types
55
+ {
56
+ :'succeeded' => :'Boolean',
57
+ :'response_status' => :'Integer',
58
+ :'response_headers' => :'Hash<String, String>',
59
+ :'response_body' => :'String',
60
+ :'latency_ms' => :'Integer',
61
+ :'error' => :'String'
62
+ }
63
+ end
64
+
65
+ # List of attributes with nullable: true
66
+ def self.openapi_nullable
67
+ Set.new([
68
+ :'response_status',
69
+ :'response_body',
70
+ :'latency_ms',
71
+ :'error'
72
+ ])
73
+ end
74
+
75
+ # Initializes the object
76
+ # @param [Hash] attributes Model attributes in the form of hash
77
+ def initialize(attributes = {})
78
+ if (!attributes.is_a?(Hash))
79
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SmplkitGeneratedClient::Audit::TestForwarderResponse` initialize method"
80
+ end
81
+
82
+ # check to see if the attribute exists and convert string to symbol for hash key
83
+ acceptable_attribute_map = self.class.acceptable_attribute_map
84
+ attributes = attributes.each_with_object({}) { |(k, v), h|
85
+ if (!acceptable_attribute_map.key?(k.to_sym))
86
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SmplkitGeneratedClient::Audit::TestForwarderResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
87
+ end
88
+ h[k.to_sym] = v
89
+ }
90
+
91
+ if attributes.key?(:'succeeded')
92
+ self.succeeded = attributes[:'succeeded']
93
+ else
94
+ self.succeeded = nil
95
+ end
96
+
97
+ if attributes.key?(:'response_status')
98
+ self.response_status = attributes[:'response_status']
99
+ else
100
+ self.response_status = nil
101
+ end
102
+
103
+ if attributes.key?(:'response_headers')
104
+ if (value = attributes[:'response_headers']).is_a?(Hash)
105
+ self.response_headers = value
106
+ end
107
+ end
108
+
109
+ if attributes.key?(:'response_body')
110
+ self.response_body = attributes[:'response_body']
111
+ end
112
+
113
+ if attributes.key?(:'latency_ms')
114
+ self.latency_ms = attributes[:'latency_ms']
115
+ else
116
+ self.latency_ms = nil
117
+ end
118
+
119
+ if attributes.key?(:'error')
120
+ self.error = attributes[:'error']
121
+ end
122
+ end
123
+
124
+ # Show invalid properties with the reasons. Usually used together with valid?
125
+ # @return Array for valid properties with the reasons
126
+ def list_invalid_properties
127
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
128
+ invalid_properties = Array.new
129
+ if @succeeded.nil?
130
+ invalid_properties.push('invalid value for "succeeded", succeeded cannot be nil.')
131
+ end
132
+
133
+ invalid_properties
134
+ end
135
+
136
+ # Check to see if the all the properties in the model are valid
137
+ # @return true if the model is valid
138
+ def valid?
139
+ warn '[DEPRECATED] the `valid?` method is obsolete'
140
+ return false if @succeeded.nil?
141
+ true
142
+ end
143
+
144
+ # Custom attribute writer method with validation
145
+ # @param [Object] succeeded Value to be assigned
146
+ def succeeded=(succeeded)
147
+ if succeeded.nil?
148
+ fail ArgumentError, 'succeeded cannot be nil'
149
+ end
150
+
151
+ @succeeded = succeeded
152
+ end
153
+
154
+ # Checks equality by comparing each attribute.
155
+ # @param [Object] Object to be compared
156
+ def ==(o)
157
+ return true if self.equal?(o)
158
+ self.class == o.class &&
159
+ succeeded == o.succeeded &&
160
+ response_status == o.response_status &&
161
+ response_headers == o.response_headers &&
162
+ response_body == o.response_body &&
163
+ latency_ms == o.latency_ms &&
164
+ error == o.error
165
+ end
166
+
167
+ # @see the `==` method
168
+ # @param [Object] Object to be compared
169
+ def eql?(o)
170
+ self == o
171
+ end
172
+
173
+ # Calculates hash code according to all attributes.
174
+ # @return [Integer] Hash code
175
+ def hash
176
+ [succeeded, response_status, response_headers, response_body, latency_ms, error].hash
177
+ end
178
+
179
+ # Builds the object from hash
180
+ # @param [Hash] attributes Model attributes in the form of hash
181
+ # @return [Object] Returns the model itself
182
+ def self.build_from_hash(attributes)
183
+ return nil unless attributes.is_a?(Hash)
184
+ attributes = attributes.transform_keys(&:to_sym)
185
+ transformed_hash = {}
186
+ openapi_types.each_pair do |key, type|
187
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
188
+ transformed_hash["#{key}"] = nil
189
+ elsif type =~ /\AArray<(.*)>/i
190
+ # check to ensure the input is an array given that the attribute
191
+ # is documented as an array but the input is not
192
+ if attributes[attribute_map[key]].is_a?(Array)
193
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
194
+ end
195
+ elsif !attributes[attribute_map[key]].nil?
196
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
197
+ end
198
+ end
199
+ new(transformed_hash)
200
+ end
201
+
202
+ # Returns the object in the form of hash
203
+ # @return [Hash] Returns the object in the form of hash
204
+ def to_hash
205
+ hash = {}
206
+ self.class.attribute_map.each_pair do |attr, param|
207
+ value = self.send(attr)
208
+ if value.nil?
209
+ is_nullable = self.class.openapi_nullable.include?(attr)
210
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
211
+ end
212
+
213
+ hash[param] = _to_hash(value)
214
+ end
215
+ hash
216
+ end
217
+
218
+ end
219
+
220
+ end
@@ -24,11 +24,29 @@ require 'smplkit_audit_client/models/event_list_meta'
24
24
  require 'smplkit_audit_client/models/event_list_response'
25
25
  require 'smplkit_audit_client/models/event_resource'
26
26
  require 'smplkit_audit_client/models/event_response'
27
+ require 'smplkit_audit_client/models/forwarder'
28
+ require 'smplkit_audit_client/models/forwarder_delivery'
29
+ require 'smplkit_audit_client/models/forwarder_delivery_list_response'
30
+ require 'smplkit_audit_client/models/forwarder_delivery_resource'
31
+ require 'smplkit_audit_client/models/forwarder_delivery_response'
32
+ require 'smplkit_audit_client/models/forwarder_http'
33
+ require 'smplkit_audit_client/models/forwarder_list_links'
34
+ require 'smplkit_audit_client/models/forwarder_list_meta'
35
+ require 'smplkit_audit_client/models/forwarder_list_response'
36
+ require 'smplkit_audit_client/models/forwarder_resource'
37
+ require 'smplkit_audit_client/models/forwarder_response'
38
+ require 'smplkit_audit_client/models/http_header'
39
+ require 'smplkit_audit_client/models/retry_failed_deliveries_summary'
40
+ require 'smplkit_audit_client/models/success_status'
41
+ require 'smplkit_audit_client/models/test_forwarder_request'
42
+ require 'smplkit_audit_client/models/test_forwarder_response'
27
43
  require 'smplkit_audit_client/models/usage_resource'
28
44
  require 'smplkit_audit_client/models/usage_response'
29
45
 
30
46
  # APIs
31
- require 'smplkit_audit_client/api/default_api'
47
+ require 'smplkit_audit_client/api/events_api'
48
+ require 'smplkit_audit_client/api/forwarders_api'
49
+ require 'smplkit_audit_client/api/usage_api'
32
50
 
33
51
  module SmplkitGeneratedClient::Audit
34
52
  class << self
@@ -13,35 +13,22 @@ Generator version: 7.22.0
13
13
  require 'spec_helper'
14
14
  require 'json'
15
15
 
16
- # Unit tests for SmplkitGeneratedClient::Audit::DefaultApi
16
+ # Unit tests for SmplkitGeneratedClient::Audit::EventsApi
17
17
  # Automatically generated by openapi-generator (https://openapi-generator.tech)
18
18
  # Please update as you see appropriate
19
- describe 'DefaultApi' do
19
+ describe 'EventsApi' do
20
20
  before do
21
21
  # run before each test
22
- @api_instance = SmplkitGeneratedClient::Audit::DefaultApi.new
22
+ @api_instance = SmplkitGeneratedClient::Audit::EventsApi.new
23
23
  end
24
24
 
25
25
  after do
26
26
  # run after each test
27
27
  end
28
28
 
29
- describe 'test an instance of DefaultApi' do
30
- it 'should create an instance of DefaultApi' do
31
- expect(@api_instance).to be_instance_of(SmplkitGeneratedClient::Audit::DefaultApi)
32
- end
33
- end
34
-
35
- # unit tests for create_event
36
- # Create Event
37
- # Record an audit event for the authenticated account. Returns &#x60;&#x60;201 Created&#x60;&#x60; on first write, &#x60;&#x60;200 OK&#x60;&#x60; if the request was a duplicate (matched by &#x60;&#x60;Idempotency-Key&#x60;&#x60; or auto-derived key). Customers may not emit events whose &#x60;&#x60;resource_type&#x60;&#x60; starts with &#x60;&#x60;smpl.&#x60;&#x60; — that namespace is reserved for smplkit-emitted events about platform resources.
38
- # @param event_response
39
- # @param [Hash] opts the optional parameters
40
- # @option opts [String] :idempotency_key
41
- # @return [EventResponse]
42
- describe 'create_event test' do
43
- it 'should work' do
44
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
29
+ describe 'test an instance of EventsApi' do
30
+ it 'should create an instance of EventsApi' do
31
+ expect(@api_instance).to be_instance_of(SmplkitGeneratedClient::Audit::EventsApi)
45
32
  end
46
33
  end
47
34
 
@@ -76,13 +63,14 @@ describe 'DefaultApi' do
76
63
  end
77
64
  end
78
65
 
79
- # unit tests for list_usage
80
- # List Usage
81
- # Current-period usage and quota for the audit product. Only &#x60;&#x60;filter[period]&#x3D;current&#x60;&#x60; is supported; historical usage is a follow-up.
82
- # @param filter_period
66
+ # unit tests for record_event
67
+ # Record Event
68
+ # Record an audit event for the authenticated account. Returns &#x60;&#x60;201 Created&#x60;&#x60; on first write, &#x60;&#x60;200 OK&#x60;&#x60; if the request was a duplicate (matched by &#x60;&#x60;Idempotency-Key&#x60;&#x60; or auto-derived key). Customers may not emit events whose &#x60;&#x60;resource_type&#x60;&#x60; starts with &#x60;&#x60;smpl.&#x60;&#x60; — that namespace is reserved for smplkit-emitted events about platform resources.
69
+ # @param event_response
83
70
  # @param [Hash] opts the optional parameters
84
- # @return [UsageResponse]
85
- describe 'list_usage test' do
71
+ # @option opts [String] :idempotency_key
72
+ # @return [EventResponse]
73
+ describe 'record_event test' do
86
74
  it 'should work' do
87
75
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
88
76
  end