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
|
# doc-todo: General information about 'account' needed - what account - or type of account. something to guide the user.
|
17
18
|
class Account
|
18
19
|
# description
|
@@ -33,6 +34,11 @@ module OpenapiClient
|
|
33
34
|
}
|
34
35
|
end
|
35
36
|
|
37
|
+
# Returns all the JSON keys this model knows about
|
38
|
+
def self.acceptable_attributes
|
39
|
+
attribute_map.values
|
40
|
+
end
|
41
|
+
|
36
42
|
# Attribute type mapping.
|
37
43
|
def self.openapi_types
|
38
44
|
{
|
@@ -52,13 +58,13 @@ module OpenapiClient
|
|
52
58
|
# @param [Hash] attributes Model attributes in the form of hash
|
53
59
|
def initialize(attributes = {})
|
54
60
|
if (!attributes.is_a?(Hash))
|
55
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
61
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `AutosdeOpenapiClient::Account` initialize method"
|
56
62
|
end
|
57
63
|
|
58
64
|
# check to see if the attribute exists and convert string to symbol for hash key
|
59
65
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
60
66
|
if (!self.class.attribute_map.key?(k.to_sym))
|
61
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
67
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `AutosdeOpenapiClient::Account`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
62
68
|
end
|
63
69
|
h[k.to_sym] = v
|
64
70
|
}
|
@@ -124,7 +130,9 @@ module OpenapiClient
|
|
124
130
|
def build_from_hash(attributes)
|
125
131
|
return nil unless attributes.is_a?(Hash)
|
126
132
|
self.class.openapi_types.each_pair do |key, type|
|
127
|
-
if
|
133
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
134
|
+
self.send("#{key}=", nil)
|
135
|
+
elsif type =~ /\AArray<(.*)>/i
|
128
136
|
# check to ensure the input is an array given that the attribute
|
129
137
|
# is documented as an array but the input is not
|
130
138
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -132,7 +140,7 @@ module OpenapiClient
|
|
132
140
|
end
|
133
141
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
134
142
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
135
|
-
end
|
143
|
+
end
|
136
144
|
end
|
137
145
|
|
138
146
|
self
|
@@ -144,8 +152,8 @@ module OpenapiClient
|
|
144
152
|
# @return [Object] Deserialized data
|
145
153
|
def _deserialize(type, value)
|
146
154
|
case type.to_sym
|
147
|
-
when :
|
148
|
-
|
155
|
+
when :Time
|
156
|
+
Time.parse(value)
|
149
157
|
when :Date
|
150
158
|
Date.parse(value)
|
151
159
|
when :String
|
@@ -175,7 +183,9 @@ module OpenapiClient
|
|
175
183
|
end
|
176
184
|
end
|
177
185
|
else # model
|
178
|
-
|
186
|
+
# models (e.g. Pet) or oneOf
|
187
|
+
klass = AutosdeOpenapiClient.const_get(type)
|
188
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
179
189
|
end
|
180
190
|
end
|
181
191
|
|
@@ -201,7 +211,7 @@ module OpenapiClient
|
|
201
211
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
202
212
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
203
213
|
end
|
204
|
-
|
214
|
+
|
205
215
|
hash[param] = _to_hash(value)
|
206
216
|
end
|
207
217
|
hash
|
@@ -224,5 +234,7 @@ module OpenapiClient
|
|
224
234
|
value
|
225
235
|
end
|
226
236
|
end
|
237
|
+
|
227
238
|
end
|
239
|
+
|
228
240
|
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 AccountPostRequest
|
18
19
|
# description
|
@@ -29,6 +30,11 @@ module OpenapiClient
|
|
29
30
|
}
|
30
31
|
end
|
31
32
|
|
33
|
+
# Returns all the JSON keys this model knows about
|
34
|
+
def self.acceptable_attributes
|
35
|
+
attribute_map.values
|
36
|
+
end
|
37
|
+
|
32
38
|
# Attribute type mapping.
|
33
39
|
def self.openapi_types
|
34
40
|
{
|
@@ -47,13 +53,13 @@ module OpenapiClient
|
|
47
53
|
# @param [Hash] attributes Model attributes in the form of hash
|
48
54
|
def initialize(attributes = {})
|
49
55
|
if (!attributes.is_a?(Hash))
|
50
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
56
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `AutosdeOpenapiClient::AccountPostRequest` initialize method"
|
51
57
|
end
|
52
58
|
|
53
59
|
# check to see if the attribute exists and convert string to symbol for hash key
|
54
60
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
55
61
|
if (!self.class.attribute_map.key?(k.to_sym))
|
56
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
62
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `AutosdeOpenapiClient::AccountPostRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
57
63
|
end
|
58
64
|
h[k.to_sym] = v
|
59
65
|
}
|
@@ -114,7 +120,9 @@ module OpenapiClient
|
|
114
120
|
def build_from_hash(attributes)
|
115
121
|
return nil unless attributes.is_a?(Hash)
|
116
122
|
self.class.openapi_types.each_pair do |key, type|
|
117
|
-
if
|
123
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
124
|
+
self.send("#{key}=", nil)
|
125
|
+
elsif type =~ /\AArray<(.*)>/i
|
118
126
|
# check to ensure the input is an array given that the attribute
|
119
127
|
# is documented as an array but the input is not
|
120
128
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -122,7 +130,7 @@ module OpenapiClient
|
|
122
130
|
end
|
123
131
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
124
132
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
125
|
-
end
|
133
|
+
end
|
126
134
|
end
|
127
135
|
|
128
136
|
self
|
@@ -134,8 +142,8 @@ module OpenapiClient
|
|
134
142
|
# @return [Object] Deserialized data
|
135
143
|
def _deserialize(type, value)
|
136
144
|
case type.to_sym
|
137
|
-
when :
|
138
|
-
|
145
|
+
when :Time
|
146
|
+
Time.parse(value)
|
139
147
|
when :Date
|
140
148
|
Date.parse(value)
|
141
149
|
when :String
|
@@ -165,7 +173,9 @@ module OpenapiClient
|
|
165
173
|
end
|
166
174
|
end
|
167
175
|
else # model
|
168
|
-
|
176
|
+
# models (e.g. Pet) or oneOf
|
177
|
+
klass = AutosdeOpenapiClient.const_get(type)
|
178
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
169
179
|
end
|
170
180
|
end
|
171
181
|
|
@@ -191,7 +201,7 @@ module OpenapiClient
|
|
191
201
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
192
202
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
193
203
|
end
|
194
|
-
|
204
|
+
|
195
205
|
hash[param] = _to_hash(value)
|
196
206
|
end
|
197
207
|
hash
|
@@ -214,5 +224,7 @@ module OpenapiClient
|
|
214
224
|
value
|
215
225
|
end
|
216
226
|
end
|
227
|
+
|
217
228
|
end
|
229
|
+
|
218
230
|
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 AccountPostResponse
|
18
19
|
# description
|
@@ -37,6 +38,11 @@ module OpenapiClient
|
|
37
38
|
}
|
38
39
|
end
|
39
40
|
|
41
|
+
# Returns all the JSON keys this model knows about
|
42
|
+
def self.acceptable_attributes
|
43
|
+
attribute_map.values
|
44
|
+
end
|
45
|
+
|
40
46
|
# Attribute type mapping.
|
41
47
|
def self.openapi_types
|
42
48
|
{
|
@@ -57,13 +63,13 @@ module OpenapiClient
|
|
57
63
|
# @param [Hash] attributes Model attributes in the form of hash
|
58
64
|
def initialize(attributes = {})
|
59
65
|
if (!attributes.is_a?(Hash))
|
60
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
66
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `AutosdeOpenapiClient::AccountPostResponse` initialize method"
|
61
67
|
end
|
62
68
|
|
63
69
|
# check to see if the attribute exists and convert string to symbol for hash key
|
64
70
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
65
71
|
if (!self.class.attribute_map.key?(k.to_sym))
|
66
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
72
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `AutosdeOpenapiClient::AccountPostResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
67
73
|
end
|
68
74
|
h[k.to_sym] = v
|
69
75
|
}
|
@@ -134,7 +140,9 @@ module OpenapiClient
|
|
134
140
|
def build_from_hash(attributes)
|
135
141
|
return nil unless attributes.is_a?(Hash)
|
136
142
|
self.class.openapi_types.each_pair do |key, type|
|
137
|
-
if
|
143
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
144
|
+
self.send("#{key}=", nil)
|
145
|
+
elsif type =~ /\AArray<(.*)>/i
|
138
146
|
# check to ensure the input is an array given that the attribute
|
139
147
|
# is documented as an array but the input is not
|
140
148
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -142,7 +150,7 @@ module OpenapiClient
|
|
142
150
|
end
|
143
151
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
144
152
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
145
|
-
end
|
153
|
+
end
|
146
154
|
end
|
147
155
|
|
148
156
|
self
|
@@ -154,8 +162,8 @@ module OpenapiClient
|
|
154
162
|
# @return [Object] Deserialized data
|
155
163
|
def _deserialize(type, value)
|
156
164
|
case type.to_sym
|
157
|
-
when :
|
158
|
-
|
165
|
+
when :Time
|
166
|
+
Time.parse(value)
|
159
167
|
when :Date
|
160
168
|
Date.parse(value)
|
161
169
|
when :String
|
@@ -185,7 +193,9 @@ module OpenapiClient
|
|
185
193
|
end
|
186
194
|
end
|
187
195
|
else # model
|
188
|
-
|
196
|
+
# models (e.g. Pet) or oneOf
|
197
|
+
klass = AutosdeOpenapiClient.const_get(type)
|
198
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
189
199
|
end
|
190
200
|
end
|
191
201
|
|
@@ -211,7 +221,7 @@ module OpenapiClient
|
|
211
221
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
212
222
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
213
223
|
end
|
214
|
-
|
224
|
+
|
215
225
|
hash[param] = _to_hash(value)
|
216
226
|
end
|
217
227
|
hash
|
@@ -234,5 +244,7 @@ module OpenapiClient
|
|
234
244
|
value
|
235
245
|
end
|
236
246
|
end
|
247
|
+
|
237
248
|
end
|
249
|
+
|
238
250
|
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
|
# Address
|
17
18
|
class Address
|
18
19
|
# chap_name
|
@@ -74,6 +75,11 @@ module OpenapiClient
|
|
74
75
|
}
|
75
76
|
end
|
76
77
|
|
78
|
+
# Returns all the JSON keys this model knows about
|
79
|
+
def self.acceptable_attributes
|
80
|
+
attribute_map.values
|
81
|
+
end
|
82
|
+
|
77
83
|
# Attribute type mapping.
|
78
84
|
def self.openapi_types
|
79
85
|
{
|
@@ -98,13 +104,13 @@ module OpenapiClient
|
|
98
104
|
# @param [Hash] attributes Model attributes in the form of hash
|
99
105
|
def initialize(attributes = {})
|
100
106
|
if (!attributes.is_a?(Hash))
|
101
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
107
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `AutosdeOpenapiClient::Address` initialize method"
|
102
108
|
end
|
103
109
|
|
104
110
|
# check to see if the attribute exists and convert string to symbol for hash key
|
105
111
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
106
112
|
if (!self.class.attribute_map.key?(k.to_sym))
|
107
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
113
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `AutosdeOpenapiClient::Address`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
108
114
|
end
|
109
115
|
h[k.to_sym] = v
|
110
116
|
}
|
@@ -224,7 +230,9 @@ module OpenapiClient
|
|
224
230
|
def build_from_hash(attributes)
|
225
231
|
return nil unless attributes.is_a?(Hash)
|
226
232
|
self.class.openapi_types.each_pair do |key, type|
|
227
|
-
if
|
233
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
234
|
+
self.send("#{key}=", nil)
|
235
|
+
elsif type =~ /\AArray<(.*)>/i
|
228
236
|
# check to ensure the input is an array given that the attribute
|
229
237
|
# is documented as an array but the input is not
|
230
238
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -232,7 +240,7 @@ module OpenapiClient
|
|
232
240
|
end
|
233
241
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
234
242
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
235
|
-
end
|
243
|
+
end
|
236
244
|
end
|
237
245
|
|
238
246
|
self
|
@@ -244,8 +252,8 @@ module OpenapiClient
|
|
244
252
|
# @return [Object] Deserialized data
|
245
253
|
def _deserialize(type, value)
|
246
254
|
case type.to_sym
|
247
|
-
when :
|
248
|
-
|
255
|
+
when :Time
|
256
|
+
Time.parse(value)
|
249
257
|
when :Date
|
250
258
|
Date.parse(value)
|
251
259
|
when :String
|
@@ -275,7 +283,9 @@ module OpenapiClient
|
|
275
283
|
end
|
276
284
|
end
|
277
285
|
else # model
|
278
|
-
|
286
|
+
# models (e.g. Pet) or oneOf
|
287
|
+
klass = AutosdeOpenapiClient.const_get(type)
|
288
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
279
289
|
end
|
280
290
|
end
|
281
291
|
|
@@ -301,7 +311,7 @@ module OpenapiClient
|
|
301
311
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
302
312
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
303
313
|
end
|
304
|
-
|
314
|
+
|
305
315
|
hash[param] = _to_hash(value)
|
306
316
|
end
|
307
317
|
hash
|
@@ -324,5 +334,7 @@ module OpenapiClient
|
|
324
334
|
value
|
325
335
|
end
|
326
336
|
end
|
337
|
+
|
327
338
|
end
|
339
|
+
|
328
340
|
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 AddressCreate
|
18
19
|
# chap_name
|
@@ -74,6 +75,11 @@ module OpenapiClient
|
|
74
75
|
}
|
75
76
|
end
|
76
77
|
|
78
|
+
# Returns all the JSON keys this model knows about
|
79
|
+
def self.acceptable_attributes
|
80
|
+
attribute_map.values
|
81
|
+
end
|
82
|
+
|
77
83
|
# Attribute type mapping.
|
78
84
|
def self.openapi_types
|
79
85
|
{
|
@@ -98,13 +104,13 @@ module OpenapiClient
|
|
98
104
|
# @param [Hash] attributes Model attributes in the form of hash
|
99
105
|
def initialize(attributes = {})
|
100
106
|
if (!attributes.is_a?(Hash))
|
101
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
107
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `AutosdeOpenapiClient::AddressCreate` initialize method"
|
102
108
|
end
|
103
109
|
|
104
110
|
# check to see if the attribute exists and convert string to symbol for hash key
|
105
111
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
106
112
|
if (!self.class.attribute_map.key?(k.to_sym))
|
107
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
113
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `AutosdeOpenapiClient::AddressCreate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
108
114
|
end
|
109
115
|
h[k.to_sym] = v
|
110
116
|
}
|
@@ -226,7 +232,9 @@ module OpenapiClient
|
|
226
232
|
def build_from_hash(attributes)
|
227
233
|
return nil unless attributes.is_a?(Hash)
|
228
234
|
self.class.openapi_types.each_pair do |key, type|
|
229
|
-
if
|
235
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
236
|
+
self.send("#{key}=", nil)
|
237
|
+
elsif type =~ /\AArray<(.*)>/i
|
230
238
|
# check to ensure the input is an array given that the attribute
|
231
239
|
# is documented as an array but the input is not
|
232
240
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -234,7 +242,7 @@ module OpenapiClient
|
|
234
242
|
end
|
235
243
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
236
244
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
237
|
-
end
|
245
|
+
end
|
238
246
|
end
|
239
247
|
|
240
248
|
self
|
@@ -246,8 +254,8 @@ module OpenapiClient
|
|
246
254
|
# @return [Object] Deserialized data
|
247
255
|
def _deserialize(type, value)
|
248
256
|
case type.to_sym
|
249
|
-
when :
|
250
|
-
|
257
|
+
when :Time
|
258
|
+
Time.parse(value)
|
251
259
|
when :Date
|
252
260
|
Date.parse(value)
|
253
261
|
when :String
|
@@ -277,7 +285,9 @@ module OpenapiClient
|
|
277
285
|
end
|
278
286
|
end
|
279
287
|
else # model
|
280
|
-
|
288
|
+
# models (e.g. Pet) or oneOf
|
289
|
+
klass = AutosdeOpenapiClient.const_get(type)
|
290
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
281
291
|
end
|
282
292
|
end
|
283
293
|
|
@@ -303,7 +313,7 @@ module OpenapiClient
|
|
303
313
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
304
314
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
305
315
|
end
|
306
|
-
|
316
|
+
|
307
317
|
hash[param] = _to_hash(value)
|
308
318
|
end
|
309
319
|
hash
|
@@ -326,5 +336,7 @@ module OpenapiClient
|
|
326
336
|
value
|
327
337
|
end
|
328
338
|
end
|
339
|
+
|
329
340
|
end
|
341
|
+
|
330
342
|
end
|