eilam_test 1.1.15

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