eilam_test 1.1.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/LICENSE.txt +21 -0
- data/README.md +271 -0
- data/Rakefile +10 -0
- data/docs/AbstractCapability.md +20 -0
- data/docs/AbstractCapabilityApi.md +276 -0
- data/docs/Account.md +22 -0
- data/docs/AccountApi.md +346 -0
- data/docs/AccountPostRequest.md +20 -0
- data/docs/AccountPostResponse.md +24 -0
- data/docs/Address.md +32 -0
- data/docs/AddressApi.md +276 -0
- data/docs/AddressCreate.md +32 -0
- data/docs/AuthResponse.md +18 -0
- data/docs/Authentication.md +20 -0
- data/docs/AuthenticationApi.md +70 -0
- data/docs/AutoSDEProject.md +56 -0
- data/docs/AutoSDEProjectApi.md +276 -0
- data/docs/AutoSDERole.md +20 -0
- data/docs/AutoSDERoleApi.md +276 -0
- data/docs/CapabilityTranslation.md +36 -0
- data/docs/CapabilityTranslationApi.md +276 -0
- data/docs/CapabilityTranslationCreate.md +32 -0
- data/docs/Event.md +32 -0
- data/docs/EventApi.md +276 -0
- data/docs/Host.md +30 -0
- data/docs/HostApi.md +276 -0
- data/docs/HostCluster.md +34 -0
- data/docs/HostClusterApi.md +276 -0
- data/docs/HostClusterCreate.md +30 -0
- data/docs/HostClusterMembership.md +24 -0
- data/docs/HostClusterMembershipApi.md +276 -0
- data/docs/HostClusterResponse.md +34 -0
- data/docs/HostClusterVolumeMapping.md +26 -0
- data/docs/HostClusterVolumeMappingApi.md +276 -0
- data/docs/HostClusterVolumeMappingCreate.md +24 -0
- data/docs/HostClusterVolumeMappingResponse.md +26 -0
- data/docs/HostCreate.md +40 -0
- data/docs/HostVolumeConnection.md +24 -0
- data/docs/HostVolumeConnectionApi.md +276 -0
- data/docs/HostVolumeConnectionCreate.md +22 -0
- data/docs/Job.md +30 -0
- data/docs/JobApi.md +140 -0
- data/docs/JobCreate.md +20 -0
- data/docs/NativeCapability.md +24 -0
- data/docs/NativeCapabilityApi.md +276 -0
- data/docs/Profile.md +26 -0
- data/docs/ProfileApi.md +276 -0
- data/docs/ProvisioningStrategy.md +20 -0
- data/docs/ProvisioningStrategyApi.md +276 -0
- data/docs/Service.md +36 -0
- data/docs/ServiceAbstractCapabilityValue.md +22 -0
- data/docs/ServiceApi.md +346 -0
- data/docs/ServiceCreate.md +34 -0
- data/docs/ServiceResourceAttachment.md +24 -0
- data/docs/ServiceResourceAttachmentApi.md +276 -0
- data/docs/Snapshot.md +26 -0
- data/docs/SnapshotApi.md +276 -0
- data/docs/SnapshotCreate.md +24 -0
- data/docs/StorageHost.md +36 -0
- data/docs/StorageHostApi.md +346 -0
- data/docs/StorageHostCreate.md +42 -0
- data/docs/StorageHostResponse.md +38 -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/StorageHostWWPNCandidates.md +20 -0
- data/docs/StorageHostWWPNCandidatesApi.md +72 -0
- data/docs/StorageResource.md +34 -0
- data/docs/StorageResourceApi.md +346 -0
- data/docs/StorageResourceCreate.md +32 -0
- data/docs/StorageResourceResponse.md +34 -0
- data/docs/StorageSystem.md +34 -0
- data/docs/StorageSystemApi.md +346 -0
- data/docs/StorageSystemCreate.md +52 -0
- data/docs/StorageSystemUpdate.md +24 -0
- data/docs/SystemType.md +26 -0
- data/docs/SystemTypeApi.md +276 -0
- data/docs/SystemTypeCreate.md +28 -0
- data/docs/User.md +38 -0
- data/docs/UserApi.md +346 -0
- data/docs/UserCreate.md +38 -0
- data/docs/UserUpdate.md +30 -0
- data/docs/ValidateSystem.md +26 -0
- data/docs/ValidateSystemApi.md +75 -0
- data/docs/Volume.md +36 -0
- data/docs/VolumeApi.md +346 -0
- data/docs/VolumeCreate.md +34 -0
- data/docs/VolumeResponse.md +36 -0
- data/docs/VolumeSafeDelete.md +22 -0
- data/docs/VolumeSafeDeleteApi.md +276 -0
- data/docs/VolumeSafeDeleteCreate.md +18 -0
- data/docs/VolumeUpdate.md +20 -0
- data/eilam_test.gemspec +38 -0
- data/git_push.sh +58 -0
- data/lib/.DS_Store +0 -0
- data/lib/eilam_test/.DS_Store +0 -0
- data/lib/eilam_test/api/abstract_capability_api.rb +254 -0
- data/lib/eilam_test/api/account_api.rb +321 -0
- data/lib/eilam_test/api/address_api.rb +254 -0
- data/lib/eilam_test/api/authentication_api.rb +83 -0
- data/lib/eilam_test/api/auto_sde_project_api.rb +254 -0
- data/lib/eilam_test/api/auto_sde_role_api.rb +254 -0
- data/lib/eilam_test/api/capability_translation_api.rb +254 -0
- data/lib/eilam_test/api/event_api.rb +254 -0
- data/lib/eilam_test/api/host_api.rb +254 -0
- data/lib/eilam_test/api/host_cluster_api.rb +254 -0
- data/lib/eilam_test/api/host_cluster_membership_api.rb +254 -0
- data/lib/eilam_test/api/host_cluster_volume_mapping_api.rb +254 -0
- data/lib/eilam_test/api/host_volume_connection_api.rb +254 -0
- data/lib/eilam_test/api/job_api.rb +136 -0
- data/lib/eilam_test/api/native_capability_api.rb +254 -0
- data/lib/eilam_test/api/profile_api.rb +254 -0
- data/lib/eilam_test/api/provisioning_strategy_api.rb +254 -0
- data/lib/eilam_test/api/service_api.rb +321 -0
- data/lib/eilam_test/api/service_resource_attachment_api.rb +254 -0
- data/lib/eilam_test/api/snapshot_api.rb +254 -0
- data/lib/eilam_test/api/storage_host_api.rb +321 -0
- data/lib/eilam_test/api/storage_host_volume_mapping_api.rb +254 -0
- data/lib/eilam_test/api/storage_host_wwpn_candidates_api.rb +75 -0
- data/lib/eilam_test/api/storage_resource_api.rb +321 -0
- data/lib/eilam_test/api/storage_system_api.rb +321 -0
- data/lib/eilam_test/api/system_type_api.rb +254 -0
- data/lib/eilam_test/api/user_api.rb +321 -0
- data/lib/eilam_test/api/validate_system_api.rb +83 -0
- data/lib/eilam_test/api/volume_api.rb +321 -0
- data/lib/eilam_test/api/volume_safe_delete_api.rb +254 -0
- data/lib/eilam_test/api_client.rb +390 -0
- data/lib/eilam_test/api_error.rb +57 -0
- data/lib/eilam_test/configuration.rb +293 -0
- data/lib/eilam_test/models/abstract_capability.rb +230 -0
- data/lib/eilam_test/models/account.rb +240 -0
- data/lib/eilam_test/models/account_post_request.rb +230 -0
- data/lib/eilam_test/models/account_post_response.rb +250 -0
- data/lib/eilam_test/models/address.rb +340 -0
- data/lib/eilam_test/models/address_create.rb +342 -0
- data/lib/eilam_test/models/auth_response.rb +220 -0
- data/lib/eilam_test/models/authentication.rb +230 -0
- data/lib/eilam_test/models/auto_sde_project.rb +410 -0
- data/lib/eilam_test/models/auto_sde_role.rb +230 -0
- data/lib/eilam_test/models/capability_translation.rb +340 -0
- data/lib/eilam_test/models/capability_translation_create.rb +322 -0
- data/lib/eilam_test/models/event.rb +289 -0
- data/lib/eilam_test/models/host.rb +333 -0
- data/lib/eilam_test/models/host_cluster.rb +397 -0
- data/lib/eilam_test/models/host_cluster_create.rb +338 -0
- data/lib/eilam_test/models/host_cluster_membership.rb +287 -0
- data/lib/eilam_test/models/host_cluster_response.rb +398 -0
- data/lib/eilam_test/models/host_cluster_volume_mapping.rb +299 -0
- data/lib/eilam_test/models/host_cluster_volume_mapping_create.rb +291 -0
- data/lib/eilam_test/models/host_cluster_volume_mapping_response.rb +301 -0
- data/lib/eilam_test/models/host_create.rb +394 -0
- data/lib/eilam_test/models/host_volume_connection.rb +287 -0
- data/lib/eilam_test/models/host_volume_connection_create.rb +277 -0
- data/lib/eilam_test/models/job.rb +280 -0
- data/lib/eilam_test/models/job_create.rb +230 -0
- data/lib/eilam_test/models/native_capability.rb +251 -0
- data/lib/eilam_test/models/profile.rb +295 -0
- data/lib/eilam_test/models/provisioning_strategy.rb +269 -0
- data/lib/eilam_test/models/service.rb +351 -0
- data/lib/eilam_test/models/service_abstract_capability_value.rb +239 -0
- data/lib/eilam_test/models/service_create.rb +339 -0
- data/lib/eilam_test/models/service_resource_attachment.rb +250 -0
- data/lib/eilam_test/models/snapshot.rb +298 -0
- data/lib/eilam_test/models/snapshot_create.rb +288 -0
- data/lib/eilam_test/models/storage_host.rb +346 -0
- data/lib/eilam_test/models/storage_host_create.rb +388 -0
- data/lib/eilam_test/models/storage_host_response.rb +363 -0
- data/lib/eilam_test/models/storage_host_update.rb +301 -0
- data/lib/eilam_test/models/storage_host_volume_mapping.rb +299 -0
- data/lib/eilam_test/models/storage_host_volume_mapping_create.rb +291 -0
- data/lib/eilam_test/models/storage_host_volume_mapping_response.rb +301 -0
- data/lib/eilam_test/models/storage_host_wwpn_candidates.rb +230 -0
- data/lib/eilam_test/models/storage_resource.rb +354 -0
- data/lib/eilam_test/models/storage_resource_create.rb +345 -0
- data/lib/eilam_test/models/storage_resource_response.rb +355 -0
- data/lib/eilam_test/models/storage_system.rb +352 -0
- data/lib/eilam_test/models/storage_system_create.rb +455 -0
- data/lib/eilam_test/models/storage_system_update.rb +265 -0
- data/lib/eilam_test/models/system_type.rb +333 -0
- data/lib/eilam_test/models/system_type_create.rb +345 -0
- data/lib/eilam_test/models/user.rb +395 -0
- data/lib/eilam_test/models/user_create.rb +395 -0
- data/lib/eilam_test/models/user_update.rb +280 -0
- data/lib/eilam_test/models/validate_system.rb +260 -0
- data/lib/eilam_test/models/volume.rb +348 -0
- data/lib/eilam_test/models/volume_create.rb +343 -0
- data/lib/eilam_test/models/volume_response.rb +350 -0
- data/lib/eilam_test/models/volume_safe_delete.rb +239 -0
- data/lib/eilam_test/models/volume_safe_delete_create.rb +219 -0
- data/lib/eilam_test/models/volume_update.rb +232 -0
- data/lib/eilam_test/version.rb +15 -0
- data/lib/eilam_test.rb +130 -0
- data/spec/api/abstract_capability_api_spec.rb +74 -0
- data/spec/api/account_api_spec.rb +85 -0
- data/spec/api/address_api_spec.rb +74 -0
- data/spec/api/authentication_api_spec.rb +45 -0
- data/spec/api/auto_sde_project_api_spec.rb +74 -0
- data/spec/api/auto_sde_role_api_spec.rb +74 -0
- data/spec/api/capability_translation_api_spec.rb +74 -0
- data/spec/api/event_api_spec.rb +74 -0
- data/spec/api/host_api_spec.rb +74 -0
- data/spec/api/host_cluster_api_spec.rb +74 -0
- data/spec/api/host_cluster_membership_api_spec.rb +74 -0
- data/spec/api/host_cluster_volume_mapping_api_spec.rb +74 -0
- data/spec/api/host_volume_connection_api_spec.rb +74 -0
- data/spec/api/job_api_spec.rb +54 -0
- data/spec/api/native_capability_api_spec.rb +74 -0
- data/spec/api/profile_api_spec.rb +74 -0
- data/spec/api/provisioning_strategy_api_spec.rb +74 -0
- data/spec/api/service_api_spec.rb +85 -0
- data/spec/api/service_resource_attachment_api_spec.rb +74 -0
- 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_host_wwpn_candidates_api_spec.rb +44 -0
- data/spec/api/storage_resource_api_spec.rb +85 -0
- data/spec/api/storage_system_api_spec.rb +85 -0
- data/spec/api/system_type_api_spec.rb +74 -0
- data/spec/api/user_api_spec.rb +85 -0
- data/spec/api/validate_system_api_spec.rb +45 -0
- data/spec/api/volume_api_spec.rb +85 -0
- data/spec/api/volume_safe_delete_api_spec.rb +74 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/abstract_capability_spec.rb +40 -0
- data/spec/models/account_post_request_spec.rb +40 -0
- data/spec/models/account_post_response_spec.rb +52 -0
- data/spec/models/account_spec.rb +46 -0
- data/spec/models/address_create_spec.rb +84 -0
- data/spec/models/address_spec.rb +84 -0
- data/spec/models/auth_response_spec.rb +34 -0
- data/spec/models/authentication_spec.rb +40 -0
- data/spec/models/auto_sde_project_spec.rb +148 -0
- data/spec/models/auto_sde_role_spec.rb +40 -0
- data/spec/models/capability_translation_create_spec.rb +76 -0
- data/spec/models/capability_translation_spec.rb +88 -0
- data/spec/models/event_spec.rb +76 -0
- data/spec/models/host_cluster_create_spec.rb +70 -0
- data/spec/models/host_cluster_membership_spec.rb +56 -0
- data/spec/models/host_cluster_response_spec.rb +86 -0
- data/spec/models/host_cluster_spec.rb +86 -0
- data/spec/models/host_cluster_volume_mapping_create_spec.rb +56 -0
- data/spec/models/host_cluster_volume_mapping_response_spec.rb +62 -0
- data/spec/models/host_cluster_volume_mapping_spec.rb +62 -0
- data/spec/models/host_create_spec.rb +112 -0
- data/spec/models/host_spec.rb +78 -0
- data/spec/models/host_volume_connection_create_spec.rb +50 -0
- data/spec/models/host_volume_connection_spec.rb +56 -0
- data/spec/models/job_create_spec.rb +40 -0
- data/spec/models/job_spec.rb +70 -0
- data/spec/models/native_capability_spec.rb +52 -0
- data/spec/models/profile_spec.rb +62 -0
- data/spec/models/provisioning_strategy_spec.rb +44 -0
- data/spec/models/service_abstract_capability_value_spec.rb +46 -0
- data/spec/models/service_create_spec.rb +86 -0
- data/spec/models/service_resource_attachment_spec.rb +52 -0
- data/spec/models/service_spec.rb +92 -0
- 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 +114 -0
- data/spec/models/storage_host_response_spec.rb +98 -0
- data/spec/models/storage_host_spec.rb +92 -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_host_wwpn_candidates_spec.rb +40 -0
- data/spec/models/storage_resource_create_spec.rb +84 -0
- data/spec/models/storage_resource_response_spec.rb +90 -0
- data/spec/models/storage_resource_spec.rb +90 -0
- data/spec/models/storage_system_create_spec.rb +148 -0
- data/spec/models/storage_system_spec.rb +90 -0
- data/spec/models/storage_system_update_spec.rb +52 -0
- data/spec/models/system_type_create_spec.rb +72 -0
- data/spec/models/system_type_spec.rb +66 -0
- data/spec/models/user_create_spec.rb +94 -0
- data/spec/models/user_spec.rb +94 -0
- data/spec/models/user_update_spec.rb +70 -0
- data/spec/models/validate_system_spec.rb +58 -0
- data/spec/models/volume_create_spec.rb +86 -0
- data/spec/models/volume_response_spec.rb +92 -0
- data/spec/models/volume_safe_delete_create_spec.rb +34 -0
- data/spec/models/volume_safe_delete_spec.rb +46 -0
- data/spec/models/volume_spec.rb +92 -0
- data/spec/models/volume_update_spec.rb +40 -0
- data/spec/spec_helper.rb +111 -0
- metadata +466 -0
@@ -0,0 +1,343 @@
|
|
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 VolumeCreate
|
19
|
+
# compliant
|
20
|
+
attr_accessor :compliant
|
21
|
+
|
22
|
+
# component_state
|
23
|
+
attr_accessor :component_state
|
24
|
+
|
25
|
+
# count
|
26
|
+
attr_accessor :count
|
27
|
+
|
28
|
+
# name
|
29
|
+
attr_accessor :name
|
30
|
+
|
31
|
+
# !!uuid of service
|
32
|
+
attr_accessor :service
|
33
|
+
|
34
|
+
# size
|
35
|
+
attr_accessor :size
|
36
|
+
|
37
|
+
# status
|
38
|
+
attr_accessor :status
|
39
|
+
|
40
|
+
# unmapped_since
|
41
|
+
attr_accessor :unmapped_since
|
42
|
+
|
43
|
+
# uuid
|
44
|
+
attr_accessor :uuid
|
45
|
+
|
46
|
+
class EnumAttributeValidator
|
47
|
+
attr_reader :datatype
|
48
|
+
attr_reader :allowable_values
|
49
|
+
|
50
|
+
def initialize(datatype, allowable_values)
|
51
|
+
@allowable_values = allowable_values.map do |value|
|
52
|
+
case datatype.to_s
|
53
|
+
when /Integer/i
|
54
|
+
value.to_i
|
55
|
+
when /Float/i
|
56
|
+
value.to_f
|
57
|
+
else
|
58
|
+
value
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
def valid?(value)
|
64
|
+
!value || allowable_values.include?(value)
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
69
|
+
def self.attribute_map
|
70
|
+
{
|
71
|
+
:'compliant' => :'compliant',
|
72
|
+
:'component_state' => :'component_state',
|
73
|
+
:'count' => :'count',
|
74
|
+
:'name' => :'name',
|
75
|
+
:'service' => :'service',
|
76
|
+
:'size' => :'size',
|
77
|
+
:'status' => :'status',
|
78
|
+
:'unmapped_since' => :'unmapped_since',
|
79
|
+
:'uuid' => :'uuid'
|
80
|
+
}
|
81
|
+
end
|
82
|
+
|
83
|
+
# Returns all the JSON keys this model knows about
|
84
|
+
def self.acceptable_attributes
|
85
|
+
attribute_map.values
|
86
|
+
end
|
87
|
+
|
88
|
+
# Attribute type mapping.
|
89
|
+
def self.openapi_types
|
90
|
+
{
|
91
|
+
:'compliant' => :'Boolean',
|
92
|
+
:'component_state' => :'String',
|
93
|
+
:'count' => :'Integer',
|
94
|
+
:'name' => :'String',
|
95
|
+
:'service' => :'String',
|
96
|
+
:'size' => :'Integer',
|
97
|
+
:'status' => :'String',
|
98
|
+
:'unmapped_since' => :'Time',
|
99
|
+
:'uuid' => :'String'
|
100
|
+
}
|
101
|
+
end
|
102
|
+
|
103
|
+
# List of attributes with nullable: true
|
104
|
+
def self.openapi_nullable
|
105
|
+
Set.new([
|
106
|
+
])
|
107
|
+
end
|
108
|
+
|
109
|
+
# Initializes the object
|
110
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
111
|
+
def initialize(attributes = {})
|
112
|
+
if (!attributes.is_a?(Hash))
|
113
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `AutosdeOpenapiClient::VolumeCreate` initialize method"
|
114
|
+
end
|
115
|
+
|
116
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
117
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
118
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
119
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `AutosdeOpenapiClient::VolumeCreate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
120
|
+
end
|
121
|
+
h[k.to_sym] = v
|
122
|
+
}
|
123
|
+
|
124
|
+
if attributes.key?(:'compliant')
|
125
|
+
self.compliant = attributes[:'compliant']
|
126
|
+
else
|
127
|
+
self.compliant = false
|
128
|
+
end
|
129
|
+
|
130
|
+
if attributes.key?(:'component_state')
|
131
|
+
self.component_state = attributes[:'component_state']
|
132
|
+
end
|
133
|
+
|
134
|
+
if attributes.key?(:'count')
|
135
|
+
self.count = attributes[:'count']
|
136
|
+
else
|
137
|
+
self.count = 1
|
138
|
+
end
|
139
|
+
|
140
|
+
if attributes.key?(:'name')
|
141
|
+
self.name = attributes[:'name']
|
142
|
+
end
|
143
|
+
|
144
|
+
if attributes.key?(:'service')
|
145
|
+
self.service = attributes[:'service']
|
146
|
+
end
|
147
|
+
|
148
|
+
if attributes.key?(:'size')
|
149
|
+
self.size = attributes[:'size']
|
150
|
+
end
|
151
|
+
|
152
|
+
if attributes.key?(:'status')
|
153
|
+
self.status = attributes[:'status']
|
154
|
+
end
|
155
|
+
|
156
|
+
if attributes.key?(:'unmapped_since')
|
157
|
+
self.unmapped_since = attributes[:'unmapped_since']
|
158
|
+
end
|
159
|
+
|
160
|
+
if attributes.key?(:'uuid')
|
161
|
+
self.uuid = attributes[:'uuid']
|
162
|
+
end
|
163
|
+
end
|
164
|
+
|
165
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
166
|
+
# @return Array for valid properties with the reasons
|
167
|
+
def list_invalid_properties
|
168
|
+
invalid_properties = Array.new
|
169
|
+
if !@component_state.nil? && @component_state.to_s.length > 32
|
170
|
+
invalid_properties.push('invalid value for "component_state", the character length must be smaller than or equal to 32.')
|
171
|
+
end
|
172
|
+
|
173
|
+
invalid_properties
|
174
|
+
end
|
175
|
+
|
176
|
+
# Check to see if the all the properties in the model are valid
|
177
|
+
# @return true if the model is valid
|
178
|
+
def valid?
|
179
|
+
component_state_validator = EnumAttributeValidator.new('String', ["PENDING_CREATION", "CREATED", "DELETED", "PENDING_DELETION", "MODIFICATION", "PENDING_MODIFICATION"])
|
180
|
+
return false unless component_state_validator.valid?(@component_state)
|
181
|
+
return false if !@component_state.nil? && @component_state.to_s.length > 32
|
182
|
+
true
|
183
|
+
end
|
184
|
+
|
185
|
+
# Custom attribute writer method checking allowed values (enum).
|
186
|
+
# @param [Object] component_state Object to be assigned
|
187
|
+
def component_state=(component_state)
|
188
|
+
validator = EnumAttributeValidator.new('String', ["PENDING_CREATION", "CREATED", "DELETED", "PENDING_DELETION", "MODIFICATION", "PENDING_MODIFICATION"])
|
189
|
+
unless validator.valid?(component_state)
|
190
|
+
fail ArgumentError, "invalid value for \"component_state\", must be one of #{validator.allowable_values}."
|
191
|
+
end
|
192
|
+
@component_state = component_state
|
193
|
+
end
|
194
|
+
|
195
|
+
# Checks equality by comparing each attribute.
|
196
|
+
# @param [Object] Object to be compared
|
197
|
+
def ==(o)
|
198
|
+
return true if self.equal?(o)
|
199
|
+
self.class == o.class &&
|
200
|
+
compliant == o.compliant &&
|
201
|
+
component_state == o.component_state &&
|
202
|
+
count == o.count &&
|
203
|
+
name == o.name &&
|
204
|
+
service == o.service &&
|
205
|
+
size == o.size &&
|
206
|
+
status == o.status &&
|
207
|
+
unmapped_since == o.unmapped_since &&
|
208
|
+
uuid == o.uuid
|
209
|
+
end
|
210
|
+
|
211
|
+
# @see the `==` method
|
212
|
+
# @param [Object] Object to be compared
|
213
|
+
def eql?(o)
|
214
|
+
self == o
|
215
|
+
end
|
216
|
+
|
217
|
+
# Calculates hash code according to all attributes.
|
218
|
+
# @return [Integer] Hash code
|
219
|
+
def hash
|
220
|
+
[compliant, component_state, count, name, service, size, status, unmapped_since, uuid].hash
|
221
|
+
end
|
222
|
+
|
223
|
+
# Builds the object from hash
|
224
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
225
|
+
# @return [Object] Returns the model itself
|
226
|
+
def self.build_from_hash(attributes)
|
227
|
+
new.build_from_hash(attributes)
|
228
|
+
end
|
229
|
+
|
230
|
+
# Builds the object from hash
|
231
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
232
|
+
# @return [Object] Returns the model itself
|
233
|
+
def build_from_hash(attributes)
|
234
|
+
return nil unless attributes.is_a?(Hash)
|
235
|
+
self.class.openapi_types.each_pair do |key, type|
|
236
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
237
|
+
self.send("#{key}=", nil)
|
238
|
+
elsif type =~ /\AArray<(.*)>/i
|
239
|
+
# check to ensure the input is an array given that the attribute
|
240
|
+
# is documented as an array but the input is not
|
241
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
242
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
243
|
+
end
|
244
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
245
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
246
|
+
end
|
247
|
+
end
|
248
|
+
|
249
|
+
self
|
250
|
+
end
|
251
|
+
|
252
|
+
# Deserializes the data based on type
|
253
|
+
# @param string type Data type
|
254
|
+
# @param string value Value to be deserialized
|
255
|
+
# @return [Object] Deserialized data
|
256
|
+
def _deserialize(type, value)
|
257
|
+
case type.to_sym
|
258
|
+
when :Time
|
259
|
+
Time.parse(value)
|
260
|
+
when :Date
|
261
|
+
Date.parse(value)
|
262
|
+
when :String
|
263
|
+
value.to_s
|
264
|
+
when :Integer
|
265
|
+
value.to_i
|
266
|
+
when :Float
|
267
|
+
value.to_f
|
268
|
+
when :Boolean
|
269
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
270
|
+
true
|
271
|
+
else
|
272
|
+
false
|
273
|
+
end
|
274
|
+
when :Object
|
275
|
+
# generic object (usually a Hash), return directly
|
276
|
+
value
|
277
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
278
|
+
inner_type = Regexp.last_match[:inner_type]
|
279
|
+
value.map { |v| _deserialize(inner_type, v) }
|
280
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
281
|
+
k_type = Regexp.last_match[:k_type]
|
282
|
+
v_type = Regexp.last_match[:v_type]
|
283
|
+
{}.tap do |hash|
|
284
|
+
value.each do |k, v|
|
285
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
286
|
+
end
|
287
|
+
end
|
288
|
+
else # model
|
289
|
+
# models (e.g. Pet) or oneOf
|
290
|
+
klass = AutosdeOpenapiClient.const_get(type)
|
291
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
292
|
+
end
|
293
|
+
end
|
294
|
+
|
295
|
+
# Returns the string representation of the object
|
296
|
+
# @return [String] String presentation of the object
|
297
|
+
def to_s
|
298
|
+
to_hash.to_s
|
299
|
+
end
|
300
|
+
|
301
|
+
# to_body is an alias to to_hash (backward compatibility)
|
302
|
+
# @return [Hash] Returns the object in the form of hash
|
303
|
+
def to_body
|
304
|
+
to_hash
|
305
|
+
end
|
306
|
+
|
307
|
+
# Returns the object in the form of hash
|
308
|
+
# @return [Hash] Returns the object in the form of hash
|
309
|
+
def to_hash
|
310
|
+
hash = {}
|
311
|
+
self.class.attribute_map.each_pair do |attr, param|
|
312
|
+
value = self.send(attr)
|
313
|
+
if value.nil?
|
314
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
315
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
316
|
+
end
|
317
|
+
|
318
|
+
hash[param] = _to_hash(value)
|
319
|
+
end
|
320
|
+
hash
|
321
|
+
end
|
322
|
+
|
323
|
+
# Outputs non-array value in the form of hash
|
324
|
+
# For object, use to_hash. Otherwise, just return the value
|
325
|
+
# @param [Object] value Any valid value
|
326
|
+
# @return [Hash] Returns the value in the form of hash
|
327
|
+
def _to_hash(value)
|
328
|
+
if value.is_a?(Array)
|
329
|
+
value.compact.map { |v| _to_hash(v) }
|
330
|
+
elsif value.is_a?(Hash)
|
331
|
+
{}.tap do |hash|
|
332
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
333
|
+
end
|
334
|
+
elsif value.respond_to? :to_hash
|
335
|
+
value.to_hash
|
336
|
+
else
|
337
|
+
value
|
338
|
+
end
|
339
|
+
end
|
340
|
+
|
341
|
+
end
|
342
|
+
|
343
|
+
end
|
@@ -0,0 +1,350 @@
|
|
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 VolumeResponse
|
19
|
+
# compliant
|
20
|
+
attr_accessor :compliant
|
21
|
+
|
22
|
+
# component_state
|
23
|
+
attr_accessor :component_state
|
24
|
+
|
25
|
+
attr_accessor :historical_service
|
26
|
+
|
27
|
+
# name
|
28
|
+
attr_accessor :name
|
29
|
+
|
30
|
+
# !!uuid of service
|
31
|
+
attr_accessor :service
|
32
|
+
|
33
|
+
# size
|
34
|
+
attr_accessor :size
|
35
|
+
|
36
|
+
# status
|
37
|
+
attr_accessor :status
|
38
|
+
|
39
|
+
# !!uuid of storage_resource
|
40
|
+
attr_accessor :storage_resource
|
41
|
+
|
42
|
+
# unmapped_since
|
43
|
+
attr_accessor :unmapped_since
|
44
|
+
|
45
|
+
# uuid
|
46
|
+
attr_accessor :uuid
|
47
|
+
|
48
|
+
class EnumAttributeValidator
|
49
|
+
attr_reader :datatype
|
50
|
+
attr_reader :allowable_values
|
51
|
+
|
52
|
+
def initialize(datatype, allowable_values)
|
53
|
+
@allowable_values = allowable_values.map do |value|
|
54
|
+
case datatype.to_s
|
55
|
+
when /Integer/i
|
56
|
+
value.to_i
|
57
|
+
when /Float/i
|
58
|
+
value.to_f
|
59
|
+
else
|
60
|
+
value
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
def valid?(value)
|
66
|
+
!value || allowable_values.include?(value)
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
71
|
+
def self.attribute_map
|
72
|
+
{
|
73
|
+
:'compliant' => :'compliant',
|
74
|
+
:'component_state' => :'component_state',
|
75
|
+
:'historical_service' => :'historical_service',
|
76
|
+
:'name' => :'name',
|
77
|
+
:'service' => :'service',
|
78
|
+
:'size' => :'size',
|
79
|
+
:'status' => :'status',
|
80
|
+
:'storage_resource' => :'storage_resource',
|
81
|
+
:'unmapped_since' => :'unmapped_since',
|
82
|
+
:'uuid' => :'uuid'
|
83
|
+
}
|
84
|
+
end
|
85
|
+
|
86
|
+
# Returns all the JSON keys this model knows about
|
87
|
+
def self.acceptable_attributes
|
88
|
+
attribute_map.values
|
89
|
+
end
|
90
|
+
|
91
|
+
# Attribute type mapping.
|
92
|
+
def self.openapi_types
|
93
|
+
{
|
94
|
+
:'compliant' => :'Boolean',
|
95
|
+
:'component_state' => :'String',
|
96
|
+
:'historical_service' => :'Service',
|
97
|
+
:'name' => :'String',
|
98
|
+
:'service' => :'String',
|
99
|
+
:'size' => :'Integer',
|
100
|
+
:'status' => :'String',
|
101
|
+
:'storage_resource' => :'String',
|
102
|
+
:'unmapped_since' => :'Time',
|
103
|
+
:'uuid' => :'String'
|
104
|
+
}
|
105
|
+
end
|
106
|
+
|
107
|
+
# List of attributes with nullable: true
|
108
|
+
def self.openapi_nullable
|
109
|
+
Set.new([
|
110
|
+
])
|
111
|
+
end
|
112
|
+
|
113
|
+
# Initializes the object
|
114
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
115
|
+
def initialize(attributes = {})
|
116
|
+
if (!attributes.is_a?(Hash))
|
117
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `AutosdeOpenapiClient::VolumeResponse` initialize method"
|
118
|
+
end
|
119
|
+
|
120
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
121
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
122
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
123
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `AutosdeOpenapiClient::VolumeResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
124
|
+
end
|
125
|
+
h[k.to_sym] = v
|
126
|
+
}
|
127
|
+
|
128
|
+
if attributes.key?(:'compliant')
|
129
|
+
self.compliant = attributes[:'compliant']
|
130
|
+
else
|
131
|
+
self.compliant = false
|
132
|
+
end
|
133
|
+
|
134
|
+
if attributes.key?(:'component_state')
|
135
|
+
self.component_state = attributes[:'component_state']
|
136
|
+
end
|
137
|
+
|
138
|
+
if attributes.key?(:'historical_service')
|
139
|
+
self.historical_service = attributes[:'historical_service']
|
140
|
+
end
|
141
|
+
|
142
|
+
if attributes.key?(:'name')
|
143
|
+
self.name = attributes[:'name']
|
144
|
+
end
|
145
|
+
|
146
|
+
if attributes.key?(:'service')
|
147
|
+
self.service = attributes[:'service']
|
148
|
+
end
|
149
|
+
|
150
|
+
if attributes.key?(:'size')
|
151
|
+
self.size = attributes[:'size']
|
152
|
+
end
|
153
|
+
|
154
|
+
if attributes.key?(:'status')
|
155
|
+
self.status = attributes[:'status']
|
156
|
+
end
|
157
|
+
|
158
|
+
if attributes.key?(:'storage_resource')
|
159
|
+
self.storage_resource = attributes[:'storage_resource']
|
160
|
+
end
|
161
|
+
|
162
|
+
if attributes.key?(:'unmapped_since')
|
163
|
+
self.unmapped_since = attributes[:'unmapped_since']
|
164
|
+
end
|
165
|
+
|
166
|
+
if attributes.key?(:'uuid')
|
167
|
+
self.uuid = attributes[:'uuid']
|
168
|
+
end
|
169
|
+
end
|
170
|
+
|
171
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
172
|
+
# @return Array for valid properties with the reasons
|
173
|
+
def list_invalid_properties
|
174
|
+
invalid_properties = Array.new
|
175
|
+
if !@component_state.nil? && @component_state.to_s.length > 32
|
176
|
+
invalid_properties.push('invalid value for "component_state", the character length must be smaller than or equal to 32.')
|
177
|
+
end
|
178
|
+
|
179
|
+
invalid_properties
|
180
|
+
end
|
181
|
+
|
182
|
+
# Check to see if the all the properties in the model are valid
|
183
|
+
# @return true if the model is valid
|
184
|
+
def valid?
|
185
|
+
component_state_validator = EnumAttributeValidator.new('String', ["PENDING_CREATION", "CREATED", "DELETED", "PENDING_DELETION", "MODIFICATION", "PENDING_MODIFICATION"])
|
186
|
+
return false unless component_state_validator.valid?(@component_state)
|
187
|
+
return false if !@component_state.nil? && @component_state.to_s.length > 32
|
188
|
+
true
|
189
|
+
end
|
190
|
+
|
191
|
+
# Custom attribute writer method checking allowed values (enum).
|
192
|
+
# @param [Object] component_state Object to be assigned
|
193
|
+
def component_state=(component_state)
|
194
|
+
validator = EnumAttributeValidator.new('String', ["PENDING_CREATION", "CREATED", "DELETED", "PENDING_DELETION", "MODIFICATION", "PENDING_MODIFICATION"])
|
195
|
+
unless validator.valid?(component_state)
|
196
|
+
fail ArgumentError, "invalid value for \"component_state\", must be one of #{validator.allowable_values}."
|
197
|
+
end
|
198
|
+
@component_state = component_state
|
199
|
+
end
|
200
|
+
|
201
|
+
# Checks equality by comparing each attribute.
|
202
|
+
# @param [Object] Object to be compared
|
203
|
+
def ==(o)
|
204
|
+
return true if self.equal?(o)
|
205
|
+
self.class == o.class &&
|
206
|
+
compliant == o.compliant &&
|
207
|
+
component_state == o.component_state &&
|
208
|
+
historical_service == o.historical_service &&
|
209
|
+
name == o.name &&
|
210
|
+
service == o.service &&
|
211
|
+
size == o.size &&
|
212
|
+
status == o.status &&
|
213
|
+
storage_resource == o.storage_resource &&
|
214
|
+
unmapped_since == o.unmapped_since &&
|
215
|
+
uuid == o.uuid
|
216
|
+
end
|
217
|
+
|
218
|
+
# @see the `==` method
|
219
|
+
# @param [Object] Object to be compared
|
220
|
+
def eql?(o)
|
221
|
+
self == o
|
222
|
+
end
|
223
|
+
|
224
|
+
# Calculates hash code according to all attributes.
|
225
|
+
# @return [Integer] Hash code
|
226
|
+
def hash
|
227
|
+
[compliant, component_state, historical_service, name, service, size, status, storage_resource, unmapped_since, uuid].hash
|
228
|
+
end
|
229
|
+
|
230
|
+
# Builds the object from hash
|
231
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
232
|
+
# @return [Object] Returns the model itself
|
233
|
+
def self.build_from_hash(attributes)
|
234
|
+
new.build_from_hash(attributes)
|
235
|
+
end
|
236
|
+
|
237
|
+
# Builds the object from hash
|
238
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
239
|
+
# @return [Object] Returns the model itself
|
240
|
+
def build_from_hash(attributes)
|
241
|
+
return nil unless attributes.is_a?(Hash)
|
242
|
+
self.class.openapi_types.each_pair do |key, type|
|
243
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
244
|
+
self.send("#{key}=", nil)
|
245
|
+
elsif type =~ /\AArray<(.*)>/i
|
246
|
+
# check to ensure the input is an array given that the attribute
|
247
|
+
# is documented as an array but the input is not
|
248
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
249
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
250
|
+
end
|
251
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
252
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
253
|
+
end
|
254
|
+
end
|
255
|
+
|
256
|
+
self
|
257
|
+
end
|
258
|
+
|
259
|
+
# Deserializes the data based on type
|
260
|
+
# @param string type Data type
|
261
|
+
# @param string value Value to be deserialized
|
262
|
+
# @return [Object] Deserialized data
|
263
|
+
def _deserialize(type, value)
|
264
|
+
case type.to_sym
|
265
|
+
when :Time
|
266
|
+
Time.parse(value)
|
267
|
+
when :Date
|
268
|
+
Date.parse(value)
|
269
|
+
when :String
|
270
|
+
value.to_s
|
271
|
+
when :Integer
|
272
|
+
value.to_i
|
273
|
+
when :Float
|
274
|
+
value.to_f
|
275
|
+
when :Boolean
|
276
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
277
|
+
true
|
278
|
+
else
|
279
|
+
false
|
280
|
+
end
|
281
|
+
when :Object
|
282
|
+
# generic object (usually a Hash), return directly
|
283
|
+
value
|
284
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
285
|
+
inner_type = Regexp.last_match[:inner_type]
|
286
|
+
value.map { |v| _deserialize(inner_type, v) }
|
287
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
288
|
+
k_type = Regexp.last_match[:k_type]
|
289
|
+
v_type = Regexp.last_match[:v_type]
|
290
|
+
{}.tap do |hash|
|
291
|
+
value.each do |k, v|
|
292
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
293
|
+
end
|
294
|
+
end
|
295
|
+
else # model
|
296
|
+
# models (e.g. Pet) or oneOf
|
297
|
+
klass = AutosdeOpenapiClient.const_get(type)
|
298
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
299
|
+
end
|
300
|
+
end
|
301
|
+
|
302
|
+
# Returns the string representation of the object
|
303
|
+
# @return [String] String presentation of the object
|
304
|
+
def to_s
|
305
|
+
to_hash.to_s
|
306
|
+
end
|
307
|
+
|
308
|
+
# to_body is an alias to to_hash (backward compatibility)
|
309
|
+
# @return [Hash] Returns the object in the form of hash
|
310
|
+
def to_body
|
311
|
+
to_hash
|
312
|
+
end
|
313
|
+
|
314
|
+
# Returns the object in the form of hash
|
315
|
+
# @return [Hash] Returns the object in the form of hash
|
316
|
+
def to_hash
|
317
|
+
hash = {}
|
318
|
+
self.class.attribute_map.each_pair do |attr, param|
|
319
|
+
value = self.send(attr)
|
320
|
+
if value.nil?
|
321
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
322
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
323
|
+
end
|
324
|
+
|
325
|
+
hash[param] = _to_hash(value)
|
326
|
+
end
|
327
|
+
hash
|
328
|
+
end
|
329
|
+
|
330
|
+
# Outputs non-array value in the form of hash
|
331
|
+
# For object, use to_hash. Otherwise, just return the value
|
332
|
+
# @param [Object] value Any valid value
|
333
|
+
# @return [Hash] Returns the value in the form of hash
|
334
|
+
def _to_hash(value)
|
335
|
+
if value.is_a?(Array)
|
336
|
+
value.compact.map { |v| _to_hash(v) }
|
337
|
+
elsif value.is_a?(Hash)
|
338
|
+
{}.tap do |hash|
|
339
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
340
|
+
end
|
341
|
+
elsif value.respond_to? :to_hash
|
342
|
+
value.to_hash
|
343
|
+
else
|
344
|
+
value
|
345
|
+
end
|
346
|
+
end
|
347
|
+
|
348
|
+
end
|
349
|
+
|
350
|
+
end
|