autosde_openapi_client 2.0.3 → 2.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -6
- data/docs/RefreshSystem.md +4 -2
- data/docs/ServiceApi.md +12 -12
- data/docs/ServiceResponse.md +38 -0
- data/docs/StorageResourceResponse.md +2 -0
- data/docs/VolumeCreate.md +5 -1
- data/lib/autosde_openapi_client/api/service_api.rb +9 -9
- data/lib/autosde_openapi_client/models/refresh_system.rb +51 -7
- data/lib/autosde_openapi_client/models/{volume_safe_delete.rb → service_response.rb} +143 -18
- data/lib/autosde_openapi_client/models/storage_resource_response.rb +11 -1
- data/lib/autosde_openapi_client/models/volume_create.rb +26 -3
- data/lib/autosde_openapi_client/version.rb +2 -2
- data/lib/autosde_openapi_client.rb +1 -3
- data/spec/api/service_api_spec.rb +3 -3
- data/spec/models/refresh_system_spec.rb +11 -1
- data/spec/models/service_response_spec.rb +98 -0
- data/spec/models/storage_resource_response_spec.rb +6 -0
- data/spec/models/volume_create_spec.rb +12 -0
- metadata +86 -94
- data/docs/VolumeSafeDelete.md +0 -22
- data/docs/VolumeSafeDeleteApi.md +0 -276
- data/docs/VolumeSafeDeleteCreate.md +0 -18
- data/lib/autosde_openapi_client/api/volume_safe_delete_api.rb +0 -254
- data/lib/autosde_openapi_client/models/volume_safe_delete_create.rb +0 -219
- data/spec/api/volume_safe_delete_api_spec.rb +0 -74
- data/spec/models/volume_safe_delete_create_spec.rb +0 -34
- data/spec/models/volume_safe_delete_spec.rb +0 -46
@@ -1,219 +0,0 @@
|
|
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 VolumeSafeDeleteCreate
|
19
|
-
attr_accessor :volume
|
20
|
-
|
21
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
22
|
-
def self.attribute_map
|
23
|
-
{
|
24
|
-
:'volume' => :'volume'
|
25
|
-
}
|
26
|
-
end
|
27
|
-
|
28
|
-
# Returns all the JSON keys this model knows about
|
29
|
-
def self.acceptable_attributes
|
30
|
-
attribute_map.values
|
31
|
-
end
|
32
|
-
|
33
|
-
# Attribute type mapping.
|
34
|
-
def self.openapi_types
|
35
|
-
{
|
36
|
-
:'volume' => :'Volume'
|
37
|
-
}
|
38
|
-
end
|
39
|
-
|
40
|
-
# List of attributes with nullable: true
|
41
|
-
def self.openapi_nullable
|
42
|
-
Set.new([
|
43
|
-
])
|
44
|
-
end
|
45
|
-
|
46
|
-
# Initializes the object
|
47
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
48
|
-
def initialize(attributes = {})
|
49
|
-
if (!attributes.is_a?(Hash))
|
50
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `AutosdeOpenapiClient::VolumeSafeDeleteCreate` initialize method"
|
51
|
-
end
|
52
|
-
|
53
|
-
# check to see if the attribute exists and convert string to symbol for hash key
|
54
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
55
|
-
if (!self.class.attribute_map.key?(k.to_sym))
|
56
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `AutosdeOpenapiClient::VolumeSafeDeleteCreate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
57
|
-
end
|
58
|
-
h[k.to_sym] = v
|
59
|
-
}
|
60
|
-
|
61
|
-
if attributes.key?(:'volume')
|
62
|
-
self.volume = attributes[:'volume']
|
63
|
-
end
|
64
|
-
end
|
65
|
-
|
66
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
67
|
-
# @return Array for valid properties with the reasons
|
68
|
-
def list_invalid_properties
|
69
|
-
invalid_properties = Array.new
|
70
|
-
invalid_properties
|
71
|
-
end
|
72
|
-
|
73
|
-
# Check to see if the all the properties in the model are valid
|
74
|
-
# @return true if the model is valid
|
75
|
-
def valid?
|
76
|
-
true
|
77
|
-
end
|
78
|
-
|
79
|
-
# Checks equality by comparing each attribute.
|
80
|
-
# @param [Object] Object to be compared
|
81
|
-
def ==(o)
|
82
|
-
return true if self.equal?(o)
|
83
|
-
self.class == o.class &&
|
84
|
-
volume == o.volume
|
85
|
-
end
|
86
|
-
|
87
|
-
# @see the `==` method
|
88
|
-
# @param [Object] Object to be compared
|
89
|
-
def eql?(o)
|
90
|
-
self == o
|
91
|
-
end
|
92
|
-
|
93
|
-
# Calculates hash code according to all attributes.
|
94
|
-
# @return [Integer] Hash code
|
95
|
-
def hash
|
96
|
-
[volume].hash
|
97
|
-
end
|
98
|
-
|
99
|
-
# Builds the object from hash
|
100
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
101
|
-
# @return [Object] Returns the model itself
|
102
|
-
def self.build_from_hash(attributes)
|
103
|
-
new.build_from_hash(attributes)
|
104
|
-
end
|
105
|
-
|
106
|
-
# Builds the object from hash
|
107
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
108
|
-
# @return [Object] Returns the model itself
|
109
|
-
def build_from_hash(attributes)
|
110
|
-
return nil unless attributes.is_a?(Hash)
|
111
|
-
self.class.openapi_types.each_pair do |key, type|
|
112
|
-
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
113
|
-
self.send("#{key}=", nil)
|
114
|
-
elsif type =~ /\AArray<(.*)>/i
|
115
|
-
# check to ensure the input is an array given that the attribute
|
116
|
-
# is documented as an array but the input is not
|
117
|
-
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
118
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
119
|
-
end
|
120
|
-
elsif !attributes[self.class.attribute_map[key]].nil?
|
121
|
-
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
122
|
-
end
|
123
|
-
end
|
124
|
-
|
125
|
-
self
|
126
|
-
end
|
127
|
-
|
128
|
-
# Deserializes the data based on type
|
129
|
-
# @param string type Data type
|
130
|
-
# @param string value Value to be deserialized
|
131
|
-
# @return [Object] Deserialized data
|
132
|
-
def _deserialize(type, value)
|
133
|
-
case type.to_sym
|
134
|
-
when :Time
|
135
|
-
Time.parse(value)
|
136
|
-
when :Date
|
137
|
-
Date.parse(value)
|
138
|
-
when :String
|
139
|
-
value.to_s
|
140
|
-
when :Integer
|
141
|
-
value.to_i
|
142
|
-
when :Float
|
143
|
-
value.to_f
|
144
|
-
when :Boolean
|
145
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
146
|
-
true
|
147
|
-
else
|
148
|
-
false
|
149
|
-
end
|
150
|
-
when :Object
|
151
|
-
# generic object (usually a Hash), return directly
|
152
|
-
value
|
153
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
154
|
-
inner_type = Regexp.last_match[:inner_type]
|
155
|
-
value.map { |v| _deserialize(inner_type, v) }
|
156
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
157
|
-
k_type = Regexp.last_match[:k_type]
|
158
|
-
v_type = Regexp.last_match[:v_type]
|
159
|
-
{}.tap do |hash|
|
160
|
-
value.each do |k, v|
|
161
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
162
|
-
end
|
163
|
-
end
|
164
|
-
else # model
|
165
|
-
# models (e.g. Pet) or oneOf
|
166
|
-
klass = AutosdeOpenapiClient.const_get(type)
|
167
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
168
|
-
end
|
169
|
-
end
|
170
|
-
|
171
|
-
# Returns the string representation of the object
|
172
|
-
# @return [String] String presentation of the object
|
173
|
-
def to_s
|
174
|
-
to_hash.to_s
|
175
|
-
end
|
176
|
-
|
177
|
-
# to_body is an alias to to_hash (backward compatibility)
|
178
|
-
# @return [Hash] Returns the object in the form of hash
|
179
|
-
def to_body
|
180
|
-
to_hash
|
181
|
-
end
|
182
|
-
|
183
|
-
# Returns the object in the form of hash
|
184
|
-
# @return [Hash] Returns the object in the form of hash
|
185
|
-
def to_hash
|
186
|
-
hash = {}
|
187
|
-
self.class.attribute_map.each_pair do |attr, param|
|
188
|
-
value = self.send(attr)
|
189
|
-
if value.nil?
|
190
|
-
is_nullable = self.class.openapi_nullable.include?(attr)
|
191
|
-
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
192
|
-
end
|
193
|
-
|
194
|
-
hash[param] = _to_hash(value)
|
195
|
-
end
|
196
|
-
hash
|
197
|
-
end
|
198
|
-
|
199
|
-
# Outputs non-array value in the form of hash
|
200
|
-
# For object, use to_hash. Otherwise, just return the value
|
201
|
-
# @param [Object] value Any valid value
|
202
|
-
# @return [Hash] Returns the value in the form of hash
|
203
|
-
def _to_hash(value)
|
204
|
-
if value.is_a?(Array)
|
205
|
-
value.compact.map { |v| _to_hash(v) }
|
206
|
-
elsif value.is_a?(Hash)
|
207
|
-
{}.tap do |hash|
|
208
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
209
|
-
end
|
210
|
-
elsif value.respond_to? :to_hash
|
211
|
-
value.to_hash
|
212
|
-
else
|
213
|
-
value
|
214
|
-
end
|
215
|
-
end
|
216
|
-
|
217
|
-
end
|
218
|
-
|
219
|
-
end
|
@@ -1,74 +0,0 @@
|
|
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 'spec_helper'
|
14
|
-
require 'json'
|
15
|
-
|
16
|
-
# Unit tests for AutosdeOpenapiClient::VolumeSafeDeleteApi
|
17
|
-
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
18
|
-
# Please update as you see appropriate
|
19
|
-
describe 'VolumeSafeDeleteApi' do
|
20
|
-
before do
|
21
|
-
# run before each test
|
22
|
-
@api_instance = AutosdeOpenapiClient::VolumeSafeDeleteApi.new
|
23
|
-
end
|
24
|
-
|
25
|
-
after do
|
26
|
-
# run after each test
|
27
|
-
end
|
28
|
-
|
29
|
-
describe 'test an instance of VolumeSafeDeleteApi' do
|
30
|
-
it 'should create an instance of VolumeSafeDeleteApi' do
|
31
|
-
expect(@api_instance).to be_instance_of(AutosdeOpenapiClient::VolumeSafeDeleteApi)
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
# unit tests for safe_deletes_get
|
36
|
-
# @param [Hash] opts the optional parameters
|
37
|
-
# @return [Array<VolumeSafeDelete>]
|
38
|
-
describe 'safe_deletes_get test' do
|
39
|
-
it 'should work' do
|
40
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
41
|
-
end
|
42
|
-
end
|
43
|
-
|
44
|
-
# unit tests for safe_deletes_pk_delete
|
45
|
-
# @param pk
|
46
|
-
# @param [Hash] opts the optional parameters
|
47
|
-
# @return [VolumeSafeDelete]
|
48
|
-
describe 'safe_deletes_pk_delete test' do
|
49
|
-
it 'should work' do
|
50
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
51
|
-
end
|
52
|
-
end
|
53
|
-
|
54
|
-
# unit tests for safe_deletes_pk_get
|
55
|
-
# @param pk
|
56
|
-
# @param [Hash] opts the optional parameters
|
57
|
-
# @return [VolumeSafeDelete]
|
58
|
-
describe 'safe_deletes_pk_get test' do
|
59
|
-
it 'should work' do
|
60
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
61
|
-
end
|
62
|
-
end
|
63
|
-
|
64
|
-
# unit tests for safe_deletes_post
|
65
|
-
# @param volume_safe_delete_create
|
66
|
-
# @param [Hash] opts the optional parameters
|
67
|
-
# @return [VolumeSafeDelete]
|
68
|
-
describe 'safe_deletes_post test' do
|
69
|
-
it 'should work' do
|
70
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
71
|
-
end
|
72
|
-
end
|
73
|
-
|
74
|
-
end
|
@@ -1,34 +0,0 @@
|
|
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 'spec_helper'
|
14
|
-
require 'json'
|
15
|
-
require 'date'
|
16
|
-
|
17
|
-
# Unit tests for AutosdeOpenapiClient::VolumeSafeDeleteCreate
|
18
|
-
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
|
-
# Please update as you see appropriate
|
20
|
-
describe AutosdeOpenapiClient::VolumeSafeDeleteCreate do
|
21
|
-
let(:instance) { AutosdeOpenapiClient::VolumeSafeDeleteCreate.new }
|
22
|
-
|
23
|
-
describe 'test an instance of VolumeSafeDeleteCreate' do
|
24
|
-
it 'should create an instance of VolumeSafeDeleteCreate' do
|
25
|
-
expect(instance).to be_instance_of(AutosdeOpenapiClient::VolumeSafeDeleteCreate)
|
26
|
-
end
|
27
|
-
end
|
28
|
-
describe 'test attribute "volume"' do
|
29
|
-
it 'should work' do
|
30
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
end
|
@@ -1,46 +0,0 @@
|
|
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 'spec_helper'
|
14
|
-
require 'json'
|
15
|
-
require 'date'
|
16
|
-
|
17
|
-
# Unit tests for AutosdeOpenapiClient::VolumeSafeDelete
|
18
|
-
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
|
-
# Please update as you see appropriate
|
20
|
-
describe AutosdeOpenapiClient::VolumeSafeDelete do
|
21
|
-
let(:instance) { AutosdeOpenapiClient::VolumeSafeDelete.new }
|
22
|
-
|
23
|
-
describe 'test an instance of VolumeSafeDelete' do
|
24
|
-
it 'should create an instance of VolumeSafeDelete' do
|
25
|
-
expect(instance).to be_instance_of(AutosdeOpenapiClient::VolumeSafeDelete)
|
26
|
-
end
|
27
|
-
end
|
28
|
-
describe 'test attribute "task_id"' do
|
29
|
-
it 'should work' do
|
30
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
describe 'test attribute "uuid"' do
|
35
|
-
it 'should work' do
|
36
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
37
|
-
end
|
38
|
-
end
|
39
|
-
|
40
|
-
describe 'test attribute "volume"' do
|
41
|
-
it 'should work' do
|
42
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
43
|
-
end
|
44
|
-
end
|
45
|
-
|
46
|
-
end
|