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