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
|
# NativeCapability
|
17
18
|
class NativeCapability
|
18
19
|
# name
|
@@ -36,6 +37,11 @@ module OpenapiClient
|
|
36
37
|
}
|
37
38
|
end
|
38
39
|
|
40
|
+
# Returns all the JSON keys this model knows about
|
41
|
+
def self.acceptable_attributes
|
42
|
+
attribute_map.values
|
43
|
+
end
|
44
|
+
|
39
45
|
# Attribute type mapping.
|
40
46
|
def self.openapi_types
|
41
47
|
{
|
@@ -56,13 +62,13 @@ module OpenapiClient
|
|
56
62
|
# @param [Hash] attributes Model attributes in the form of hash
|
57
63
|
def initialize(attributes = {})
|
58
64
|
if (!attributes.is_a?(Hash))
|
59
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
65
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `AutosdeOpenapiClient::NativeCapability` initialize method"
|
60
66
|
end
|
61
67
|
|
62
68
|
# check to see if the attribute exists and convert string to symbol for hash key
|
63
69
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
64
70
|
if (!self.class.attribute_map.key?(k.to_sym))
|
65
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
71
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `AutosdeOpenapiClient::NativeCapability`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
66
72
|
end
|
67
73
|
h[k.to_sym] = v
|
68
74
|
}
|
@@ -135,7 +141,9 @@ module OpenapiClient
|
|
135
141
|
def build_from_hash(attributes)
|
136
142
|
return nil unless attributes.is_a?(Hash)
|
137
143
|
self.class.openapi_types.each_pair do |key, type|
|
138
|
-
if
|
144
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
145
|
+
self.send("#{key}=", nil)
|
146
|
+
elsif type =~ /\AArray<(.*)>/i
|
139
147
|
# check to ensure the input is an array given that the attribute
|
140
148
|
# is documented as an array but the input is not
|
141
149
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -143,7 +151,7 @@ module OpenapiClient
|
|
143
151
|
end
|
144
152
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
145
153
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
146
|
-
end
|
154
|
+
end
|
147
155
|
end
|
148
156
|
|
149
157
|
self
|
@@ -155,8 +163,8 @@ module OpenapiClient
|
|
155
163
|
# @return [Object] Deserialized data
|
156
164
|
def _deserialize(type, value)
|
157
165
|
case type.to_sym
|
158
|
-
when :
|
159
|
-
|
166
|
+
when :Time
|
167
|
+
Time.parse(value)
|
160
168
|
when :Date
|
161
169
|
Date.parse(value)
|
162
170
|
when :String
|
@@ -186,7 +194,9 @@ module OpenapiClient
|
|
186
194
|
end
|
187
195
|
end
|
188
196
|
else # model
|
189
|
-
|
197
|
+
# models (e.g. Pet) or oneOf
|
198
|
+
klass = AutosdeOpenapiClient.const_get(type)
|
199
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
190
200
|
end
|
191
201
|
end
|
192
202
|
|
@@ -212,7 +222,7 @@ module OpenapiClient
|
|
212
222
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
213
223
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
214
224
|
end
|
215
|
-
|
225
|
+
|
216
226
|
hash[param] = _to_hash(value)
|
217
227
|
end
|
218
228
|
hash
|
@@ -235,5 +245,7 @@ module OpenapiClient
|
|
235
245
|
value
|
236
246
|
end
|
237
247
|
end
|
248
|
+
|
238
249
|
end
|
250
|
+
|
239
251
|
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
|
# doc-todo: which profile is being defined??
|
17
18
|
class Profile
|
18
19
|
attr_accessor :account
|
@@ -62,6 +63,11 @@ module OpenapiClient
|
|
62
63
|
}
|
63
64
|
end
|
64
65
|
|
66
|
+
# Returns all the JSON keys this model knows about
|
67
|
+
def self.acceptable_attributes
|
68
|
+
attribute_map.values
|
69
|
+
end
|
70
|
+
|
65
71
|
# Attribute type mapping.
|
66
72
|
def self.openapi_types
|
67
73
|
{
|
@@ -83,13 +89,13 @@ module OpenapiClient
|
|
83
89
|
# @param [Hash] attributes Model attributes in the form of hash
|
84
90
|
def initialize(attributes = {})
|
85
91
|
if (!attributes.is_a?(Hash))
|
86
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
92
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `AutosdeOpenapiClient::Profile` initialize method"
|
87
93
|
end
|
88
94
|
|
89
95
|
# check to see if the attribute exists and convert string to symbol for hash key
|
90
96
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
91
97
|
if (!self.class.attribute_map.key?(k.to_sym))
|
92
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
98
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `AutosdeOpenapiClient::Profile`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
93
99
|
end
|
94
100
|
h[k.to_sym] = v
|
95
101
|
}
|
@@ -179,7 +185,9 @@ module OpenapiClient
|
|
179
185
|
def build_from_hash(attributes)
|
180
186
|
return nil unless attributes.is_a?(Hash)
|
181
187
|
self.class.openapi_types.each_pair do |key, type|
|
182
|
-
if
|
188
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
189
|
+
self.send("#{key}=", nil)
|
190
|
+
elsif type =~ /\AArray<(.*)>/i
|
183
191
|
# check to ensure the input is an array given that the attribute
|
184
192
|
# is documented as an array but the input is not
|
185
193
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -187,7 +195,7 @@ module OpenapiClient
|
|
187
195
|
end
|
188
196
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
189
197
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
190
|
-
end
|
198
|
+
end
|
191
199
|
end
|
192
200
|
|
193
201
|
self
|
@@ -199,8 +207,8 @@ module OpenapiClient
|
|
199
207
|
# @return [Object] Deserialized data
|
200
208
|
def _deserialize(type, value)
|
201
209
|
case type.to_sym
|
202
|
-
when :
|
203
|
-
|
210
|
+
when :Time
|
211
|
+
Time.parse(value)
|
204
212
|
when :Date
|
205
213
|
Date.parse(value)
|
206
214
|
when :String
|
@@ -230,7 +238,9 @@ module OpenapiClient
|
|
230
238
|
end
|
231
239
|
end
|
232
240
|
else # model
|
233
|
-
|
241
|
+
# models (e.g. Pet) or oneOf
|
242
|
+
klass = AutosdeOpenapiClient.const_get(type)
|
243
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
234
244
|
end
|
235
245
|
end
|
236
246
|
|
@@ -256,7 +266,7 @@ module OpenapiClient
|
|
256
266
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
257
267
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
258
268
|
end
|
259
|
-
|
269
|
+
|
260
270
|
hash[param] = _to_hash(value)
|
261
271
|
end
|
262
272
|
hash
|
@@ -279,5 +289,7 @@ module OpenapiClient
|
|
279
289
|
value
|
280
290
|
end
|
281
291
|
end
|
292
|
+
|
282
293
|
end
|
294
|
+
|
283
295
|
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
|
# Used for capacity provisioning details.
|
17
18
|
class ProvisioningStrategy
|
18
19
|
# name
|
@@ -51,6 +52,11 @@ module OpenapiClient
|
|
51
52
|
}
|
52
53
|
end
|
53
54
|
|
55
|
+
# Returns all the JSON keys this model knows about
|
56
|
+
def self.acceptable_attributes
|
57
|
+
attribute_map.values
|
58
|
+
end
|
59
|
+
|
54
60
|
# Attribute type mapping.
|
55
61
|
def self.openapi_types
|
56
62
|
{
|
@@ -69,13 +75,13 @@ module OpenapiClient
|
|
69
75
|
# @param [Hash] attributes Model attributes in the form of hash
|
70
76
|
def initialize(attributes = {})
|
71
77
|
if (!attributes.is_a?(Hash))
|
72
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
78
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `AutosdeOpenapiClient::ProvisioningStrategy` initialize method"
|
73
79
|
end
|
74
80
|
|
75
81
|
# check to see if the attribute exists and convert string to symbol for hash key
|
76
82
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
77
83
|
if (!self.class.attribute_map.key?(k.to_sym))
|
78
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
84
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `AutosdeOpenapiClient::ProvisioningStrategy`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
79
85
|
end
|
80
86
|
h[k.to_sym] = v
|
81
87
|
}
|
@@ -153,7 +159,9 @@ module OpenapiClient
|
|
153
159
|
def build_from_hash(attributes)
|
154
160
|
return nil unless attributes.is_a?(Hash)
|
155
161
|
self.class.openapi_types.each_pair do |key, type|
|
156
|
-
if
|
162
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
163
|
+
self.send("#{key}=", nil)
|
164
|
+
elsif type =~ /\AArray<(.*)>/i
|
157
165
|
# check to ensure the input is an array given that the attribute
|
158
166
|
# is documented as an array but the input is not
|
159
167
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -161,7 +169,7 @@ module OpenapiClient
|
|
161
169
|
end
|
162
170
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
163
171
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
164
|
-
end
|
172
|
+
end
|
165
173
|
end
|
166
174
|
|
167
175
|
self
|
@@ -173,8 +181,8 @@ module OpenapiClient
|
|
173
181
|
# @return [Object] Deserialized data
|
174
182
|
def _deserialize(type, value)
|
175
183
|
case type.to_sym
|
176
|
-
when :
|
177
|
-
|
184
|
+
when :Time
|
185
|
+
Time.parse(value)
|
178
186
|
when :Date
|
179
187
|
Date.parse(value)
|
180
188
|
when :String
|
@@ -204,7 +212,9 @@ module OpenapiClient
|
|
204
212
|
end
|
205
213
|
end
|
206
214
|
else # model
|
207
|
-
|
215
|
+
# models (e.g. Pet) or oneOf
|
216
|
+
klass = AutosdeOpenapiClient.const_get(type)
|
217
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
208
218
|
end
|
209
219
|
end
|
210
220
|
|
@@ -230,7 +240,7 @@ module OpenapiClient
|
|
230
240
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
231
241
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
232
242
|
end
|
233
|
-
|
243
|
+
|
234
244
|
hash[param] = _to_hash(value)
|
235
245
|
end
|
236
246
|
hash
|
@@ -253,5 +263,7 @@ module OpenapiClient
|
|
253
263
|
value
|
254
264
|
end
|
255
265
|
end
|
266
|
+
|
256
267
|
end
|
268
|
+
|
257
269
|
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
|
# Service
|
17
18
|
class Service
|
18
19
|
attr_accessor :capability_values
|
@@ -79,6 +80,11 @@ module OpenapiClient
|
|
79
80
|
}
|
80
81
|
end
|
81
82
|
|
83
|
+
# Returns all the JSON keys this model knows about
|
84
|
+
def self.acceptable_attributes
|
85
|
+
attribute_map.values
|
86
|
+
end
|
87
|
+
|
82
88
|
# Attribute type mapping.
|
83
89
|
def self.openapi_types
|
84
90
|
{
|
@@ -105,13 +111,13 @@ module OpenapiClient
|
|
105
111
|
# @param [Hash] attributes Model attributes in the form of hash
|
106
112
|
def initialize(attributes = {})
|
107
113
|
if (!attributes.is_a?(Hash))
|
108
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
114
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `AutosdeOpenapiClient::Service` initialize method"
|
109
115
|
end
|
110
116
|
|
111
117
|
# check to see if the attribute exists and convert string to symbol for hash key
|
112
118
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
113
119
|
if (!self.class.attribute_map.key?(k.to_sym))
|
114
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
120
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `AutosdeOpenapiClient::Service`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
115
121
|
end
|
116
122
|
h[k.to_sym] = v
|
117
123
|
}
|
@@ -235,7 +241,9 @@ module OpenapiClient
|
|
235
241
|
def build_from_hash(attributes)
|
236
242
|
return nil unless attributes.is_a?(Hash)
|
237
243
|
self.class.openapi_types.each_pair do |key, type|
|
238
|
-
if
|
244
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
245
|
+
self.send("#{key}=", nil)
|
246
|
+
elsif type =~ /\AArray<(.*)>/i
|
239
247
|
# check to ensure the input is an array given that the attribute
|
240
248
|
# is documented as an array but the input is not
|
241
249
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -243,7 +251,7 @@ module OpenapiClient
|
|
243
251
|
end
|
244
252
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
245
253
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
246
|
-
end
|
254
|
+
end
|
247
255
|
end
|
248
256
|
|
249
257
|
self
|
@@ -255,8 +263,8 @@ module OpenapiClient
|
|
255
263
|
# @return [Object] Deserialized data
|
256
264
|
def _deserialize(type, value)
|
257
265
|
case type.to_sym
|
258
|
-
when :
|
259
|
-
|
266
|
+
when :Time
|
267
|
+
Time.parse(value)
|
260
268
|
when :Date
|
261
269
|
Date.parse(value)
|
262
270
|
when :String
|
@@ -286,7 +294,9 @@ module OpenapiClient
|
|
286
294
|
end
|
287
295
|
end
|
288
296
|
else # model
|
289
|
-
|
297
|
+
# models (e.g. Pet) or oneOf
|
298
|
+
klass = AutosdeOpenapiClient.const_get(type)
|
299
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
290
300
|
end
|
291
301
|
end
|
292
302
|
|
@@ -312,7 +322,7 @@ module OpenapiClient
|
|
312
322
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
313
323
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
314
324
|
end
|
315
|
-
|
325
|
+
|
316
326
|
hash[param] = _to_hash(value)
|
317
327
|
end
|
318
328
|
hash
|
@@ -335,5 +345,7 @@ module OpenapiClient
|
|
335
345
|
value
|
336
346
|
end
|
337
347
|
end
|
348
|
+
|
338
349
|
end
|
350
|
+
|
339
351
|
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
|
# ServiceAbstractCapabilityValue
|
17
18
|
class ServiceAbstractCapabilityValue
|
18
19
|
attr_accessor :abstract_capability
|
@@ -32,6 +33,11 @@ module OpenapiClient
|
|
32
33
|
}
|
33
34
|
end
|
34
35
|
|
36
|
+
# Returns all the JSON keys this model knows about
|
37
|
+
def self.acceptable_attributes
|
38
|
+
attribute_map.values
|
39
|
+
end
|
40
|
+
|
35
41
|
# Attribute type mapping.
|
36
42
|
def self.openapi_types
|
37
43
|
{
|
@@ -51,13 +57,13 @@ module OpenapiClient
|
|
51
57
|
# @param [Hash] attributes Model attributes in the form of hash
|
52
58
|
def initialize(attributes = {})
|
53
59
|
if (!attributes.is_a?(Hash))
|
54
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
60
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `AutosdeOpenapiClient::ServiceAbstractCapabilityValue` initialize method"
|
55
61
|
end
|
56
62
|
|
57
63
|
# check to see if the attribute exists and convert string to symbol for hash key
|
58
64
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
59
65
|
if (!self.class.attribute_map.key?(k.to_sym))
|
60
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
66
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `AutosdeOpenapiClient::ServiceAbstractCapabilityValue`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
61
67
|
end
|
62
68
|
h[k.to_sym] = v
|
63
69
|
}
|
@@ -123,7 +129,9 @@ module OpenapiClient
|
|
123
129
|
def build_from_hash(attributes)
|
124
130
|
return nil unless attributes.is_a?(Hash)
|
125
131
|
self.class.openapi_types.each_pair do |key, type|
|
126
|
-
if
|
132
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
133
|
+
self.send("#{key}=", nil)
|
134
|
+
elsif type =~ /\AArray<(.*)>/i
|
127
135
|
# check to ensure the input is an array given that the attribute
|
128
136
|
# is documented as an array but the input is not
|
129
137
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -131,7 +139,7 @@ module OpenapiClient
|
|
131
139
|
end
|
132
140
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
133
141
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
134
|
-
end
|
142
|
+
end
|
135
143
|
end
|
136
144
|
|
137
145
|
self
|
@@ -143,8 +151,8 @@ module OpenapiClient
|
|
143
151
|
# @return [Object] Deserialized data
|
144
152
|
def _deserialize(type, value)
|
145
153
|
case type.to_sym
|
146
|
-
when :
|
147
|
-
|
154
|
+
when :Time
|
155
|
+
Time.parse(value)
|
148
156
|
when :Date
|
149
157
|
Date.parse(value)
|
150
158
|
when :String
|
@@ -174,7 +182,9 @@ module OpenapiClient
|
|
174
182
|
end
|
175
183
|
end
|
176
184
|
else # model
|
177
|
-
|
185
|
+
# models (e.g. Pet) or oneOf
|
186
|
+
klass = AutosdeOpenapiClient.const_get(type)
|
187
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
178
188
|
end
|
179
189
|
end
|
180
190
|
|
@@ -200,7 +210,7 @@ module OpenapiClient
|
|
200
210
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
201
211
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
202
212
|
end
|
203
|
-
|
213
|
+
|
204
214
|
hash[param] = _to_hash(value)
|
205
215
|
end
|
206
216
|
hash
|
@@ -223,5 +233,7 @@ module OpenapiClient
|
|
223
233
|
value
|
224
234
|
end
|
225
235
|
end
|
236
|
+
|
226
237
|
end
|
238
|
+
|
227
239
|
end
|