autosde_openapi_client 1.0.2 → 1.0.3

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 (219) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +146 -146
  3. data/autosde_openapi_client.gemspec +2 -2
  4. data/docs/AbstractCapability.md +11 -10
  5. data/docs/AbstractCapabilityApi.md +121 -49
  6. data/docs/Account.md +13 -12
  7. data/docs/AccountApi.md +153 -63
  8. data/docs/AccountPostRequest.md +11 -10
  9. data/docs/AccountPostResponse.md +15 -14
  10. data/docs/Address.md +23 -22
  11. data/docs/AddressApi.md +121 -49
  12. data/docs/AddressCreate.md +23 -22
  13. data/docs/AuthResponse.md +9 -8
  14. data/docs/Authentication.md +11 -10
  15. data/docs/AuthenticationApi.md +33 -16
  16. data/docs/AutoSDEProject.md +47 -46
  17. data/docs/AutoSDEProjectApi.md +121 -49
  18. data/docs/AutoSDERole.md +11 -10
  19. data/docs/AutoSDERoleApi.md +121 -49
  20. data/docs/CapabilityTranslation.md +27 -26
  21. data/docs/CapabilityTranslationApi.md +121 -49
  22. data/docs/CapabilityTranslationCreate.md +23 -22
  23. data/docs/Host.md +21 -20
  24. data/docs/HostApi.md +121 -49
  25. data/docs/HostCreate.md +31 -30
  26. data/docs/HostVolumeConnection.md +15 -14
  27. data/docs/HostVolumeConnectionApi.md +121 -49
  28. data/docs/HostVolumeConnectionCreate.md +13 -12
  29. data/docs/Job.md +21 -20
  30. data/docs/JobApi.md +61 -25
  31. data/docs/JobCreate.md +11 -10
  32. data/docs/NativeCapability.md +15 -14
  33. data/docs/NativeCapabilityApi.md +121 -49
  34. data/docs/Profile.md +17 -16
  35. data/docs/ProfileApi.md +121 -49
  36. data/docs/ProvisioningStrategy.md +11 -10
  37. data/docs/ProvisioningStrategyApi.md +121 -49
  38. data/docs/Service.md +27 -26
  39. data/docs/ServiceAbstractCapabilityValue.md +13 -12
  40. data/docs/ServiceApi.md +153 -63
  41. data/docs/ServiceCreate.md +25 -24
  42. data/docs/ServiceResourceAttachment.md +15 -14
  43. data/docs/ServiceResourceAttachmentApi.md +121 -49
  44. data/docs/Snapshot.md +17 -16
  45. data/docs/SnapshotApi.md +121 -49
  46. data/docs/SnapshotCreate.md +15 -14
  47. data/docs/StorageHost.md +21 -20
  48. data/docs/StorageHostApi.md +153 -63
  49. data/docs/StorageHostCreate.md +29 -28
  50. data/docs/StorageHostResponse.md +23 -22
  51. data/docs/StorageHostUpdate.md +13 -12
  52. data/docs/StorageHostVolumeMapping.md +17 -16
  53. data/docs/StorageHostVolumeMappingApi.md +121 -49
  54. data/docs/StorageHostVolumeMappingCreate.md +15 -14
  55. data/docs/StorageResource.md +25 -24
  56. data/docs/StorageResourceApi.md +153 -63
  57. data/docs/StorageResourceCreate.md +23 -22
  58. data/docs/StorageResourceResponse.md +25 -24
  59. data/docs/StorageSystem.md +21 -20
  60. data/docs/StorageSystemApi.md +121 -49
  61. data/docs/StorageSystemCreate.md +41 -40
  62. data/docs/SystemType.md +17 -16
  63. data/docs/SystemTypeApi.md +121 -49
  64. data/docs/SystemTypeCreate.md +19 -18
  65. data/docs/Volume.md +25 -24
  66. data/docs/VolumeApi.md +153 -63
  67. data/docs/VolumeCreate.md +21 -20
  68. data/docs/VolumeResponse.md +25 -24
  69. data/docs/VolumeSafeDelete.md +13 -12
  70. data/docs/VolumeSafeDeleteApi.md +121 -49
  71. data/docs/VolumeSafeDeleteCreate.md +9 -8
  72. data/docs/VolumeUpdate.md +11 -10
  73. data/lib/autosde_openapi_client.rb +3 -3
  74. data/lib/autosde_openapi_client/api/abstract_capability_api.rb +2 -2
  75. data/lib/autosde_openapi_client/api/account_api.rb +2 -2
  76. data/lib/autosde_openapi_client/api/address_api.rb +2 -2
  77. data/lib/autosde_openapi_client/api/authentication_api.rb +2 -2
  78. data/lib/autosde_openapi_client/api/auto_sde_project_api.rb +2 -2
  79. data/lib/autosde_openapi_client/api/auto_sde_role_api.rb +2 -2
  80. data/lib/autosde_openapi_client/api/capability_translation_api.rb +2 -2
  81. data/lib/autosde_openapi_client/api/host_api.rb +2 -2
  82. data/lib/autosde_openapi_client/api/host_volume_connection_api.rb +2 -2
  83. data/lib/autosde_openapi_client/api/job_api.rb +2 -2
  84. data/lib/autosde_openapi_client/api/native_capability_api.rb +2 -2
  85. data/lib/autosde_openapi_client/api/profile_api.rb +2 -2
  86. data/lib/autosde_openapi_client/api/provisioning_strategy_api.rb +2 -2
  87. data/lib/autosde_openapi_client/api/service_api.rb +2 -2
  88. data/lib/autosde_openapi_client/api/service_resource_attachment_api.rb +2 -2
  89. data/lib/autosde_openapi_client/api/snapshot_api.rb +2 -2
  90. data/lib/autosde_openapi_client/api/storage_host_api.rb +2 -2
  91. data/lib/autosde_openapi_client/api/storage_host_volume_mapping_api.rb +2 -2
  92. data/lib/autosde_openapi_client/api/storage_resource_api.rb +2 -2
  93. data/lib/autosde_openapi_client/api/storage_system_api.rb +2 -2
  94. data/lib/autosde_openapi_client/api/system_type_api.rb +2 -2
  95. data/lib/autosde_openapi_client/api/volume_api.rb +2 -2
  96. data/lib/autosde_openapi_client/api/volume_safe_delete_api.rb +2 -2
  97. data/lib/autosde_openapi_client/api_client.rb +6 -5
  98. data/lib/autosde_openapi_client/api_error.rb +2 -2
  99. data/lib/autosde_openapi_client/configuration.rb +7 -5
  100. data/lib/autosde_openapi_client/models/abstract_capability.rb +14 -6
  101. data/lib/autosde_openapi_client/models/account.rb +14 -6
  102. data/lib/autosde_openapi_client/models/account_post_request.rb +14 -6
  103. data/lib/autosde_openapi_client/models/account_post_response.rb +14 -6
  104. data/lib/autosde_openapi_client/models/address.rb +14 -6
  105. data/lib/autosde_openapi_client/models/address_create.rb +14 -6
  106. data/lib/autosde_openapi_client/models/auth_response.rb +14 -6
  107. data/lib/autosde_openapi_client/models/authentication.rb +14 -6
  108. data/lib/autosde_openapi_client/models/auto_sde_project.rb +14 -6
  109. data/lib/autosde_openapi_client/models/auto_sde_role.rb +14 -6
  110. data/lib/autosde_openapi_client/models/capability_translation.rb +14 -6
  111. data/lib/autosde_openapi_client/models/capability_translation_create.rb +14 -6
  112. data/lib/autosde_openapi_client/models/host.rb +14 -6
  113. data/lib/autosde_openapi_client/models/host_create.rb +14 -6
  114. data/lib/autosde_openapi_client/models/host_volume_connection.rb +14 -6
  115. data/lib/autosde_openapi_client/models/host_volume_connection_create.rb +14 -6
  116. data/lib/autosde_openapi_client/models/job.rb +14 -6
  117. data/lib/autosde_openapi_client/models/job_create.rb +14 -6
  118. data/lib/autosde_openapi_client/models/native_capability.rb +14 -6
  119. data/lib/autosde_openapi_client/models/profile.rb +14 -6
  120. data/lib/autosde_openapi_client/models/provisioning_strategy.rb +14 -6
  121. data/lib/autosde_openapi_client/models/service.rb +14 -6
  122. data/lib/autosde_openapi_client/models/service_abstract_capability_value.rb +14 -6
  123. data/lib/autosde_openapi_client/models/service_create.rb +14 -6
  124. data/lib/autosde_openapi_client/models/service_resource_attachment.rb +14 -6
  125. data/lib/autosde_openapi_client/models/snapshot.rb +14 -6
  126. data/lib/autosde_openapi_client/models/snapshot_create.rb +14 -6
  127. data/lib/autosde_openapi_client/models/storage_host.rb +14 -6
  128. data/lib/autosde_openapi_client/models/storage_host_create.rb +14 -6
  129. data/lib/autosde_openapi_client/models/storage_host_response.rb +14 -6
  130. data/lib/autosde_openapi_client/models/storage_host_update.rb +14 -6
  131. data/lib/autosde_openapi_client/models/storage_host_volume_mapping.rb +14 -6
  132. data/lib/autosde_openapi_client/models/storage_host_volume_mapping_create.rb +14 -6
  133. data/lib/autosde_openapi_client/models/storage_resource.rb +14 -6
  134. data/lib/autosde_openapi_client/models/storage_resource_create.rb +14 -6
  135. data/lib/autosde_openapi_client/models/storage_resource_response.rb +14 -6
  136. data/lib/autosde_openapi_client/models/storage_system.rb +14 -6
  137. data/lib/autosde_openapi_client/models/storage_system_create.rb +14 -6
  138. data/lib/autosde_openapi_client/models/system_type.rb +14 -6
  139. data/lib/autosde_openapi_client/models/system_type_create.rb +14 -6
  140. data/lib/autosde_openapi_client/models/volume.rb +14 -6
  141. data/lib/autosde_openapi_client/models/volume_create.rb +14 -6
  142. data/lib/autosde_openapi_client/models/volume_response.rb +14 -6
  143. data/lib/autosde_openapi_client/models/volume_safe_delete.rb +14 -6
  144. data/lib/autosde_openapi_client/models/volume_safe_delete_create.rb +14 -6
  145. data/lib/autosde_openapi_client/models/volume_update.rb +14 -6
  146. data/lib/autosde_openapi_client/version.rb +4 -4
  147. data/spec/api/abstract_capability_api_spec.rb +1 -1
  148. data/spec/api/account_api_spec.rb +1 -1
  149. data/spec/api/address_api_spec.rb +1 -1
  150. data/spec/api/authentication_api_spec.rb +1 -1
  151. data/spec/api/auto_sde_project_api_spec.rb +1 -1
  152. data/spec/api/auto_sde_role_api_spec.rb +1 -1
  153. data/spec/api/capability_translation_api_spec.rb +1 -1
  154. data/spec/api/host_api_spec.rb +1 -1
  155. data/spec/api/host_volume_connection_api_spec.rb +1 -1
  156. data/spec/api/job_api_spec.rb +1 -1
  157. data/spec/api/native_capability_api_spec.rb +1 -1
  158. data/spec/api/profile_api_spec.rb +1 -1
  159. data/spec/api/provisioning_strategy_api_spec.rb +1 -1
  160. data/spec/api/service_api_spec.rb +1 -1
  161. data/spec/api/service_resource_attachment_api_spec.rb +1 -1
  162. data/spec/api/snapshot_api_spec.rb +1 -1
  163. data/spec/api/storage_host_api_spec.rb +1 -1
  164. data/spec/api/storage_host_volume_mapping_api_spec.rb +1 -1
  165. data/spec/api/storage_resource_api_spec.rb +1 -1
  166. data/spec/api/storage_system_api_spec.rb +1 -1
  167. data/spec/api/system_type_api_spec.rb +1 -1
  168. data/spec/api/volume_api_spec.rb +1 -1
  169. data/spec/api/volume_safe_delete_api_spec.rb +1 -1
  170. data/spec/api_client_spec.rb +30 -30
  171. data/spec/configuration_spec.rb +4 -4
  172. data/spec/models/abstract_capability_spec.rb +4 -11
  173. data/spec/models/account_post_request_spec.rb +4 -11
  174. data/spec/models/account_post_response_spec.rb +4 -11
  175. data/spec/models/account_spec.rb +4 -11
  176. data/spec/models/address_create_spec.rb +6 -13
  177. data/spec/models/address_spec.rb +6 -13
  178. data/spec/models/auth_response_spec.rb +4 -11
  179. data/spec/models/authentication_spec.rb +4 -11
  180. data/spec/models/auto_sde_project_spec.rb +4 -11
  181. data/spec/models/auto_sde_role_spec.rb +4 -11
  182. data/spec/models/capability_translation_create_spec.rb +4 -11
  183. data/spec/models/capability_translation_spec.rb +4 -11
  184. data/spec/models/host_create_spec.rb +7 -14
  185. data/spec/models/host_spec.rb +6 -13
  186. data/spec/models/host_volume_connection_create_spec.rb +5 -12
  187. data/spec/models/host_volume_connection_spec.rb +5 -12
  188. data/spec/models/job_create_spec.rb +4 -11
  189. data/spec/models/job_spec.rb +4 -11
  190. data/spec/models/native_capability_spec.rb +4 -11
  191. data/spec/models/profile_spec.rb +5 -12
  192. data/spec/models/provisioning_strategy_spec.rb +5 -12
  193. data/spec/models/service_abstract_capability_value_spec.rb +4 -11
  194. data/spec/models/service_create_spec.rb +5 -12
  195. data/spec/models/service_resource_attachment_spec.rb +4 -11
  196. data/spec/models/service_spec.rb +5 -12
  197. data/spec/models/snapshot_create_spec.rb +5 -12
  198. data/spec/models/snapshot_spec.rb +5 -12
  199. data/spec/models/storage_host_create_spec.rb +6 -13
  200. data/spec/models/storage_host_response_spec.rb +5 -12
  201. data/spec/models/storage_host_spec.rb +5 -12
  202. data/spec/models/storage_host_update_spec.rb +6 -13
  203. data/spec/models/storage_host_volume_mapping_create_spec.rb +5 -12
  204. data/spec/models/storage_host_volume_mapping_spec.rb +5 -12
  205. data/spec/models/storage_resource_create_spec.rb +6 -13
  206. data/spec/models/storage_resource_response_spec.rb +6 -13
  207. data/spec/models/storage_resource_spec.rb +6 -13
  208. data/spec/models/storage_system_create_spec.rb +7 -14
  209. data/spec/models/storage_system_spec.rb +6 -13
  210. data/spec/models/system_type_create_spec.rb +6 -13
  211. data/spec/models/system_type_spec.rb +6 -13
  212. data/spec/models/volume_create_spec.rb +5 -12
  213. data/spec/models/volume_response_spec.rb +5 -12
  214. data/spec/models/volume_safe_delete_create_spec.rb +4 -11
  215. data/spec/models/volume_safe_delete_spec.rb +4 -11
  216. data/spec/models/volume_spec.rb +5 -12
  217. data/spec/models/volume_update_spec.rb +4 -11
  218. data/spec/spec_helper.rb +1 -1
  219. metadata +55 -55
@@ -6,11 +6,11 @@
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: 5.0.0-SNAPSHOT
9
+ OpenAPI Generator version: 5.0.1-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
13
- module OpenapiClient
13
+ module AutosdeOpenapiClient
14
14
  class ApiError < StandardError
15
15
  attr_reader :code, :response_headers, :response_body
16
16
 
@@ -6,11 +6,11 @@
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: 5.0.0-SNAPSHOT
9
+ OpenAPI Generator version: 5.0.1-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
13
- module OpenapiClient
13
+ module AutosdeOpenapiClient
14
14
  class Configuration
15
15
  # Defines url scheme
16
16
  attr_accessor :scheme
@@ -197,11 +197,13 @@ module OpenapiClient
197
197
 
198
198
  # Gets API key (with prefix if set).
199
199
  # @param [String] param_name the parameter name of API key auth
200
- def api_key_with_prefix(param_name)
200
+ def api_key_with_prefix(param_name, param_alias = nil)
201
+ key = @api_key[param_name]
202
+ key = @api_key.fetch(param_alias, key) unless param_alias.nil?
201
203
  if @api_key_prefix[param_name]
202
- "#{@api_key_prefix[param_name]} #{@api_key[param_name]}"
204
+ "#{@api_key_prefix[param_name]} #{key}"
203
205
  else
204
- @api_key[param_name]
206
+ key
205
207
  end
206
208
  end
207
209
 
@@ -6,14 +6,14 @@
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: 5.0.0-SNAPSHOT
9
+ OpenAPI Generator version: 5.0.1-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
14
  require 'time'
15
15
 
16
- module OpenapiClient
16
+ module AutosdeOpenapiClient
17
17
  # Abstract capabilities are the storage system feature capabilities, in general terminology.
18
18
  class AbstractCapability
19
19
  # name
@@ -30,6 +30,11 @@ module OpenapiClient
30
30
  }
31
31
  end
32
32
 
33
+ # Returns all the JSON keys this model knows about
34
+ def self.acceptable_attributes
35
+ attribute_map.values
36
+ end
37
+
33
38
  # Attribute type mapping.
34
39
  def self.openapi_types
35
40
  {
@@ -48,13 +53,13 @@ module OpenapiClient
48
53
  # @param [Hash] attributes Model attributes in the form of hash
49
54
  def initialize(attributes = {})
50
55
  if (!attributes.is_a?(Hash))
51
- fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::AbstractCapability` initialize method"
56
+ fail ArgumentError, "The input argument (attributes) must be a hash in `AutosdeOpenapiClient::AbstractCapability` initialize method"
52
57
  end
53
58
 
54
59
  # check to see if the attribute exists and convert string to symbol for hash key
55
60
  attributes = attributes.each_with_object({}) { |(k, v), h|
56
61
  if (!self.class.attribute_map.key?(k.to_sym))
57
- fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::AbstractCapability`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
62
+ fail ArgumentError, "`#{k}` is not a valid attribute in `AutosdeOpenapiClient::AbstractCapability`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
58
63
  end
59
64
  h[k.to_sym] = v
60
65
  }
@@ -168,7 +173,9 @@ module OpenapiClient
168
173
  end
169
174
  end
170
175
  else # model
171
- OpenapiClient.const_get(type).build_from_hash(value)
176
+ # models (e.g. Pet) or oneOf
177
+ klass = AutosdeOpenapiClient.const_get(type)
178
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
172
179
  end
173
180
  end
174
181
 
@@ -194,7 +201,7 @@ module OpenapiClient
194
201
  is_nullable = self.class.openapi_nullable.include?(attr)
195
202
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
196
203
  end
197
-
204
+
198
205
  hash[param] = _to_hash(value)
199
206
  end
200
207
  hash
@@ -219,4 +226,5 @@ module OpenapiClient
219
226
  end
220
227
 
221
228
  end
229
+
222
230
  end
@@ -6,14 +6,14 @@
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: 5.0.0-SNAPSHOT
9
+ OpenAPI Generator version: 5.0.1-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
14
  require 'time'
15
15
 
16
- module OpenapiClient
16
+ module AutosdeOpenapiClient
17
17
  # doc-todo: General information about 'account' needed - what account - or type of account. something to guide the user.
18
18
  class Account
19
19
  # description
@@ -34,6 +34,11 @@ module OpenapiClient
34
34
  }
35
35
  end
36
36
 
37
+ # Returns all the JSON keys this model knows about
38
+ def self.acceptable_attributes
39
+ attribute_map.values
40
+ end
41
+
37
42
  # Attribute type mapping.
38
43
  def self.openapi_types
39
44
  {
@@ -53,13 +58,13 @@ module OpenapiClient
53
58
  # @param [Hash] attributes Model attributes in the form of hash
54
59
  def initialize(attributes = {})
55
60
  if (!attributes.is_a?(Hash))
56
- fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::Account` initialize method"
61
+ fail ArgumentError, "The input argument (attributes) must be a hash in `AutosdeOpenapiClient::Account` initialize method"
57
62
  end
58
63
 
59
64
  # check to see if the attribute exists and convert string to symbol for hash key
60
65
  attributes = attributes.each_with_object({}) { |(k, v), h|
61
66
  if (!self.class.attribute_map.key?(k.to_sym))
62
- fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::Account`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
67
+ fail ArgumentError, "`#{k}` is not a valid attribute in `AutosdeOpenapiClient::Account`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
63
68
  end
64
69
  h[k.to_sym] = v
65
70
  }
@@ -178,7 +183,9 @@ module OpenapiClient
178
183
  end
179
184
  end
180
185
  else # model
181
- OpenapiClient.const_get(type).build_from_hash(value)
186
+ # models (e.g. Pet) or oneOf
187
+ klass = AutosdeOpenapiClient.const_get(type)
188
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
182
189
  end
183
190
  end
184
191
 
@@ -204,7 +211,7 @@ module OpenapiClient
204
211
  is_nullable = self.class.openapi_nullable.include?(attr)
205
212
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
206
213
  end
207
-
214
+
208
215
  hash[param] = _to_hash(value)
209
216
  end
210
217
  hash
@@ -229,4 +236,5 @@ module OpenapiClient
229
236
  end
230
237
 
231
238
  end
239
+
232
240
  end
@@ -6,14 +6,14 @@
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: 5.0.0-SNAPSHOT
9
+ OpenAPI Generator version: 5.0.1-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
14
  require 'time'
15
15
 
16
- module OpenapiClient
16
+ module AutosdeOpenapiClient
17
17
  # TODO add description
18
18
  class AccountPostRequest
19
19
  # description
@@ -30,6 +30,11 @@ module OpenapiClient
30
30
  }
31
31
  end
32
32
 
33
+ # Returns all the JSON keys this model knows about
34
+ def self.acceptable_attributes
35
+ attribute_map.values
36
+ end
37
+
33
38
  # Attribute type mapping.
34
39
  def self.openapi_types
35
40
  {
@@ -48,13 +53,13 @@ module OpenapiClient
48
53
  # @param [Hash] attributes Model attributes in the form of hash
49
54
  def initialize(attributes = {})
50
55
  if (!attributes.is_a?(Hash))
51
- fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::AccountPostRequest` initialize method"
56
+ fail ArgumentError, "The input argument (attributes) must be a hash in `AutosdeOpenapiClient::AccountPostRequest` initialize method"
52
57
  end
53
58
 
54
59
  # check to see if the attribute exists and convert string to symbol for hash key
55
60
  attributes = attributes.each_with_object({}) { |(k, v), h|
56
61
  if (!self.class.attribute_map.key?(k.to_sym))
57
- fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::AccountPostRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
62
+ fail ArgumentError, "`#{k}` is not a valid attribute in `AutosdeOpenapiClient::AccountPostRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
58
63
  end
59
64
  h[k.to_sym] = v
60
65
  }
@@ -168,7 +173,9 @@ module OpenapiClient
168
173
  end
169
174
  end
170
175
  else # model
171
- OpenapiClient.const_get(type).build_from_hash(value)
176
+ # models (e.g. Pet) or oneOf
177
+ klass = AutosdeOpenapiClient.const_get(type)
178
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
172
179
  end
173
180
  end
174
181
 
@@ -194,7 +201,7 @@ module OpenapiClient
194
201
  is_nullable = self.class.openapi_nullable.include?(attr)
195
202
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
196
203
  end
197
-
204
+
198
205
  hash[param] = _to_hash(value)
199
206
  end
200
207
  hash
@@ -219,4 +226,5 @@ module OpenapiClient
219
226
  end
220
227
 
221
228
  end
229
+
222
230
  end
@@ -6,14 +6,14 @@
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: 5.0.0-SNAPSHOT
9
+ OpenAPI Generator version: 5.0.1-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
14
  require 'time'
15
15
 
16
- module OpenapiClient
16
+ module AutosdeOpenapiClient
17
17
  # TODO add description
18
18
  class AccountPostResponse
19
19
  # description
@@ -38,6 +38,11 @@ module OpenapiClient
38
38
  }
39
39
  end
40
40
 
41
+ # Returns all the JSON keys this model knows about
42
+ def self.acceptable_attributes
43
+ attribute_map.values
44
+ end
45
+
41
46
  # Attribute type mapping.
42
47
  def self.openapi_types
43
48
  {
@@ -58,13 +63,13 @@ module OpenapiClient
58
63
  # @param [Hash] attributes Model attributes in the form of hash
59
64
  def initialize(attributes = {})
60
65
  if (!attributes.is_a?(Hash))
61
- fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::AccountPostResponse` initialize method"
66
+ fail ArgumentError, "The input argument (attributes) must be a hash in `AutosdeOpenapiClient::AccountPostResponse` initialize method"
62
67
  end
63
68
 
64
69
  # check to see if the attribute exists and convert string to symbol for hash key
65
70
  attributes = attributes.each_with_object({}) { |(k, v), h|
66
71
  if (!self.class.attribute_map.key?(k.to_sym))
67
- fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::AccountPostResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
72
+ fail ArgumentError, "`#{k}` is not a valid attribute in `AutosdeOpenapiClient::AccountPostResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
68
73
  end
69
74
  h[k.to_sym] = v
70
75
  }
@@ -188,7 +193,9 @@ module OpenapiClient
188
193
  end
189
194
  end
190
195
  else # model
191
- OpenapiClient.const_get(type).build_from_hash(value)
196
+ # models (e.g. Pet) or oneOf
197
+ klass = AutosdeOpenapiClient.const_get(type)
198
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
192
199
  end
193
200
  end
194
201
 
@@ -214,7 +221,7 @@ module OpenapiClient
214
221
  is_nullable = self.class.openapi_nullable.include?(attr)
215
222
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
216
223
  end
217
-
224
+
218
225
  hash[param] = _to_hash(value)
219
226
  end
220
227
  hash
@@ -239,4 +246,5 @@ module OpenapiClient
239
246
  end
240
247
 
241
248
  end
249
+
242
250
  end
@@ -6,14 +6,14 @@
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: 5.0.0-SNAPSHOT
9
+ OpenAPI Generator version: 5.0.1-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
14
  require 'time'
15
15
 
16
- module OpenapiClient
16
+ module AutosdeOpenapiClient
17
17
  # Address
18
18
  class Address
19
19
  # chap_name
@@ -75,6 +75,11 @@ module OpenapiClient
75
75
  }
76
76
  end
77
77
 
78
+ # Returns all the JSON keys this model knows about
79
+ def self.acceptable_attributes
80
+ attribute_map.values
81
+ end
82
+
78
83
  # Attribute type mapping.
79
84
  def self.openapi_types
80
85
  {
@@ -99,13 +104,13 @@ module OpenapiClient
99
104
  # @param [Hash] attributes Model attributes in the form of hash
100
105
  def initialize(attributes = {})
101
106
  if (!attributes.is_a?(Hash))
102
- fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::Address` initialize method"
107
+ fail ArgumentError, "The input argument (attributes) must be a hash in `AutosdeOpenapiClient::Address` initialize method"
103
108
  end
104
109
 
105
110
  # check to see if the attribute exists and convert string to symbol for hash key
106
111
  attributes = attributes.each_with_object({}) { |(k, v), h|
107
112
  if (!self.class.attribute_map.key?(k.to_sym))
108
- fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::Address`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
113
+ fail ArgumentError, "`#{k}` is not a valid attribute in `AutosdeOpenapiClient::Address`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
109
114
  end
110
115
  h[k.to_sym] = v
111
116
  }
@@ -278,7 +283,9 @@ module OpenapiClient
278
283
  end
279
284
  end
280
285
  else # model
281
- OpenapiClient.const_get(type).build_from_hash(value)
286
+ # models (e.g. Pet) or oneOf
287
+ klass = AutosdeOpenapiClient.const_get(type)
288
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
282
289
  end
283
290
  end
284
291
 
@@ -304,7 +311,7 @@ module OpenapiClient
304
311
  is_nullable = self.class.openapi_nullable.include?(attr)
305
312
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
306
313
  end
307
-
314
+
308
315
  hash[param] = _to_hash(value)
309
316
  end
310
317
  hash
@@ -329,4 +336,5 @@ module OpenapiClient
329
336
  end
330
337
 
331
338
  end
339
+
332
340
  end
@@ -6,14 +6,14 @@
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: 5.0.0-SNAPSHOT
9
+ OpenAPI Generator version: 5.0.1-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
14
  require 'time'
15
15
 
16
- module OpenapiClient
16
+ module AutosdeOpenapiClient
17
17
  # TODO add description
18
18
  class AddressCreate
19
19
  # chap_name
@@ -75,6 +75,11 @@ module OpenapiClient
75
75
  }
76
76
  end
77
77
 
78
+ # Returns all the JSON keys this model knows about
79
+ def self.acceptable_attributes
80
+ attribute_map.values
81
+ end
82
+
78
83
  # Attribute type mapping.
79
84
  def self.openapi_types
80
85
  {
@@ -99,13 +104,13 @@ module OpenapiClient
99
104
  # @param [Hash] attributes Model attributes in the form of hash
100
105
  def initialize(attributes = {})
101
106
  if (!attributes.is_a?(Hash))
102
- fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::AddressCreate` initialize method"
107
+ fail ArgumentError, "The input argument (attributes) must be a hash in `AutosdeOpenapiClient::AddressCreate` initialize method"
103
108
  end
104
109
 
105
110
  # check to see if the attribute exists and convert string to symbol for hash key
106
111
  attributes = attributes.each_with_object({}) { |(k, v), h|
107
112
  if (!self.class.attribute_map.key?(k.to_sym))
108
- fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::AddressCreate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
113
+ fail ArgumentError, "`#{k}` is not a valid attribute in `AutosdeOpenapiClient::AddressCreate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
109
114
  end
110
115
  h[k.to_sym] = v
111
116
  }
@@ -280,7 +285,9 @@ module OpenapiClient
280
285
  end
281
286
  end
282
287
  else # model
283
- OpenapiClient.const_get(type).build_from_hash(value)
288
+ # models (e.g. Pet) or oneOf
289
+ klass = AutosdeOpenapiClient.const_get(type)
290
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
284
291
  end
285
292
  end
286
293
 
@@ -306,7 +313,7 @@ module OpenapiClient
306
313
  is_nullable = self.class.openapi_nullable.include?(attr)
307
314
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
308
315
  end
309
-
316
+
310
317
  hash[param] = _to_hash(value)
311
318
  end
312
319
  hash
@@ -331,4 +338,5 @@ module OpenapiClient
331
338
  end
332
339
 
333
340
  end
341
+
334
342
  end