autosde_openapi_client 1.0.0 → 1.0.1
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.
- checksums.yaml +4 -4
- data/README.md +32 -7
- data/docs/AbstractCapabilityApi.md +6 -6
- data/docs/AccountApi.md +9 -9
- data/docs/AddressApi.md +6 -6
- data/docs/AuthenticationApi.md +1 -1
- data/docs/AutoSDEProjectApi.md +6 -6
- data/docs/AutoSDERoleApi.md +6 -6
- data/docs/CapabilityTranslationApi.md +6 -6
- data/docs/HostApi.md +6 -6
- data/docs/HostVolumeConnectionApi.md +6 -6
- data/docs/Job.md +29 -0
- data/docs/JobApi.md +104 -0
- data/docs/JobCreate.md +19 -0
- data/docs/NativeCapabilityApi.md +6 -6
- data/docs/ProfileApi.md +6 -6
- data/docs/ProvisioningStrategyApi.md +6 -6
- data/docs/ServiceApi.md +9 -9
- data/docs/ServiceResourceAttachmentApi.md +6 -6
- data/docs/Snapshot.md +25 -0
- data/docs/SnapshotApi.md +204 -0
- data/docs/SnapshotCreate.md +23 -0
- data/docs/StorageHost.md +29 -0
- data/docs/StorageHostApi.md +256 -0
- data/docs/StorageHostCreate.md +37 -0
- data/docs/StorageHostResponse.md +31 -0
- data/docs/StorageHostUpdate.md +21 -0
- data/docs/StorageHostVolumeMapping.md +25 -0
- data/docs/StorageHostVolumeMappingApi.md +204 -0
- data/docs/StorageHostVolumeMappingCreate.md +23 -0
- data/docs/StorageResourceApi.md +9 -9
- data/docs/StorageSystemApi.md +6 -6
- data/docs/SystemTypeApi.md +6 -6
- data/docs/Volume.md +2 -0
- data/docs/VolumeApi.md +9 -9
- data/docs/VolumeCreate.md +2 -0
- data/docs/VolumeResponse.md +2 -0
- data/docs/VolumeSafeDeleteApi.md +6 -6
- data/docs/VolumeUpdate.md +3 -1
- data/lib/openapi_client.rb +108 -0
- data/lib/{autosde_openapi_client → openapi_client}/api/abstract_capability_api.rb +19 -15
- data/lib/{autosde_openapi_client → openapi_client}/api/account_api.rb +25 -20
- data/lib/{autosde_openapi_client → openapi_client}/api/address_api.rb +19 -15
- data/lib/{autosde_openapi_client → openapi_client}/api/authentication_api.rb +5 -4
- data/lib/{autosde_openapi_client → openapi_client}/api/auto_sde_project_api.rb +19 -15
- data/lib/{autosde_openapi_client → openapi_client}/api/auto_sde_role_api.rb +19 -15
- data/lib/{autosde_openapi_client → openapi_client}/api/capability_translation_api.rb +19 -15
- data/lib/{autosde_openapi_client → openapi_client}/api/host_api.rb +19 -15
- data/lib/{autosde_openapi_client → openapi_client}/api/host_volume_connection_api.rb +19 -15
- data/lib/openapi_client/api/job_api.rb +136 -0
- data/lib/{autosde_openapi_client → openapi_client}/api/native_capability_api.rb +19 -15
- data/lib/{autosde_openapi_client → openapi_client}/api/profile_api.rb +19 -15
- data/lib/{autosde_openapi_client → openapi_client}/api/provisioning_strategy_api.rb +19 -15
- data/lib/{autosde_openapi_client → openapi_client}/api/service_api.rb +25 -20
- data/lib/{autosde_openapi_client → openapi_client}/api/service_resource_attachment_api.rb +19 -15
- data/lib/openapi_client/api/snapshot_api.rb +254 -0
- data/lib/openapi_client/api/storage_host_api.rb +321 -0
- data/lib/openapi_client/api/storage_host_volume_mapping_api.rb +254 -0
- data/lib/{autosde_openapi_client → openapi_client}/api/storage_resource_api.rb +25 -20
- data/lib/{autosde_openapi_client → openapi_client}/api/storage_system_api.rb +19 -15
- data/lib/{autosde_openapi_client → openapi_client}/api/system_type_api.rb +19 -15
- data/lib/{autosde_openapi_client → openapi_client}/api/volume_api.rb +25 -20
- data/lib/{autosde_openapi_client → openapi_client}/api/volume_safe_delete_api.rb +19 -15
- data/lib/{autosde_openapi_client → openapi_client}/api_client.rb +46 -45
- data/lib/{autosde_openapi_client → openapi_client}/api_error.rb +1 -1
- data/lib/{autosde_openapi_client → openapi_client}/configuration.rb +34 -7
- data/lib/{autosde_openapi_client → openapi_client}/models/abstract_capability.rb +9 -5
- data/lib/{autosde_openapi_client → openapi_client}/models/account.rb +9 -5
- data/lib/{autosde_openapi_client → openapi_client}/models/account_post_request.rb +9 -5
- data/lib/{autosde_openapi_client → openapi_client}/models/account_post_response.rb +9 -5
- data/lib/{autosde_openapi_client → openapi_client}/models/address.rb +9 -5
- data/lib/{autosde_openapi_client → openapi_client}/models/address_create.rb +9 -5
- data/lib/{autosde_openapi_client → openapi_client}/models/auth_response.rb +9 -5
- data/lib/{autosde_openapi_client → openapi_client}/models/authentication.rb +9 -5
- data/lib/{autosde_openapi_client → openapi_client}/models/auto_sde_project.rb +9 -5
- data/lib/{autosde_openapi_client → openapi_client}/models/auto_sde_role.rb +9 -5
- data/lib/{autosde_openapi_client → openapi_client}/models/capability_translation.rb +9 -5
- data/lib/{autosde_openapi_client → openapi_client}/models/capability_translation_create.rb +9 -5
- data/lib/{autosde_openapi_client → openapi_client}/models/host.rb +9 -5
- data/lib/{autosde_openapi_client → openapi_client}/models/host_create.rb +9 -5
- data/lib/{autosde_openapi_client → openapi_client}/models/host_volume_connection.rb +9 -5
- data/lib/{autosde_openapi_client → openapi_client}/models/host_volume_connection_create.rb +9 -5
- data/lib/openapi_client/models/job.rb +272 -0
- data/lib/openapi_client/models/job_create.rb +222 -0
- data/lib/{autosde_openapi_client → openapi_client}/models/native_capability.rb +9 -5
- data/lib/{autosde_openapi_client → openapi_client}/models/profile.rb +9 -5
- data/lib/{autosde_openapi_client → openapi_client}/models/provisioning_strategy.rb +9 -5
- data/lib/{autosde_openapi_client → openapi_client}/models/service.rb +9 -5
- data/lib/{autosde_openapi_client → openapi_client}/models/service_abstract_capability_value.rb +9 -5
- data/lib/{autosde_openapi_client → openapi_client}/models/service_create.rb +9 -5
- data/lib/{autosde_openapi_client → openapi_client}/models/service_resource_attachment.rb +9 -5
- data/lib/openapi_client/models/snapshot.rb +290 -0
- data/lib/openapi_client/models/snapshot_create.rb +280 -0
- data/lib/openapi_client/models/storage_host.rb +309 -0
- data/lib/openapi_client/models/storage_host_create.rb +360 -0
- data/lib/openapi_client/models/storage_host_response.rb +325 -0
- data/lib/openapi_client/models/storage_host_update.rb +293 -0
- data/lib/openapi_client/models/storage_host_volume_mapping.rb +291 -0
- data/lib/openapi_client/models/storage_host_volume_mapping_create.rb +283 -0
- data/lib/{autosde_openapi_client → openapi_client}/models/storage_resource.rb +9 -5
- data/lib/{autosde_openapi_client → openapi_client}/models/storage_resource_create.rb +9 -5
- data/lib/{autosde_openapi_client → openapi_client}/models/storage_resource_response.rb +9 -5
- data/lib/{autosde_openapi_client → openapi_client}/models/storage_system.rb +9 -5
- data/lib/{autosde_openapi_client → openapi_client}/models/storage_system_create.rb +9 -5
- data/lib/{autosde_openapi_client → openapi_client}/models/system_type.rb +9 -5
- data/lib/{autosde_openapi_client → openapi_client}/models/system_type_create.rb +9 -5
- data/lib/{autosde_openapi_client → openapi_client}/models/volume.rb +20 -6
- data/lib/{autosde_openapi_client → openapi_client}/models/volume_create.rb +20 -6
- data/lib/{autosde_openapi_client → openapi_client}/models/volume_response.rb +20 -6
- data/lib/{autosde_openapi_client → openapi_client}/models/volume_safe_delete.rb +9 -5
- data/lib/{autosde_openapi_client → openapi_client}/models/volume_safe_delete_create.rb +9 -5
- data/lib/{autosde_openapi_client → openapi_client}/models/volume_update.rb +22 -6
- data/lib/{autosde_openapi_client → openapi_client}/version.rb +2 -2
- data/{autosde_openapi_client.gemspec → openapi_client.gemspec} +3 -4
- data/spec/api/abstract_capability_api_spec.rb +1 -1
- data/spec/api/account_api_spec.rb +1 -1
- data/spec/api/address_api_spec.rb +1 -1
- data/spec/api/authentication_api_spec.rb +1 -1
- data/spec/api/auto_sde_project_api_spec.rb +1 -1
- data/spec/api/auto_sde_role_api_spec.rb +1 -1
- data/spec/api/capability_translation_api_spec.rb +1 -1
- data/spec/api/host_api_spec.rb +1 -1
- data/spec/api/host_volume_connection_api_spec.rb +1 -1
- data/spec/api/job_api_spec.rb +54 -0
- data/spec/api/native_capability_api_spec.rb +1 -1
- data/spec/api/profile_api_spec.rb +1 -1
- data/spec/api/provisioning_strategy_api_spec.rb +1 -1
- data/spec/api/service_api_spec.rb +1 -1
- data/spec/api/service_resource_attachment_api_spec.rb +1 -1
- data/spec/api/snapshot_api_spec.rb +74 -0
- data/spec/api/storage_host_api_spec.rb +74 -0
- data/spec/api/storage_host_volume_mapping_api_spec.rb +74 -0
- data/spec/api/storage_resource_api_spec.rb +1 -1
- data/spec/api/storage_system_api_spec.rb +1 -1
- data/spec/api/system_type_api_spec.rb +1 -1
- data/spec/api/volume_api_spec.rb +1 -1
- data/spec/api/volume_safe_delete_api_spec.rb +1 -1
- data/spec/api_client_spec.rb +1 -1
- data/spec/configuration_spec.rb +1 -1
- data/spec/models/abstract_capability_spec.rb +1 -1
- data/spec/models/account_post_request_spec.rb +1 -1
- data/spec/models/account_post_response_spec.rb +1 -1
- data/spec/models/account_spec.rb +1 -1
- data/spec/models/address_create_spec.rb +1 -1
- data/spec/models/address_spec.rb +1 -1
- data/spec/models/auth_response_spec.rb +1 -1
- data/spec/models/authentication_spec.rb +1 -1
- data/spec/models/auto_sde_project_spec.rb +1 -1
- data/spec/models/auto_sde_role_spec.rb +1 -1
- data/spec/models/capability_translation_create_spec.rb +1 -1
- data/spec/models/capability_translation_spec.rb +1 -1
- data/spec/models/host_create_spec.rb +1 -1
- data/spec/models/host_spec.rb +1 -1
- data/spec/models/host_volume_connection_create_spec.rb +1 -1
- data/spec/models/host_volume_connection_spec.rb +1 -1
- data/spec/models/job_create_spec.rb +47 -0
- data/spec/models/job_spec.rb +77 -0
- data/spec/models/native_capability_spec.rb +1 -1
- data/spec/models/profile_spec.rb +1 -1
- data/spec/models/provisioning_strategy_spec.rb +1 -1
- data/spec/models/service_abstract_capability_value_spec.rb +1 -1
- data/spec/models/service_create_spec.rb +1 -1
- data/spec/models/service_resource_attachment_spec.rb +1 -1
- data/spec/models/service_spec.rb +1 -1
- data/spec/models/snapshot_create_spec.rb +63 -0
- data/spec/models/snapshot_spec.rb +69 -0
- data/spec/models/storage_host_create_spec.rb +109 -0
- data/spec/models/storage_host_response_spec.rb +87 -0
- data/spec/models/storage_host_spec.rb +81 -0
- data/spec/models/storage_host_update_spec.rb +61 -0
- data/spec/models/storage_host_volume_mapping_create_spec.rb +63 -0
- data/spec/models/storage_host_volume_mapping_spec.rb +69 -0
- data/spec/models/storage_resource_create_spec.rb +1 -1
- data/spec/models/storage_resource_response_spec.rb +1 -1
- data/spec/models/storage_resource_spec.rb +1 -1
- data/spec/models/storage_system_create_spec.rb +1 -1
- data/spec/models/storage_system_spec.rb +1 -1
- data/spec/models/system_type_create_spec.rb +1 -1
- data/spec/models/system_type_spec.rb +1 -1
- data/spec/models/volume_create_spec.rb +1 -1
- data/spec/models/volume_response_spec.rb +1 -1
- data/spec/models/volume_safe_delete_create_spec.rb +1 -1
- data/spec/models/volume_safe_delete_spec.rb +1 -1
- data/spec/models/volume_spec.rb +1 -1
- data/spec/models/volume_update_spec.rb +7 -1
- data/spec/spec_helper.rb +2 -2
- metadata +142 -106
- data/lib/autosde_openapi_client.rb +0 -94
- data/site_manager_oas.json +0 -3992
|
@@ -6,11 +6,12 @@
|
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
|
7
7
|
Contact: autosde@il.ibm.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
OpenAPI Generator version:
|
|
9
|
+
OpenAPI Generator version: 5.0.0-SNAPSHOT
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
13
13
|
require 'date'
|
|
14
|
+
require 'time'
|
|
14
15
|
|
|
15
16
|
module OpenapiClient
|
|
16
17
|
# NativeCapability
|
|
@@ -135,7 +136,9 @@ module OpenapiClient
|
|
|
135
136
|
def build_from_hash(attributes)
|
|
136
137
|
return nil unless attributes.is_a?(Hash)
|
|
137
138
|
self.class.openapi_types.each_pair do |key, type|
|
|
138
|
-
if
|
|
139
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
140
|
+
self.send("#{key}=", nil)
|
|
141
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
139
142
|
# check to ensure the input is an array given that the attribute
|
|
140
143
|
# is documented as an array but the input is not
|
|
141
144
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
@@ -143,7 +146,7 @@ module OpenapiClient
|
|
|
143
146
|
end
|
|
144
147
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
145
148
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
146
|
-
end
|
|
149
|
+
end
|
|
147
150
|
end
|
|
148
151
|
|
|
149
152
|
self
|
|
@@ -155,8 +158,8 @@ module OpenapiClient
|
|
|
155
158
|
# @return [Object] Deserialized data
|
|
156
159
|
def _deserialize(type, value)
|
|
157
160
|
case type.to_sym
|
|
158
|
-
when :
|
|
159
|
-
|
|
161
|
+
when :Time
|
|
162
|
+
Time.parse(value)
|
|
160
163
|
when :Date
|
|
161
164
|
Date.parse(value)
|
|
162
165
|
when :String
|
|
@@ -235,5 +238,6 @@ module OpenapiClient
|
|
|
235
238
|
value
|
|
236
239
|
end
|
|
237
240
|
end
|
|
241
|
+
|
|
238
242
|
end
|
|
239
243
|
end
|
|
@@ -6,11 +6,12 @@
|
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
|
7
7
|
Contact: autosde@il.ibm.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
OpenAPI Generator version:
|
|
9
|
+
OpenAPI Generator version: 5.0.0-SNAPSHOT
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
13
13
|
require 'date'
|
|
14
|
+
require 'time'
|
|
14
15
|
|
|
15
16
|
module OpenapiClient
|
|
16
17
|
# doc-todo: which profile is being defined??
|
|
@@ -179,7 +180,9 @@ module OpenapiClient
|
|
|
179
180
|
def build_from_hash(attributes)
|
|
180
181
|
return nil unless attributes.is_a?(Hash)
|
|
181
182
|
self.class.openapi_types.each_pair do |key, type|
|
|
182
|
-
if
|
|
183
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
184
|
+
self.send("#{key}=", nil)
|
|
185
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
183
186
|
# check to ensure the input is an array given that the attribute
|
|
184
187
|
# is documented as an array but the input is not
|
|
185
188
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
@@ -187,7 +190,7 @@ module OpenapiClient
|
|
|
187
190
|
end
|
|
188
191
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
189
192
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
190
|
-
end
|
|
193
|
+
end
|
|
191
194
|
end
|
|
192
195
|
|
|
193
196
|
self
|
|
@@ -199,8 +202,8 @@ module OpenapiClient
|
|
|
199
202
|
# @return [Object] Deserialized data
|
|
200
203
|
def _deserialize(type, value)
|
|
201
204
|
case type.to_sym
|
|
202
|
-
when :
|
|
203
|
-
|
|
205
|
+
when :Time
|
|
206
|
+
Time.parse(value)
|
|
204
207
|
when :Date
|
|
205
208
|
Date.parse(value)
|
|
206
209
|
when :String
|
|
@@ -279,5 +282,6 @@ module OpenapiClient
|
|
|
279
282
|
value
|
|
280
283
|
end
|
|
281
284
|
end
|
|
285
|
+
|
|
282
286
|
end
|
|
283
287
|
end
|
|
@@ -6,11 +6,12 @@
|
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
|
7
7
|
Contact: autosde@il.ibm.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
OpenAPI Generator version:
|
|
9
|
+
OpenAPI Generator version: 5.0.0-SNAPSHOT
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
13
13
|
require 'date'
|
|
14
|
+
require 'time'
|
|
14
15
|
|
|
15
16
|
module OpenapiClient
|
|
16
17
|
# Used for capacity provisioning details.
|
|
@@ -153,7 +154,9 @@ module OpenapiClient
|
|
|
153
154
|
def build_from_hash(attributes)
|
|
154
155
|
return nil unless attributes.is_a?(Hash)
|
|
155
156
|
self.class.openapi_types.each_pair do |key, type|
|
|
156
|
-
if
|
|
157
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
158
|
+
self.send("#{key}=", nil)
|
|
159
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
157
160
|
# check to ensure the input is an array given that the attribute
|
|
158
161
|
# is documented as an array but the input is not
|
|
159
162
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
@@ -161,7 +164,7 @@ module OpenapiClient
|
|
|
161
164
|
end
|
|
162
165
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
163
166
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
164
|
-
end
|
|
167
|
+
end
|
|
165
168
|
end
|
|
166
169
|
|
|
167
170
|
self
|
|
@@ -173,8 +176,8 @@ module OpenapiClient
|
|
|
173
176
|
# @return [Object] Deserialized data
|
|
174
177
|
def _deserialize(type, value)
|
|
175
178
|
case type.to_sym
|
|
176
|
-
when :
|
|
177
|
-
|
|
179
|
+
when :Time
|
|
180
|
+
Time.parse(value)
|
|
178
181
|
when :Date
|
|
179
182
|
Date.parse(value)
|
|
180
183
|
when :String
|
|
@@ -253,5 +256,6 @@ module OpenapiClient
|
|
|
253
256
|
value
|
|
254
257
|
end
|
|
255
258
|
end
|
|
259
|
+
|
|
256
260
|
end
|
|
257
261
|
end
|
|
@@ -6,11 +6,12 @@
|
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
|
7
7
|
Contact: autosde@il.ibm.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
OpenAPI Generator version:
|
|
9
|
+
OpenAPI Generator version: 5.0.0-SNAPSHOT
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
13
13
|
require 'date'
|
|
14
|
+
require 'time'
|
|
14
15
|
|
|
15
16
|
module OpenapiClient
|
|
16
17
|
# Service
|
|
@@ -235,7 +236,9 @@ module OpenapiClient
|
|
|
235
236
|
def build_from_hash(attributes)
|
|
236
237
|
return nil unless attributes.is_a?(Hash)
|
|
237
238
|
self.class.openapi_types.each_pair do |key, type|
|
|
238
|
-
if
|
|
239
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
240
|
+
self.send("#{key}=", nil)
|
|
241
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
239
242
|
# check to ensure the input is an array given that the attribute
|
|
240
243
|
# is documented as an array but the input is not
|
|
241
244
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
@@ -243,7 +246,7 @@ module OpenapiClient
|
|
|
243
246
|
end
|
|
244
247
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
245
248
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
246
|
-
end
|
|
249
|
+
end
|
|
247
250
|
end
|
|
248
251
|
|
|
249
252
|
self
|
|
@@ -255,8 +258,8 @@ module OpenapiClient
|
|
|
255
258
|
# @return [Object] Deserialized data
|
|
256
259
|
def _deserialize(type, value)
|
|
257
260
|
case type.to_sym
|
|
258
|
-
when :
|
|
259
|
-
|
|
261
|
+
when :Time
|
|
262
|
+
Time.parse(value)
|
|
260
263
|
when :Date
|
|
261
264
|
Date.parse(value)
|
|
262
265
|
when :String
|
|
@@ -335,5 +338,6 @@ module OpenapiClient
|
|
|
335
338
|
value
|
|
336
339
|
end
|
|
337
340
|
end
|
|
341
|
+
|
|
338
342
|
end
|
|
339
343
|
end
|
data/lib/{autosde_openapi_client → openapi_client}/models/service_abstract_capability_value.rb
RENAMED
|
@@ -6,11 +6,12 @@
|
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
|
7
7
|
Contact: autosde@il.ibm.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
OpenAPI Generator version:
|
|
9
|
+
OpenAPI Generator version: 5.0.0-SNAPSHOT
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
13
13
|
require 'date'
|
|
14
|
+
require 'time'
|
|
14
15
|
|
|
15
16
|
module OpenapiClient
|
|
16
17
|
# ServiceAbstractCapabilityValue
|
|
@@ -123,7 +124,9 @@ module OpenapiClient
|
|
|
123
124
|
def build_from_hash(attributes)
|
|
124
125
|
return nil unless attributes.is_a?(Hash)
|
|
125
126
|
self.class.openapi_types.each_pair do |key, type|
|
|
126
|
-
if
|
|
127
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
128
|
+
self.send("#{key}=", nil)
|
|
129
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
127
130
|
# check to ensure the input is an array given that the attribute
|
|
128
131
|
# is documented as an array but the input is not
|
|
129
132
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
@@ -131,7 +134,7 @@ module OpenapiClient
|
|
|
131
134
|
end
|
|
132
135
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
133
136
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
134
|
-
end
|
|
137
|
+
end
|
|
135
138
|
end
|
|
136
139
|
|
|
137
140
|
self
|
|
@@ -143,8 +146,8 @@ module OpenapiClient
|
|
|
143
146
|
# @return [Object] Deserialized data
|
|
144
147
|
def _deserialize(type, value)
|
|
145
148
|
case type.to_sym
|
|
146
|
-
when :
|
|
147
|
-
|
|
149
|
+
when :Time
|
|
150
|
+
Time.parse(value)
|
|
148
151
|
when :Date
|
|
149
152
|
Date.parse(value)
|
|
150
153
|
when :String
|
|
@@ -223,5 +226,6 @@ module OpenapiClient
|
|
|
223
226
|
value
|
|
224
227
|
end
|
|
225
228
|
end
|
|
229
|
+
|
|
226
230
|
end
|
|
227
231
|
end
|
|
@@ -6,11 +6,12 @@
|
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
|
7
7
|
Contact: autosde@il.ibm.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
OpenAPI Generator version:
|
|
9
|
+
OpenAPI Generator version: 5.0.0-SNAPSHOT
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
13
13
|
require 'date'
|
|
14
|
+
require 'time'
|
|
14
15
|
|
|
15
16
|
module OpenapiClient
|
|
16
17
|
# TODO add description
|
|
@@ -223,7 +224,9 @@ module OpenapiClient
|
|
|
223
224
|
def build_from_hash(attributes)
|
|
224
225
|
return nil unless attributes.is_a?(Hash)
|
|
225
226
|
self.class.openapi_types.each_pair do |key, type|
|
|
226
|
-
if
|
|
227
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
228
|
+
self.send("#{key}=", nil)
|
|
229
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
227
230
|
# check to ensure the input is an array given that the attribute
|
|
228
231
|
# is documented as an array but the input is not
|
|
229
232
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
@@ -231,7 +234,7 @@ module OpenapiClient
|
|
|
231
234
|
end
|
|
232
235
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
233
236
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
234
|
-
end
|
|
237
|
+
end
|
|
235
238
|
end
|
|
236
239
|
|
|
237
240
|
self
|
|
@@ -243,8 +246,8 @@ module OpenapiClient
|
|
|
243
246
|
# @return [Object] Deserialized data
|
|
244
247
|
def _deserialize(type, value)
|
|
245
248
|
case type.to_sym
|
|
246
|
-
when :
|
|
247
|
-
|
|
249
|
+
when :Time
|
|
250
|
+
Time.parse(value)
|
|
248
251
|
when :Date
|
|
249
252
|
Date.parse(value)
|
|
250
253
|
when :String
|
|
@@ -323,5 +326,6 @@ module OpenapiClient
|
|
|
323
326
|
value
|
|
324
327
|
end
|
|
325
328
|
end
|
|
329
|
+
|
|
326
330
|
end
|
|
327
331
|
end
|
|
@@ -6,11 +6,12 @@
|
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
|
7
7
|
Contact: autosde@il.ibm.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
OpenAPI Generator version:
|
|
9
|
+
OpenAPI Generator version: 5.0.0-SNAPSHOT
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
13
13
|
require 'date'
|
|
14
|
+
require 'time'
|
|
14
15
|
|
|
15
16
|
module OpenapiClient
|
|
16
17
|
# ServiceResourceAttachment
|
|
@@ -134,7 +135,9 @@ module OpenapiClient
|
|
|
134
135
|
def build_from_hash(attributes)
|
|
135
136
|
return nil unless attributes.is_a?(Hash)
|
|
136
137
|
self.class.openapi_types.each_pair do |key, type|
|
|
137
|
-
if
|
|
138
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
139
|
+
self.send("#{key}=", nil)
|
|
140
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
138
141
|
# check to ensure the input is an array given that the attribute
|
|
139
142
|
# is documented as an array but the input is not
|
|
140
143
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
@@ -142,7 +145,7 @@ module OpenapiClient
|
|
|
142
145
|
end
|
|
143
146
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
144
147
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
145
|
-
end
|
|
148
|
+
end
|
|
146
149
|
end
|
|
147
150
|
|
|
148
151
|
self
|
|
@@ -154,8 +157,8 @@ module OpenapiClient
|
|
|
154
157
|
# @return [Object] Deserialized data
|
|
155
158
|
def _deserialize(type, value)
|
|
156
159
|
case type.to_sym
|
|
157
|
-
when :
|
|
158
|
-
|
|
160
|
+
when :Time
|
|
161
|
+
Time.parse(value)
|
|
159
162
|
when :Date
|
|
160
163
|
Date.parse(value)
|
|
161
164
|
when :String
|
|
@@ -234,5 +237,6 @@ module OpenapiClient
|
|
|
234
237
|
value
|
|
235
238
|
end
|
|
236
239
|
end
|
|
240
|
+
|
|
237
241
|
end
|
|
238
242
|
end
|
|
@@ -0,0 +1,290 @@
|
|
|
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-SNAPSHOT
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module OpenapiClient
|
|
17
|
+
# Define volume snapshot.
|
|
18
|
+
class Snapshot
|
|
19
|
+
# component_state
|
|
20
|
+
attr_accessor :component_state
|
|
21
|
+
|
|
22
|
+
# description
|
|
23
|
+
attr_accessor :description
|
|
24
|
+
|
|
25
|
+
# name
|
|
26
|
+
attr_accessor :name
|
|
27
|
+
|
|
28
|
+
# uuid
|
|
29
|
+
attr_accessor :uuid
|
|
30
|
+
|
|
31
|
+
attr_accessor :volume
|
|
32
|
+
|
|
33
|
+
class EnumAttributeValidator
|
|
34
|
+
attr_reader :datatype
|
|
35
|
+
attr_reader :allowable_values
|
|
36
|
+
|
|
37
|
+
def initialize(datatype, allowable_values)
|
|
38
|
+
@allowable_values = allowable_values.map do |value|
|
|
39
|
+
case datatype.to_s
|
|
40
|
+
when /Integer/i
|
|
41
|
+
value.to_i
|
|
42
|
+
when /Float/i
|
|
43
|
+
value.to_f
|
|
44
|
+
else
|
|
45
|
+
value
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
def valid?(value)
|
|
51
|
+
!value || allowable_values.include?(value)
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
56
|
+
def self.attribute_map
|
|
57
|
+
{
|
|
58
|
+
:'component_state' => :'component_state',
|
|
59
|
+
:'description' => :'description',
|
|
60
|
+
:'name' => :'name',
|
|
61
|
+
:'uuid' => :'uuid',
|
|
62
|
+
:'volume' => :'volume'
|
|
63
|
+
}
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Attribute type mapping.
|
|
67
|
+
def self.openapi_types
|
|
68
|
+
{
|
|
69
|
+
:'component_state' => :'String',
|
|
70
|
+
:'description' => :'String',
|
|
71
|
+
:'name' => :'String',
|
|
72
|
+
:'uuid' => :'String',
|
|
73
|
+
:'volume' => :'Volume'
|
|
74
|
+
}
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# List of attributes with nullable: true
|
|
78
|
+
def self.openapi_nullable
|
|
79
|
+
Set.new([
|
|
80
|
+
])
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# Initializes the object
|
|
84
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
85
|
+
def initialize(attributes = {})
|
|
86
|
+
if (!attributes.is_a?(Hash))
|
|
87
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::Snapshot` initialize method"
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
91
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
92
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
93
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::Snapshot`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
94
|
+
end
|
|
95
|
+
h[k.to_sym] = v
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
if attributes.key?(:'component_state')
|
|
99
|
+
self.component_state = attributes[:'component_state']
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
if attributes.key?(:'description')
|
|
103
|
+
self.description = attributes[:'description']
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
if attributes.key?(:'name')
|
|
107
|
+
self.name = attributes[:'name']
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
if attributes.key?(:'uuid')
|
|
111
|
+
self.uuid = attributes[:'uuid']
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
if attributes.key?(:'volume')
|
|
115
|
+
self.volume = attributes[:'volume']
|
|
116
|
+
end
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
120
|
+
# @return Array for valid properties with the reasons
|
|
121
|
+
def list_invalid_properties
|
|
122
|
+
invalid_properties = Array.new
|
|
123
|
+
if !@component_state.nil? && @component_state.to_s.length > 32
|
|
124
|
+
invalid_properties.push('invalid value for "component_state", the character length must be smaller than or equal to 32.')
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
invalid_properties
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# Check to see if the all the properties in the model are valid
|
|
131
|
+
# @return true if the model is valid
|
|
132
|
+
def valid?
|
|
133
|
+
component_state_validator = EnumAttributeValidator.new('String', ["PENDING_CREATION", "CREATED", "DELETED", "PENDING_DELETION", "MODIFICATION", "PENDING_MODIFICATION"])
|
|
134
|
+
return false unless component_state_validator.valid?(@component_state)
|
|
135
|
+
return false if !@component_state.nil? && @component_state.to_s.length > 32
|
|
136
|
+
true
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
140
|
+
# @param [Object] component_state Object to be assigned
|
|
141
|
+
def component_state=(component_state)
|
|
142
|
+
validator = EnumAttributeValidator.new('String', ["PENDING_CREATION", "CREATED", "DELETED", "PENDING_DELETION", "MODIFICATION", "PENDING_MODIFICATION"])
|
|
143
|
+
unless validator.valid?(component_state)
|
|
144
|
+
fail ArgumentError, "invalid value for \"component_state\", must be one of #{validator.allowable_values}."
|
|
145
|
+
end
|
|
146
|
+
@component_state = component_state
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# Checks equality by comparing each attribute.
|
|
150
|
+
# @param [Object] Object to be compared
|
|
151
|
+
def ==(o)
|
|
152
|
+
return true if self.equal?(o)
|
|
153
|
+
self.class == o.class &&
|
|
154
|
+
component_state == o.component_state &&
|
|
155
|
+
description == o.description &&
|
|
156
|
+
name == o.name &&
|
|
157
|
+
uuid == o.uuid &&
|
|
158
|
+
volume == o.volume
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
# @see the `==` method
|
|
162
|
+
# @param [Object] Object to be compared
|
|
163
|
+
def eql?(o)
|
|
164
|
+
self == o
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
# Calculates hash code according to all attributes.
|
|
168
|
+
# @return [Integer] Hash code
|
|
169
|
+
def hash
|
|
170
|
+
[component_state, description, name, uuid, volume].hash
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
# Builds the object from hash
|
|
174
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
175
|
+
# @return [Object] Returns the model itself
|
|
176
|
+
def self.build_from_hash(attributes)
|
|
177
|
+
new.build_from_hash(attributes)
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
# Builds the object from hash
|
|
181
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
182
|
+
# @return [Object] Returns the model itself
|
|
183
|
+
def build_from_hash(attributes)
|
|
184
|
+
return nil unless attributes.is_a?(Hash)
|
|
185
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
186
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
187
|
+
self.send("#{key}=", nil)
|
|
188
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
189
|
+
# check to ensure the input is an array given that the attribute
|
|
190
|
+
# is documented as an array but the input is not
|
|
191
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
192
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
193
|
+
end
|
|
194
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
195
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
196
|
+
end
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
self
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
# Deserializes the data based on type
|
|
203
|
+
# @param string type Data type
|
|
204
|
+
# @param string value Value to be deserialized
|
|
205
|
+
# @return [Object] Deserialized data
|
|
206
|
+
def _deserialize(type, value)
|
|
207
|
+
case type.to_sym
|
|
208
|
+
when :Time
|
|
209
|
+
Time.parse(value)
|
|
210
|
+
when :Date
|
|
211
|
+
Date.parse(value)
|
|
212
|
+
when :String
|
|
213
|
+
value.to_s
|
|
214
|
+
when :Integer
|
|
215
|
+
value.to_i
|
|
216
|
+
when :Float
|
|
217
|
+
value.to_f
|
|
218
|
+
when :Boolean
|
|
219
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
220
|
+
true
|
|
221
|
+
else
|
|
222
|
+
false
|
|
223
|
+
end
|
|
224
|
+
when :Object
|
|
225
|
+
# generic object (usually a Hash), return directly
|
|
226
|
+
value
|
|
227
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
228
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
229
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
230
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
231
|
+
k_type = Regexp.last_match[:k_type]
|
|
232
|
+
v_type = Regexp.last_match[:v_type]
|
|
233
|
+
{}.tap do |hash|
|
|
234
|
+
value.each do |k, v|
|
|
235
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
236
|
+
end
|
|
237
|
+
end
|
|
238
|
+
else # model
|
|
239
|
+
OpenapiClient.const_get(type).build_from_hash(value)
|
|
240
|
+
end
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
# Returns the string representation of the object
|
|
244
|
+
# @return [String] String presentation of the object
|
|
245
|
+
def to_s
|
|
246
|
+
to_hash.to_s
|
|
247
|
+
end
|
|
248
|
+
|
|
249
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
250
|
+
# @return [Hash] Returns the object in the form of hash
|
|
251
|
+
def to_body
|
|
252
|
+
to_hash
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
# Returns the object in the form of hash
|
|
256
|
+
# @return [Hash] Returns the object in the form of hash
|
|
257
|
+
def to_hash
|
|
258
|
+
hash = {}
|
|
259
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
260
|
+
value = self.send(attr)
|
|
261
|
+
if value.nil?
|
|
262
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
263
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
hash[param] = _to_hash(value)
|
|
267
|
+
end
|
|
268
|
+
hash
|
|
269
|
+
end
|
|
270
|
+
|
|
271
|
+
# Outputs non-array value in the form of hash
|
|
272
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
273
|
+
# @param [Object] value Any valid value
|
|
274
|
+
# @return [Hash] Returns the value in the form of hash
|
|
275
|
+
def _to_hash(value)
|
|
276
|
+
if value.is_a?(Array)
|
|
277
|
+
value.compact.map { |v| _to_hash(v) }
|
|
278
|
+
elsif value.is_a?(Hash)
|
|
279
|
+
{}.tap do |hash|
|
|
280
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
281
|
+
end
|
|
282
|
+
elsif value.respond_to? :to_hash
|
|
283
|
+
value.to_hash
|
|
284
|
+
else
|
|
285
|
+
value
|
|
286
|
+
end
|
|
287
|
+
end
|
|
288
|
+
|
|
289
|
+
end
|
|
290
|
+
end
|