smplkit 3.0.117 → 3.0.119

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.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/api/retry_policies_api.rb +364 -0
  3. data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/api/runs_api.rb +9 -6
  4. data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/error.rb +213 -0
  5. data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/error_response.rb +167 -0
  6. data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/job.rb +12 -1
  7. data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/job_environment.rb +12 -1
  8. data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/retry_on.rb +185 -0
  9. data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/retry_policy.rb +396 -0
  10. data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/retry_policy_create_request.rb +165 -0
  11. data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/retry_policy_create_resource.rb +237 -0
  12. data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/retry_policy_list_response.rb +193 -0
  13. data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/retry_policy_request.rb +165 -0
  14. data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/retry_policy_resource.rb +186 -0
  15. data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/retry_policy_response.rb +165 -0
  16. data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/run.rb +15 -4
  17. data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/run_list_meta.rb +1 -1
  18. data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/run_retry.rb +193 -0
  19. data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client.rb +12 -0
  20. data/lib/smplkit/_generated/jobs/spec/api/retry_policies_api_spec.rb +100 -0
  21. data/lib/smplkit/_generated/jobs/spec/api/runs_api_spec.rb +4 -3
  22. data/lib/smplkit/_generated/jobs/spec/models/error_response_spec.rb +36 -0
  23. data/lib/smplkit/_generated/jobs/spec/models/error_spec.rb +54 -0
  24. data/lib/smplkit/_generated/jobs/spec/models/job_environment_spec.rb +6 -0
  25. data/lib/smplkit/_generated/jobs/spec/models/job_spec.rb +6 -0
  26. data/lib/smplkit/_generated/jobs/spec/models/retry_on_spec.rb +46 -0
  27. data/lib/smplkit/_generated/jobs/spec/models/retry_policy_create_request_spec.rb +36 -0
  28. data/lib/smplkit/_generated/jobs/spec/models/retry_policy_create_resource_spec.rb +52 -0
  29. data/lib/smplkit/_generated/jobs/spec/models/retry_policy_list_response_spec.rb +42 -0
  30. data/lib/smplkit/_generated/jobs/spec/models/retry_policy_request_spec.rb +36 -0
  31. data/lib/smplkit/_generated/jobs/spec/models/retry_policy_resource_spec.rb +48 -0
  32. data/lib/smplkit/_generated/jobs/spec/models/retry_policy_response_spec.rb +36 -0
  33. data/lib/smplkit/_generated/jobs/spec/models/retry_policy_spec.rb +94 -0
  34. data/lib/smplkit/_generated/jobs/spec/models/run_retry_spec.rb +42 -0
  35. data/lib/smplkit/_generated/jobs/spec/models/run_spec.rb +7 -1
  36. metadata +25 -1
@@ -0,0 +1,396 @@
1
+ =begin
2
+ #smplkit Jobs API
3
+
4
+ #Scheduled HTTP job execution API for smplkit.
5
+
6
+ The version of the OpenAPI document: 0.1.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.22.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module SmplkitGeneratedClient::Jobs
17
+ # A named, reusable automatic-retry policy. A policy decides whether and how a failed run is retried. Reference it from a job's `retry_policy` (and optionally override it per environment). A job that references nothing uses the built-in `Default` policy, which never retries.
18
+ class RetryPolicy < ApiModelBase
19
+ # Human-readable name for the policy.
20
+ attr_accessor :name
21
+
22
+ # How many times a failed run is retried, after the initial attempt — so `max_retries` of 3 means up to 4 attempts in total. `0` disables retries. Maximum 10.
23
+ attr_accessor :max_retries
24
+
25
+ # How the wait between retries grows. `fixed` waits `delay_seconds` before every retry. `exponential` doubles the wait each time — `delay_seconds`, then `2×`, `4×`, … — capped at `max_delay_seconds`.
26
+ attr_accessor :backoff
27
+
28
+ # The wait before a retry, in seconds. For `fixed` backoff it is the constant wait before every retry; for `exponential` it is the base wait that doubles each retry.
29
+ attr_accessor :delay_seconds
30
+
31
+ # The ceiling on the wait between retries, in seconds, for `exponential` backoff — once the doubling reaches it, every subsequent retry waits this long. Only valid with `exponential` backoff; omit it for `fixed`.
32
+ attr_accessor :max_delay_seconds
33
+
34
+ # Which failures are retried. A run is retried only when its failure matches this set; an empty set retries nothing. Some failures are never retried regardless of this value.
35
+ attr_accessor :retry_on
36
+
37
+ # When the policy was created.
38
+ attr_accessor :created_at
39
+
40
+ # When the policy was last modified.
41
+ attr_accessor :updated_at
42
+
43
+ # When the policy was deleted. `null` for active policies.
44
+ attr_accessor :deleted_at
45
+
46
+ # Monotonic counter incremented on every update, starting at 1.
47
+ attr_accessor :version
48
+
49
+ class EnumAttributeValidator
50
+ attr_reader :datatype
51
+ attr_reader :allowable_values
52
+
53
+ def initialize(datatype, allowable_values)
54
+ @allowable_values = allowable_values.map do |value|
55
+ case datatype.to_s
56
+ when /Integer/i
57
+ value.to_i
58
+ when /Float/i
59
+ value.to_f
60
+ else
61
+ value
62
+ end
63
+ end
64
+ end
65
+
66
+ def valid?(value)
67
+ !value || allowable_values.include?(value)
68
+ end
69
+ end
70
+
71
+ # Attribute mapping from ruby-style variable name to JSON key.
72
+ def self.attribute_map
73
+ {
74
+ :'name' => :'name',
75
+ :'max_retries' => :'max_retries',
76
+ :'backoff' => :'backoff',
77
+ :'delay_seconds' => :'delay_seconds',
78
+ :'max_delay_seconds' => :'max_delay_seconds',
79
+ :'retry_on' => :'retry_on',
80
+ :'created_at' => :'created_at',
81
+ :'updated_at' => :'updated_at',
82
+ :'deleted_at' => :'deleted_at',
83
+ :'version' => :'version'
84
+ }
85
+ end
86
+
87
+ # Returns attribute mapping this model knows about
88
+ def self.acceptable_attribute_map
89
+ attribute_map
90
+ end
91
+
92
+ # Returns all the JSON keys this model knows about
93
+ def self.acceptable_attributes
94
+ acceptable_attribute_map.values
95
+ end
96
+
97
+ # Attribute type mapping.
98
+ def self.openapi_types
99
+ {
100
+ :'name' => :'String',
101
+ :'max_retries' => :'Integer',
102
+ :'backoff' => :'String',
103
+ :'delay_seconds' => :'Integer',
104
+ :'max_delay_seconds' => :'Integer',
105
+ :'retry_on' => :'RetryOn',
106
+ :'created_at' => :'Time',
107
+ :'updated_at' => :'Time',
108
+ :'deleted_at' => :'Time',
109
+ :'version' => :'Integer'
110
+ }
111
+ end
112
+
113
+ # List of attributes with nullable: true
114
+ def self.openapi_nullable
115
+ Set.new([
116
+ :'max_delay_seconds',
117
+ :'created_at',
118
+ :'updated_at',
119
+ :'deleted_at',
120
+ :'version'
121
+ ])
122
+ end
123
+
124
+ # Initializes the object
125
+ # @param [Hash] attributes Model attributes in the form of hash
126
+ def initialize(attributes = {})
127
+ if (!attributes.is_a?(Hash))
128
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SmplkitGeneratedClient::Jobs::RetryPolicy` initialize method"
129
+ end
130
+
131
+ # check to see if the attribute exists and convert string to symbol for hash key
132
+ acceptable_attribute_map = self.class.acceptable_attribute_map
133
+ attributes = attributes.each_with_object({}) { |(k, v), h|
134
+ if (!acceptable_attribute_map.key?(k.to_sym))
135
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SmplkitGeneratedClient::Jobs::RetryPolicy`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
136
+ end
137
+ h[k.to_sym] = v
138
+ }
139
+
140
+ if attributes.key?(:'name')
141
+ self.name = attributes[:'name']
142
+ else
143
+ self.name = nil
144
+ end
145
+
146
+ if attributes.key?(:'max_retries')
147
+ self.max_retries = attributes[:'max_retries']
148
+ else
149
+ self.max_retries = nil
150
+ end
151
+
152
+ if attributes.key?(:'backoff')
153
+ self.backoff = attributes[:'backoff']
154
+ else
155
+ self.backoff = nil
156
+ end
157
+
158
+ if attributes.key?(:'delay_seconds')
159
+ self.delay_seconds = attributes[:'delay_seconds']
160
+ else
161
+ self.delay_seconds = nil
162
+ end
163
+
164
+ if attributes.key?(:'max_delay_seconds')
165
+ self.max_delay_seconds = attributes[:'max_delay_seconds']
166
+ end
167
+
168
+ if attributes.key?(:'retry_on')
169
+ self.retry_on = attributes[:'retry_on']
170
+ end
171
+
172
+ if attributes.key?(:'created_at')
173
+ self.created_at = attributes[:'created_at']
174
+ end
175
+
176
+ if attributes.key?(:'updated_at')
177
+ self.updated_at = attributes[:'updated_at']
178
+ end
179
+
180
+ if attributes.key?(:'deleted_at')
181
+ self.deleted_at = attributes[:'deleted_at']
182
+ end
183
+
184
+ if attributes.key?(:'version')
185
+ self.version = attributes[:'version']
186
+ end
187
+ end
188
+
189
+ # Show invalid properties with the reasons. Usually used together with valid?
190
+ # @return Array for valid properties with the reasons
191
+ def list_invalid_properties
192
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
193
+ invalid_properties = Array.new
194
+ if @name.nil?
195
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
196
+ end
197
+
198
+ if @name.to_s.length > 200
199
+ invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 200.')
200
+ end
201
+
202
+ if @name.to_s.length < 1
203
+ invalid_properties.push('invalid value for "name", the character length must be greater than or equal to 1.')
204
+ end
205
+
206
+ if @max_retries.nil?
207
+ invalid_properties.push('invalid value for "max_retries", max_retries cannot be nil.')
208
+ end
209
+
210
+ if @max_retries > 10
211
+ invalid_properties.push('invalid value for "max_retries", must be smaller than or equal to 10.')
212
+ end
213
+
214
+ if @max_retries < 0
215
+ invalid_properties.push('invalid value for "max_retries", must be greater than or equal to 0.')
216
+ end
217
+
218
+ if @backoff.nil?
219
+ invalid_properties.push('invalid value for "backoff", backoff cannot be nil.')
220
+ end
221
+
222
+ if @delay_seconds.nil?
223
+ invalid_properties.push('invalid value for "delay_seconds", delay_seconds cannot be nil.')
224
+ end
225
+
226
+ if @delay_seconds < 1
227
+ invalid_properties.push('invalid value for "delay_seconds", must be greater than or equal to 1.')
228
+ end
229
+
230
+ if !@max_delay_seconds.nil? && @max_delay_seconds < 1
231
+ invalid_properties.push('invalid value for "max_delay_seconds", must be greater than or equal to 1.')
232
+ end
233
+
234
+ invalid_properties
235
+ end
236
+
237
+ # Check to see if the all the properties in the model are valid
238
+ # @return true if the model is valid
239
+ def valid?
240
+ warn '[DEPRECATED] the `valid?` method is obsolete'
241
+ return false if @name.nil?
242
+ return false if @name.to_s.length > 200
243
+ return false if @name.to_s.length < 1
244
+ return false if @max_retries.nil?
245
+ return false if @max_retries > 10
246
+ return false if @max_retries < 0
247
+ return false if @backoff.nil?
248
+ backoff_validator = EnumAttributeValidator.new('String', ["fixed", "exponential"])
249
+ return false unless backoff_validator.valid?(@backoff)
250
+ return false if @delay_seconds.nil?
251
+ return false if @delay_seconds < 1
252
+ return false if !@max_delay_seconds.nil? && @max_delay_seconds < 1
253
+ true
254
+ end
255
+
256
+ # Custom attribute writer method with validation
257
+ # @param [Object] name Value to be assigned
258
+ def name=(name)
259
+ if name.nil?
260
+ fail ArgumentError, 'name cannot be nil'
261
+ end
262
+
263
+ if name.to_s.length > 200
264
+ fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 200.'
265
+ end
266
+
267
+ if name.to_s.length < 1
268
+ fail ArgumentError, 'invalid value for "name", the character length must be greater than or equal to 1.'
269
+ end
270
+
271
+ @name = name
272
+ end
273
+
274
+ # Custom attribute writer method with validation
275
+ # @param [Object] max_retries Value to be assigned
276
+ def max_retries=(max_retries)
277
+ if max_retries.nil?
278
+ fail ArgumentError, 'max_retries cannot be nil'
279
+ end
280
+
281
+ if max_retries > 10
282
+ fail ArgumentError, 'invalid value for "max_retries", must be smaller than or equal to 10.'
283
+ end
284
+
285
+ if max_retries < 0
286
+ fail ArgumentError, 'invalid value for "max_retries", must be greater than or equal to 0.'
287
+ end
288
+
289
+ @max_retries = max_retries
290
+ end
291
+
292
+ # Custom attribute writer method checking allowed values (enum).
293
+ # @param [Object] backoff Object to be assigned
294
+ def backoff=(backoff)
295
+ validator = EnumAttributeValidator.new('String', ["fixed", "exponential"])
296
+ unless validator.valid?(backoff)
297
+ fail ArgumentError, "invalid value for \"backoff\", must be one of #{validator.allowable_values}."
298
+ end
299
+ @backoff = backoff
300
+ end
301
+
302
+ # Custom attribute writer method with validation
303
+ # @param [Object] delay_seconds Value to be assigned
304
+ def delay_seconds=(delay_seconds)
305
+ if delay_seconds.nil?
306
+ fail ArgumentError, 'delay_seconds cannot be nil'
307
+ end
308
+
309
+ if delay_seconds < 1
310
+ fail ArgumentError, 'invalid value for "delay_seconds", must be greater than or equal to 1.'
311
+ end
312
+
313
+ @delay_seconds = delay_seconds
314
+ end
315
+
316
+ # Custom attribute writer method with validation
317
+ # @param [Object] max_delay_seconds Value to be assigned
318
+ def max_delay_seconds=(max_delay_seconds)
319
+ if !max_delay_seconds.nil? && max_delay_seconds < 1
320
+ fail ArgumentError, 'invalid value for "max_delay_seconds", must be greater than or equal to 1.'
321
+ end
322
+
323
+ @max_delay_seconds = max_delay_seconds
324
+ end
325
+
326
+ # Checks equality by comparing each attribute.
327
+ # @param [Object] Object to be compared
328
+ def ==(o)
329
+ return true if self.equal?(o)
330
+ self.class == o.class &&
331
+ name == o.name &&
332
+ max_retries == o.max_retries &&
333
+ backoff == o.backoff &&
334
+ delay_seconds == o.delay_seconds &&
335
+ max_delay_seconds == o.max_delay_seconds &&
336
+ retry_on == o.retry_on &&
337
+ created_at == o.created_at &&
338
+ updated_at == o.updated_at &&
339
+ deleted_at == o.deleted_at &&
340
+ version == o.version
341
+ end
342
+
343
+ # @see the `==` method
344
+ # @param [Object] Object to be compared
345
+ def eql?(o)
346
+ self == o
347
+ end
348
+
349
+ # Calculates hash code according to all attributes.
350
+ # @return [Integer] Hash code
351
+ def hash
352
+ [name, max_retries, backoff, delay_seconds, max_delay_seconds, retry_on, created_at, updated_at, deleted_at, version].hash
353
+ end
354
+
355
+ # Builds the object from hash
356
+ # @param [Hash] attributes Model attributes in the form of hash
357
+ # @return [Object] Returns the model itself
358
+ def self.build_from_hash(attributes)
359
+ return nil unless attributes.is_a?(Hash)
360
+ attributes = attributes.transform_keys(&:to_sym)
361
+ transformed_hash = {}
362
+ openapi_types.each_pair do |key, type|
363
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
364
+ transformed_hash["#{key}"] = nil
365
+ elsif type =~ /\AArray<(.*)>/i
366
+ # check to ensure the input is an array given that the attribute
367
+ # is documented as an array but the input is not
368
+ if attributes[attribute_map[key]].is_a?(Array)
369
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
370
+ end
371
+ elsif !attributes[attribute_map[key]].nil?
372
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
373
+ end
374
+ end
375
+ new(transformed_hash)
376
+ end
377
+
378
+ # Returns the object in the form of hash
379
+ # @return [Hash] Returns the object in the form of hash
380
+ def to_hash
381
+ hash = {}
382
+ self.class.attribute_map.each_pair do |attr, param|
383
+ value = self.send(attr)
384
+ if value.nil?
385
+ is_nullable = self.class.openapi_nullable.include?(attr)
386
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
387
+ end
388
+
389
+ hash[param] = _to_hash(value)
390
+ end
391
+ hash
392
+ end
393
+
394
+ end
395
+
396
+ end
@@ -0,0 +1,165 @@
1
+ =begin
2
+ #smplkit Jobs API
3
+
4
+ #Scheduled HTTP job execution API for smplkit.
5
+
6
+ The version of the OpenAPI document: 0.1.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.22.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module SmplkitGeneratedClient::Jobs
17
+ # JSON:API request envelope for creating a retry policy (caller-supplied `data.id`).
18
+ class RetryPolicyCreateRequest < ApiModelBase
19
+ attr_accessor :data
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'data' => :'data'
25
+ }
26
+ end
27
+
28
+ # Returns attribute mapping this model knows about
29
+ def self.acceptable_attribute_map
30
+ attribute_map
31
+ end
32
+
33
+ # Returns all the JSON keys this model knows about
34
+ def self.acceptable_attributes
35
+ acceptable_attribute_map.values
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.openapi_types
40
+ {
41
+ :'data' => :'RetryPolicyCreateResource'
42
+ }
43
+ end
44
+
45
+ # List of attributes with nullable: true
46
+ def self.openapi_nullable
47
+ Set.new([
48
+ ])
49
+ end
50
+
51
+ # Initializes the object
52
+ # @param [Hash] attributes Model attributes in the form of hash
53
+ def initialize(attributes = {})
54
+ if (!attributes.is_a?(Hash))
55
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SmplkitGeneratedClient::Jobs::RetryPolicyCreateRequest` initialize method"
56
+ end
57
+
58
+ # check to see if the attribute exists and convert string to symbol for hash key
59
+ acceptable_attribute_map = self.class.acceptable_attribute_map
60
+ attributes = attributes.each_with_object({}) { |(k, v), h|
61
+ if (!acceptable_attribute_map.key?(k.to_sym))
62
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SmplkitGeneratedClient::Jobs::RetryPolicyCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
63
+ end
64
+ h[k.to_sym] = v
65
+ }
66
+
67
+ if attributes.key?(:'data')
68
+ self.data = attributes[:'data']
69
+ else
70
+ self.data = nil
71
+ end
72
+ end
73
+
74
+ # Show invalid properties with the reasons. Usually used together with valid?
75
+ # @return Array for valid properties with the reasons
76
+ def list_invalid_properties
77
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
78
+ invalid_properties = Array.new
79
+ if @data.nil?
80
+ invalid_properties.push('invalid value for "data", data cannot be nil.')
81
+ end
82
+
83
+ invalid_properties
84
+ end
85
+
86
+ # Check to see if the all the properties in the model are valid
87
+ # @return true if the model is valid
88
+ def valid?
89
+ warn '[DEPRECATED] the `valid?` method is obsolete'
90
+ return false if @data.nil?
91
+ true
92
+ end
93
+
94
+ # Custom attribute writer method with validation
95
+ # @param [Object] data Value to be assigned
96
+ def data=(data)
97
+ if data.nil?
98
+ fail ArgumentError, 'data cannot be nil'
99
+ end
100
+
101
+ @data = data
102
+ end
103
+
104
+ # Checks equality by comparing each attribute.
105
+ # @param [Object] Object to be compared
106
+ def ==(o)
107
+ return true if self.equal?(o)
108
+ self.class == o.class &&
109
+ data == o.data
110
+ end
111
+
112
+ # @see the `==` method
113
+ # @param [Object] Object to be compared
114
+ def eql?(o)
115
+ self == o
116
+ end
117
+
118
+ # Calculates hash code according to all attributes.
119
+ # @return [Integer] Hash code
120
+ def hash
121
+ [data].hash
122
+ end
123
+
124
+ # Builds the object from hash
125
+ # @param [Hash] attributes Model attributes in the form of hash
126
+ # @return [Object] Returns the model itself
127
+ def self.build_from_hash(attributes)
128
+ return nil unless attributes.is_a?(Hash)
129
+ attributes = attributes.transform_keys(&:to_sym)
130
+ transformed_hash = {}
131
+ openapi_types.each_pair do |key, type|
132
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
133
+ transformed_hash["#{key}"] = nil
134
+ elsif type =~ /\AArray<(.*)>/i
135
+ # check to ensure the input is an array given that the attribute
136
+ # is documented as an array but the input is not
137
+ if attributes[attribute_map[key]].is_a?(Array)
138
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
139
+ end
140
+ elsif !attributes[attribute_map[key]].nil?
141
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
142
+ end
143
+ end
144
+ new(transformed_hash)
145
+ end
146
+
147
+ # Returns the object in the form of hash
148
+ # @return [Hash] Returns the object in the form of hash
149
+ def to_hash
150
+ hash = {}
151
+ self.class.attribute_map.each_pair do |attr, param|
152
+ value = self.send(attr)
153
+ if value.nil?
154
+ is_nullable = self.class.openapi_nullable.include?(attr)
155
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
156
+ end
157
+
158
+ hash[param] = _to_hash(value)
159
+ end
160
+ hash
161
+ end
162
+
163
+ end
164
+
165
+ end