ionoscloud 6.0.2 → 6.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +2 -2
  3. data/docs/CHANGELOG.md +8 -0
  4. data/docs/api/ApplicationLoadBalancersApi.md +1586 -0
  5. data/docs/api/TargetGroupsApi.md +516 -0
  6. data/docs/models/ApplicationLoadBalancer.md +28 -0
  7. data/docs/models/ApplicationLoadBalancerEntities.md +18 -0
  8. data/docs/models/ApplicationLoadBalancerForwardingRule.md +26 -0
  9. data/docs/models/ApplicationLoadBalancerForwardingRuleProperties.md +30 -0
  10. data/docs/models/ApplicationLoadBalancerForwardingRulePut.md +24 -0
  11. data/docs/models/ApplicationLoadBalancerForwardingRules.md +30 -0
  12. data/docs/models/ApplicationLoadBalancerHttpRule.md +34 -0
  13. data/docs/models/ApplicationLoadBalancerHttpRuleCondition.md +26 -0
  14. data/docs/models/ApplicationLoadBalancerProperties.md +26 -0
  15. data/docs/models/ApplicationLoadBalancerPut.md +24 -0
  16. data/docs/models/ApplicationLoadBalancers.md +30 -0
  17. data/docs/models/TargetGroup.md +26 -0
  18. data/docs/models/TargetGroupHealthCheck.md +22 -0
  19. data/docs/models/TargetGroupHttpHealthCheck.md +28 -0
  20. data/docs/models/TargetGroupProperties.md +28 -0
  21. data/docs/models/TargetGroupPut.md +24 -0
  22. data/docs/models/TargetGroupTarget.md +26 -0
  23. data/docs/models/TargetGroups.md +30 -0
  24. data/lib/ionoscloud/api/application_load_balancers_api.rb +1690 -0
  25. data/lib/ionoscloud/api/target_groups_api.rb +530 -0
  26. data/lib/ionoscloud/api_client.rb +1 -1
  27. data/lib/ionoscloud/models/application_load_balancer.rb +319 -0
  28. data/lib/ionoscloud/models/application_load_balancer_entities.rb +226 -0
  29. data/lib/ionoscloud/models/application_load_balancer_forwarding_rule.rb +302 -0
  30. data/lib/ionoscloud/models/application_load_balancer_forwarding_rule_properties.rb +389 -0
  31. data/lib/ionoscloud/models/application_load_balancer_forwarding_rule_put.rb +285 -0
  32. data/lib/ionoscloud/models/application_load_balancer_forwarding_rules.rb +334 -0
  33. data/lib/ionoscloud/models/application_load_balancer_http_rule.rb +427 -0
  34. data/lib/ionoscloud/models/application_load_balancer_http_rule_condition.rb +355 -0
  35. data/lib/ionoscloud/models/application_load_balancer_properties.rb +314 -0
  36. data/lib/ionoscloud/models/application_load_balancer_put.rb +285 -0
  37. data/lib/ionoscloud/models/application_load_balancers.rb +334 -0
  38. data/lib/ionoscloud/models/target_group.rb +302 -0
  39. data/lib/ionoscloud/models/target_group_health_check.rb +263 -0
  40. data/lib/ionoscloud/models/target_group_http_health_check.rb +373 -0
  41. data/lib/ionoscloud/models/target_group_properties.rb +376 -0
  42. data/lib/ionoscloud/models/target_group_put.rb +285 -0
  43. data/lib/ionoscloud/models/target_group_target.rb +314 -0
  44. data/lib/ionoscloud/models/target_groups.rb +334 -0
  45. data/lib/ionoscloud/version.rb +1 -1
  46. data/lib/ionoscloud.rb +20 -0
  47. metadata +42 -2
@@ -0,0 +1,373 @@
1
+ =begin
2
+ #CLOUD API
3
+
4
+ #IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on.
5
+
6
+ The version of the OpenAPI document: 6.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.2.1-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Ionoscloud
17
+ class TargetGroupHttpHealthCheck
18
+
19
+ # The path (destination URL) for the HTTP health check request; the default is /.
20
+ attr_accessor :path
21
+
22
+
23
+ # The method for the HTTP health check.
24
+ attr_accessor :method
25
+
26
+
27
+ #
28
+ attr_accessor :match_type
29
+
30
+
31
+ # The response returned by the request, depending on the match type.
32
+ attr_accessor :response
33
+
34
+
35
+ #
36
+ attr_accessor :regex
37
+
38
+
39
+ #
40
+ attr_accessor :negate
41
+
42
+ class EnumAttributeValidator
43
+ attr_reader :datatype
44
+ attr_reader :allowable_values
45
+
46
+ def initialize(datatype, allowable_values)
47
+ @allowable_values = allowable_values.map do |value|
48
+ case datatype.to_s
49
+ when /Integer/i
50
+ value.to_i
51
+ when /Float/i
52
+ value.to_f
53
+ else
54
+ value
55
+ end
56
+ end
57
+ end
58
+
59
+ def valid?(value)
60
+ !value || allowable_values.include?(value)
61
+ end
62
+ end
63
+
64
+ # Attribute mapping from ruby-style variable name to JSON key.
65
+ def self.attribute_map
66
+ {
67
+
68
+ :'path' => :'path',
69
+
70
+ :'method' => :'method',
71
+
72
+ :'match_type' => :'matchType',
73
+
74
+ :'response' => :'response',
75
+
76
+ :'regex' => :'regex',
77
+
78
+ :'negate' => :'negate'
79
+ }
80
+ end
81
+
82
+ # Returns all the JSON keys this model knows about
83
+ def self.acceptable_attributes
84
+ attribute_map.values
85
+ end
86
+
87
+ # Attribute type mapping.
88
+ def self.openapi_types
89
+ {
90
+
91
+ :'path' => :'String',
92
+
93
+ :'method' => :'String',
94
+
95
+ :'match_type' => :'String',
96
+
97
+ :'response' => :'String',
98
+
99
+ :'regex' => :'Boolean',
100
+
101
+ :'negate' => :'Boolean'
102
+ }
103
+ end
104
+
105
+ # List of attributes with nullable: true
106
+ def self.openapi_nullable
107
+ Set.new([
108
+
109
+
110
+
111
+
112
+
113
+
114
+ ])
115
+ end
116
+
117
+ # Initializes the object
118
+ # @param [Hash] attributes Model attributes in the form of hash
119
+ def initialize(attributes = {})
120
+ if (!attributes.is_a?(Hash))
121
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Ionoscloud::TargetGroupHttpHealthCheck` initialize method"
122
+ end
123
+
124
+ # check to see if the attribute exists and convert string to symbol for hash key
125
+ attributes = attributes.each_with_object({}) { |(k, v), h|
126
+ if (!self.class.attribute_map.key?(k.to_sym))
127
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Ionoscloud::TargetGroupHttpHealthCheck`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
128
+ end
129
+ h[k.to_sym] = v
130
+ }
131
+
132
+
133
+ if attributes.key?(:'path')
134
+ self.path = attributes[:'path']
135
+ end
136
+
137
+
138
+ if attributes.key?(:'method')
139
+ self.method = attributes[:'method']
140
+ end
141
+
142
+
143
+ if attributes.key?(:'match_type')
144
+ self.match_type = attributes[:'match_type']
145
+ end
146
+
147
+
148
+ if attributes.key?(:'response')
149
+ self.response = attributes[:'response']
150
+ end
151
+
152
+
153
+ if attributes.key?(:'regex')
154
+ self.regex = attributes[:'regex']
155
+ end
156
+
157
+
158
+ if attributes.key?(:'negate')
159
+ self.negate = attributes[:'negate']
160
+ end
161
+ end
162
+
163
+ # Show invalid properties with the reasons. Usually used together with valid?
164
+ # @return Array for valid properties with the reasons
165
+ def list_invalid_properties
166
+ invalid_properties = Array.new
167
+
168
+
169
+
170
+ if @match_type.nil?
171
+ invalid_properties.push('invalid value for "match_type", match_type cannot be nil.')
172
+ end
173
+
174
+
175
+ if @response.nil?
176
+ invalid_properties.push('invalid value for "response", response cannot be nil.')
177
+ end
178
+
179
+
180
+
181
+ invalid_properties
182
+ end
183
+
184
+ # Check to see if the all the properties in the model are valid
185
+ # @return true if the model is valid
186
+ def valid?
187
+
188
+
189
+ method_validator = EnumAttributeValidator.new('String', ["HEAD", "PUT", "POST", "GET", "TRACE", "PATCH", "OPTIONS"])
190
+ return false unless method_validator.valid?(@method)
191
+
192
+ return false if @match_type.nil?
193
+ match_type_validator = EnumAttributeValidator.new('String', ["STATUS_CODE", "RESPONSE_BODY"])
194
+ return false unless match_type_validator.valid?(@match_type)
195
+
196
+ return false if @response.nil?
197
+
198
+
199
+ true
200
+ end
201
+
202
+
203
+
204
+ # Custom attribute writer method checking allowed values (enum).
205
+ # @param [Object] method Object to be assigned
206
+ def method=(method)
207
+ validator = EnumAttributeValidator.new('String', ["HEAD", "PUT", "POST", "GET", "TRACE", "PATCH", "OPTIONS"])
208
+ unless validator.valid?(method)
209
+ fail ArgumentError, "invalid value for \"method\", must be one of #{validator.allowable_values}."
210
+ end
211
+ @method = method
212
+ end
213
+
214
+
215
+ # Custom attribute writer method checking allowed values (enum).
216
+ # @param [Object] match_type Object to be assigned
217
+ def match_type=(match_type)
218
+ validator = EnumAttributeValidator.new('String', ["STATUS_CODE", "RESPONSE_BODY"])
219
+ unless validator.valid?(match_type)
220
+ fail ArgumentError, "invalid value for \"match_type\", must be one of #{validator.allowable_values}."
221
+ end
222
+ @match_type = match_type
223
+ end
224
+
225
+
226
+
227
+
228
+ # Checks equality by comparing each attribute.
229
+ # @param [Object] Object to be compared
230
+ def ==(o)
231
+ return true if self.equal?(o)
232
+ self.class == o.class &&
233
+ path == o.path &&
234
+ method == o.method &&
235
+ match_type == o.match_type &&
236
+ response == o.response &&
237
+ regex == o.regex &&
238
+ negate == o.negate
239
+ end
240
+
241
+ # @see the `==` method
242
+ # @param [Object] Object to be compared
243
+ def eql?(o)
244
+ self == o
245
+ end
246
+
247
+ # Calculates hash code according to all attributes.
248
+ # @return [Integer] Hash code
249
+ def hash
250
+ [path, method, match_type, response, regex, negate].hash
251
+ end
252
+
253
+ # Builds the object from hash
254
+ # @param [Hash] attributes Model attributes in the form of hash
255
+ # @return [Object] Returns the model itself
256
+ def self.build_from_hash(attributes)
257
+ new.build_from_hash(attributes)
258
+ end
259
+
260
+ # Builds the object from hash
261
+ # @param [Hash] attributes Model attributes in the form of hash
262
+ # @return [Object] Returns the model itself
263
+ def build_from_hash(attributes)
264
+ return nil unless attributes.is_a?(Hash)
265
+ self.class.openapi_types.each_pair do |key, type|
266
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
267
+ self.send("#{key}=", nil)
268
+ elsif type =~ /\AArray<(.*)>/i
269
+ # check to ensure the input is an array given that the attribute
270
+ # is documented as an array but the input is not
271
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
272
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
273
+ end
274
+ elsif !attributes[self.class.attribute_map[key]].nil?
275
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
276
+ end
277
+ end
278
+
279
+ self
280
+ end
281
+
282
+ # Deserializes the data based on type
283
+ # @param string type Data type
284
+ # @param string value Value to be deserialized
285
+ # @return [Object] Deserialized data
286
+ def _deserialize(type, value)
287
+ case type.to_sym
288
+ when :Time
289
+ Time.parse(value)
290
+ when :Date
291
+ Date.parse(value)
292
+ when :String
293
+ value.to_s
294
+ when :Integer
295
+ value.to_i
296
+ when :Float
297
+ value.to_f
298
+ when :Boolean
299
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
300
+ true
301
+ else
302
+ false
303
+ end
304
+ when :Object
305
+ # generic object (usually a Hash), return directly
306
+ value
307
+ when /\AArray<(?<inner_type>.+)>\z/
308
+ inner_type = Regexp.last_match[:inner_type]
309
+ value.map { |v| _deserialize(inner_type, v) }
310
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
311
+ k_type = Regexp.last_match[:k_type]
312
+ v_type = Regexp.last_match[:v_type]
313
+ {}.tap do |hash|
314
+ value.each do |k, v|
315
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
316
+ end
317
+ end
318
+ else # model
319
+ # models (e.g. Pet) or oneOf
320
+ klass = Ionoscloud.const_get(type)
321
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
322
+ end
323
+ end
324
+
325
+ # Returns the string representation of the object
326
+ # @return [String] String presentation of the object
327
+ def to_s
328
+ to_hash.to_s
329
+ end
330
+
331
+ # to_body is an alias to to_hash (backward compatibility)
332
+ # @return [Hash] Returns the object in the form of hash
333
+ def to_body
334
+ to_hash
335
+ end
336
+
337
+ # Returns the object in the form of hash
338
+ # @return [Hash] Returns the object in the form of hash
339
+ def to_hash
340
+ hash = {}
341
+ self.class.attribute_map.each_pair do |attr, param|
342
+ value = self.send(attr)
343
+ if value.nil?
344
+ is_nullable = self.class.openapi_nullable.include?(attr)
345
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
346
+ end
347
+
348
+ hash[param] = _to_hash(value)
349
+ end
350
+ hash
351
+ end
352
+
353
+ # Outputs non-array value in the form of hash
354
+ # For object, use to_hash. Otherwise, just return the value
355
+ # @param [Object] value Any valid value
356
+ # @return [Hash] Returns the value in the form of hash
357
+ def _to_hash(value)
358
+ if value.is_a?(Array)
359
+ value.compact.map { |v| _to_hash(v) }
360
+ elsif value.is_a?(Hash)
361
+ {}.tap do |hash|
362
+ value.each { |k, v| hash[k] = _to_hash(v) }
363
+ end
364
+ elsif value.respond_to? :to_hash
365
+ value.to_hash
366
+ else
367
+ value
368
+ end
369
+ end
370
+
371
+ end
372
+
373
+ end