autosde_openapi_client 1.0.0 → 1.0.21
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +143 -117
- data/autosde_openapi_client.gemspec +4 -5
- data/docs/AbstractCapability.md +11 -10
- data/docs/AbstractCapabilityApi.md +122 -50
- data/docs/Account.md +13 -12
- data/docs/AccountApi.md +155 -65
- data/docs/AccountPostRequest.md +11 -10
- data/docs/AccountPostResponse.md +15 -14
- data/docs/Address.md +23 -22
- data/docs/AddressApi.md +122 -50
- data/docs/AddressCreate.md +23 -22
- data/docs/AuthResponse.md +9 -8
- data/docs/Authentication.md +11 -10
- data/docs/AuthenticationApi.md +33 -16
- data/docs/AutoSDEProject.md +47 -46
- data/docs/AutoSDEProjectApi.md +122 -50
- data/docs/AutoSDERole.md +11 -10
- data/docs/AutoSDERoleApi.md +122 -50
- data/docs/CapabilityTranslation.md +27 -26
- data/docs/CapabilityTranslationApi.md +122 -50
- data/docs/CapabilityTranslationCreate.md +23 -22
- data/docs/Host.md +21 -20
- data/docs/HostApi.md +122 -50
- data/docs/HostCreate.md +31 -30
- data/docs/HostVolumeConnection.md +15 -14
- data/docs/HostVolumeConnectionApi.md +122 -50
- data/docs/HostVolumeConnectionCreate.md +13 -12
- data/docs/Job.md +30 -0
- data/docs/JobApi.md +140 -0
- data/docs/JobCreate.md +20 -0
- data/docs/NativeCapability.md +15 -14
- data/docs/NativeCapabilityApi.md +122 -50
- data/docs/Profile.md +17 -16
- data/docs/ProfileApi.md +122 -50
- data/docs/ProvisioningStrategy.md +11 -10
- data/docs/ProvisioningStrategyApi.md +122 -50
- data/docs/Service.md +27 -26
- data/docs/ServiceAbstractCapabilityValue.md +13 -12
- data/docs/ServiceApi.md +155 -65
- data/docs/ServiceCreate.md +25 -24
- data/docs/ServiceResourceAttachment.md +15 -14
- data/docs/ServiceResourceAttachmentApi.md +122 -50
- data/docs/Snapshot.md +26 -0
- data/docs/SnapshotApi.md +276 -0
- data/docs/SnapshotCreate.md +24 -0
- data/docs/StorageHost.md +30 -0
- data/docs/StorageHostApi.md +346 -0
- data/docs/StorageHostCreate.md +38 -0
- data/docs/StorageHostResponse.md +32 -0
- data/docs/StorageHostUpdate.md +22 -0
- data/docs/StorageHostVolumeMapping.md +26 -0
- data/docs/StorageHostVolumeMappingApi.md +276 -0
- data/docs/StorageHostVolumeMappingCreate.md +24 -0
- data/docs/StorageHostVolumeMappingResponse.md +26 -0
- data/docs/StorageResource.md +25 -24
- data/docs/StorageResourceApi.md +155 -65
- data/docs/StorageResourceCreate.md +23 -22
- data/docs/StorageResourceResponse.md +25 -24
- data/docs/StorageSystem.md +21 -20
- data/docs/StorageSystemApi.md +122 -50
- data/docs/StorageSystemCreate.md +41 -40
- data/docs/SystemType.md +17 -16
- data/docs/SystemTypeApi.md +122 -50
- data/docs/SystemTypeCreate.md +19 -18
- data/docs/Volume.md +25 -22
- data/docs/VolumeApi.md +155 -65
- data/docs/VolumeCreate.md +21 -18
- data/docs/VolumeResponse.md +25 -22
- data/docs/VolumeSafeDelete.md +13 -12
- data/docs/VolumeSafeDeleteApi.md +122 -50
- data/docs/VolumeSafeDeleteCreate.md +9 -8
- data/docs/VolumeUpdate.md +11 -8
- data/lib/autosde_openapi_client.rb +18 -3
- data/lib/autosde_openapi_client/api/abstract_capability_api.rb +20 -16
- data/lib/autosde_openapi_client/api/account_api.rb +26 -21
- data/lib/autosde_openapi_client/api/address_api.rb +20 -16
- data/lib/autosde_openapi_client/api/authentication_api.rb +6 -5
- data/lib/autosde_openapi_client/api/auto_sde_project_api.rb +20 -16
- data/lib/autosde_openapi_client/api/auto_sde_role_api.rb +20 -16
- data/lib/autosde_openapi_client/api/capability_translation_api.rb +20 -16
- data/lib/autosde_openapi_client/api/host_api.rb +20 -16
- data/lib/autosde_openapi_client/api/host_volume_connection_api.rb +20 -16
- data/lib/autosde_openapi_client/api/job_api.rb +136 -0
- data/lib/autosde_openapi_client/api/native_capability_api.rb +20 -16
- data/lib/autosde_openapi_client/api/profile_api.rb +20 -16
- data/lib/autosde_openapi_client/api/provisioning_strategy_api.rb +20 -16
- data/lib/autosde_openapi_client/api/service_api.rb +26 -21
- data/lib/autosde_openapi_client/api/service_resource_attachment_api.rb +20 -16
- data/lib/autosde_openapi_client/api/snapshot_api.rb +254 -0
- data/lib/autosde_openapi_client/api/storage_host_api.rb +321 -0
- data/lib/autosde_openapi_client/api/storage_host_volume_mapping_api.rb +254 -0
- data/lib/autosde_openapi_client/api/storage_resource_api.rb +26 -21
- data/lib/autosde_openapi_client/api/storage_system_api.rb +20 -16
- data/lib/autosde_openapi_client/api/system_type_api.rb +20 -16
- data/lib/autosde_openapi_client/api/volume_api.rb +26 -21
- data/lib/autosde_openapi_client/api/volume_safe_delete_api.rb +20 -16
- data/lib/autosde_openapi_client/api_client.rb +50 -48
- data/lib/autosde_openapi_client/api_error.rb +2 -2
- data/lib/autosde_openapi_client/configuration.rb +35 -8
- data/lib/autosde_openapi_client/models/abstract_capability.rb +22 -10
- data/lib/autosde_openapi_client/models/account.rb +22 -10
- data/lib/autosde_openapi_client/models/account_post_request.rb +22 -10
- data/lib/autosde_openapi_client/models/account_post_response.rb +22 -10
- data/lib/autosde_openapi_client/models/address.rb +22 -10
- data/lib/autosde_openapi_client/models/address_create.rb +22 -10
- data/lib/autosde_openapi_client/models/auth_response.rb +22 -10
- data/lib/autosde_openapi_client/models/authentication.rb +22 -10
- data/lib/autosde_openapi_client/models/auto_sde_project.rb +22 -10
- data/lib/autosde_openapi_client/models/auto_sde_role.rb +22 -10
- data/lib/autosde_openapi_client/models/capability_translation.rb +22 -10
- data/lib/autosde_openapi_client/models/capability_translation_create.rb +22 -10
- data/lib/autosde_openapi_client/models/host.rb +22 -10
- data/lib/autosde_openapi_client/models/host_create.rb +22 -10
- data/lib/autosde_openapi_client/models/host_volume_connection.rb +22 -10
- data/lib/autosde_openapi_client/models/host_volume_connection_create.rb +22 -10
- data/lib/autosde_openapi_client/models/job.rb +280 -0
- data/lib/autosde_openapi_client/models/job_create.rb +230 -0
- data/lib/autosde_openapi_client/models/native_capability.rb +22 -10
- data/lib/autosde_openapi_client/models/profile.rb +22 -10
- data/lib/autosde_openapi_client/models/provisioning_strategy.rb +22 -10
- data/lib/autosde_openapi_client/models/service.rb +22 -10
- data/lib/autosde_openapi_client/models/service_abstract_capability_value.rb +22 -10
- data/lib/autosde_openapi_client/models/service_create.rb +22 -10
- data/lib/autosde_openapi_client/models/service_resource_attachment.rb +22 -10
- data/lib/autosde_openapi_client/models/snapshot.rb +298 -0
- data/lib/autosde_openapi_client/models/snapshot_create.rb +288 -0
- data/lib/autosde_openapi_client/models/storage_host.rb +317 -0
- data/lib/autosde_openapi_client/models/storage_host_create.rb +368 -0
- data/lib/autosde_openapi_client/models/storage_host_response.rb +333 -0
- data/lib/autosde_openapi_client/models/storage_host_update.rb +301 -0
- data/lib/autosde_openapi_client/models/storage_host_volume_mapping.rb +299 -0
- data/lib/autosde_openapi_client/models/storage_host_volume_mapping_create.rb +291 -0
- data/lib/autosde_openapi_client/models/storage_host_volume_mapping_response.rb +301 -0
- data/lib/autosde_openapi_client/models/storage_resource.rb +22 -10
- data/lib/autosde_openapi_client/models/storage_resource_create.rb +22 -10
- data/lib/autosde_openapi_client/models/storage_resource_response.rb +22 -10
- data/lib/autosde_openapi_client/models/storage_system.rb +22 -10
- data/lib/autosde_openapi_client/models/storage_system_create.rb +22 -10
- data/lib/autosde_openapi_client/models/system_type.rb +22 -10
- data/lib/autosde_openapi_client/models/system_type_create.rb +22 -10
- data/lib/autosde_openapi_client/models/volume.rb +33 -11
- data/lib/autosde_openapi_client/models/volume_create.rb +33 -11
- data/lib/autosde_openapi_client/models/volume_response.rb +33 -11
- data/lib/autosde_openapi_client/models/volume_safe_delete.rb +22 -10
- data/lib/autosde_openapi_client/models/volume_safe_delete_create.rb +22 -10
- data/lib/autosde_openapi_client/models/volume_update.rb +35 -11
- data/lib/autosde_openapi_client/version.rb +4 -4
- data/spec/api/abstract_capability_api_spec.rb +2 -2
- data/spec/api/account_api_spec.rb +3 -3
- data/spec/api/address_api_spec.rb +2 -2
- data/spec/api/authentication_api_spec.rb +1 -1
- data/spec/api/auto_sde_project_api_spec.rb +2 -2
- data/spec/api/auto_sde_role_api_spec.rb +2 -2
- data/spec/api/capability_translation_api_spec.rb +2 -2
- data/spec/api/host_api_spec.rb +2 -2
- data/spec/api/host_volume_connection_api_spec.rb +2 -2
- data/spec/api/job_api_spec.rb +54 -0
- data/spec/api/native_capability_api_spec.rb +2 -2
- data/spec/api/profile_api_spec.rb +2 -2
- data/spec/api/provisioning_strategy_api_spec.rb +2 -2
- data/spec/api/service_api_spec.rb +3 -3
- data/spec/api/service_resource_attachment_api_spec.rb +2 -2
- data/spec/api/snapshot_api_spec.rb +74 -0
- data/spec/api/storage_host_api_spec.rb +85 -0
- data/spec/api/storage_host_volume_mapping_api_spec.rb +74 -0
- data/spec/api/storage_resource_api_spec.rb +3 -3
- data/spec/api/storage_system_api_spec.rb +2 -2
- data/spec/api/system_type_api_spec.rb +2 -2
- data/spec/api/volume_api_spec.rb +3 -3
- data/spec/api/volume_safe_delete_api_spec.rb +2 -2
- data/spec/api_client_spec.rb +30 -30
- data/spec/configuration_spec.rb +4 -4
- data/spec/models/abstract_capability_spec.rb +4 -11
- data/spec/models/account_post_request_spec.rb +4 -11
- data/spec/models/account_post_response_spec.rb +4 -11
- data/spec/models/account_spec.rb +4 -11
- data/spec/models/address_create_spec.rb +6 -13
- data/spec/models/address_spec.rb +6 -13
- data/spec/models/auth_response_spec.rb +4 -11
- data/spec/models/authentication_spec.rb +4 -11
- data/spec/models/auto_sde_project_spec.rb +4 -11
- data/spec/models/auto_sde_role_spec.rb +4 -11
- data/spec/models/capability_translation_create_spec.rb +4 -11
- data/spec/models/capability_translation_spec.rb +4 -11
- data/spec/models/host_create_spec.rb +7 -14
- data/spec/models/host_spec.rb +6 -13
- data/spec/models/host_volume_connection_create_spec.rb +5 -12
- data/spec/models/host_volume_connection_spec.rb +5 -12
- data/spec/models/job_create_spec.rb +40 -0
- data/spec/models/job_spec.rb +70 -0
- data/spec/models/native_capability_spec.rb +4 -11
- data/spec/models/profile_spec.rb +5 -12
- data/spec/models/provisioning_strategy_spec.rb +5 -12
- data/spec/models/service_abstract_capability_value_spec.rb +4 -11
- data/spec/models/service_create_spec.rb +5 -12
- data/spec/models/service_resource_attachment_spec.rb +4 -11
- data/spec/models/service_spec.rb +5 -12
- data/spec/models/snapshot_create_spec.rb +56 -0
- data/spec/models/snapshot_spec.rb +62 -0
- data/spec/models/storage_host_create_spec.rb +102 -0
- data/spec/models/storage_host_response_spec.rb +80 -0
- data/spec/models/storage_host_spec.rb +74 -0
- data/spec/models/storage_host_update_spec.rb +54 -0
- data/spec/models/storage_host_volume_mapping_create_spec.rb +56 -0
- data/spec/models/storage_host_volume_mapping_response_spec.rb +62 -0
- data/spec/models/storage_host_volume_mapping_spec.rb +62 -0
- data/spec/models/storage_resource_create_spec.rb +6 -13
- data/spec/models/storage_resource_response_spec.rb +6 -13
- data/spec/models/storage_resource_spec.rb +6 -13
- data/spec/models/storage_system_create_spec.rb +7 -14
- data/spec/models/storage_system_spec.rb +6 -13
- data/spec/models/system_type_create_spec.rb +6 -13
- data/spec/models/system_type_spec.rb +6 -13
- data/spec/models/volume_create_spec.rb +11 -12
- data/spec/models/volume_response_spec.rb +11 -12
- data/spec/models/volume_safe_delete_create_spec.rb +4 -11
- data/spec/models/volume_safe_delete_spec.rb +4 -11
- data/spec/models/volume_spec.rb +11 -12
- data/spec/models/volume_update_spec.rb +10 -11
- data/spec/spec_helper.rb +1 -1
- metadata +112 -72
- data/site_manager_oas.json +0 -3992
@@ -6,13 +6,14 @@
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
7
7
|
Contact: autosde@il.ibm.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 5.0.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
|
+
require 'time'
|
14
15
|
|
15
|
-
module
|
16
|
+
module AutosdeOpenapiClient
|
16
17
|
# Use to define the storage system type.
|
17
18
|
class SystemType
|
18
19
|
# component_state
|
@@ -63,6 +64,11 @@ module OpenapiClient
|
|
63
64
|
}
|
64
65
|
end
|
65
66
|
|
67
|
+
# Returns all the JSON keys this model knows about
|
68
|
+
def self.acceptable_attributes
|
69
|
+
attribute_map.values
|
70
|
+
end
|
71
|
+
|
66
72
|
# Attribute type mapping.
|
67
73
|
def self.openapi_types
|
68
74
|
{
|
@@ -84,13 +90,13 @@ module OpenapiClient
|
|
84
90
|
# @param [Hash] attributes Model attributes in the form of hash
|
85
91
|
def initialize(attributes = {})
|
86
92
|
if (!attributes.is_a?(Hash))
|
87
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
93
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `AutosdeOpenapiClient::SystemType` initialize method"
|
88
94
|
end
|
89
95
|
|
90
96
|
# check to see if the attribute exists and convert string to symbol for hash key
|
91
97
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
92
98
|
if (!self.class.attribute_map.key?(k.to_sym))
|
93
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
99
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `AutosdeOpenapiClient::SystemType`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
94
100
|
end
|
95
101
|
h[k.to_sym] = v
|
96
102
|
}
|
@@ -217,7 +223,9 @@ module OpenapiClient
|
|
217
223
|
def build_from_hash(attributes)
|
218
224
|
return nil unless attributes.is_a?(Hash)
|
219
225
|
self.class.openapi_types.each_pair do |key, type|
|
220
|
-
if
|
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
|
221
229
|
# check to ensure the input is an array given that the attribute
|
222
230
|
# is documented as an array but the input is not
|
223
231
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -225,7 +233,7 @@ module OpenapiClient
|
|
225
233
|
end
|
226
234
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
227
235
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
228
|
-
end
|
236
|
+
end
|
229
237
|
end
|
230
238
|
|
231
239
|
self
|
@@ -237,8 +245,8 @@ module OpenapiClient
|
|
237
245
|
# @return [Object] Deserialized data
|
238
246
|
def _deserialize(type, value)
|
239
247
|
case type.to_sym
|
240
|
-
when :
|
241
|
-
|
248
|
+
when :Time
|
249
|
+
Time.parse(value)
|
242
250
|
when :Date
|
243
251
|
Date.parse(value)
|
244
252
|
when :String
|
@@ -268,7 +276,9 @@ module OpenapiClient
|
|
268
276
|
end
|
269
277
|
end
|
270
278
|
else # model
|
271
|
-
|
279
|
+
# models (e.g. Pet) or oneOf
|
280
|
+
klass = AutosdeOpenapiClient.const_get(type)
|
281
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
272
282
|
end
|
273
283
|
end
|
274
284
|
|
@@ -294,7 +304,7 @@ module OpenapiClient
|
|
294
304
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
295
305
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
296
306
|
end
|
297
|
-
|
307
|
+
|
298
308
|
hash[param] = _to_hash(value)
|
299
309
|
end
|
300
310
|
hash
|
@@ -317,5 +327,7 @@ module OpenapiClient
|
|
317
327
|
value
|
318
328
|
end
|
319
329
|
end
|
330
|
+
|
320
331
|
end
|
332
|
+
|
321
333
|
end
|
@@ -6,13 +6,14 @@
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
7
7
|
Contact: autosde@il.ibm.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 5.0.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
|
+
require 'time'
|
14
15
|
|
15
|
-
module
|
16
|
+
module AutosdeOpenapiClient
|
16
17
|
# TODO add description
|
17
18
|
class SystemTypeCreate
|
18
19
|
# component_state
|
@@ -67,6 +68,11 @@ module OpenapiClient
|
|
67
68
|
}
|
68
69
|
end
|
69
70
|
|
71
|
+
# Returns all the JSON keys this model knows about
|
72
|
+
def self.acceptable_attributes
|
73
|
+
attribute_map.values
|
74
|
+
end
|
75
|
+
|
70
76
|
# Attribute type mapping.
|
71
77
|
def self.openapi_types
|
72
78
|
{
|
@@ -89,13 +95,13 @@ module OpenapiClient
|
|
89
95
|
# @param [Hash] attributes Model attributes in the form of hash
|
90
96
|
def initialize(attributes = {})
|
91
97
|
if (!attributes.is_a?(Hash))
|
92
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
98
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `AutosdeOpenapiClient::SystemTypeCreate` initialize method"
|
93
99
|
end
|
94
100
|
|
95
101
|
# check to see if the attribute exists and convert string to symbol for hash key
|
96
102
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
97
103
|
if (!self.class.attribute_map.key?(k.to_sym))
|
98
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
104
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `AutosdeOpenapiClient::SystemTypeCreate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
99
105
|
end
|
100
106
|
h[k.to_sym] = v
|
101
107
|
}
|
@@ -229,7 +235,9 @@ module OpenapiClient
|
|
229
235
|
def build_from_hash(attributes)
|
230
236
|
return nil unless attributes.is_a?(Hash)
|
231
237
|
self.class.openapi_types.each_pair do |key, type|
|
232
|
-
if
|
238
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
239
|
+
self.send("#{key}=", nil)
|
240
|
+
elsif type =~ /\AArray<(.*)>/i
|
233
241
|
# check to ensure the input is an array given that the attribute
|
234
242
|
# is documented as an array but the input is not
|
235
243
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -237,7 +245,7 @@ module OpenapiClient
|
|
237
245
|
end
|
238
246
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
239
247
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
240
|
-
end
|
248
|
+
end
|
241
249
|
end
|
242
250
|
|
243
251
|
self
|
@@ -249,8 +257,8 @@ module OpenapiClient
|
|
249
257
|
# @return [Object] Deserialized data
|
250
258
|
def _deserialize(type, value)
|
251
259
|
case type.to_sym
|
252
|
-
when :
|
253
|
-
|
260
|
+
when :Time
|
261
|
+
Time.parse(value)
|
254
262
|
when :Date
|
255
263
|
Date.parse(value)
|
256
264
|
when :String
|
@@ -280,7 +288,9 @@ module OpenapiClient
|
|
280
288
|
end
|
281
289
|
end
|
282
290
|
else # model
|
283
|
-
|
291
|
+
# models (e.g. Pet) or oneOf
|
292
|
+
klass = AutosdeOpenapiClient.const_get(type)
|
293
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
284
294
|
end
|
285
295
|
end
|
286
296
|
|
@@ -306,7 +316,7 @@ module OpenapiClient
|
|
306
316
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
307
317
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
308
318
|
end
|
309
|
-
|
319
|
+
|
310
320
|
hash[param] = _to_hash(value)
|
311
321
|
end
|
312
322
|
hash
|
@@ -329,5 +339,7 @@ module OpenapiClient
|
|
329
339
|
value
|
330
340
|
end
|
331
341
|
end
|
342
|
+
|
332
343
|
end
|
344
|
+
|
333
345
|
end
|
@@ -6,13 +6,14 @@
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
7
7
|
Contact: autosde@il.ibm.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 5.0.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
|
+
require 'time'
|
14
15
|
|
15
|
-
module
|
16
|
+
module AutosdeOpenapiClient
|
16
17
|
# Define volume properties on a specific storage resource.
|
17
18
|
class Volume
|
18
19
|
# compliant
|
@@ -33,6 +34,9 @@ module OpenapiClient
|
|
33
34
|
|
34
35
|
attr_accessor :storage_resource
|
35
36
|
|
37
|
+
# unmapped_since
|
38
|
+
attr_accessor :unmapped_since
|
39
|
+
|
36
40
|
# uuid
|
37
41
|
attr_accessor :uuid
|
38
42
|
|
@@ -68,10 +72,16 @@ module OpenapiClient
|
|
68
72
|
:'service' => :'service',
|
69
73
|
:'size' => :'size',
|
70
74
|
:'storage_resource' => :'storage_resource',
|
75
|
+
:'unmapped_since' => :'unmapped_since',
|
71
76
|
:'uuid' => :'uuid'
|
72
77
|
}
|
73
78
|
end
|
74
79
|
|
80
|
+
# Returns all the JSON keys this model knows about
|
81
|
+
def self.acceptable_attributes
|
82
|
+
attribute_map.values
|
83
|
+
end
|
84
|
+
|
75
85
|
# Attribute type mapping.
|
76
86
|
def self.openapi_types
|
77
87
|
{
|
@@ -82,6 +92,7 @@ module OpenapiClient
|
|
82
92
|
:'service' => :'Service',
|
83
93
|
:'size' => :'Integer',
|
84
94
|
:'storage_resource' => :'StorageResource',
|
95
|
+
:'unmapped_since' => :'Time',
|
85
96
|
:'uuid' => :'String'
|
86
97
|
}
|
87
98
|
end
|
@@ -96,13 +107,13 @@ module OpenapiClient
|
|
96
107
|
# @param [Hash] attributes Model attributes in the form of hash
|
97
108
|
def initialize(attributes = {})
|
98
109
|
if (!attributes.is_a?(Hash))
|
99
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
110
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `AutosdeOpenapiClient::Volume` initialize method"
|
100
111
|
end
|
101
112
|
|
102
113
|
# check to see if the attribute exists and convert string to symbol for hash key
|
103
114
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
104
115
|
if (!self.class.attribute_map.key?(k.to_sym))
|
105
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
116
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `AutosdeOpenapiClient::Volume`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
106
117
|
end
|
107
118
|
h[k.to_sym] = v
|
108
119
|
}
|
@@ -137,6 +148,10 @@ module OpenapiClient
|
|
137
148
|
self.storage_resource = attributes[:'storage_resource']
|
138
149
|
end
|
139
150
|
|
151
|
+
if attributes.key?(:'unmapped_since')
|
152
|
+
self.unmapped_since = attributes[:'unmapped_since']
|
153
|
+
end
|
154
|
+
|
140
155
|
if attributes.key?(:'uuid')
|
141
156
|
self.uuid = attributes[:'uuid']
|
142
157
|
end
|
@@ -184,6 +199,7 @@ module OpenapiClient
|
|
184
199
|
service == o.service &&
|
185
200
|
size == o.size &&
|
186
201
|
storage_resource == o.storage_resource &&
|
202
|
+
unmapped_since == o.unmapped_since &&
|
187
203
|
uuid == o.uuid
|
188
204
|
end
|
189
205
|
|
@@ -196,7 +212,7 @@ module OpenapiClient
|
|
196
212
|
# Calculates hash code according to all attributes.
|
197
213
|
# @return [Integer] Hash code
|
198
214
|
def hash
|
199
|
-
[compliant, component_state, historical_service, name, service, size, storage_resource, uuid].hash
|
215
|
+
[compliant, component_state, historical_service, name, service, size, storage_resource, unmapped_since, uuid].hash
|
200
216
|
end
|
201
217
|
|
202
218
|
# Builds the object from hash
|
@@ -212,7 +228,9 @@ module OpenapiClient
|
|
212
228
|
def build_from_hash(attributes)
|
213
229
|
return nil unless attributes.is_a?(Hash)
|
214
230
|
self.class.openapi_types.each_pair do |key, type|
|
215
|
-
if
|
231
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
232
|
+
self.send("#{key}=", nil)
|
233
|
+
elsif type =~ /\AArray<(.*)>/i
|
216
234
|
# check to ensure the input is an array given that the attribute
|
217
235
|
# is documented as an array but the input is not
|
218
236
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -220,7 +238,7 @@ module OpenapiClient
|
|
220
238
|
end
|
221
239
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
222
240
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
223
|
-
end
|
241
|
+
end
|
224
242
|
end
|
225
243
|
|
226
244
|
self
|
@@ -232,8 +250,8 @@ module OpenapiClient
|
|
232
250
|
# @return [Object] Deserialized data
|
233
251
|
def _deserialize(type, value)
|
234
252
|
case type.to_sym
|
235
|
-
when :
|
236
|
-
|
253
|
+
when :Time
|
254
|
+
Time.parse(value)
|
237
255
|
when :Date
|
238
256
|
Date.parse(value)
|
239
257
|
when :String
|
@@ -263,7 +281,9 @@ module OpenapiClient
|
|
263
281
|
end
|
264
282
|
end
|
265
283
|
else # model
|
266
|
-
|
284
|
+
# models (e.g. Pet) or oneOf
|
285
|
+
klass = AutosdeOpenapiClient.const_get(type)
|
286
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
267
287
|
end
|
268
288
|
end
|
269
289
|
|
@@ -289,7 +309,7 @@ module OpenapiClient
|
|
289
309
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
290
310
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
291
311
|
end
|
292
|
-
|
312
|
+
|
293
313
|
hash[param] = _to_hash(value)
|
294
314
|
end
|
295
315
|
hash
|
@@ -312,5 +332,7 @@ module OpenapiClient
|
|
312
332
|
value
|
313
333
|
end
|
314
334
|
end
|
335
|
+
|
315
336
|
end
|
337
|
+
|
316
338
|
end
|
@@ -6,13 +6,14 @@
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
7
7
|
Contact: autosde@il.ibm.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 5.0.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
|
+
require 'time'
|
14
15
|
|
15
|
-
module
|
16
|
+
module AutosdeOpenapiClient
|
16
17
|
# TODO add description
|
17
18
|
class VolumeCreate
|
18
19
|
# compliant
|
@@ -30,6 +31,9 @@ module OpenapiClient
|
|
30
31
|
# size
|
31
32
|
attr_accessor :size
|
32
33
|
|
34
|
+
# unmapped_since
|
35
|
+
attr_accessor :unmapped_since
|
36
|
+
|
33
37
|
# uuid
|
34
38
|
attr_accessor :uuid
|
35
39
|
|
@@ -63,10 +67,16 @@ module OpenapiClient
|
|
63
67
|
:'name' => :'name',
|
64
68
|
:'service' => :'service',
|
65
69
|
:'size' => :'size',
|
70
|
+
:'unmapped_since' => :'unmapped_since',
|
66
71
|
:'uuid' => :'uuid'
|
67
72
|
}
|
68
73
|
end
|
69
74
|
|
75
|
+
# Returns all the JSON keys this model knows about
|
76
|
+
def self.acceptable_attributes
|
77
|
+
attribute_map.values
|
78
|
+
end
|
79
|
+
|
70
80
|
# Attribute type mapping.
|
71
81
|
def self.openapi_types
|
72
82
|
{
|
@@ -75,6 +85,7 @@ module OpenapiClient
|
|
75
85
|
:'name' => :'String',
|
76
86
|
:'service' => :'String',
|
77
87
|
:'size' => :'Integer',
|
88
|
+
:'unmapped_since' => :'Time',
|
78
89
|
:'uuid' => :'String'
|
79
90
|
}
|
80
91
|
end
|
@@ -89,13 +100,13 @@ module OpenapiClient
|
|
89
100
|
# @param [Hash] attributes Model attributes in the form of hash
|
90
101
|
def initialize(attributes = {})
|
91
102
|
if (!attributes.is_a?(Hash))
|
92
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
103
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `AutosdeOpenapiClient::VolumeCreate` initialize method"
|
93
104
|
end
|
94
105
|
|
95
106
|
# check to see if the attribute exists and convert string to symbol for hash key
|
96
107
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
97
108
|
if (!self.class.attribute_map.key?(k.to_sym))
|
98
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
109
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `AutosdeOpenapiClient::VolumeCreate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
99
110
|
end
|
100
111
|
h[k.to_sym] = v
|
101
112
|
}
|
@@ -122,6 +133,10 @@ module OpenapiClient
|
|
122
133
|
self.size = attributes[:'size']
|
123
134
|
end
|
124
135
|
|
136
|
+
if attributes.key?(:'unmapped_since')
|
137
|
+
self.unmapped_since = attributes[:'unmapped_since']
|
138
|
+
end
|
139
|
+
|
125
140
|
if attributes.key?(:'uuid')
|
126
141
|
self.uuid = attributes[:'uuid']
|
127
142
|
end
|
@@ -167,6 +182,7 @@ module OpenapiClient
|
|
167
182
|
name == o.name &&
|
168
183
|
service == o.service &&
|
169
184
|
size == o.size &&
|
185
|
+
unmapped_since == o.unmapped_since &&
|
170
186
|
uuid == o.uuid
|
171
187
|
end
|
172
188
|
|
@@ -179,7 +195,7 @@ module OpenapiClient
|
|
179
195
|
# Calculates hash code according to all attributes.
|
180
196
|
# @return [Integer] Hash code
|
181
197
|
def hash
|
182
|
-
[compliant, component_state, name, service, size, uuid].hash
|
198
|
+
[compliant, component_state, name, service, size, unmapped_since, uuid].hash
|
183
199
|
end
|
184
200
|
|
185
201
|
# Builds the object from hash
|
@@ -195,7 +211,9 @@ module OpenapiClient
|
|
195
211
|
def build_from_hash(attributes)
|
196
212
|
return nil unless attributes.is_a?(Hash)
|
197
213
|
self.class.openapi_types.each_pair do |key, type|
|
198
|
-
if
|
214
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
215
|
+
self.send("#{key}=", nil)
|
216
|
+
elsif type =~ /\AArray<(.*)>/i
|
199
217
|
# check to ensure the input is an array given that the attribute
|
200
218
|
# is documented as an array but the input is not
|
201
219
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -203,7 +221,7 @@ module OpenapiClient
|
|
203
221
|
end
|
204
222
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
205
223
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
206
|
-
end
|
224
|
+
end
|
207
225
|
end
|
208
226
|
|
209
227
|
self
|
@@ -215,8 +233,8 @@ module OpenapiClient
|
|
215
233
|
# @return [Object] Deserialized data
|
216
234
|
def _deserialize(type, value)
|
217
235
|
case type.to_sym
|
218
|
-
when :
|
219
|
-
|
236
|
+
when :Time
|
237
|
+
Time.parse(value)
|
220
238
|
when :Date
|
221
239
|
Date.parse(value)
|
222
240
|
when :String
|
@@ -246,7 +264,9 @@ module OpenapiClient
|
|
246
264
|
end
|
247
265
|
end
|
248
266
|
else # model
|
249
|
-
|
267
|
+
# models (e.g. Pet) or oneOf
|
268
|
+
klass = AutosdeOpenapiClient.const_get(type)
|
269
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
250
270
|
end
|
251
271
|
end
|
252
272
|
|
@@ -272,7 +292,7 @@ module OpenapiClient
|
|
272
292
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
273
293
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
274
294
|
end
|
275
|
-
|
295
|
+
|
276
296
|
hash[param] = _to_hash(value)
|
277
297
|
end
|
278
298
|
hash
|
@@ -295,5 +315,7 @@ module OpenapiClient
|
|
295
315
|
value
|
296
316
|
end
|
297
317
|
end
|
318
|
+
|
298
319
|
end
|
320
|
+
|
299
321
|
end
|