autosde_openapi_client 1.1.32 → 1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +15 -7
  3. data/docs/CeleryConfig.md +20 -0
  4. data/docs/CeleryConfigApi.md +140 -0
  5. data/docs/Event.md +4 -0
  6. data/docs/EventApi.md +16 -16
  7. data/docs/EventResponse.md +36 -0
  8. data/docs/Job.md +2 -0
  9. data/docs/JobApi.md +136 -0
  10. data/docs/JobCreate.md +2 -2
  11. data/docs/RefreshSystem.md +18 -0
  12. data/docs/RefreshSystemApi.md +75 -0
  13. data/docs/{StorageHostVolumeMapping.md → StorageHostsMapping.md} +2 -2
  14. data/docs/{StorageHostVolumeMappingApi.md → StorageHostsMappingApi.md} +37 -37
  15. data/docs/{StorageHostVolumeMappingCreate.md → StorageHostsMappingCreate.md} +2 -2
  16. data/docs/{StorageHostVolumeMappingResponse.md → StorageHostsMappingResponse.md} +2 -2
  17. data/docs/StorageSystem.md +2 -2
  18. data/docs/StorageSystemCreate.md +4 -4
  19. data/lib/autosde_openapi_client/api/celery_config_api.rb +136 -0
  20. data/lib/autosde_openapi_client/api/event_api.rb +12 -12
  21. data/lib/autosde_openapi_client/api/job_api.rb +118 -0
  22. data/lib/autosde_openapi_client/api/refresh_system_api.rb +83 -0
  23. data/lib/autosde_openapi_client/api/{storage_host_volume_mapping_api.rb → storage_hosts_mapping_api.rb} +36 -36
  24. data/lib/autosde_openapi_client/models/celery_config.rb +230 -0
  25. data/lib/autosde_openapi_client/models/event.rb +22 -2
  26. data/lib/autosde_openapi_client/models/event_response.rb +310 -0
  27. data/lib/autosde_openapi_client/models/job.rb +11 -1
  28. data/lib/autosde_openapi_client/models/job_create.rb +8 -8
  29. data/lib/autosde_openapi_client/models/refresh_system.rb +220 -0
  30. data/lib/autosde_openapi_client/models/{storage_host_volume_mapping.rb → storage_hosts_mapping.rb} +4 -4
  31. data/lib/autosde_openapi_client/models/{storage_host_volume_mapping_create.rb → storage_hosts_mapping_create.rb} +3 -3
  32. data/lib/autosde_openapi_client/models/{storage_host_volume_mapping_response.rb → storage_hosts_mapping_response.rb} +3 -3
  33. data/lib/autosde_openapi_client/models/storage_system.rb +9 -9
  34. data/lib/autosde_openapi_client/models/storage_system_create.rb +21 -21
  35. data/lib/autosde_openapi_client/version.rb +2 -2
  36. data/lib/autosde_openapi_client.rb +9 -4
  37. data/spec/api/celery_config_api_spec.rb +54 -0
  38. data/spec/api/event_api_spec.rb +4 -4
  39. data/spec/api/job_api_spec.rb +20 -0
  40. data/spec/api/refresh_system_api_spec.rb +45 -0
  41. data/spec/api/{storage_host_volume_mapping_api_spec.rb → storage_hosts_mapping_api_spec.rb} +11 -11
  42. data/spec/models/celery_config_spec.rb +40 -0
  43. data/spec/models/event_response_spec.rb +88 -0
  44. data/spec/models/event_spec.rb +12 -0
  45. data/spec/models/job_create_spec.rb +1 -1
  46. data/spec/models/job_spec.rb +6 -0
  47. data/spec/models/refresh_system_spec.rb +34 -0
  48. data/spec/models/{storage_host_volume_mapping_create_spec.rb → storage_hosts_mapping_create_spec.rb} +6 -6
  49. data/spec/models/{storage_host_volume_mapping_response_spec.rb → storage_hosts_mapping_response_spec.rb} +6 -6
  50. data/spec/models/{storage_host_volume_mapping_spec.rb → storage_hosts_mapping_spec.rb} +6 -6
  51. data/spec/models/storage_system_create_spec.rb +7 -7
  52. data/spec/models/storage_system_spec.rb +1 -1
  53. metadata +38 -18
@@ -14,8 +14,11 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module AutosdeOpenapiClient
17
- # Event object represents storage system alerts and messages.
17
+ # Event
18
18
  class Event
19
+ # created_at
20
+ attr_accessor :created_at
21
+
19
22
  # description
20
23
  attr_accessor :description
21
24
 
@@ -34,6 +37,9 @@ module AutosdeOpenapiClient
34
37
  # last_timestamp
35
38
  attr_accessor :last_timestamp
36
39
 
40
+ # refresh_interval
41
+ attr_accessor :refresh_interval
42
+
37
43
  attr_accessor :storage_system
38
44
 
39
45
  # uuid
@@ -42,12 +48,14 @@ module AutosdeOpenapiClient
42
48
  # Attribute mapping from ruby-style variable name to JSON key.
43
49
  def self.attribute_map
44
50
  {
51
+ :'created_at' => :'created_at',
45
52
  :'description' => :'description',
46
53
  :'error_code' => :'error_code',
47
54
  :'event_id' => :'event_id',
48
55
  :'event_type' => :'event_type',
49
56
  :'fixed' => :'fixed',
50
57
  :'last_timestamp' => :'last_timestamp',
58
+ :'refresh_interval' => :'refresh_interval',
51
59
  :'storage_system' => :'storage_system',
52
60
  :'uuid' => :'uuid'
53
61
  }
@@ -61,12 +69,14 @@ module AutosdeOpenapiClient
61
69
  # Attribute type mapping.
62
70
  def self.openapi_types
63
71
  {
72
+ :'created_at' => :'Time',
64
73
  :'description' => :'String',
65
74
  :'error_code' => :'String',
66
75
  :'event_id' => :'Integer',
67
76
  :'event_type' => :'String',
68
77
  :'fixed' => :'String',
69
78
  :'last_timestamp' => :'Time',
79
+ :'refresh_interval' => :'Integer',
70
80
  :'storage_system' => :'StorageSystem',
71
81
  :'uuid' => :'String'
72
82
  }
@@ -93,6 +103,10 @@ module AutosdeOpenapiClient
93
103
  h[k.to_sym] = v
94
104
  }
95
105
 
106
+ if attributes.key?(:'created_at')
107
+ self.created_at = attributes[:'created_at']
108
+ end
109
+
96
110
  if attributes.key?(:'description')
97
111
  self.description = attributes[:'description']
98
112
  end
@@ -117,6 +131,10 @@ module AutosdeOpenapiClient
117
131
  self.last_timestamp = attributes[:'last_timestamp']
118
132
  end
119
133
 
134
+ if attributes.key?(:'refresh_interval')
135
+ self.refresh_interval = attributes[:'refresh_interval']
136
+ end
137
+
120
138
  if attributes.key?(:'storage_system')
121
139
  self.storage_system = attributes[:'storage_system']
122
140
  end
@@ -144,12 +162,14 @@ module AutosdeOpenapiClient
144
162
  def ==(o)
145
163
  return true if self.equal?(o)
146
164
  self.class == o.class &&
165
+ created_at == o.created_at &&
147
166
  description == o.description &&
148
167
  error_code == o.error_code &&
149
168
  event_id == o.event_id &&
150
169
  event_type == o.event_type &&
151
170
  fixed == o.fixed &&
152
171
  last_timestamp == o.last_timestamp &&
172
+ refresh_interval == o.refresh_interval &&
153
173
  storage_system == o.storage_system &&
154
174
  uuid == o.uuid
155
175
  end
@@ -163,7 +183,7 @@ module AutosdeOpenapiClient
163
183
  # Calculates hash code according to all attributes.
164
184
  # @return [Integer] Hash code
165
185
  def hash
166
- [description, error_code, event_id, event_type, fixed, last_timestamp, storage_system, uuid].hash
186
+ [created_at, description, error_code, event_id, event_type, fixed, last_timestamp, refresh_interval, storage_system, uuid].hash
167
187
  end
168
188
 
169
189
  # Builds the object from hash
@@ -0,0 +1,310 @@
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 EventResponse
19
+ # created_at
20
+ attr_accessor :created_at
21
+
22
+ # description
23
+ attr_accessor :description
24
+
25
+ # error_code
26
+ attr_accessor :error_code
27
+
28
+ # event_id
29
+ attr_accessor :event_id
30
+
31
+ # event_type
32
+ attr_accessor :event_type
33
+
34
+ # fixed
35
+ attr_accessor :fixed
36
+
37
+ # last_timestamp
38
+ attr_accessor :last_timestamp
39
+
40
+ # refresh_interval
41
+ attr_accessor :refresh_interval
42
+
43
+ # !!uuid of storage_system
44
+ attr_accessor :storage_system
45
+
46
+ # uuid
47
+ attr_accessor :uuid
48
+
49
+ # Attribute mapping from ruby-style variable name to JSON key.
50
+ def self.attribute_map
51
+ {
52
+ :'created_at' => :'created_at',
53
+ :'description' => :'description',
54
+ :'error_code' => :'error_code',
55
+ :'event_id' => :'event_id',
56
+ :'event_type' => :'event_type',
57
+ :'fixed' => :'fixed',
58
+ :'last_timestamp' => :'last_timestamp',
59
+ :'refresh_interval' => :'refresh_interval',
60
+ :'storage_system' => :'storage_system',
61
+ :'uuid' => :'uuid'
62
+ }
63
+ end
64
+
65
+ # Returns all the JSON keys this model knows about
66
+ def self.acceptable_attributes
67
+ attribute_map.values
68
+ end
69
+
70
+ # Attribute type mapping.
71
+ def self.openapi_types
72
+ {
73
+ :'created_at' => :'Time',
74
+ :'description' => :'String',
75
+ :'error_code' => :'String',
76
+ :'event_id' => :'Integer',
77
+ :'event_type' => :'String',
78
+ :'fixed' => :'String',
79
+ :'last_timestamp' => :'Time',
80
+ :'refresh_interval' => :'Integer',
81
+ :'storage_system' => :'String',
82
+ :'uuid' => :'String'
83
+ }
84
+ end
85
+
86
+ # List of attributes with nullable: true
87
+ def self.openapi_nullable
88
+ Set.new([
89
+ ])
90
+ end
91
+
92
+ # Initializes the object
93
+ # @param [Hash] attributes Model attributes in the form of hash
94
+ def initialize(attributes = {})
95
+ if (!attributes.is_a?(Hash))
96
+ fail ArgumentError, "The input argument (attributes) must be a hash in `AutosdeOpenapiClient::EventResponse` initialize method"
97
+ end
98
+
99
+ # check to see if the attribute exists and convert string to symbol for hash key
100
+ attributes = attributes.each_with_object({}) { |(k, v), h|
101
+ if (!self.class.attribute_map.key?(k.to_sym))
102
+ fail ArgumentError, "`#{k}` is not a valid attribute in `AutosdeOpenapiClient::EventResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
103
+ end
104
+ h[k.to_sym] = v
105
+ }
106
+
107
+ if attributes.key?(:'created_at')
108
+ self.created_at = attributes[:'created_at']
109
+ end
110
+
111
+ if attributes.key?(:'description')
112
+ self.description = attributes[:'description']
113
+ end
114
+
115
+ if attributes.key?(:'error_code')
116
+ self.error_code = attributes[:'error_code']
117
+ end
118
+
119
+ if attributes.key?(:'event_id')
120
+ self.event_id = attributes[:'event_id']
121
+ end
122
+
123
+ if attributes.key?(:'event_type')
124
+ self.event_type = attributes[:'event_type']
125
+ end
126
+
127
+ if attributes.key?(:'fixed')
128
+ self.fixed = attributes[:'fixed']
129
+ end
130
+
131
+ if attributes.key?(:'last_timestamp')
132
+ self.last_timestamp = attributes[:'last_timestamp']
133
+ end
134
+
135
+ if attributes.key?(:'refresh_interval')
136
+ self.refresh_interval = attributes[:'refresh_interval']
137
+ end
138
+
139
+ if attributes.key?(:'storage_system')
140
+ self.storage_system = attributes[:'storage_system']
141
+ end
142
+
143
+ if attributes.key?(:'uuid')
144
+ self.uuid = attributes[:'uuid']
145
+ end
146
+ end
147
+
148
+ # Show invalid properties with the reasons. Usually used together with valid?
149
+ # @return Array for valid properties with the reasons
150
+ def list_invalid_properties
151
+ invalid_properties = Array.new
152
+ invalid_properties
153
+ end
154
+
155
+ # Check to see if the all the properties in the model are valid
156
+ # @return true if the model is valid
157
+ def valid?
158
+ true
159
+ end
160
+
161
+ # Checks equality by comparing each attribute.
162
+ # @param [Object] Object to be compared
163
+ def ==(o)
164
+ return true if self.equal?(o)
165
+ self.class == o.class &&
166
+ created_at == o.created_at &&
167
+ description == o.description &&
168
+ error_code == o.error_code &&
169
+ event_id == o.event_id &&
170
+ event_type == o.event_type &&
171
+ fixed == o.fixed &&
172
+ last_timestamp == o.last_timestamp &&
173
+ refresh_interval == o.refresh_interval &&
174
+ storage_system == o.storage_system &&
175
+ uuid == o.uuid
176
+ end
177
+
178
+ # @see the `==` method
179
+ # @param [Object] Object to be compared
180
+ def eql?(o)
181
+ self == o
182
+ end
183
+
184
+ # Calculates hash code according to all attributes.
185
+ # @return [Integer] Hash code
186
+ def hash
187
+ [created_at, description, error_code, event_id, event_type, fixed, last_timestamp, refresh_interval, storage_system, uuid].hash
188
+ end
189
+
190
+ # Builds the object from hash
191
+ # @param [Hash] attributes Model attributes in the form of hash
192
+ # @return [Object] Returns the model itself
193
+ def self.build_from_hash(attributes)
194
+ new.build_from_hash(attributes)
195
+ end
196
+
197
+ # Builds the object from hash
198
+ # @param [Hash] attributes Model attributes in the form of hash
199
+ # @return [Object] Returns the model itself
200
+ def build_from_hash(attributes)
201
+ return nil unless attributes.is_a?(Hash)
202
+ self.class.openapi_types.each_pair do |key, type|
203
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
204
+ self.send("#{key}=", nil)
205
+ elsif type =~ /\AArray<(.*)>/i
206
+ # check to ensure the input is an array given that the attribute
207
+ # is documented as an array but the input is not
208
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
209
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
210
+ end
211
+ elsif !attributes[self.class.attribute_map[key]].nil?
212
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
213
+ end
214
+ end
215
+
216
+ self
217
+ end
218
+
219
+ # Deserializes the data based on type
220
+ # @param string type Data type
221
+ # @param string value Value to be deserialized
222
+ # @return [Object] Deserialized data
223
+ def _deserialize(type, value)
224
+ case type.to_sym
225
+ when :Time
226
+ Time.parse(value)
227
+ when :Date
228
+ Date.parse(value)
229
+ when :String
230
+ value.to_s
231
+ when :Integer
232
+ value.to_i
233
+ when :Float
234
+ value.to_f
235
+ when :Boolean
236
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
237
+ true
238
+ else
239
+ false
240
+ end
241
+ when :Object
242
+ # generic object (usually a Hash), return directly
243
+ value
244
+ when /\AArray<(?<inner_type>.+)>\z/
245
+ inner_type = Regexp.last_match[:inner_type]
246
+ value.map { |v| _deserialize(inner_type, v) }
247
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
248
+ k_type = Regexp.last_match[:k_type]
249
+ v_type = Regexp.last_match[:v_type]
250
+ {}.tap do |hash|
251
+ value.each do |k, v|
252
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
253
+ end
254
+ end
255
+ else # model
256
+ # models (e.g. Pet) or oneOf
257
+ klass = AutosdeOpenapiClient.const_get(type)
258
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
259
+ end
260
+ end
261
+
262
+ # Returns the string representation of the object
263
+ # @return [String] String presentation of the object
264
+ def to_s
265
+ to_hash.to_s
266
+ end
267
+
268
+ # to_body is an alias to to_hash (backward compatibility)
269
+ # @return [Hash] Returns the object in the form of hash
270
+ def to_body
271
+ to_hash
272
+ end
273
+
274
+ # Returns the object in the form of hash
275
+ # @return [Hash] Returns the object in the form of hash
276
+ def to_hash
277
+ hash = {}
278
+ self.class.attribute_map.each_pair do |attr, param|
279
+ value = self.send(attr)
280
+ if value.nil?
281
+ is_nullable = self.class.openapi_nullable.include?(attr)
282
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
283
+ end
284
+
285
+ hash[param] = _to_hash(value)
286
+ end
287
+ hash
288
+ end
289
+
290
+ # Outputs non-array value in the form of hash
291
+ # For object, use to_hash. Otherwise, just return the value
292
+ # @param [Object] value Any valid value
293
+ # @return [Hash] Returns the value in the form of hash
294
+ def _to_hash(value)
295
+ if value.is_a?(Array)
296
+ value.compact.map { |v| _to_hash(v) }
297
+ elsif value.is_a?(Hash)
298
+ {}.tap do |hash|
299
+ value.each { |k, v| hash[k] = _to_hash(v) }
300
+ end
301
+ elsif value.respond_to? :to_hash
302
+ value.to_hash
303
+ else
304
+ value
305
+ end
306
+ end
307
+
308
+ end
309
+
310
+ end
@@ -22,6 +22,9 @@ module AutosdeOpenapiClient
22
22
  # date_started
23
23
  attr_accessor :date_started
24
24
 
25
+ # extra
26
+ attr_accessor :extra
27
+
25
28
  # status
26
29
  attr_accessor :status
27
30
 
@@ -42,6 +45,7 @@ module AutosdeOpenapiClient
42
45
  {
43
46
  :'date_finished' => :'date_finished',
44
47
  :'date_started' => :'date_started',
48
+ :'extra' => :'extra',
45
49
  :'status' => :'status',
46
50
  :'task_args' => :'task_args',
47
51
  :'task_id' => :'task_id',
@@ -60,6 +64,7 @@ module AutosdeOpenapiClient
60
64
  {
61
65
  :'date_finished' => :'Time',
62
66
  :'date_started' => :'Time',
67
+ :'extra' => :'String',
63
68
  :'status' => :'String',
64
69
  :'task_args' => :'String',
65
70
  :'task_id' => :'String',
@@ -97,6 +102,10 @@ module AutosdeOpenapiClient
97
102
  self.date_started = attributes[:'date_started']
98
103
  end
99
104
 
105
+ if attributes.key?(:'extra')
106
+ self.extra = attributes[:'extra']
107
+ end
108
+
100
109
  if attributes.key?(:'status')
101
110
  self.status = attributes[:'status']
102
111
  end
@@ -138,6 +147,7 @@ module AutosdeOpenapiClient
138
147
  self.class == o.class &&
139
148
  date_finished == o.date_finished &&
140
149
  date_started == o.date_started &&
150
+ extra == o.extra &&
141
151
  status == o.status &&
142
152
  task_args == o.task_args &&
143
153
  task_id == o.task_id &&
@@ -154,7 +164,7 @@ module AutosdeOpenapiClient
154
164
  # Calculates hash code according to all attributes.
155
165
  # @return [Integer] Hash code
156
166
  def hash
157
- [date_finished, date_started, status, task_args, task_id, task_kwargs, task_name].hash
167
+ [date_finished, date_started, extra, status, task_args, task_id, task_kwargs, task_name].hash
158
168
  end
159
169
 
160
170
  # Builds the object from hash
@@ -16,8 +16,8 @@ require 'time'
16
16
  module AutosdeOpenapiClient
17
17
  # JobCreate
18
18
  class JobCreate
19
- # task_args
20
- attr_accessor :task_args
19
+ # task_kwargs
20
+ attr_accessor :task_kwargs
21
21
 
22
22
  # task_name
23
23
  attr_accessor :task_name
@@ -25,7 +25,7 @@ module AutosdeOpenapiClient
25
25
  # Attribute mapping from ruby-style variable name to JSON key.
26
26
  def self.attribute_map
27
27
  {
28
- :'task_args' => :'task_args',
28
+ :'task_kwargs' => :'task_kwargs',
29
29
  :'task_name' => :'task_name'
30
30
  }
31
31
  end
@@ -38,7 +38,7 @@ module AutosdeOpenapiClient
38
38
  # Attribute type mapping.
39
39
  def self.openapi_types
40
40
  {
41
- :'task_args' => :'String',
41
+ :'task_kwargs' => :'String',
42
42
  :'task_name' => :'String'
43
43
  }
44
44
  end
@@ -64,8 +64,8 @@ module AutosdeOpenapiClient
64
64
  h[k.to_sym] = v
65
65
  }
66
66
 
67
- if attributes.key?(:'task_args')
68
- self.task_args = attributes[:'task_args']
67
+ if attributes.key?(:'task_kwargs')
68
+ self.task_kwargs = attributes[:'task_kwargs']
69
69
  end
70
70
 
71
71
  if attributes.key?(:'task_name')
@@ -91,7 +91,7 @@ module AutosdeOpenapiClient
91
91
  def ==(o)
92
92
  return true if self.equal?(o)
93
93
  self.class == o.class &&
94
- task_args == o.task_args &&
94
+ task_kwargs == o.task_kwargs &&
95
95
  task_name == o.task_name
96
96
  end
97
97
 
@@ -104,7 +104,7 @@ module AutosdeOpenapiClient
104
104
  # Calculates hash code according to all attributes.
105
105
  # @return [Integer] Hash code
106
106
  def hash
107
- [task_args, task_name].hash
107
+ [task_kwargs, task_name].hash
108
108
  end
109
109
 
110
110
  # Builds the object from hash