smplkit 2.0.4 → 2.0.5

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 (33) hide show
  1. checksums.yaml +4 -4
  2. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/api/actions_api.rb +159 -0
  3. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/api/functions_api.rb +90 -0
  4. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/api/resource_types_api.rb +159 -0
  5. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/action_attributes.rb +192 -0
  6. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/action_list_links.rb +148 -0
  7. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/action_list_meta.rb +164 -0
  8. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/action_list_response.rb +202 -0
  9. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/action_resource.rb +202 -0
  10. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/resource_type_attributes.rb +192 -0
  11. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/resource_type_list_links.rb +148 -0
  12. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/resource_type_list_meta.rb +164 -0
  13. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/resource_type_list_response.rb +202 -0
  14. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/resource_type_resource.rb +202 -0
  15. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/wipe_response.rb +201 -0
  16. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/wipe_tables_summary.rb +348 -0
  17. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client.rb +15 -0
  18. data/lib/smplkit/_generated/audit/spec/api/actions_api_spec.rb +62 -0
  19. data/lib/smplkit/_generated/audit/spec/api/functions_api_spec.rb +47 -0
  20. data/lib/smplkit/_generated/audit/spec/api/resource_types_api_spec.rb +62 -0
  21. data/lib/smplkit/_generated/audit/spec/models/action_attributes_spec.rb +42 -0
  22. data/lib/smplkit/_generated/audit/spec/models/action_list_links_spec.rb +36 -0
  23. data/lib/smplkit/_generated/audit/spec/models/action_list_meta_spec.rb +36 -0
  24. data/lib/smplkit/_generated/audit/spec/models/action_list_response_spec.rb +48 -0
  25. data/lib/smplkit/_generated/audit/spec/models/action_resource_spec.rb +48 -0
  26. data/lib/smplkit/_generated/audit/spec/models/resource_type_attributes_spec.rb +42 -0
  27. data/lib/smplkit/_generated/audit/spec/models/resource_type_list_links_spec.rb +36 -0
  28. data/lib/smplkit/_generated/audit/spec/models/resource_type_list_meta_spec.rb +36 -0
  29. data/lib/smplkit/_generated/audit/spec/models/resource_type_list_response_spec.rb +48 -0
  30. data/lib/smplkit/_generated/audit/spec/models/resource_type_resource_spec.rb +48 -0
  31. data/lib/smplkit/_generated/audit/spec/models/wipe_response_spec.rb +48 -0
  32. data/lib/smplkit/_generated/audit/spec/models/wipe_tables_summary_spec.rb +66 -0
  33. metadata +31 -1
@@ -0,0 +1,202 @@
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 ResourceTypeResource < ApiModelBase
18
+ # The resource_type slug.
19
+ attr_accessor :id
20
+
21
+ attr_accessor :type
22
+
23
+ attr_accessor :attributes
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+ :'id' => :'id',
29
+ :'type' => :'type',
30
+ :'attributes' => :'attributes'
31
+ }
32
+ end
33
+
34
+ # Returns attribute mapping this model knows about
35
+ def self.acceptable_attribute_map
36
+ attribute_map
37
+ end
38
+
39
+ # Returns all the JSON keys this model knows about
40
+ def self.acceptable_attributes
41
+ acceptable_attribute_map.values
42
+ end
43
+
44
+ # Attribute type mapping.
45
+ def self.openapi_types
46
+ {
47
+ :'id' => :'String',
48
+ :'type' => :'String',
49
+ :'attributes' => :'ResourceTypeAttributes'
50
+ }
51
+ end
52
+
53
+ # List of attributes with nullable: true
54
+ def self.openapi_nullable
55
+ Set.new([
56
+ ])
57
+ end
58
+
59
+ # Initializes the object
60
+ # @param [Hash] attributes Model attributes in the form of hash
61
+ def initialize(attributes = {})
62
+ if (!attributes.is_a?(Hash))
63
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SmplkitGeneratedClient::Audit::ResourceTypeResource` initialize method"
64
+ end
65
+
66
+ # check to see if the attribute exists and convert string to symbol for hash key
67
+ acceptable_attribute_map = self.class.acceptable_attribute_map
68
+ attributes = attributes.each_with_object({}) { |(k, v), h|
69
+ if (!acceptable_attribute_map.key?(k.to_sym))
70
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SmplkitGeneratedClient::Audit::ResourceTypeResource`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
71
+ end
72
+ h[k.to_sym] = v
73
+ }
74
+
75
+ if attributes.key?(:'id')
76
+ self.id = attributes[:'id']
77
+ else
78
+ self.id = nil
79
+ end
80
+
81
+ if attributes.key?(:'type')
82
+ self.type = attributes[:'type']
83
+ else
84
+ self.type = 'resource_type'
85
+ end
86
+
87
+ if attributes.key?(:'attributes')
88
+ self.attributes = attributes[:'attributes']
89
+ else
90
+ self.attributes = nil
91
+ end
92
+ end
93
+
94
+ # Show invalid properties with the reasons. Usually used together with valid?
95
+ # @return Array for valid properties with the reasons
96
+ def list_invalid_properties
97
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
98
+ invalid_properties = Array.new
99
+ if @id.nil?
100
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
101
+ end
102
+
103
+ if @attributes.nil?
104
+ invalid_properties.push('invalid value for "attributes", attributes cannot be nil.')
105
+ end
106
+
107
+ invalid_properties
108
+ end
109
+
110
+ # Check to see if the all the properties in the model are valid
111
+ # @return true if the model is valid
112
+ def valid?
113
+ warn '[DEPRECATED] the `valid?` method is obsolete'
114
+ return false if @id.nil?
115
+ return false if @attributes.nil?
116
+ true
117
+ end
118
+
119
+ # Custom attribute writer method with validation
120
+ # @param [Object] id Value to be assigned
121
+ def id=(id)
122
+ if id.nil?
123
+ fail ArgumentError, 'id cannot be nil'
124
+ end
125
+
126
+ @id = id
127
+ end
128
+
129
+ # Custom attribute writer method with validation
130
+ # @param [Object] attributes Value to be assigned
131
+ def attributes=(attributes)
132
+ if attributes.nil?
133
+ fail ArgumentError, 'attributes cannot be nil'
134
+ end
135
+
136
+ @attributes = attributes
137
+ end
138
+
139
+ # Checks equality by comparing each attribute.
140
+ # @param [Object] Object to be compared
141
+ def ==(o)
142
+ return true if self.equal?(o)
143
+ self.class == o.class &&
144
+ id == o.id &&
145
+ type == o.type &&
146
+ attributes == o.attributes
147
+ end
148
+
149
+ # @see the `==` method
150
+ # @param [Object] Object to be compared
151
+ def eql?(o)
152
+ self == o
153
+ end
154
+
155
+ # Calculates hash code according to all attributes.
156
+ # @return [Integer] Hash code
157
+ def hash
158
+ [id, type, attributes].hash
159
+ end
160
+
161
+ # Builds the object from hash
162
+ # @param [Hash] attributes Model attributes in the form of hash
163
+ # @return [Object] Returns the model itself
164
+ def self.build_from_hash(attributes)
165
+ return nil unless attributes.is_a?(Hash)
166
+ attributes = attributes.transform_keys(&:to_sym)
167
+ transformed_hash = {}
168
+ openapi_types.each_pair do |key, type|
169
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
170
+ transformed_hash["#{key}"] = nil
171
+ elsif type =~ /\AArray<(.*)>/i
172
+ # check to ensure the input is an array given that the attribute
173
+ # is documented as an array but the input is not
174
+ if attributes[attribute_map[key]].is_a?(Array)
175
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
176
+ end
177
+ elsif !attributes[attribute_map[key]].nil?
178
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
179
+ end
180
+ end
181
+ new(transformed_hash)
182
+ end
183
+
184
+ # Returns the object in the form of hash
185
+ # @return [Hash] Returns the object in the form of hash
186
+ def to_hash
187
+ hash = {}
188
+ self.class.attribute_map.each_pair do |attr, param|
189
+ value = self.send(attr)
190
+ if value.nil?
191
+ is_nullable = self.class.openapi_nullable.include?(attr)
192
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
193
+ end
194
+
195
+ hash[param] = _to_hash(value)
196
+ end
197
+ hash
198
+ end
199
+
200
+ end
201
+
202
+ end
@@ -0,0 +1,201 @@
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 WipeResponse < ApiModelBase
18
+ attr_accessor :wiped
19
+
20
+ attr_accessor :tables
21
+
22
+ attr_accessor :completed_at
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'wiped' => :'wiped',
28
+ :'tables' => :'tables',
29
+ :'completed_at' => :'completed_at'
30
+ }
31
+ end
32
+
33
+ # Returns attribute mapping this model knows about
34
+ def self.acceptable_attribute_map
35
+ attribute_map
36
+ end
37
+
38
+ # Returns all the JSON keys this model knows about
39
+ def self.acceptable_attributes
40
+ acceptable_attribute_map.values
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ def self.openapi_types
45
+ {
46
+ :'wiped' => :'Boolean',
47
+ :'tables' => :'WipeTablesSummary',
48
+ :'completed_at' => :'Time'
49
+ }
50
+ end
51
+
52
+ # List of attributes with nullable: true
53
+ def self.openapi_nullable
54
+ Set.new([
55
+ ])
56
+ end
57
+
58
+ # Initializes the object
59
+ # @param [Hash] attributes Model attributes in the form of hash
60
+ def initialize(attributes = {})
61
+ if (!attributes.is_a?(Hash))
62
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SmplkitGeneratedClient::Audit::WipeResponse` initialize method"
63
+ end
64
+
65
+ # check to see if the attribute exists and convert string to symbol for hash key
66
+ acceptable_attribute_map = self.class.acceptable_attribute_map
67
+ attributes = attributes.each_with_object({}) { |(k, v), h|
68
+ if (!acceptable_attribute_map.key?(k.to_sym))
69
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SmplkitGeneratedClient::Audit::WipeResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
70
+ end
71
+ h[k.to_sym] = v
72
+ }
73
+
74
+ if attributes.key?(:'wiped')
75
+ self.wiped = attributes[:'wiped']
76
+ else
77
+ self.wiped = true
78
+ end
79
+
80
+ if attributes.key?(:'tables')
81
+ self.tables = attributes[:'tables']
82
+ else
83
+ self.tables = nil
84
+ end
85
+
86
+ if attributes.key?(:'completed_at')
87
+ self.completed_at = attributes[:'completed_at']
88
+ else
89
+ self.completed_at = nil
90
+ end
91
+ end
92
+
93
+ # Show invalid properties with the reasons. Usually used together with valid?
94
+ # @return Array for valid properties with the reasons
95
+ def list_invalid_properties
96
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
97
+ invalid_properties = Array.new
98
+ if @tables.nil?
99
+ invalid_properties.push('invalid value for "tables", tables cannot be nil.')
100
+ end
101
+
102
+ if @completed_at.nil?
103
+ invalid_properties.push('invalid value for "completed_at", completed_at cannot be nil.')
104
+ end
105
+
106
+ invalid_properties
107
+ end
108
+
109
+ # Check to see if the all the properties in the model are valid
110
+ # @return true if the model is valid
111
+ def valid?
112
+ warn '[DEPRECATED] the `valid?` method is obsolete'
113
+ return false if @tables.nil?
114
+ return false if @completed_at.nil?
115
+ true
116
+ end
117
+
118
+ # Custom attribute writer method with validation
119
+ # @param [Object] tables Value to be assigned
120
+ def tables=(tables)
121
+ if tables.nil?
122
+ fail ArgumentError, 'tables cannot be nil'
123
+ end
124
+
125
+ @tables = tables
126
+ end
127
+
128
+ # Custom attribute writer method with validation
129
+ # @param [Object] completed_at Value to be assigned
130
+ def completed_at=(completed_at)
131
+ if completed_at.nil?
132
+ fail ArgumentError, 'completed_at cannot be nil'
133
+ end
134
+
135
+ @completed_at = completed_at
136
+ end
137
+
138
+ # Checks equality by comparing each attribute.
139
+ # @param [Object] Object to be compared
140
+ def ==(o)
141
+ return true if self.equal?(o)
142
+ self.class == o.class &&
143
+ wiped == o.wiped &&
144
+ tables == o.tables &&
145
+ completed_at == o.completed_at
146
+ end
147
+
148
+ # @see the `==` method
149
+ # @param [Object] Object to be compared
150
+ def eql?(o)
151
+ self == o
152
+ end
153
+
154
+ # Calculates hash code according to all attributes.
155
+ # @return [Integer] Hash code
156
+ def hash
157
+ [wiped, tables, completed_at].hash
158
+ end
159
+
160
+ # Builds the object from hash
161
+ # @param [Hash] attributes Model attributes in the form of hash
162
+ # @return [Object] Returns the model itself
163
+ def self.build_from_hash(attributes)
164
+ return nil unless attributes.is_a?(Hash)
165
+ attributes = attributes.transform_keys(&:to_sym)
166
+ transformed_hash = {}
167
+ openapi_types.each_pair do |key, type|
168
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
169
+ transformed_hash["#{key}"] = nil
170
+ elsif type =~ /\AArray<(.*)>/i
171
+ # check to ensure the input is an array given that the attribute
172
+ # is documented as an array but the input is not
173
+ if attributes[attribute_map[key]].is_a?(Array)
174
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
175
+ end
176
+ elsif !attributes[attribute_map[key]].nil?
177
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
178
+ end
179
+ end
180
+ new(transformed_hash)
181
+ end
182
+
183
+ # Returns the object in the form of hash
184
+ # @return [Hash] Returns the object in the form of hash
185
+ def to_hash
186
+ hash = {}
187
+ self.class.attribute_map.each_pair do |attr, param|
188
+ value = self.send(attr)
189
+ if value.nil?
190
+ is_nullable = self.class.openapi_nullable.include?(attr)
191
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
192
+ end
193
+
194
+ hash[param] = _to_hash(value)
195
+ end
196
+ hash
197
+ end
198
+
199
+ end
200
+
201
+ end