eilam_test 1.1.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (289) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/LICENSE.txt +21 -0
  4. data/README.md +271 -0
  5. data/Rakefile +10 -0
  6. data/docs/AbstractCapability.md +20 -0
  7. data/docs/AbstractCapabilityApi.md +276 -0
  8. data/docs/Account.md +22 -0
  9. data/docs/AccountApi.md +346 -0
  10. data/docs/AccountPostRequest.md +20 -0
  11. data/docs/AccountPostResponse.md +24 -0
  12. data/docs/Address.md +32 -0
  13. data/docs/AddressApi.md +276 -0
  14. data/docs/AddressCreate.md +32 -0
  15. data/docs/AuthResponse.md +18 -0
  16. data/docs/Authentication.md +20 -0
  17. data/docs/AuthenticationApi.md +70 -0
  18. data/docs/AutoSDEProject.md +56 -0
  19. data/docs/AutoSDEProjectApi.md +276 -0
  20. data/docs/AutoSDERole.md +20 -0
  21. data/docs/AutoSDERoleApi.md +276 -0
  22. data/docs/CapabilityTranslation.md +36 -0
  23. data/docs/CapabilityTranslationApi.md +276 -0
  24. data/docs/CapabilityTranslationCreate.md +32 -0
  25. data/docs/Event.md +32 -0
  26. data/docs/EventApi.md +276 -0
  27. data/docs/Host.md +30 -0
  28. data/docs/HostApi.md +276 -0
  29. data/docs/HostCluster.md +34 -0
  30. data/docs/HostClusterApi.md +276 -0
  31. data/docs/HostClusterCreate.md +30 -0
  32. data/docs/HostClusterMembership.md +24 -0
  33. data/docs/HostClusterMembershipApi.md +276 -0
  34. data/docs/HostClusterResponse.md +34 -0
  35. data/docs/HostClusterVolumeMapping.md +26 -0
  36. data/docs/HostClusterVolumeMappingApi.md +276 -0
  37. data/docs/HostClusterVolumeMappingCreate.md +24 -0
  38. data/docs/HostClusterVolumeMappingResponse.md +26 -0
  39. data/docs/HostCreate.md +40 -0
  40. data/docs/HostVolumeConnection.md +24 -0
  41. data/docs/HostVolumeConnectionApi.md +276 -0
  42. data/docs/HostVolumeConnectionCreate.md +22 -0
  43. data/docs/Job.md +30 -0
  44. data/docs/JobApi.md +140 -0
  45. data/docs/JobCreate.md +20 -0
  46. data/docs/NativeCapability.md +24 -0
  47. data/docs/NativeCapabilityApi.md +276 -0
  48. data/docs/Profile.md +26 -0
  49. data/docs/ProfileApi.md +276 -0
  50. data/docs/ProvisioningStrategy.md +20 -0
  51. data/docs/ProvisioningStrategyApi.md +276 -0
  52. data/docs/Service.md +36 -0
  53. data/docs/ServiceAbstractCapabilityValue.md +22 -0
  54. data/docs/ServiceApi.md +346 -0
  55. data/docs/ServiceCreate.md +34 -0
  56. data/docs/ServiceResourceAttachment.md +24 -0
  57. data/docs/ServiceResourceAttachmentApi.md +276 -0
  58. data/docs/Snapshot.md +26 -0
  59. data/docs/SnapshotApi.md +276 -0
  60. data/docs/SnapshotCreate.md +24 -0
  61. data/docs/StorageHost.md +36 -0
  62. data/docs/StorageHostApi.md +346 -0
  63. data/docs/StorageHostCreate.md +42 -0
  64. data/docs/StorageHostResponse.md +38 -0
  65. data/docs/StorageHostUpdate.md +22 -0
  66. data/docs/StorageHostVolumeMapping.md +26 -0
  67. data/docs/StorageHostVolumeMappingApi.md +276 -0
  68. data/docs/StorageHostVolumeMappingCreate.md +24 -0
  69. data/docs/StorageHostVolumeMappingResponse.md +26 -0
  70. data/docs/StorageHostWWPNCandidates.md +20 -0
  71. data/docs/StorageHostWWPNCandidatesApi.md +72 -0
  72. data/docs/StorageResource.md +34 -0
  73. data/docs/StorageResourceApi.md +346 -0
  74. data/docs/StorageResourceCreate.md +32 -0
  75. data/docs/StorageResourceResponse.md +34 -0
  76. data/docs/StorageSystem.md +34 -0
  77. data/docs/StorageSystemApi.md +346 -0
  78. data/docs/StorageSystemCreate.md +52 -0
  79. data/docs/StorageSystemUpdate.md +24 -0
  80. data/docs/SystemType.md +26 -0
  81. data/docs/SystemTypeApi.md +276 -0
  82. data/docs/SystemTypeCreate.md +28 -0
  83. data/docs/User.md +38 -0
  84. data/docs/UserApi.md +346 -0
  85. data/docs/UserCreate.md +38 -0
  86. data/docs/UserUpdate.md +30 -0
  87. data/docs/ValidateSystem.md +26 -0
  88. data/docs/ValidateSystemApi.md +75 -0
  89. data/docs/Volume.md +36 -0
  90. data/docs/VolumeApi.md +346 -0
  91. data/docs/VolumeCreate.md +34 -0
  92. data/docs/VolumeResponse.md +36 -0
  93. data/docs/VolumeSafeDelete.md +22 -0
  94. data/docs/VolumeSafeDeleteApi.md +276 -0
  95. data/docs/VolumeSafeDeleteCreate.md +18 -0
  96. data/docs/VolumeUpdate.md +20 -0
  97. data/eilam_test.gemspec +38 -0
  98. data/git_push.sh +58 -0
  99. data/lib/eilam_test/api/abstract_capability_api.rb +254 -0
  100. data/lib/eilam_test/api/account_api.rb +321 -0
  101. data/lib/eilam_test/api/address_api.rb +254 -0
  102. data/lib/eilam_test/api/authentication_api.rb +83 -0
  103. data/lib/eilam_test/api/auto_sde_project_api.rb +254 -0
  104. data/lib/eilam_test/api/auto_sde_role_api.rb +254 -0
  105. data/lib/eilam_test/api/capability_translation_api.rb +254 -0
  106. data/lib/eilam_test/api/event_api.rb +254 -0
  107. data/lib/eilam_test/api/host_api.rb +254 -0
  108. data/lib/eilam_test/api/host_cluster_api.rb +254 -0
  109. data/lib/eilam_test/api/host_cluster_membership_api.rb +254 -0
  110. data/lib/eilam_test/api/host_cluster_volume_mapping_api.rb +254 -0
  111. data/lib/eilam_test/api/host_volume_connection_api.rb +254 -0
  112. data/lib/eilam_test/api/job_api.rb +136 -0
  113. data/lib/eilam_test/api/native_capability_api.rb +254 -0
  114. data/lib/eilam_test/api/profile_api.rb +254 -0
  115. data/lib/eilam_test/api/provisioning_strategy_api.rb +254 -0
  116. data/lib/eilam_test/api/service_api.rb +321 -0
  117. data/lib/eilam_test/api/service_resource_attachment_api.rb +254 -0
  118. data/lib/eilam_test/api/snapshot_api.rb +254 -0
  119. data/lib/eilam_test/api/storage_host_api.rb +321 -0
  120. data/lib/eilam_test/api/storage_host_volume_mapping_api.rb +254 -0
  121. data/lib/eilam_test/api/storage_host_wwpn_candidates_api.rb +75 -0
  122. data/lib/eilam_test/api/storage_resource_api.rb +321 -0
  123. data/lib/eilam_test/api/storage_system_api.rb +321 -0
  124. data/lib/eilam_test/api/system_type_api.rb +254 -0
  125. data/lib/eilam_test/api/user_api.rb +321 -0
  126. data/lib/eilam_test/api/validate_system_api.rb +83 -0
  127. data/lib/eilam_test/api/volume_api.rb +321 -0
  128. data/lib/eilam_test/api/volume_safe_delete_api.rb +254 -0
  129. data/lib/eilam_test/api_client.rb +390 -0
  130. data/lib/eilam_test/api_error.rb +57 -0
  131. data/lib/eilam_test/configuration.rb +293 -0
  132. data/lib/eilam_test/models/abstract_capability.rb +230 -0
  133. data/lib/eilam_test/models/account.rb +240 -0
  134. data/lib/eilam_test/models/account_post_request.rb +230 -0
  135. data/lib/eilam_test/models/account_post_response.rb +250 -0
  136. data/lib/eilam_test/models/address.rb +340 -0
  137. data/lib/eilam_test/models/address_create.rb +342 -0
  138. data/lib/eilam_test/models/auth_response.rb +220 -0
  139. data/lib/eilam_test/models/authentication.rb +230 -0
  140. data/lib/eilam_test/models/auto_sde_project.rb +410 -0
  141. data/lib/eilam_test/models/auto_sde_role.rb +230 -0
  142. data/lib/eilam_test/models/capability_translation.rb +340 -0
  143. data/lib/eilam_test/models/capability_translation_create.rb +322 -0
  144. data/lib/eilam_test/models/event.rb +289 -0
  145. data/lib/eilam_test/models/host.rb +333 -0
  146. data/lib/eilam_test/models/host_cluster.rb +397 -0
  147. data/lib/eilam_test/models/host_cluster_create.rb +338 -0
  148. data/lib/eilam_test/models/host_cluster_membership.rb +287 -0
  149. data/lib/eilam_test/models/host_cluster_response.rb +398 -0
  150. data/lib/eilam_test/models/host_cluster_volume_mapping.rb +299 -0
  151. data/lib/eilam_test/models/host_cluster_volume_mapping_create.rb +291 -0
  152. data/lib/eilam_test/models/host_cluster_volume_mapping_response.rb +301 -0
  153. data/lib/eilam_test/models/host_create.rb +394 -0
  154. data/lib/eilam_test/models/host_volume_connection.rb +287 -0
  155. data/lib/eilam_test/models/host_volume_connection_create.rb +277 -0
  156. data/lib/eilam_test/models/job.rb +280 -0
  157. data/lib/eilam_test/models/job_create.rb +230 -0
  158. data/lib/eilam_test/models/native_capability.rb +251 -0
  159. data/lib/eilam_test/models/profile.rb +295 -0
  160. data/lib/eilam_test/models/provisioning_strategy.rb +269 -0
  161. data/lib/eilam_test/models/service.rb +351 -0
  162. data/lib/eilam_test/models/service_abstract_capability_value.rb +239 -0
  163. data/lib/eilam_test/models/service_create.rb +339 -0
  164. data/lib/eilam_test/models/service_resource_attachment.rb +250 -0
  165. data/lib/eilam_test/models/snapshot.rb +298 -0
  166. data/lib/eilam_test/models/snapshot_create.rb +288 -0
  167. data/lib/eilam_test/models/storage_host.rb +346 -0
  168. data/lib/eilam_test/models/storage_host_create.rb +388 -0
  169. data/lib/eilam_test/models/storage_host_response.rb +363 -0
  170. data/lib/eilam_test/models/storage_host_update.rb +301 -0
  171. data/lib/eilam_test/models/storage_host_volume_mapping.rb +299 -0
  172. data/lib/eilam_test/models/storage_host_volume_mapping_create.rb +291 -0
  173. data/lib/eilam_test/models/storage_host_volume_mapping_response.rb +301 -0
  174. data/lib/eilam_test/models/storage_host_wwpn_candidates.rb +230 -0
  175. data/lib/eilam_test/models/storage_resource.rb +354 -0
  176. data/lib/eilam_test/models/storage_resource_create.rb +345 -0
  177. data/lib/eilam_test/models/storage_resource_response.rb +355 -0
  178. data/lib/eilam_test/models/storage_system.rb +352 -0
  179. data/lib/eilam_test/models/storage_system_create.rb +455 -0
  180. data/lib/eilam_test/models/storage_system_update.rb +265 -0
  181. data/lib/eilam_test/models/system_type.rb +333 -0
  182. data/lib/eilam_test/models/system_type_create.rb +345 -0
  183. data/lib/eilam_test/models/user.rb +395 -0
  184. data/lib/eilam_test/models/user_create.rb +395 -0
  185. data/lib/eilam_test/models/user_update.rb +280 -0
  186. data/lib/eilam_test/models/validate_system.rb +260 -0
  187. data/lib/eilam_test/models/volume.rb +348 -0
  188. data/lib/eilam_test/models/volume_create.rb +343 -0
  189. data/lib/eilam_test/models/volume_response.rb +350 -0
  190. data/lib/eilam_test/models/volume_safe_delete.rb +239 -0
  191. data/lib/eilam_test/models/volume_safe_delete_create.rb +219 -0
  192. data/lib/eilam_test/models/volume_update.rb +232 -0
  193. data/lib/eilam_test/version.rb +15 -0
  194. data/lib/eilam_test.rb +130 -0
  195. data/spec/api/abstract_capability_api_spec.rb +74 -0
  196. data/spec/api/account_api_spec.rb +85 -0
  197. data/spec/api/address_api_spec.rb +74 -0
  198. data/spec/api/authentication_api_spec.rb +45 -0
  199. data/spec/api/auto_sde_project_api_spec.rb +74 -0
  200. data/spec/api/auto_sde_role_api_spec.rb +74 -0
  201. data/spec/api/capability_translation_api_spec.rb +74 -0
  202. data/spec/api/event_api_spec.rb +74 -0
  203. data/spec/api/host_api_spec.rb +74 -0
  204. data/spec/api/host_cluster_api_spec.rb +74 -0
  205. data/spec/api/host_cluster_membership_api_spec.rb +74 -0
  206. data/spec/api/host_cluster_volume_mapping_api_spec.rb +74 -0
  207. data/spec/api/host_volume_connection_api_spec.rb +74 -0
  208. data/spec/api/job_api_spec.rb +54 -0
  209. data/spec/api/native_capability_api_spec.rb +74 -0
  210. data/spec/api/profile_api_spec.rb +74 -0
  211. data/spec/api/provisioning_strategy_api_spec.rb +74 -0
  212. data/spec/api/service_api_spec.rb +85 -0
  213. data/spec/api/service_resource_attachment_api_spec.rb +74 -0
  214. data/spec/api/snapshot_api_spec.rb +74 -0
  215. data/spec/api/storage_host_api_spec.rb +85 -0
  216. data/spec/api/storage_host_volume_mapping_api_spec.rb +74 -0
  217. data/spec/api/storage_host_wwpn_candidates_api_spec.rb +44 -0
  218. data/spec/api/storage_resource_api_spec.rb +85 -0
  219. data/spec/api/storage_system_api_spec.rb +85 -0
  220. data/spec/api/system_type_api_spec.rb +74 -0
  221. data/spec/api/user_api_spec.rb +85 -0
  222. data/spec/api/validate_system_api_spec.rb +45 -0
  223. data/spec/api/volume_api_spec.rb +85 -0
  224. data/spec/api/volume_safe_delete_api_spec.rb +74 -0
  225. data/spec/api_client_spec.rb +226 -0
  226. data/spec/configuration_spec.rb +42 -0
  227. data/spec/models/abstract_capability_spec.rb +40 -0
  228. data/spec/models/account_post_request_spec.rb +40 -0
  229. data/spec/models/account_post_response_spec.rb +52 -0
  230. data/spec/models/account_spec.rb +46 -0
  231. data/spec/models/address_create_spec.rb +84 -0
  232. data/spec/models/address_spec.rb +84 -0
  233. data/spec/models/auth_response_spec.rb +34 -0
  234. data/spec/models/authentication_spec.rb +40 -0
  235. data/spec/models/auto_sde_project_spec.rb +148 -0
  236. data/spec/models/auto_sde_role_spec.rb +40 -0
  237. data/spec/models/capability_translation_create_spec.rb +76 -0
  238. data/spec/models/capability_translation_spec.rb +88 -0
  239. data/spec/models/event_spec.rb +76 -0
  240. data/spec/models/host_cluster_create_spec.rb +70 -0
  241. data/spec/models/host_cluster_membership_spec.rb +56 -0
  242. data/spec/models/host_cluster_response_spec.rb +86 -0
  243. data/spec/models/host_cluster_spec.rb +86 -0
  244. data/spec/models/host_cluster_volume_mapping_create_spec.rb +56 -0
  245. data/spec/models/host_cluster_volume_mapping_response_spec.rb +62 -0
  246. data/spec/models/host_cluster_volume_mapping_spec.rb +62 -0
  247. data/spec/models/host_create_spec.rb +112 -0
  248. data/spec/models/host_spec.rb +78 -0
  249. data/spec/models/host_volume_connection_create_spec.rb +50 -0
  250. data/spec/models/host_volume_connection_spec.rb +56 -0
  251. data/spec/models/job_create_spec.rb +40 -0
  252. data/spec/models/job_spec.rb +70 -0
  253. data/spec/models/native_capability_spec.rb +52 -0
  254. data/spec/models/profile_spec.rb +62 -0
  255. data/spec/models/provisioning_strategy_spec.rb +44 -0
  256. data/spec/models/service_abstract_capability_value_spec.rb +46 -0
  257. data/spec/models/service_create_spec.rb +86 -0
  258. data/spec/models/service_resource_attachment_spec.rb +52 -0
  259. data/spec/models/service_spec.rb +92 -0
  260. data/spec/models/snapshot_create_spec.rb +56 -0
  261. data/spec/models/snapshot_spec.rb +62 -0
  262. data/spec/models/storage_host_create_spec.rb +114 -0
  263. data/spec/models/storage_host_response_spec.rb +98 -0
  264. data/spec/models/storage_host_spec.rb +92 -0
  265. data/spec/models/storage_host_update_spec.rb +54 -0
  266. data/spec/models/storage_host_volume_mapping_create_spec.rb +56 -0
  267. data/spec/models/storage_host_volume_mapping_response_spec.rb +62 -0
  268. data/spec/models/storage_host_volume_mapping_spec.rb +62 -0
  269. data/spec/models/storage_host_wwpn_candidates_spec.rb +40 -0
  270. data/spec/models/storage_resource_create_spec.rb +84 -0
  271. data/spec/models/storage_resource_response_spec.rb +90 -0
  272. data/spec/models/storage_resource_spec.rb +90 -0
  273. data/spec/models/storage_system_create_spec.rb +148 -0
  274. data/spec/models/storage_system_spec.rb +90 -0
  275. data/spec/models/storage_system_update_spec.rb +52 -0
  276. data/spec/models/system_type_create_spec.rb +72 -0
  277. data/spec/models/system_type_spec.rb +66 -0
  278. data/spec/models/user_create_spec.rb +94 -0
  279. data/spec/models/user_spec.rb +94 -0
  280. data/spec/models/user_update_spec.rb +70 -0
  281. data/spec/models/validate_system_spec.rb +58 -0
  282. data/spec/models/volume_create_spec.rb +86 -0
  283. data/spec/models/volume_response_spec.rb +92 -0
  284. data/spec/models/volume_safe_delete_create_spec.rb +34 -0
  285. data/spec/models/volume_safe_delete_spec.rb +46 -0
  286. data/spec/models/volume_spec.rb +92 -0
  287. data/spec/models/volume_update_spec.rb +40 -0
  288. data/spec/spec_helper.rb +111 -0
  289. metadata +464 -0
@@ -0,0 +1,265 @@
1
+ =begin
2
+ #Site Manager API
3
+
4
+ #Site Manager API
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ Contact: autosde@il.ibm.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.0.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module EilamTest
17
+ # TODO add description
18
+ class StorageSystemUpdate
19
+ # management_ip
20
+ attr_accessor :management_ip
21
+
22
+ # name
23
+ attr_accessor :name
24
+
25
+ # password
26
+ attr_accessor :password
27
+
28
+ # user
29
+ attr_accessor :user
30
+
31
+ # Attribute mapping from ruby-style variable name to JSON key.
32
+ def self.attribute_map
33
+ {
34
+ :'management_ip' => :'management_ip',
35
+ :'name' => :'name',
36
+ :'password' => :'password',
37
+ :'user' => :'user'
38
+ }
39
+ end
40
+
41
+ # Returns all the JSON keys this model knows about
42
+ def self.acceptable_attributes
43
+ attribute_map.values
44
+ end
45
+
46
+ # Attribute type mapping.
47
+ def self.openapi_types
48
+ {
49
+ :'management_ip' => :'String',
50
+ :'name' => :'String',
51
+ :'password' => :'String',
52
+ :'user' => :'String'
53
+ }
54
+ end
55
+
56
+ # List of attributes with nullable: true
57
+ def self.openapi_nullable
58
+ Set.new([
59
+ ])
60
+ end
61
+
62
+ # Initializes the object
63
+ # @param [Hash] attributes Model attributes in the form of hash
64
+ def initialize(attributes = {})
65
+ if (!attributes.is_a?(Hash))
66
+ fail ArgumentError, "The input argument (attributes) must be a hash in `EilamTest::StorageSystemUpdate` initialize method"
67
+ end
68
+
69
+ # check to see if the attribute exists and convert string to symbol for hash key
70
+ attributes = attributes.each_with_object({}) { |(k, v), h|
71
+ if (!self.class.attribute_map.key?(k.to_sym))
72
+ fail ArgumentError, "`#{k}` is not a valid attribute in `EilamTest::StorageSystemUpdate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
73
+ end
74
+ h[k.to_sym] = v
75
+ }
76
+
77
+ if attributes.key?(:'management_ip')
78
+ self.management_ip = attributes[:'management_ip']
79
+ end
80
+
81
+ if attributes.key?(:'name')
82
+ self.name = attributes[:'name']
83
+ end
84
+
85
+ if attributes.key?(:'password')
86
+ self.password = attributes[:'password']
87
+ end
88
+
89
+ if attributes.key?(:'user')
90
+ self.user = attributes[:'user']
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
+ invalid_properties = Array.new
98
+ if !@name.nil? && @name.to_s.length > 15
99
+ invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 15.')
100
+ end
101
+
102
+ invalid_properties
103
+ end
104
+
105
+ # Check to see if the all the properties in the model are valid
106
+ # @return true if the model is valid
107
+ def valid?
108
+ return false if !@name.nil? && @name.to_s.length > 15
109
+ true
110
+ end
111
+
112
+ # Custom attribute writer method with validation
113
+ # @param [Object] name Value to be assigned
114
+ def name=(name)
115
+ if !name.nil? && name.to_s.length > 15
116
+ fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 15.'
117
+ end
118
+
119
+ @name = name
120
+ end
121
+
122
+ # Checks equality by comparing each attribute.
123
+ # @param [Object] Object to be compared
124
+ def ==(o)
125
+ return true if self.equal?(o)
126
+ self.class == o.class &&
127
+ management_ip == o.management_ip &&
128
+ name == o.name &&
129
+ password == o.password &&
130
+ user == o.user
131
+ end
132
+
133
+ # @see the `==` method
134
+ # @param [Object] Object to be compared
135
+ def eql?(o)
136
+ self == o
137
+ end
138
+
139
+ # Calculates hash code according to all attributes.
140
+ # @return [Integer] Hash code
141
+ def hash
142
+ [management_ip, name, password, user].hash
143
+ end
144
+
145
+ # Builds the object from hash
146
+ # @param [Hash] attributes Model attributes in the form of hash
147
+ # @return [Object] Returns the model itself
148
+ def self.build_from_hash(attributes)
149
+ new.build_from_hash(attributes)
150
+ end
151
+
152
+ # Builds the object from hash
153
+ # @param [Hash] attributes Model attributes in the form of hash
154
+ # @return [Object] Returns the model itself
155
+ def build_from_hash(attributes)
156
+ return nil unless attributes.is_a?(Hash)
157
+ self.class.openapi_types.each_pair do |key, type|
158
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
159
+ self.send("#{key}=", nil)
160
+ elsif type =~ /\AArray<(.*)>/i
161
+ # check to ensure the input is an array given that the attribute
162
+ # is documented as an array but the input is not
163
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
164
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
165
+ end
166
+ elsif !attributes[self.class.attribute_map[key]].nil?
167
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
168
+ end
169
+ end
170
+
171
+ self
172
+ end
173
+
174
+ # Deserializes the data based on type
175
+ # @param string type Data type
176
+ # @param string value Value to be deserialized
177
+ # @return [Object] Deserialized data
178
+ def _deserialize(type, value)
179
+ case type.to_sym
180
+ when :Time
181
+ Time.parse(value)
182
+ when :Date
183
+ Date.parse(value)
184
+ when :String
185
+ value.to_s
186
+ when :Integer
187
+ value.to_i
188
+ when :Float
189
+ value.to_f
190
+ when :Boolean
191
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
192
+ true
193
+ else
194
+ false
195
+ end
196
+ when :Object
197
+ # generic object (usually a Hash), return directly
198
+ value
199
+ when /\AArray<(?<inner_type>.+)>\z/
200
+ inner_type = Regexp.last_match[:inner_type]
201
+ value.map { |v| _deserialize(inner_type, v) }
202
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
203
+ k_type = Regexp.last_match[:k_type]
204
+ v_type = Regexp.last_match[:v_type]
205
+ {}.tap do |hash|
206
+ value.each do |k, v|
207
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
208
+ end
209
+ end
210
+ else # model
211
+ # models (e.g. Pet) or oneOf
212
+ klass = EilamTest.const_get(type)
213
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
214
+ end
215
+ end
216
+
217
+ # Returns the string representation of the object
218
+ # @return [String] String presentation of the object
219
+ def to_s
220
+ to_hash.to_s
221
+ end
222
+
223
+ # to_body is an alias to to_hash (backward compatibility)
224
+ # @return [Hash] Returns the object in the form of hash
225
+ def to_body
226
+ to_hash
227
+ end
228
+
229
+ # Returns the object in the form of hash
230
+ # @return [Hash] Returns the object in the form of hash
231
+ def to_hash
232
+ hash = {}
233
+ self.class.attribute_map.each_pair do |attr, param|
234
+ value = self.send(attr)
235
+ if value.nil?
236
+ is_nullable = self.class.openapi_nullable.include?(attr)
237
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
238
+ end
239
+
240
+ hash[param] = _to_hash(value)
241
+ end
242
+ hash
243
+ end
244
+
245
+ # Outputs non-array value in the form of hash
246
+ # For object, use to_hash. Otherwise, just return the value
247
+ # @param [Object] value Any valid value
248
+ # @return [Hash] Returns the value in the form of hash
249
+ def _to_hash(value)
250
+ if value.is_a?(Array)
251
+ value.compact.map { |v| _to_hash(v) }
252
+ elsif value.is_a?(Hash)
253
+ {}.tap do |hash|
254
+ value.each { |k, v| hash[k] = _to_hash(v) }
255
+ end
256
+ elsif value.respond_to? :to_hash
257
+ value.to_hash
258
+ else
259
+ value
260
+ end
261
+ end
262
+
263
+ end
264
+
265
+ end
@@ -0,0 +1,333 @@
1
+ =begin
2
+ #Site Manager API
3
+
4
+ #Site Manager API
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ Contact: autosde@il.ibm.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.0.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module EilamTest
17
+ # Use to define the storage system type.
18
+ class SystemType
19
+ # component_state
20
+ attr_accessor :component_state
21
+
22
+ # name
23
+ attr_accessor :name
24
+
25
+ # short_version
26
+ attr_accessor :short_version
27
+
28
+ # uuid
29
+ attr_accessor :uuid
30
+
31
+ # SystemType version
32
+ attr_accessor :version
33
+
34
+ class EnumAttributeValidator
35
+ attr_reader :datatype
36
+ attr_reader :allowable_values
37
+
38
+ def initialize(datatype, allowable_values)
39
+ @allowable_values = allowable_values.map do |value|
40
+ case datatype.to_s
41
+ when /Integer/i
42
+ value.to_i
43
+ when /Float/i
44
+ value.to_f
45
+ else
46
+ value
47
+ end
48
+ end
49
+ end
50
+
51
+ def valid?(value)
52
+ !value || allowable_values.include?(value)
53
+ end
54
+ end
55
+
56
+ # Attribute mapping from ruby-style variable name to JSON key.
57
+ def self.attribute_map
58
+ {
59
+ :'component_state' => :'component_state',
60
+ :'name' => :'name',
61
+ :'short_version' => :'short_version',
62
+ :'uuid' => :'uuid',
63
+ :'version' => :'version'
64
+ }
65
+ end
66
+
67
+ # Returns all the JSON keys this model knows about
68
+ def self.acceptable_attributes
69
+ attribute_map.values
70
+ end
71
+
72
+ # Attribute type mapping.
73
+ def self.openapi_types
74
+ {
75
+ :'component_state' => :'String',
76
+ :'name' => :'String',
77
+ :'short_version' => :'String',
78
+ :'uuid' => :'String',
79
+ :'version' => :'String'
80
+ }
81
+ end
82
+
83
+ # List of attributes with nullable: true
84
+ def self.openapi_nullable
85
+ Set.new([
86
+ ])
87
+ end
88
+
89
+ # Initializes the object
90
+ # @param [Hash] attributes Model attributes in the form of hash
91
+ def initialize(attributes = {})
92
+ if (!attributes.is_a?(Hash))
93
+ fail ArgumentError, "The input argument (attributes) must be a hash in `EilamTest::SystemType` initialize method"
94
+ end
95
+
96
+ # check to see if the attribute exists and convert string to symbol for hash key
97
+ attributes = attributes.each_with_object({}) { |(k, v), h|
98
+ if (!self.class.attribute_map.key?(k.to_sym))
99
+ fail ArgumentError, "`#{k}` is not a valid attribute in `EilamTest::SystemType`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
100
+ end
101
+ h[k.to_sym] = v
102
+ }
103
+
104
+ if attributes.key?(:'component_state')
105
+ self.component_state = attributes[:'component_state']
106
+ end
107
+
108
+ if attributes.key?(:'name')
109
+ self.name = attributes[:'name']
110
+ else
111
+ self.name = 'IBM_FlashSystems'
112
+ end
113
+
114
+ if attributes.key?(:'short_version')
115
+ self.short_version = attributes[:'short_version']
116
+ end
117
+
118
+ if attributes.key?(:'uuid')
119
+ self.uuid = attributes[:'uuid']
120
+ end
121
+
122
+ if attributes.key?(:'version')
123
+ self.version = attributes[:'version']
124
+ end
125
+ end
126
+
127
+ # Show invalid properties with the reasons. Usually used together with valid?
128
+ # @return Array for valid properties with the reasons
129
+ def list_invalid_properties
130
+ invalid_properties = Array.new
131
+ if !@component_state.nil? && @component_state.to_s.length > 32
132
+ invalid_properties.push('invalid value for "component_state", the character length must be smaller than or equal to 32.')
133
+ end
134
+
135
+ if !@name.nil? && @name.to_s.length > 255
136
+ invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 255.')
137
+ end
138
+
139
+ if !@short_version.nil? && @short_version.to_s.length > 255
140
+ invalid_properties.push('invalid value for "short_version", the character length must be smaller than or equal to 255.')
141
+ end
142
+
143
+ invalid_properties
144
+ end
145
+
146
+ # Check to see if the all the properties in the model are valid
147
+ # @return true if the model is valid
148
+ def valid?
149
+ component_state_validator = EnumAttributeValidator.new('String', ["PENDING_CREATION", "CREATED", "DELETED", "PENDING_DELETION", "MODIFICATION", "PENDING_MODIFICATION"])
150
+ return false unless component_state_validator.valid?(@component_state)
151
+ return false if !@component_state.nil? && @component_state.to_s.length > 32
152
+ name_validator = EnumAttributeValidator.new('String', ["IBM_FlashSystems", "a_line", "xiv", "ds8000", "vmax", "netapp", "ds8x00"])
153
+ return false unless name_validator.valid?(@name)
154
+ return false if !@name.nil? && @name.to_s.length > 255
155
+ return false if !@short_version.nil? && @short_version.to_s.length > 255
156
+ true
157
+ end
158
+
159
+ # Custom attribute writer method checking allowed values (enum).
160
+ # @param [Object] component_state Object to be assigned
161
+ def component_state=(component_state)
162
+ validator = EnumAttributeValidator.new('String', ["PENDING_CREATION", "CREATED", "DELETED", "PENDING_DELETION", "MODIFICATION", "PENDING_MODIFICATION"])
163
+ unless validator.valid?(component_state)
164
+ fail ArgumentError, "invalid value for \"component_state\", must be one of #{validator.allowable_values}."
165
+ end
166
+ @component_state = component_state
167
+ end
168
+
169
+ # Custom attribute writer method checking allowed values (enum).
170
+ # @param [Object] name Object to be assigned
171
+ def name=(name)
172
+ validator = EnumAttributeValidator.new('String', ["IBM_FlashSystems", "a_line", "xiv", "ds8000", "vmax", "netapp", "ds8x00"])
173
+ unless validator.valid?(name)
174
+ fail ArgumentError, "invalid value for \"name\", must be one of #{validator.allowable_values}."
175
+ end
176
+ @name = name
177
+ end
178
+
179
+ # Custom attribute writer method with validation
180
+ # @param [Object] short_version Value to be assigned
181
+ def short_version=(short_version)
182
+ if !short_version.nil? && short_version.to_s.length > 255
183
+ fail ArgumentError, 'invalid value for "short_version", the character length must be smaller than or equal to 255.'
184
+ end
185
+
186
+ @short_version = short_version
187
+ end
188
+
189
+ # Checks equality by comparing each attribute.
190
+ # @param [Object] Object to be compared
191
+ def ==(o)
192
+ return true if self.equal?(o)
193
+ self.class == o.class &&
194
+ component_state == o.component_state &&
195
+ name == o.name &&
196
+ short_version == o.short_version &&
197
+ uuid == o.uuid &&
198
+ version == o.version
199
+ end
200
+
201
+ # @see the `==` method
202
+ # @param [Object] Object to be compared
203
+ def eql?(o)
204
+ self == o
205
+ end
206
+
207
+ # Calculates hash code according to all attributes.
208
+ # @return [Integer] Hash code
209
+ def hash
210
+ [component_state, name, short_version, uuid, version].hash
211
+ end
212
+
213
+ # Builds the object from hash
214
+ # @param [Hash] attributes Model attributes in the form of hash
215
+ # @return [Object] Returns the model itself
216
+ def self.build_from_hash(attributes)
217
+ new.build_from_hash(attributes)
218
+ end
219
+
220
+ # Builds the object from hash
221
+ # @param [Hash] attributes Model attributes in the form of hash
222
+ # @return [Object] Returns the model itself
223
+ def build_from_hash(attributes)
224
+ return nil unless attributes.is_a?(Hash)
225
+ self.class.openapi_types.each_pair do |key, type|
226
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
227
+ self.send("#{key}=", nil)
228
+ elsif type =~ /\AArray<(.*)>/i
229
+ # check to ensure the input is an array given that the attribute
230
+ # is documented as an array but the input is not
231
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
232
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
233
+ end
234
+ elsif !attributes[self.class.attribute_map[key]].nil?
235
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
236
+ end
237
+ end
238
+
239
+ self
240
+ end
241
+
242
+ # Deserializes the data based on type
243
+ # @param string type Data type
244
+ # @param string value Value to be deserialized
245
+ # @return [Object] Deserialized data
246
+ def _deserialize(type, value)
247
+ case type.to_sym
248
+ when :Time
249
+ Time.parse(value)
250
+ when :Date
251
+ Date.parse(value)
252
+ when :String
253
+ value.to_s
254
+ when :Integer
255
+ value.to_i
256
+ when :Float
257
+ value.to_f
258
+ when :Boolean
259
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
260
+ true
261
+ else
262
+ false
263
+ end
264
+ when :Object
265
+ # generic object (usually a Hash), return directly
266
+ value
267
+ when /\AArray<(?<inner_type>.+)>\z/
268
+ inner_type = Regexp.last_match[:inner_type]
269
+ value.map { |v| _deserialize(inner_type, v) }
270
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
271
+ k_type = Regexp.last_match[:k_type]
272
+ v_type = Regexp.last_match[:v_type]
273
+ {}.tap do |hash|
274
+ value.each do |k, v|
275
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
276
+ end
277
+ end
278
+ else # model
279
+ # models (e.g. Pet) or oneOf
280
+ klass = EilamTest.const_get(type)
281
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
282
+ end
283
+ end
284
+
285
+ # Returns the string representation of the object
286
+ # @return [String] String presentation of the object
287
+ def to_s
288
+ to_hash.to_s
289
+ end
290
+
291
+ # to_body is an alias to to_hash (backward compatibility)
292
+ # @return [Hash] Returns the object in the form of hash
293
+ def to_body
294
+ to_hash
295
+ end
296
+
297
+ # Returns the object in the form of hash
298
+ # @return [Hash] Returns the object in the form of hash
299
+ def to_hash
300
+ hash = {}
301
+ self.class.attribute_map.each_pair do |attr, param|
302
+ value = self.send(attr)
303
+ if value.nil?
304
+ is_nullable = self.class.openapi_nullable.include?(attr)
305
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
306
+ end
307
+
308
+ hash[param] = _to_hash(value)
309
+ end
310
+ hash
311
+ end
312
+
313
+ # Outputs non-array value in the form of hash
314
+ # For object, use to_hash. Otherwise, just return the value
315
+ # @param [Object] value Any valid value
316
+ # @return [Hash] Returns the value in the form of hash
317
+ def _to_hash(value)
318
+ if value.is_a?(Array)
319
+ value.compact.map { |v| _to_hash(v) }
320
+ elsif value.is_a?(Hash)
321
+ {}.tap do |hash|
322
+ value.each { |k, v| hash[k] = _to_hash(v) }
323
+ end
324
+ elsif value.respond_to? :to_hash
325
+ value.to_hash
326
+ else
327
+ value
328
+ end
329
+ end
330
+
331
+ end
332
+
333
+ end