autosde_openapi_client 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (189) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +32 -7
  3. data/docs/AbstractCapabilityApi.md +6 -6
  4. data/docs/AccountApi.md +9 -9
  5. data/docs/AddressApi.md +6 -6
  6. data/docs/AuthenticationApi.md +1 -1
  7. data/docs/AutoSDEProjectApi.md +6 -6
  8. data/docs/AutoSDERoleApi.md +6 -6
  9. data/docs/CapabilityTranslationApi.md +6 -6
  10. data/docs/HostApi.md +6 -6
  11. data/docs/HostVolumeConnectionApi.md +6 -6
  12. data/docs/Job.md +29 -0
  13. data/docs/JobApi.md +104 -0
  14. data/docs/JobCreate.md +19 -0
  15. data/docs/NativeCapabilityApi.md +6 -6
  16. data/docs/ProfileApi.md +6 -6
  17. data/docs/ProvisioningStrategyApi.md +6 -6
  18. data/docs/ServiceApi.md +9 -9
  19. data/docs/ServiceResourceAttachmentApi.md +6 -6
  20. data/docs/Snapshot.md +25 -0
  21. data/docs/SnapshotApi.md +204 -0
  22. data/docs/SnapshotCreate.md +23 -0
  23. data/docs/StorageHost.md +29 -0
  24. data/docs/StorageHostApi.md +256 -0
  25. data/docs/StorageHostCreate.md +37 -0
  26. data/docs/StorageHostResponse.md +31 -0
  27. data/docs/StorageHostUpdate.md +21 -0
  28. data/docs/StorageHostVolumeMapping.md +25 -0
  29. data/docs/StorageHostVolumeMappingApi.md +204 -0
  30. data/docs/StorageHostVolumeMappingCreate.md +23 -0
  31. data/docs/StorageResourceApi.md +9 -9
  32. data/docs/StorageSystemApi.md +6 -6
  33. data/docs/SystemTypeApi.md +6 -6
  34. data/docs/Volume.md +2 -0
  35. data/docs/VolumeApi.md +9 -9
  36. data/docs/VolumeCreate.md +2 -0
  37. data/docs/VolumeResponse.md +2 -0
  38. data/docs/VolumeSafeDeleteApi.md +6 -6
  39. data/docs/VolumeUpdate.md +3 -1
  40. data/lib/openapi_client.rb +108 -0
  41. data/lib/{autosde_openapi_client → openapi_client}/api/abstract_capability_api.rb +19 -15
  42. data/lib/{autosde_openapi_client → openapi_client}/api/account_api.rb +25 -20
  43. data/lib/{autosde_openapi_client → openapi_client}/api/address_api.rb +19 -15
  44. data/lib/{autosde_openapi_client → openapi_client}/api/authentication_api.rb +5 -4
  45. data/lib/{autosde_openapi_client → openapi_client}/api/auto_sde_project_api.rb +19 -15
  46. data/lib/{autosde_openapi_client → openapi_client}/api/auto_sde_role_api.rb +19 -15
  47. data/lib/{autosde_openapi_client → openapi_client}/api/capability_translation_api.rb +19 -15
  48. data/lib/{autosde_openapi_client → openapi_client}/api/host_api.rb +19 -15
  49. data/lib/{autosde_openapi_client → openapi_client}/api/host_volume_connection_api.rb +19 -15
  50. data/lib/openapi_client/api/job_api.rb +136 -0
  51. data/lib/{autosde_openapi_client → openapi_client}/api/native_capability_api.rb +19 -15
  52. data/lib/{autosde_openapi_client → openapi_client}/api/profile_api.rb +19 -15
  53. data/lib/{autosde_openapi_client → openapi_client}/api/provisioning_strategy_api.rb +19 -15
  54. data/lib/{autosde_openapi_client → openapi_client}/api/service_api.rb +25 -20
  55. data/lib/{autosde_openapi_client → openapi_client}/api/service_resource_attachment_api.rb +19 -15
  56. data/lib/openapi_client/api/snapshot_api.rb +254 -0
  57. data/lib/openapi_client/api/storage_host_api.rb +321 -0
  58. data/lib/openapi_client/api/storage_host_volume_mapping_api.rb +254 -0
  59. data/lib/{autosde_openapi_client → openapi_client}/api/storage_resource_api.rb +25 -20
  60. data/lib/{autosde_openapi_client → openapi_client}/api/storage_system_api.rb +19 -15
  61. data/lib/{autosde_openapi_client → openapi_client}/api/system_type_api.rb +19 -15
  62. data/lib/{autosde_openapi_client → openapi_client}/api/volume_api.rb +25 -20
  63. data/lib/{autosde_openapi_client → openapi_client}/api/volume_safe_delete_api.rb +19 -15
  64. data/lib/{autosde_openapi_client → openapi_client}/api_client.rb +46 -45
  65. data/lib/{autosde_openapi_client → openapi_client}/api_error.rb +1 -1
  66. data/lib/{autosde_openapi_client → openapi_client}/configuration.rb +34 -7
  67. data/lib/{autosde_openapi_client → openapi_client}/models/abstract_capability.rb +9 -5
  68. data/lib/{autosde_openapi_client → openapi_client}/models/account.rb +9 -5
  69. data/lib/{autosde_openapi_client → openapi_client}/models/account_post_request.rb +9 -5
  70. data/lib/{autosde_openapi_client → openapi_client}/models/account_post_response.rb +9 -5
  71. data/lib/{autosde_openapi_client → openapi_client}/models/address.rb +9 -5
  72. data/lib/{autosde_openapi_client → openapi_client}/models/address_create.rb +9 -5
  73. data/lib/{autosde_openapi_client → openapi_client}/models/auth_response.rb +9 -5
  74. data/lib/{autosde_openapi_client → openapi_client}/models/authentication.rb +9 -5
  75. data/lib/{autosde_openapi_client → openapi_client}/models/auto_sde_project.rb +9 -5
  76. data/lib/{autosde_openapi_client → openapi_client}/models/auto_sde_role.rb +9 -5
  77. data/lib/{autosde_openapi_client → openapi_client}/models/capability_translation.rb +9 -5
  78. data/lib/{autosde_openapi_client → openapi_client}/models/capability_translation_create.rb +9 -5
  79. data/lib/{autosde_openapi_client → openapi_client}/models/host.rb +9 -5
  80. data/lib/{autosde_openapi_client → openapi_client}/models/host_create.rb +9 -5
  81. data/lib/{autosde_openapi_client → openapi_client}/models/host_volume_connection.rb +9 -5
  82. data/lib/{autosde_openapi_client → openapi_client}/models/host_volume_connection_create.rb +9 -5
  83. data/lib/openapi_client/models/job.rb +272 -0
  84. data/lib/openapi_client/models/job_create.rb +222 -0
  85. data/lib/{autosde_openapi_client → openapi_client}/models/native_capability.rb +9 -5
  86. data/lib/{autosde_openapi_client → openapi_client}/models/profile.rb +9 -5
  87. data/lib/{autosde_openapi_client → openapi_client}/models/provisioning_strategy.rb +9 -5
  88. data/lib/{autosde_openapi_client → openapi_client}/models/service.rb +9 -5
  89. data/lib/{autosde_openapi_client → openapi_client}/models/service_abstract_capability_value.rb +9 -5
  90. data/lib/{autosde_openapi_client → openapi_client}/models/service_create.rb +9 -5
  91. data/lib/{autosde_openapi_client → openapi_client}/models/service_resource_attachment.rb +9 -5
  92. data/lib/openapi_client/models/snapshot.rb +290 -0
  93. data/lib/openapi_client/models/snapshot_create.rb +280 -0
  94. data/lib/openapi_client/models/storage_host.rb +309 -0
  95. data/lib/openapi_client/models/storage_host_create.rb +360 -0
  96. data/lib/openapi_client/models/storage_host_response.rb +325 -0
  97. data/lib/openapi_client/models/storage_host_update.rb +293 -0
  98. data/lib/openapi_client/models/storage_host_volume_mapping.rb +291 -0
  99. data/lib/openapi_client/models/storage_host_volume_mapping_create.rb +283 -0
  100. data/lib/{autosde_openapi_client → openapi_client}/models/storage_resource.rb +9 -5
  101. data/lib/{autosde_openapi_client → openapi_client}/models/storage_resource_create.rb +9 -5
  102. data/lib/{autosde_openapi_client → openapi_client}/models/storage_resource_response.rb +9 -5
  103. data/lib/{autosde_openapi_client → openapi_client}/models/storage_system.rb +9 -5
  104. data/lib/{autosde_openapi_client → openapi_client}/models/storage_system_create.rb +9 -5
  105. data/lib/{autosde_openapi_client → openapi_client}/models/system_type.rb +9 -5
  106. data/lib/{autosde_openapi_client → openapi_client}/models/system_type_create.rb +9 -5
  107. data/lib/{autosde_openapi_client → openapi_client}/models/volume.rb +20 -6
  108. data/lib/{autosde_openapi_client → openapi_client}/models/volume_create.rb +20 -6
  109. data/lib/{autosde_openapi_client → openapi_client}/models/volume_response.rb +20 -6
  110. data/lib/{autosde_openapi_client → openapi_client}/models/volume_safe_delete.rb +9 -5
  111. data/lib/{autosde_openapi_client → openapi_client}/models/volume_safe_delete_create.rb +9 -5
  112. data/lib/{autosde_openapi_client → openapi_client}/models/volume_update.rb +22 -6
  113. data/lib/{autosde_openapi_client → openapi_client}/version.rb +2 -2
  114. data/{autosde_openapi_client.gemspec → openapi_client.gemspec} +3 -4
  115. data/spec/api/abstract_capability_api_spec.rb +1 -1
  116. data/spec/api/account_api_spec.rb +1 -1
  117. data/spec/api/address_api_spec.rb +1 -1
  118. data/spec/api/authentication_api_spec.rb +1 -1
  119. data/spec/api/auto_sde_project_api_spec.rb +1 -1
  120. data/spec/api/auto_sde_role_api_spec.rb +1 -1
  121. data/spec/api/capability_translation_api_spec.rb +1 -1
  122. data/spec/api/host_api_spec.rb +1 -1
  123. data/spec/api/host_volume_connection_api_spec.rb +1 -1
  124. data/spec/api/job_api_spec.rb +54 -0
  125. data/spec/api/native_capability_api_spec.rb +1 -1
  126. data/spec/api/profile_api_spec.rb +1 -1
  127. data/spec/api/provisioning_strategy_api_spec.rb +1 -1
  128. data/spec/api/service_api_spec.rb +1 -1
  129. data/spec/api/service_resource_attachment_api_spec.rb +1 -1
  130. data/spec/api/snapshot_api_spec.rb +74 -0
  131. data/spec/api/storage_host_api_spec.rb +74 -0
  132. data/spec/api/storage_host_volume_mapping_api_spec.rb +74 -0
  133. data/spec/api/storage_resource_api_spec.rb +1 -1
  134. data/spec/api/storage_system_api_spec.rb +1 -1
  135. data/spec/api/system_type_api_spec.rb +1 -1
  136. data/spec/api/volume_api_spec.rb +1 -1
  137. data/spec/api/volume_safe_delete_api_spec.rb +1 -1
  138. data/spec/api_client_spec.rb +1 -1
  139. data/spec/configuration_spec.rb +1 -1
  140. data/spec/models/abstract_capability_spec.rb +1 -1
  141. data/spec/models/account_post_request_spec.rb +1 -1
  142. data/spec/models/account_post_response_spec.rb +1 -1
  143. data/spec/models/account_spec.rb +1 -1
  144. data/spec/models/address_create_spec.rb +1 -1
  145. data/spec/models/address_spec.rb +1 -1
  146. data/spec/models/auth_response_spec.rb +1 -1
  147. data/spec/models/authentication_spec.rb +1 -1
  148. data/spec/models/auto_sde_project_spec.rb +1 -1
  149. data/spec/models/auto_sde_role_spec.rb +1 -1
  150. data/spec/models/capability_translation_create_spec.rb +1 -1
  151. data/spec/models/capability_translation_spec.rb +1 -1
  152. data/spec/models/host_create_spec.rb +1 -1
  153. data/spec/models/host_spec.rb +1 -1
  154. data/spec/models/host_volume_connection_create_spec.rb +1 -1
  155. data/spec/models/host_volume_connection_spec.rb +1 -1
  156. data/spec/models/job_create_spec.rb +47 -0
  157. data/spec/models/job_spec.rb +77 -0
  158. data/spec/models/native_capability_spec.rb +1 -1
  159. data/spec/models/profile_spec.rb +1 -1
  160. data/spec/models/provisioning_strategy_spec.rb +1 -1
  161. data/spec/models/service_abstract_capability_value_spec.rb +1 -1
  162. data/spec/models/service_create_spec.rb +1 -1
  163. data/spec/models/service_resource_attachment_spec.rb +1 -1
  164. data/spec/models/service_spec.rb +1 -1
  165. data/spec/models/snapshot_create_spec.rb +63 -0
  166. data/spec/models/snapshot_spec.rb +69 -0
  167. data/spec/models/storage_host_create_spec.rb +109 -0
  168. data/spec/models/storage_host_response_spec.rb +87 -0
  169. data/spec/models/storage_host_spec.rb +81 -0
  170. data/spec/models/storage_host_update_spec.rb +61 -0
  171. data/spec/models/storage_host_volume_mapping_create_spec.rb +63 -0
  172. data/spec/models/storage_host_volume_mapping_spec.rb +69 -0
  173. data/spec/models/storage_resource_create_spec.rb +1 -1
  174. data/spec/models/storage_resource_response_spec.rb +1 -1
  175. data/spec/models/storage_resource_spec.rb +1 -1
  176. data/spec/models/storage_system_create_spec.rb +1 -1
  177. data/spec/models/storage_system_spec.rb +1 -1
  178. data/spec/models/system_type_create_spec.rb +1 -1
  179. data/spec/models/system_type_spec.rb +1 -1
  180. data/spec/models/volume_create_spec.rb +1 -1
  181. data/spec/models/volume_response_spec.rb +1 -1
  182. data/spec/models/volume_safe_delete_create_spec.rb +1 -1
  183. data/spec/models/volume_safe_delete_spec.rb +1 -1
  184. data/spec/models/volume_spec.rb +1 -1
  185. data/spec/models/volume_update_spec.rb +7 -1
  186. data/spec/spec_helper.rb +2 -2
  187. metadata +142 -106
  188. data/lib/autosde_openapi_client.rb +0 -94
  189. data/site_manager_oas.json +0 -3992
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
  Contact: autosde@il.ibm.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.3.1
9
+ OpenAPI Generator version: 5.0.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
  Contact: autosde@il.ibm.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.3.1
9
+ OpenAPI Generator version: 5.0.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -21,6 +21,18 @@ module OpenapiClient
21
21
  # Defines url base path
22
22
  attr_accessor :base_path
23
23
 
24
+ # Define server configuration index
25
+ attr_accessor :server_index
26
+
27
+ # Define server operation configuration index
28
+ attr_accessor :server_operation_index
29
+
30
+ # Default server variables
31
+ attr_accessor :server_variables
32
+
33
+ # Default server operation variables
34
+ attr_accessor :server_operation_variables
35
+
24
36
  # Defines API keys used with API Key authentications.
25
37
  #
26
38
  # @return [Hash] key: parameter name, value: parameter value (API key)
@@ -127,8 +139,12 @@ module OpenapiClient
127
139
 
128
140
  def initialize
129
141
  @scheme = 'http'
130
- @host = 'localhost'
142
+ @host = 'localhost:9000'
131
143
  @base_path = '/site-manager/api/v1/engine'
144
+ @server_index = 0
145
+ @server_operation_index = {}
146
+ @server_variables = {}
147
+ @server_operation_variables = {}
132
148
  @api_key = {}
133
149
  @api_key_prefix = {}
134
150
  @timeout = 0
@@ -171,8 +187,12 @@ module OpenapiClient
171
187
  @base_path = '' if @base_path == '/'
172
188
  end
173
189
 
174
- def base_url
175
- "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '')
190
+ # Returns base URL for specified operation based on server settings
191
+ def base_url(operation = nil)
192
+ index = server_operation_index.fetch(operation, server_index)
193
+ return "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '') if index == nil
194
+
195
+ server_url(index, server_operation_variables.fetch(operation, server_variables), operation_server_settings[operation])
176
196
  end
177
197
 
178
198
  # Gets API key (with prefix if set).
@@ -231,12 +251,17 @@ module OpenapiClient
231
251
  ]
232
252
  end
233
253
 
254
+ def operation_server_settings
255
+ {
256
+ }
257
+ end
258
+
234
259
  # Returns URL based on server settings
235
260
  #
236
261
  # @param index array index of the server settings
237
262
  # @param variables hash of variable and the corresponding value
238
- def server_url(index, variables = {})
239
- servers = server_settings
263
+ def server_url(index, variables = {}, servers = nil)
264
+ servers = server_settings if servers == nil
240
265
 
241
266
  # check array index out of bound
242
267
  if (index < 0 || index >= servers.size)
@@ -246,10 +271,12 @@ module OpenapiClient
246
271
  server = servers[index]
247
272
  url = server[:url]
248
273
 
274
+ return url unless server.key? :variables
275
+
249
276
  # go through variable and assign a value
250
277
  server[:variables].each do |name, variable|
251
278
  if variables.key?(name)
252
- if (server[:variables][name][:enum_values].include? variables[name])
279
+ if (!server[:variables][name].key?(:enum_values) || server[:variables][name][:enum_values].include?(variables[name]))
253
280
  url.gsub! "{" + name.to_s + "}", variables[name]
254
281
  else
255
282
  fail ArgumentError, "The variable `#{name}` in the server URL has invalid value #{variables[name]}. Must be #{server[:variables][name][:enum_values]}."
@@ -6,11 +6,12 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
  Contact: autosde@il.ibm.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.3.1
9
+ OpenAPI Generator version: 5.0.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
+ require 'time'
14
15
 
15
16
  module OpenapiClient
16
17
  # Abstract capabilities are the storage system feature capabilities, in general terminology.
@@ -114,7 +115,9 @@ module OpenapiClient
114
115
  def build_from_hash(attributes)
115
116
  return nil unless attributes.is_a?(Hash)
116
117
  self.class.openapi_types.each_pair do |key, type|
117
- if type =~ /\AArray<(.*)>/i
118
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
119
+ self.send("#{key}=", nil)
120
+ elsif type =~ /\AArray<(.*)>/i
118
121
  # check to ensure the input is an array given that the attribute
119
122
  # is documented as an array but the input is not
120
123
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -122,7 +125,7 @@ module OpenapiClient
122
125
  end
123
126
  elsif !attributes[self.class.attribute_map[key]].nil?
124
127
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
125
- end # or else data not found in attributes(hash), not an issue as the data can be optional
128
+ end
126
129
  end
127
130
 
128
131
  self
@@ -134,8 +137,8 @@ module OpenapiClient
134
137
  # @return [Object] Deserialized data
135
138
  def _deserialize(type, value)
136
139
  case type.to_sym
137
- when :DateTime
138
- DateTime.parse(value)
140
+ when :Time
141
+ Time.parse(value)
139
142
  when :Date
140
143
  Date.parse(value)
141
144
  when :String
@@ -214,5 +217,6 @@ module OpenapiClient
214
217
  value
215
218
  end
216
219
  end
220
+
217
221
  end
218
222
  end
@@ -6,11 +6,12 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
  Contact: autosde@il.ibm.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.3.1
9
+ OpenAPI Generator version: 5.0.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
+ require 'time'
14
15
 
15
16
  module OpenapiClient
16
17
  # doc-todo: General information about 'account' needed - what account - or type of account. something to guide the user.
@@ -124,7 +125,9 @@ module OpenapiClient
124
125
  def build_from_hash(attributes)
125
126
  return nil unless attributes.is_a?(Hash)
126
127
  self.class.openapi_types.each_pair do |key, type|
127
- if type =~ /\AArray<(.*)>/i
128
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
129
+ self.send("#{key}=", nil)
130
+ elsif type =~ /\AArray<(.*)>/i
128
131
  # check to ensure the input is an array given that the attribute
129
132
  # is documented as an array but the input is not
130
133
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -132,7 +135,7 @@ module OpenapiClient
132
135
  end
133
136
  elsif !attributes[self.class.attribute_map[key]].nil?
134
137
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
135
- end # or else data not found in attributes(hash), not an issue as the data can be optional
138
+ end
136
139
  end
137
140
 
138
141
  self
@@ -144,8 +147,8 @@ module OpenapiClient
144
147
  # @return [Object] Deserialized data
145
148
  def _deserialize(type, value)
146
149
  case type.to_sym
147
- when :DateTime
148
- DateTime.parse(value)
150
+ when :Time
151
+ Time.parse(value)
149
152
  when :Date
150
153
  Date.parse(value)
151
154
  when :String
@@ -224,5 +227,6 @@ module OpenapiClient
224
227
  value
225
228
  end
226
229
  end
230
+
227
231
  end
228
232
  end
@@ -6,11 +6,12 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
  Contact: autosde@il.ibm.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.3.1
9
+ OpenAPI Generator version: 5.0.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
+ require 'time'
14
15
 
15
16
  module OpenapiClient
16
17
  # TODO add description
@@ -114,7 +115,9 @@ module OpenapiClient
114
115
  def build_from_hash(attributes)
115
116
  return nil unless attributes.is_a?(Hash)
116
117
  self.class.openapi_types.each_pair do |key, type|
117
- if type =~ /\AArray<(.*)>/i
118
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
119
+ self.send("#{key}=", nil)
120
+ elsif type =~ /\AArray<(.*)>/i
118
121
  # check to ensure the input is an array given that the attribute
119
122
  # is documented as an array but the input is not
120
123
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -122,7 +125,7 @@ module OpenapiClient
122
125
  end
123
126
  elsif !attributes[self.class.attribute_map[key]].nil?
124
127
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
125
- end # or else data not found in attributes(hash), not an issue as the data can be optional
128
+ end
126
129
  end
127
130
 
128
131
  self
@@ -134,8 +137,8 @@ module OpenapiClient
134
137
  # @return [Object] Deserialized data
135
138
  def _deserialize(type, value)
136
139
  case type.to_sym
137
- when :DateTime
138
- DateTime.parse(value)
140
+ when :Time
141
+ Time.parse(value)
139
142
  when :Date
140
143
  Date.parse(value)
141
144
  when :String
@@ -214,5 +217,6 @@ module OpenapiClient
214
217
  value
215
218
  end
216
219
  end
220
+
217
221
  end
218
222
  end
@@ -6,11 +6,12 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
  Contact: autosde@il.ibm.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.3.1
9
+ OpenAPI Generator version: 5.0.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
+ require 'time'
14
15
 
15
16
  module OpenapiClient
16
17
  # TODO add description
@@ -134,7 +135,9 @@ module OpenapiClient
134
135
  def build_from_hash(attributes)
135
136
  return nil unless attributes.is_a?(Hash)
136
137
  self.class.openapi_types.each_pair do |key, type|
137
- if type =~ /\AArray<(.*)>/i
138
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
139
+ self.send("#{key}=", nil)
140
+ elsif type =~ /\AArray<(.*)>/i
138
141
  # check to ensure the input is an array given that the attribute
139
142
  # is documented as an array but the input is not
140
143
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -142,7 +145,7 @@ module OpenapiClient
142
145
  end
143
146
  elsif !attributes[self.class.attribute_map[key]].nil?
144
147
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
145
- end # or else data not found in attributes(hash), not an issue as the data can be optional
148
+ end
146
149
  end
147
150
 
148
151
  self
@@ -154,8 +157,8 @@ module OpenapiClient
154
157
  # @return [Object] Deserialized data
155
158
  def _deserialize(type, value)
156
159
  case type.to_sym
157
- when :DateTime
158
- DateTime.parse(value)
160
+ when :Time
161
+ Time.parse(value)
159
162
  when :Date
160
163
  Date.parse(value)
161
164
  when :String
@@ -234,5 +237,6 @@ module OpenapiClient
234
237
  value
235
238
  end
236
239
  end
240
+
237
241
  end
238
242
  end
@@ -6,11 +6,12 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
  Contact: autosde@il.ibm.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.3.1
9
+ OpenAPI Generator version: 5.0.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
+ require 'time'
14
15
 
15
16
  module OpenapiClient
16
17
  # Address
@@ -224,7 +225,9 @@ module OpenapiClient
224
225
  def build_from_hash(attributes)
225
226
  return nil unless attributes.is_a?(Hash)
226
227
  self.class.openapi_types.each_pair do |key, type|
227
- if type =~ /\AArray<(.*)>/i
228
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
229
+ self.send("#{key}=", nil)
230
+ elsif type =~ /\AArray<(.*)>/i
228
231
  # check to ensure the input is an array given that the attribute
229
232
  # is documented as an array but the input is not
230
233
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -232,7 +235,7 @@ module OpenapiClient
232
235
  end
233
236
  elsif !attributes[self.class.attribute_map[key]].nil?
234
237
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
235
- end # or else data not found in attributes(hash), not an issue as the data can be optional
238
+ end
236
239
  end
237
240
 
238
241
  self
@@ -244,8 +247,8 @@ module OpenapiClient
244
247
  # @return [Object] Deserialized data
245
248
  def _deserialize(type, value)
246
249
  case type.to_sym
247
- when :DateTime
248
- DateTime.parse(value)
250
+ when :Time
251
+ Time.parse(value)
249
252
  when :Date
250
253
  Date.parse(value)
251
254
  when :String
@@ -324,5 +327,6 @@ module OpenapiClient
324
327
  value
325
328
  end
326
329
  end
330
+
327
331
  end
328
332
  end
@@ -6,11 +6,12 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
  Contact: autosde@il.ibm.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.3.1
9
+ OpenAPI Generator version: 5.0.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
+ require 'time'
14
15
 
15
16
  module OpenapiClient
16
17
  # TODO add description
@@ -226,7 +227,9 @@ module OpenapiClient
226
227
  def build_from_hash(attributes)
227
228
  return nil unless attributes.is_a?(Hash)
228
229
  self.class.openapi_types.each_pair do |key, type|
229
- if type =~ /\AArray<(.*)>/i
230
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
231
+ self.send("#{key}=", nil)
232
+ elsif type =~ /\AArray<(.*)>/i
230
233
  # check to ensure the input is an array given that the attribute
231
234
  # is documented as an array but the input is not
232
235
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -234,7 +237,7 @@ module OpenapiClient
234
237
  end
235
238
  elsif !attributes[self.class.attribute_map[key]].nil?
236
239
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
237
- end # or else data not found in attributes(hash), not an issue as the data can be optional
240
+ end
238
241
  end
239
242
 
240
243
  self
@@ -246,8 +249,8 @@ module OpenapiClient
246
249
  # @return [Object] Deserialized data
247
250
  def _deserialize(type, value)
248
251
  case type.to_sym
249
- when :DateTime
250
- DateTime.parse(value)
252
+ when :Time
253
+ Time.parse(value)
251
254
  when :Date
252
255
  Date.parse(value)
253
256
  when :String
@@ -326,5 +329,6 @@ module OpenapiClient
326
329
  value
327
330
  end
328
331
  end
332
+
329
333
  end
330
334
  end
@@ -6,11 +6,12 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
  Contact: autosde@il.ibm.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.3.1
9
+ OpenAPI Generator version: 5.0.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
+ require 'time'
14
15
 
15
16
  module OpenapiClient
16
17
  # TODO add description
@@ -104,7 +105,9 @@ module OpenapiClient
104
105
  def build_from_hash(attributes)
105
106
  return nil unless attributes.is_a?(Hash)
106
107
  self.class.openapi_types.each_pair do |key, type|
107
- if type =~ /\AArray<(.*)>/i
108
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
109
+ self.send("#{key}=", nil)
110
+ elsif type =~ /\AArray<(.*)>/i
108
111
  # check to ensure the input is an array given that the attribute
109
112
  # is documented as an array but the input is not
110
113
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -112,7 +115,7 @@ module OpenapiClient
112
115
  end
113
116
  elsif !attributes[self.class.attribute_map[key]].nil?
114
117
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
115
- end # or else data not found in attributes(hash), not an issue as the data can be optional
118
+ end
116
119
  end
117
120
 
118
121
  self
@@ -124,8 +127,8 @@ module OpenapiClient
124
127
  # @return [Object] Deserialized data
125
128
  def _deserialize(type, value)
126
129
  case type.to_sym
127
- when :DateTime
128
- DateTime.parse(value)
130
+ when :Time
131
+ Time.parse(value)
129
132
  when :Date
130
133
  Date.parse(value)
131
134
  when :String
@@ -204,5 +207,6 @@ module OpenapiClient
204
207
  value
205
208
  end
206
209
  end
210
+
207
211
  end
208
212
  end