smplkit 3.0.82 → 3.0.83

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 (55) hide show
  1. checksums.yaml +4 -4
  2. data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/api/jobs_api.rb +420 -0
  3. data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/api/runs_api.rb +281 -0
  4. data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/api/usage_api.rb +82 -0
  5. data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/api_client.rb +441 -0
  6. data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/api_error.rb +58 -0
  7. data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/api_model_base.rb +88 -0
  8. data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/configuration.rb +392 -0
  9. data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/http_header.rb +220 -0
  10. data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/job.rb +401 -0
  11. data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/job_create_request.rb +165 -0
  12. data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/job_create_resource.rb +237 -0
  13. data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/job_http_configuration.rb +368 -0
  14. data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/job_list_response.rb +193 -0
  15. data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/job_request.rb +165 -0
  16. data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/job_resource.rb +186 -0
  17. data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/job_response.rb +165 -0
  18. data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/list_meta.rb +165 -0
  19. data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/pagination_meta.rb +215 -0
  20. data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/run.rb +405 -0
  21. data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/run_list_links.rb +149 -0
  22. data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/run_list_meta.rb +166 -0
  23. data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/run_list_response.rb +203 -0
  24. data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/run_resource.rb +202 -0
  25. data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/run_response.rb +165 -0
  26. data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/usage.rb +274 -0
  27. data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/usage_resource.rb +187 -0
  28. data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/usage_response.rb +165 -0
  29. data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/version.rb +15 -0
  30. data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client.rb +63 -0
  31. data/lib/smplkit/_generated/jobs/spec/api/jobs_api_spec.rb +111 -0
  32. data/lib/smplkit/_generated/jobs/spec/api/runs_api_spec.rb +85 -0
  33. data/lib/smplkit/_generated/jobs/spec/api/usage_api_spec.rb +47 -0
  34. data/lib/smplkit/_generated/jobs/spec/models/http_header_spec.rb +42 -0
  35. data/lib/smplkit/_generated/jobs/spec/models/job_create_request_spec.rb +36 -0
  36. data/lib/smplkit/_generated/jobs/spec/models/job_create_resource_spec.rb +52 -0
  37. data/lib/smplkit/_generated/jobs/spec/models/job_http_configuration_spec.rb +82 -0
  38. data/lib/smplkit/_generated/jobs/spec/models/job_list_response_spec.rb +42 -0
  39. data/lib/smplkit/_generated/jobs/spec/models/job_request_spec.rb +36 -0
  40. data/lib/smplkit/_generated/jobs/spec/models/job_resource_spec.rb +48 -0
  41. data/lib/smplkit/_generated/jobs/spec/models/job_response_spec.rb +36 -0
  42. data/lib/smplkit/_generated/jobs/spec/models/job_spec.rb +110 -0
  43. data/lib/smplkit/_generated/jobs/spec/models/list_meta_spec.rb +36 -0
  44. data/lib/smplkit/_generated/jobs/spec/models/pagination_meta_spec.rb +54 -0
  45. data/lib/smplkit/_generated/jobs/spec/models/run_list_links_spec.rb +36 -0
  46. data/lib/smplkit/_generated/jobs/spec/models/run_list_meta_spec.rb +36 -0
  47. data/lib/smplkit/_generated/jobs/spec/models/run_list_response_spec.rb +48 -0
  48. data/lib/smplkit/_generated/jobs/spec/models/run_resource_spec.rb +48 -0
  49. data/lib/smplkit/_generated/jobs/spec/models/run_response_spec.rb +36 -0
  50. data/lib/smplkit/_generated/jobs/spec/models/run_spec.rb +138 -0
  51. data/lib/smplkit/_generated/jobs/spec/models/usage_resource_spec.rb +48 -0
  52. data/lib/smplkit/_generated/jobs/spec/models/usage_response_spec.rb +36 -0
  53. data/lib/smplkit/_generated/jobs/spec/models/usage_spec.rb +60 -0
  54. data/lib/smplkit/_generated/jobs/spec/spec_helper.rb +111 -0
  55. metadata +54 -1
@@ -0,0 +1,166 @@
1
+ =begin
2
+ #smplkit Jobs API
3
+
4
+ #Scheduled HTTP job execution API for smplkit.
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::Jobs
17
+ # Cursor-pagination meta for the runs list (ADR-014 high-cardinality exception).
18
+ class RunListMeta < ApiModelBase
19
+ # Number of runs returned per page.
20
+ attr_accessor :page_size
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'page_size' => :'page_size'
26
+ }
27
+ end
28
+
29
+ # Returns attribute mapping this model knows about
30
+ def self.acceptable_attribute_map
31
+ attribute_map
32
+ end
33
+
34
+ # Returns all the JSON keys this model knows about
35
+ def self.acceptable_attributes
36
+ acceptable_attribute_map.values
37
+ end
38
+
39
+ # Attribute type mapping.
40
+ def self.openapi_types
41
+ {
42
+ :'page_size' => :'Integer'
43
+ }
44
+ end
45
+
46
+ # List of attributes with nullable: true
47
+ def self.openapi_nullable
48
+ Set.new([
49
+ ])
50
+ end
51
+
52
+ # Initializes the object
53
+ # @param [Hash] attributes Model attributes in the form of hash
54
+ def initialize(attributes = {})
55
+ if (!attributes.is_a?(Hash))
56
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SmplkitGeneratedClient::Jobs::RunListMeta` initialize method"
57
+ end
58
+
59
+ # check to see if the attribute exists and convert string to symbol for hash key
60
+ acceptable_attribute_map = self.class.acceptable_attribute_map
61
+ attributes = attributes.each_with_object({}) { |(k, v), h|
62
+ if (!acceptable_attribute_map.key?(k.to_sym))
63
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SmplkitGeneratedClient::Jobs::RunListMeta`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
64
+ end
65
+ h[k.to_sym] = v
66
+ }
67
+
68
+ if attributes.key?(:'page_size')
69
+ self.page_size = attributes[:'page_size']
70
+ else
71
+ self.page_size = nil
72
+ end
73
+ end
74
+
75
+ # Show invalid properties with the reasons. Usually used together with valid?
76
+ # @return Array for valid properties with the reasons
77
+ def list_invalid_properties
78
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
79
+ invalid_properties = Array.new
80
+ if @page_size.nil?
81
+ invalid_properties.push('invalid value for "page_size", page_size cannot be nil.')
82
+ end
83
+
84
+ invalid_properties
85
+ end
86
+
87
+ # Check to see if the all the properties in the model are valid
88
+ # @return true if the model is valid
89
+ def valid?
90
+ warn '[DEPRECATED] the `valid?` method is obsolete'
91
+ return false if @page_size.nil?
92
+ true
93
+ end
94
+
95
+ # Custom attribute writer method with validation
96
+ # @param [Object] page_size Value to be assigned
97
+ def page_size=(page_size)
98
+ if page_size.nil?
99
+ fail ArgumentError, 'page_size cannot be nil'
100
+ end
101
+
102
+ @page_size = page_size
103
+ end
104
+
105
+ # Checks equality by comparing each attribute.
106
+ # @param [Object] Object to be compared
107
+ def ==(o)
108
+ return true if self.equal?(o)
109
+ self.class == o.class &&
110
+ page_size == o.page_size
111
+ end
112
+
113
+ # @see the `==` method
114
+ # @param [Object] Object to be compared
115
+ def eql?(o)
116
+ self == o
117
+ end
118
+
119
+ # Calculates hash code according to all attributes.
120
+ # @return [Integer] Hash code
121
+ def hash
122
+ [page_size].hash
123
+ end
124
+
125
+ # Builds the object from hash
126
+ # @param [Hash] attributes Model attributes in the form of hash
127
+ # @return [Object] Returns the model itself
128
+ def self.build_from_hash(attributes)
129
+ return nil unless attributes.is_a?(Hash)
130
+ attributes = attributes.transform_keys(&:to_sym)
131
+ transformed_hash = {}
132
+ openapi_types.each_pair do |key, type|
133
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
134
+ transformed_hash["#{key}"] = nil
135
+ elsif type =~ /\AArray<(.*)>/i
136
+ # check to ensure the input is an array given that the attribute
137
+ # is documented as an array but the input is not
138
+ if attributes[attribute_map[key]].is_a?(Array)
139
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
140
+ end
141
+ elsif !attributes[attribute_map[key]].nil?
142
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
143
+ end
144
+ end
145
+ new(transformed_hash)
146
+ end
147
+
148
+ # Returns the object in the form of hash
149
+ # @return [Hash] Returns the object in the form of hash
150
+ def to_hash
151
+ hash = {}
152
+ self.class.attribute_map.each_pair do |attr, param|
153
+ value = self.send(attr)
154
+ if value.nil?
155
+ is_nullable = self.class.openapi_nullable.include?(attr)
156
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
157
+ end
158
+
159
+ hash[param] = _to_hash(value)
160
+ end
161
+ hash
162
+ end
163
+
164
+ end
165
+
166
+ end
@@ -0,0 +1,203 @@
1
+ =begin
2
+ #smplkit Jobs API
3
+
4
+ #Scheduled HTTP job execution API for smplkit.
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::Jobs
17
+ # JSON:API collection response for runs (cursor paginated).
18
+ class RunListResponse < ApiModelBase
19
+ attr_accessor :data
20
+
21
+ attr_accessor :meta
22
+
23
+ attr_accessor :links
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+ :'data' => :'data',
29
+ :'meta' => :'meta',
30
+ :'links' => :'links'
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
+ :'data' => :'Array<RunResource>',
48
+ :'meta' => :'RunListMeta',
49
+ :'links' => :'RunListLinks'
50
+ }
51
+ end
52
+
53
+ # List of attributes with nullable: true
54
+ def self.openapi_nullable
55
+ Set.new([
56
+ :'links'
57
+ ])
58
+ end
59
+
60
+ # Initializes the object
61
+ # @param [Hash] attributes Model attributes in the form of hash
62
+ def initialize(attributes = {})
63
+ if (!attributes.is_a?(Hash))
64
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SmplkitGeneratedClient::Jobs::RunListResponse` initialize method"
65
+ end
66
+
67
+ # check to see if the attribute exists and convert string to symbol for hash key
68
+ acceptable_attribute_map = self.class.acceptable_attribute_map
69
+ attributes = attributes.each_with_object({}) { |(k, v), h|
70
+ if (!acceptable_attribute_map.key?(k.to_sym))
71
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SmplkitGeneratedClient::Jobs::RunListResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
72
+ end
73
+ h[k.to_sym] = v
74
+ }
75
+
76
+ if attributes.key?(:'data')
77
+ if (value = attributes[:'data']).is_a?(Array)
78
+ self.data = value
79
+ end
80
+ else
81
+ self.data = nil
82
+ end
83
+
84
+ if attributes.key?(:'meta')
85
+ self.meta = attributes[:'meta']
86
+ else
87
+ self.meta = nil
88
+ end
89
+
90
+ if attributes.key?(:'links')
91
+ self.links = attributes[:'links']
92
+ end
93
+ end
94
+
95
+ # Show invalid properties with the reasons. Usually used together with valid?
96
+ # @return Array for valid properties with the reasons
97
+ def list_invalid_properties
98
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
99
+ invalid_properties = Array.new
100
+ if @data.nil?
101
+ invalid_properties.push('invalid value for "data", data cannot be nil.')
102
+ end
103
+
104
+ if @meta.nil?
105
+ invalid_properties.push('invalid value for "meta", meta cannot be nil.')
106
+ end
107
+
108
+ invalid_properties
109
+ end
110
+
111
+ # Check to see if the all the properties in the model are valid
112
+ # @return true if the model is valid
113
+ def valid?
114
+ warn '[DEPRECATED] the `valid?` method is obsolete'
115
+ return false if @data.nil?
116
+ return false if @meta.nil?
117
+ true
118
+ end
119
+
120
+ # Custom attribute writer method with validation
121
+ # @param [Object] data Value to be assigned
122
+ def data=(data)
123
+ if data.nil?
124
+ fail ArgumentError, 'data cannot be nil'
125
+ end
126
+
127
+ @data = data
128
+ end
129
+
130
+ # Custom attribute writer method with validation
131
+ # @param [Object] meta Value to be assigned
132
+ def meta=(meta)
133
+ if meta.nil?
134
+ fail ArgumentError, 'meta cannot be nil'
135
+ end
136
+
137
+ @meta = meta
138
+ end
139
+
140
+ # Checks equality by comparing each attribute.
141
+ # @param [Object] Object to be compared
142
+ def ==(o)
143
+ return true if self.equal?(o)
144
+ self.class == o.class &&
145
+ data == o.data &&
146
+ meta == o.meta &&
147
+ links == o.links
148
+ end
149
+
150
+ # @see the `==` method
151
+ # @param [Object] Object to be compared
152
+ def eql?(o)
153
+ self == o
154
+ end
155
+
156
+ # Calculates hash code according to all attributes.
157
+ # @return [Integer] Hash code
158
+ def hash
159
+ [data, meta, links].hash
160
+ end
161
+
162
+ # Builds the object from hash
163
+ # @param [Hash] attributes Model attributes in the form of hash
164
+ # @return [Object] Returns the model itself
165
+ def self.build_from_hash(attributes)
166
+ return nil unless attributes.is_a?(Hash)
167
+ attributes = attributes.transform_keys(&:to_sym)
168
+ transformed_hash = {}
169
+ openapi_types.each_pair do |key, type|
170
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
171
+ transformed_hash["#{key}"] = nil
172
+ elsif type =~ /\AArray<(.*)>/i
173
+ # check to ensure the input is an array given that the attribute
174
+ # is documented as an array but the input is not
175
+ if attributes[attribute_map[key]].is_a?(Array)
176
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
177
+ end
178
+ elsif !attributes[attribute_map[key]].nil?
179
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
180
+ end
181
+ end
182
+ new(transformed_hash)
183
+ end
184
+
185
+ # Returns the object in the form of hash
186
+ # @return [Hash] Returns the object in the form of hash
187
+ def to_hash
188
+ hash = {}
189
+ self.class.attribute_map.each_pair do |attr, param|
190
+ value = self.send(attr)
191
+ if value.nil?
192
+ is_nullable = self.class.openapi_nullable.include?(attr)
193
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
194
+ end
195
+
196
+ hash[param] = _to_hash(value)
197
+ end
198
+ hash
199
+ end
200
+
201
+ end
202
+
203
+ end
@@ -0,0 +1,202 @@
1
+ =begin
2
+ #smplkit Jobs API
3
+
4
+ #Scheduled HTTP job execution API for smplkit.
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::Jobs
17
+ # JSON:API resource envelope for a run (server-assigned UUID id).
18
+ class RunResource < ApiModelBase
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' => :'Run'
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::Jobs::RunResource` 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::Jobs::RunResource`. 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 = 'run'
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