smplkit 3.0.9 → 3.0.10
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/audit/lib/smplkit_audit_client/api/actions_api.rb +9 -10
- data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/api/forwarders_api.rb +11 -12
- data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/api/resource_types_api.rb +9 -10
- data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/api/usage_api.rb +9 -0
- data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/action_list_response.rb +4 -14
- data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/event_list_meta.rb +1 -0
- data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/event_list_response.rb +1 -1
- data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/{action_list_links.rb → forwarder_delivery_list_links.rb} +3 -3
- data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/{resource_type_list_meta.rb → forwarder_delivery_list_meta.rb} +4 -3
- data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder_delivery_list_response.rb +3 -3
- data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder_list_response.rb +4 -14
- data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/{action_list_meta.rb → list_meta.rb} +20 -19
- data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/{forwarder_list_meta.rb → pagination_meta.rb} +70 -19
- data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/resource_type_list_response.rb +4 -14
- data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/usage_response.rb +30 -4
- data/lib/smplkit/_generated/audit/lib/smplkit_audit_client.rb +4 -6
- data/lib/smplkit/_generated/audit/spec/api/actions_api_spec.rb +3 -2
- data/lib/smplkit/_generated/audit/spec/api/forwarders_api_spec.rb +4 -3
- data/lib/smplkit/_generated/audit/spec/api/resource_types_api_spec.rb +3 -2
- data/lib/smplkit/_generated/audit/spec/api/usage_api_spec.rb +3 -0
- data/lib/smplkit/_generated/audit/spec/models/action_list_response_spec.rb +0 -6
- data/lib/smplkit/_generated/audit/spec/models/{action_list_links_spec.rb → forwarder_delivery_list_links_spec.rb} +6 -6
- data/lib/smplkit/_generated/audit/spec/models/{resource_type_list_meta_spec.rb → forwarder_delivery_list_meta_spec.rb} +6 -6
- data/lib/smplkit/_generated/audit/spec/models/forwarder_list_response_spec.rb +0 -6
- data/lib/smplkit/_generated/audit/spec/models/{action_list_meta_spec.rb → list_meta_spec.rb} +7 -7
- data/lib/smplkit/_generated/audit/spec/models/pagination_meta_spec.rb +54 -0
- data/lib/smplkit/_generated/audit/spec/models/resource_type_list_response_spec.rb +0 -6
- data/lib/smplkit/_generated/audit/spec/models/usage_response_spec.rb +6 -0
- data/lib/smplkit/audit/actions.rb +7 -6
- data/lib/smplkit/audit/models.rb +14 -0
- data/lib/smplkit/audit/resource_types.rb +7 -6
- data/lib/smplkit/management/audit.rb +5 -4
- metadata +9 -13
- data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder_list_links.rb +0 -148
- data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/resource_type_list_links.rb +0 -148
- data/lib/smplkit/_generated/audit/spec/models/forwarder_list_links_spec.rb +0 -36
- data/lib/smplkit/_generated/audit/spec/models/forwarder_list_meta_spec.rb +0 -36
- data/lib/smplkit/_generated/audit/spec/models/resource_type_list_links_spec.rb +0 -36
|
@@ -7,24 +7,25 @@ module Smplkit
|
|
|
7
7
|
#
|
|
8
8
|
# Backed by a maintain-by-write side table (ADR-047 §2.5), so the
|
|
9
9
|
# response time is independent of how many years of events the
|
|
10
|
-
# account has accumulated. Sorted alphabetically;
|
|
11
|
-
#
|
|
10
|
+
# account has accumulated. Sorted alphabetically; offset pagination
|
|
11
|
+
# (+page_number+ / +page_size+) per ADR-014.
|
|
12
12
|
class ResourceTypes
|
|
13
13
|
def initialize(api)
|
|
14
14
|
@api = api
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
-
def list(page_size: nil,
|
|
17
|
+
def list(page_number: nil, page_size: nil, meta_total: nil)
|
|
18
18
|
opts = {}
|
|
19
|
+
opts[:page_number] = page_number if page_number
|
|
19
20
|
opts[:page_size] = page_size if page_size
|
|
20
|
-
opts[:
|
|
21
|
+
opts[:meta_total] = meta_total unless meta_total.nil?
|
|
21
22
|
|
|
22
23
|
resp = Smplkit::Audit.call_api { @api.list_resource_types(opts) }
|
|
23
24
|
rows = (resp.data || []).map { |r| ResourceType.from_resource(r) }
|
|
24
|
-
ResourceTypeListPage.new(rows, Smplkit::Audit.
|
|
25
|
+
ResourceTypeListPage.new(rows, Smplkit::Audit.extract_pagination(resp.meta))
|
|
25
26
|
end
|
|
26
27
|
end
|
|
27
28
|
|
|
28
|
-
ResourceTypeListPage = Struct.new(:resource_types, :
|
|
29
|
+
ResourceTypeListPage = Struct.new(:resource_types, :pagination)
|
|
29
30
|
end
|
|
30
31
|
end
|
|
@@ -49,16 +49,17 @@ module Smplkit
|
|
|
49
49
|
Smplkit::Audit::Forwarder.from_resource(resp.data)
|
|
50
50
|
end
|
|
51
51
|
|
|
52
|
-
def list(forwarder_type: nil, enabled: nil, page_size: nil,
|
|
52
|
+
def list(forwarder_type: nil, enabled: nil, page_number: nil, page_size: nil, meta_total: nil)
|
|
53
53
|
opts = {}
|
|
54
54
|
opts[:filter_forwarder_type] = Smplkit::Audit::ForwarderType.coerce(forwarder_type) if forwarder_type
|
|
55
55
|
opts[:filter_enabled] = enabled unless enabled.nil?
|
|
56
|
+
opts[:page_number] = page_number if page_number
|
|
56
57
|
opts[:page_size] = page_size if page_size
|
|
57
|
-
opts[:
|
|
58
|
+
opts[:meta_total] = meta_total unless meta_total.nil?
|
|
58
59
|
|
|
59
60
|
resp = Smplkit::Audit.call_api { @api.list_forwarders(opts) }
|
|
60
61
|
forwarders = (resp.data || []).map { |r| Smplkit::Audit::Forwarder.from_resource(r) }
|
|
61
|
-
ForwarderListPage.new(forwarders, Smplkit::Audit.
|
|
62
|
+
ForwarderListPage.new(forwarders, Smplkit::Audit.extract_pagination(resp.meta))
|
|
62
63
|
end
|
|
63
64
|
|
|
64
65
|
def get(forwarder_id)
|
|
@@ -106,6 +107,6 @@ module Smplkit
|
|
|
106
107
|
end
|
|
107
108
|
end
|
|
108
109
|
|
|
109
|
-
ForwarderListPage = Struct.new(:forwarders, :
|
|
110
|
+
ForwarderListPage = Struct.new(:forwarders, :pagination)
|
|
110
111
|
end
|
|
111
112
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: smplkit
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.0.
|
|
4
|
+
version: 3.0.10
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Smpl Solutions LLC
|
|
@@ -421,8 +421,6 @@ files:
|
|
|
421
421
|
- lib/smplkit/_generated/audit/lib/smplkit_audit_client/api_model_base.rb
|
|
422
422
|
- lib/smplkit/_generated/audit/lib/smplkit_audit_client/configuration.rb
|
|
423
423
|
- lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/action_attributes.rb
|
|
424
|
-
- lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/action_list_links.rb
|
|
425
|
-
- lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/action_list_meta.rb
|
|
426
424
|
- lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/action_list_response.rb
|
|
427
425
|
- lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/action_resource.rb
|
|
428
426
|
- lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/event.rb
|
|
@@ -434,21 +432,21 @@ files:
|
|
|
434
432
|
- lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/event_response.rb
|
|
435
433
|
- lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder.rb
|
|
436
434
|
- lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder_delivery.rb
|
|
435
|
+
- lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder_delivery_list_links.rb
|
|
436
|
+
- lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder_delivery_list_meta.rb
|
|
437
437
|
- lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder_delivery_list_response.rb
|
|
438
438
|
- lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder_delivery_resource.rb
|
|
439
439
|
- lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder_delivery_response.rb
|
|
440
440
|
- lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder_http.rb
|
|
441
|
-
- lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder_list_links.rb
|
|
442
|
-
- lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder_list_meta.rb
|
|
443
441
|
- lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder_list_response.rb
|
|
444
442
|
- lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder_request.rb
|
|
445
443
|
- lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder_resource.rb
|
|
446
444
|
- lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder_response.rb
|
|
447
445
|
- lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder_type.rb
|
|
448
446
|
- lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/http_header.rb
|
|
447
|
+
- lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/list_meta.rb
|
|
448
|
+
- lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/pagination_meta.rb
|
|
449
449
|
- lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/resource_type_attributes.rb
|
|
450
|
-
- lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/resource_type_list_links.rb
|
|
451
|
-
- lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/resource_type_list_meta.rb
|
|
452
450
|
- lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/resource_type_list_response.rb
|
|
453
451
|
- lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/resource_type_resource.rb
|
|
454
452
|
- lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/retry_failed_deliveries_summary.rb
|
|
@@ -464,8 +462,6 @@ files:
|
|
|
464
462
|
- lib/smplkit/_generated/audit/spec/api/resource_types_api_spec.rb
|
|
465
463
|
- lib/smplkit/_generated/audit/spec/api/usage_api_spec.rb
|
|
466
464
|
- lib/smplkit/_generated/audit/spec/models/action_attributes_spec.rb
|
|
467
|
-
- lib/smplkit/_generated/audit/spec/models/action_list_links_spec.rb
|
|
468
|
-
- lib/smplkit/_generated/audit/spec/models/action_list_meta_spec.rb
|
|
469
465
|
- lib/smplkit/_generated/audit/spec/models/action_list_response_spec.rb
|
|
470
466
|
- lib/smplkit/_generated/audit/spec/models/action_resource_spec.rb
|
|
471
467
|
- lib/smplkit/_generated/audit/spec/models/event_list_links_spec.rb
|
|
@@ -475,13 +471,13 @@ files:
|
|
|
475
471
|
- lib/smplkit/_generated/audit/spec/models/event_resource_spec.rb
|
|
476
472
|
- lib/smplkit/_generated/audit/spec/models/event_response_spec.rb
|
|
477
473
|
- lib/smplkit/_generated/audit/spec/models/event_spec.rb
|
|
474
|
+
- lib/smplkit/_generated/audit/spec/models/forwarder_delivery_list_links_spec.rb
|
|
475
|
+
- lib/smplkit/_generated/audit/spec/models/forwarder_delivery_list_meta_spec.rb
|
|
478
476
|
- lib/smplkit/_generated/audit/spec/models/forwarder_delivery_list_response_spec.rb
|
|
479
477
|
- lib/smplkit/_generated/audit/spec/models/forwarder_delivery_resource_spec.rb
|
|
480
478
|
- lib/smplkit/_generated/audit/spec/models/forwarder_delivery_response_spec.rb
|
|
481
479
|
- lib/smplkit/_generated/audit/spec/models/forwarder_delivery_spec.rb
|
|
482
480
|
- lib/smplkit/_generated/audit/spec/models/forwarder_http_spec.rb
|
|
483
|
-
- lib/smplkit/_generated/audit/spec/models/forwarder_list_links_spec.rb
|
|
484
|
-
- lib/smplkit/_generated/audit/spec/models/forwarder_list_meta_spec.rb
|
|
485
481
|
- lib/smplkit/_generated/audit/spec/models/forwarder_list_response_spec.rb
|
|
486
482
|
- lib/smplkit/_generated/audit/spec/models/forwarder_request_spec.rb
|
|
487
483
|
- lib/smplkit/_generated/audit/spec/models/forwarder_resource_spec.rb
|
|
@@ -489,9 +485,9 @@ files:
|
|
|
489
485
|
- lib/smplkit/_generated/audit/spec/models/forwarder_spec.rb
|
|
490
486
|
- lib/smplkit/_generated/audit/spec/models/forwarder_type_spec.rb
|
|
491
487
|
- lib/smplkit/_generated/audit/spec/models/http_header_spec.rb
|
|
488
|
+
- lib/smplkit/_generated/audit/spec/models/list_meta_spec.rb
|
|
489
|
+
- lib/smplkit/_generated/audit/spec/models/pagination_meta_spec.rb
|
|
492
490
|
- lib/smplkit/_generated/audit/spec/models/resource_type_attributes_spec.rb
|
|
493
|
-
- lib/smplkit/_generated/audit/spec/models/resource_type_list_links_spec.rb
|
|
494
|
-
- lib/smplkit/_generated/audit/spec/models/resource_type_list_meta_spec.rb
|
|
495
491
|
- lib/smplkit/_generated/audit/spec/models/resource_type_list_response_spec.rb
|
|
496
492
|
- lib/smplkit/_generated/audit/spec/models/resource_type_resource_spec.rb
|
|
497
493
|
- lib/smplkit/_generated/audit/spec/models/retry_failed_deliveries_summary_spec.rb
|
|
@@ -1,148 +0,0 @@
|
|
|
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
|
-
class ForwarderListLinks < ApiModelBase
|
|
18
|
-
attr_accessor :_next
|
|
19
|
-
|
|
20
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
|
21
|
-
def self.attribute_map
|
|
22
|
-
{
|
|
23
|
-
:'_next' => :'next'
|
|
24
|
-
}
|
|
25
|
-
end
|
|
26
|
-
|
|
27
|
-
# Returns attribute mapping this model knows about
|
|
28
|
-
def self.acceptable_attribute_map
|
|
29
|
-
attribute_map
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
# Returns all the JSON keys this model knows about
|
|
33
|
-
def self.acceptable_attributes
|
|
34
|
-
acceptable_attribute_map.values
|
|
35
|
-
end
|
|
36
|
-
|
|
37
|
-
# Attribute type mapping.
|
|
38
|
-
def self.openapi_types
|
|
39
|
-
{
|
|
40
|
-
:'_next' => :'String'
|
|
41
|
-
}
|
|
42
|
-
end
|
|
43
|
-
|
|
44
|
-
# List of attributes with nullable: true
|
|
45
|
-
def self.openapi_nullable
|
|
46
|
-
Set.new([
|
|
47
|
-
:'_next'
|
|
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::Audit::ForwarderListLinks` 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::Audit::ForwarderListLinks`. 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?(:'_next')
|
|
68
|
-
self._next = attributes[:'_next']
|
|
69
|
-
end
|
|
70
|
-
end
|
|
71
|
-
|
|
72
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
|
73
|
-
# @return Array for valid properties with the reasons
|
|
74
|
-
def list_invalid_properties
|
|
75
|
-
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
76
|
-
invalid_properties = Array.new
|
|
77
|
-
invalid_properties
|
|
78
|
-
end
|
|
79
|
-
|
|
80
|
-
# Check to see if the all the properties in the model are valid
|
|
81
|
-
# @return true if the model is valid
|
|
82
|
-
def valid?
|
|
83
|
-
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
84
|
-
true
|
|
85
|
-
end
|
|
86
|
-
|
|
87
|
-
# Checks equality by comparing each attribute.
|
|
88
|
-
# @param [Object] Object to be compared
|
|
89
|
-
def ==(o)
|
|
90
|
-
return true if self.equal?(o)
|
|
91
|
-
self.class == o.class &&
|
|
92
|
-
_next == o._next
|
|
93
|
-
end
|
|
94
|
-
|
|
95
|
-
# @see the `==` method
|
|
96
|
-
# @param [Object] Object to be compared
|
|
97
|
-
def eql?(o)
|
|
98
|
-
self == o
|
|
99
|
-
end
|
|
100
|
-
|
|
101
|
-
# Calculates hash code according to all attributes.
|
|
102
|
-
# @return [Integer] Hash code
|
|
103
|
-
def hash
|
|
104
|
-
[_next].hash
|
|
105
|
-
end
|
|
106
|
-
|
|
107
|
-
# Builds the object from hash
|
|
108
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
109
|
-
# @return [Object] Returns the model itself
|
|
110
|
-
def self.build_from_hash(attributes)
|
|
111
|
-
return nil unless attributes.is_a?(Hash)
|
|
112
|
-
attributes = attributes.transform_keys(&:to_sym)
|
|
113
|
-
transformed_hash = {}
|
|
114
|
-
openapi_types.each_pair do |key, type|
|
|
115
|
-
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
116
|
-
transformed_hash["#{key}"] = nil
|
|
117
|
-
elsif type =~ /\AArray<(.*)>/i
|
|
118
|
-
# check to ensure the input is an array given that the attribute
|
|
119
|
-
# is documented as an array but the input is not
|
|
120
|
-
if attributes[attribute_map[key]].is_a?(Array)
|
|
121
|
-
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
122
|
-
end
|
|
123
|
-
elsif !attributes[attribute_map[key]].nil?
|
|
124
|
-
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
125
|
-
end
|
|
126
|
-
end
|
|
127
|
-
new(transformed_hash)
|
|
128
|
-
end
|
|
129
|
-
|
|
130
|
-
# Returns the object in the form of hash
|
|
131
|
-
# @return [Hash] Returns the object in the form of hash
|
|
132
|
-
def to_hash
|
|
133
|
-
hash = {}
|
|
134
|
-
self.class.attribute_map.each_pair do |attr, param|
|
|
135
|
-
value = self.send(attr)
|
|
136
|
-
if value.nil?
|
|
137
|
-
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
138
|
-
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
139
|
-
end
|
|
140
|
-
|
|
141
|
-
hash[param] = _to_hash(value)
|
|
142
|
-
end
|
|
143
|
-
hash
|
|
144
|
-
end
|
|
145
|
-
|
|
146
|
-
end
|
|
147
|
-
|
|
148
|
-
end
|
data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/resource_type_list_links.rb
DELETED
|
@@ -1,148 +0,0 @@
|
|
|
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
|
-
class ResourceTypeListLinks < ApiModelBase
|
|
18
|
-
attr_accessor :_next
|
|
19
|
-
|
|
20
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
|
21
|
-
def self.attribute_map
|
|
22
|
-
{
|
|
23
|
-
:'_next' => :'next'
|
|
24
|
-
}
|
|
25
|
-
end
|
|
26
|
-
|
|
27
|
-
# Returns attribute mapping this model knows about
|
|
28
|
-
def self.acceptable_attribute_map
|
|
29
|
-
attribute_map
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
# Returns all the JSON keys this model knows about
|
|
33
|
-
def self.acceptable_attributes
|
|
34
|
-
acceptable_attribute_map.values
|
|
35
|
-
end
|
|
36
|
-
|
|
37
|
-
# Attribute type mapping.
|
|
38
|
-
def self.openapi_types
|
|
39
|
-
{
|
|
40
|
-
:'_next' => :'String'
|
|
41
|
-
}
|
|
42
|
-
end
|
|
43
|
-
|
|
44
|
-
# List of attributes with nullable: true
|
|
45
|
-
def self.openapi_nullable
|
|
46
|
-
Set.new([
|
|
47
|
-
:'_next'
|
|
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::Audit::ResourceTypeListLinks` 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::Audit::ResourceTypeListLinks`. 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?(:'_next')
|
|
68
|
-
self._next = attributes[:'_next']
|
|
69
|
-
end
|
|
70
|
-
end
|
|
71
|
-
|
|
72
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
|
73
|
-
# @return Array for valid properties with the reasons
|
|
74
|
-
def list_invalid_properties
|
|
75
|
-
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
76
|
-
invalid_properties = Array.new
|
|
77
|
-
invalid_properties
|
|
78
|
-
end
|
|
79
|
-
|
|
80
|
-
# Check to see if the all the properties in the model are valid
|
|
81
|
-
# @return true if the model is valid
|
|
82
|
-
def valid?
|
|
83
|
-
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
84
|
-
true
|
|
85
|
-
end
|
|
86
|
-
|
|
87
|
-
# Checks equality by comparing each attribute.
|
|
88
|
-
# @param [Object] Object to be compared
|
|
89
|
-
def ==(o)
|
|
90
|
-
return true if self.equal?(o)
|
|
91
|
-
self.class == o.class &&
|
|
92
|
-
_next == o._next
|
|
93
|
-
end
|
|
94
|
-
|
|
95
|
-
# @see the `==` method
|
|
96
|
-
# @param [Object] Object to be compared
|
|
97
|
-
def eql?(o)
|
|
98
|
-
self == o
|
|
99
|
-
end
|
|
100
|
-
|
|
101
|
-
# Calculates hash code according to all attributes.
|
|
102
|
-
# @return [Integer] Hash code
|
|
103
|
-
def hash
|
|
104
|
-
[_next].hash
|
|
105
|
-
end
|
|
106
|
-
|
|
107
|
-
# Builds the object from hash
|
|
108
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
109
|
-
# @return [Object] Returns the model itself
|
|
110
|
-
def self.build_from_hash(attributes)
|
|
111
|
-
return nil unless attributes.is_a?(Hash)
|
|
112
|
-
attributes = attributes.transform_keys(&:to_sym)
|
|
113
|
-
transformed_hash = {}
|
|
114
|
-
openapi_types.each_pair do |key, type|
|
|
115
|
-
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
116
|
-
transformed_hash["#{key}"] = nil
|
|
117
|
-
elsif type =~ /\AArray<(.*)>/i
|
|
118
|
-
# check to ensure the input is an array given that the attribute
|
|
119
|
-
# is documented as an array but the input is not
|
|
120
|
-
if attributes[attribute_map[key]].is_a?(Array)
|
|
121
|
-
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
122
|
-
end
|
|
123
|
-
elsif !attributes[attribute_map[key]].nil?
|
|
124
|
-
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
125
|
-
end
|
|
126
|
-
end
|
|
127
|
-
new(transformed_hash)
|
|
128
|
-
end
|
|
129
|
-
|
|
130
|
-
# Returns the object in the form of hash
|
|
131
|
-
# @return [Hash] Returns the object in the form of hash
|
|
132
|
-
def to_hash
|
|
133
|
-
hash = {}
|
|
134
|
-
self.class.attribute_map.each_pair do |attr, param|
|
|
135
|
-
value = self.send(attr)
|
|
136
|
-
if value.nil?
|
|
137
|
-
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
138
|
-
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
139
|
-
end
|
|
140
|
-
|
|
141
|
-
hash[param] = _to_hash(value)
|
|
142
|
-
end
|
|
143
|
-
hash
|
|
144
|
-
end
|
|
145
|
-
|
|
146
|
-
end
|
|
147
|
-
|
|
148
|
-
end
|
|
@@ -1,36 +0,0 @@
|
|
|
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 'spec_helper'
|
|
14
|
-
require 'json'
|
|
15
|
-
require 'date'
|
|
16
|
-
|
|
17
|
-
# Unit tests for SmplkitGeneratedClient::Audit::ForwarderListLinks
|
|
18
|
-
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
-
# Please update as you see appropriate
|
|
20
|
-
describe SmplkitGeneratedClient::Audit::ForwarderListLinks do
|
|
21
|
-
#let(:instance) { SmplkitGeneratedClient::Audit::ForwarderListLinks.new }
|
|
22
|
-
|
|
23
|
-
describe 'test an instance of ForwarderListLinks' do
|
|
24
|
-
it 'should create an instance of ForwarderListLinks' do
|
|
25
|
-
# uncomment below to test the instance creation
|
|
26
|
-
#expect(instance).to be_instance_of(SmplkitGeneratedClient::Audit::ForwarderListLinks)
|
|
27
|
-
end
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
describe 'test attribute "_next"' 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
|
|
@@ -1,36 +0,0 @@
|
|
|
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 'spec_helper'
|
|
14
|
-
require 'json'
|
|
15
|
-
require 'date'
|
|
16
|
-
|
|
17
|
-
# Unit tests for SmplkitGeneratedClient::Audit::ForwarderListMeta
|
|
18
|
-
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
-
# Please update as you see appropriate
|
|
20
|
-
describe SmplkitGeneratedClient::Audit::ForwarderListMeta do
|
|
21
|
-
#let(:instance) { SmplkitGeneratedClient::Audit::ForwarderListMeta.new }
|
|
22
|
-
|
|
23
|
-
describe 'test an instance of ForwarderListMeta' do
|
|
24
|
-
it 'should create an instance of ForwarderListMeta' do
|
|
25
|
-
# uncomment below to test the instance creation
|
|
26
|
-
#expect(instance).to be_instance_of(SmplkitGeneratedClient::Audit::ForwarderListMeta)
|
|
27
|
-
end
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
describe 'test attribute "page_size"' 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
|
|
@@ -1,36 +0,0 @@
|
|
|
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 'spec_helper'
|
|
14
|
-
require 'json'
|
|
15
|
-
require 'date'
|
|
16
|
-
|
|
17
|
-
# Unit tests for SmplkitGeneratedClient::Audit::ResourceTypeListLinks
|
|
18
|
-
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
-
# Please update as you see appropriate
|
|
20
|
-
describe SmplkitGeneratedClient::Audit::ResourceTypeListLinks do
|
|
21
|
-
#let(:instance) { SmplkitGeneratedClient::Audit::ResourceTypeListLinks.new }
|
|
22
|
-
|
|
23
|
-
describe 'test an instance of ResourceTypeListLinks' do
|
|
24
|
-
it 'should create an instance of ResourceTypeListLinks' do
|
|
25
|
-
# uncomment below to test the instance creation
|
|
26
|
-
#expect(instance).to be_instance_of(SmplkitGeneratedClient::Audit::ResourceTypeListLinks)
|
|
27
|
-
end
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
describe 'test attribute "_next"' 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
|