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,302 @@
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 TargetGroup
18
+
19
+ # The resource's unique identifier.
20
+ attr_accessor :id
21
+
22
+
23
+ # The type of object that has been created.
24
+ attr_accessor :type
25
+
26
+
27
+ # URL to the object representation (absolute path).
28
+ attr_accessor :href
29
+
30
+
31
+ attr_accessor :metadata
32
+
33
+
34
+ attr_accessor :properties
35
+
36
+ # Attribute mapping from ruby-style variable name to JSON key.
37
+ def self.attribute_map
38
+ {
39
+
40
+ :'id' => :'id',
41
+
42
+ :'type' => :'type',
43
+
44
+ :'href' => :'href',
45
+
46
+ :'metadata' => :'metadata',
47
+
48
+ :'properties' => :'properties'
49
+ }
50
+ end
51
+
52
+ # Returns all the JSON keys this model knows about
53
+ def self.acceptable_attributes
54
+ attribute_map.values
55
+ end
56
+
57
+ # Attribute type mapping.
58
+ def self.openapi_types
59
+ {
60
+
61
+ :'id' => :'String',
62
+
63
+ :'type' => :'Type',
64
+
65
+ :'href' => :'String',
66
+
67
+ :'metadata' => :'DatacenterElementMetadata',
68
+
69
+ :'properties' => :'TargetGroupProperties'
70
+ }
71
+ end
72
+
73
+ # List of attributes with nullable: true
74
+ def self.openapi_nullable
75
+ Set.new([
76
+
77
+
78
+
79
+
80
+
81
+ ])
82
+ end
83
+
84
+ # Initializes the object
85
+ # @param [Hash] attributes Model attributes in the form of hash
86
+ def initialize(attributes = {})
87
+ if (!attributes.is_a?(Hash))
88
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Ionoscloud::TargetGroup` initialize method"
89
+ end
90
+
91
+ # check to see if the attribute exists and convert string to symbol for hash key
92
+ attributes = attributes.each_with_object({}) { |(k, v), h|
93
+ if (!self.class.attribute_map.key?(k.to_sym))
94
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Ionoscloud::TargetGroup`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
95
+ end
96
+ h[k.to_sym] = v
97
+ }
98
+
99
+
100
+ if attributes.key?(:'id')
101
+ self.id = attributes[:'id']
102
+ end
103
+
104
+
105
+ if attributes.key?(:'type')
106
+ self.type = attributes[:'type']
107
+ end
108
+
109
+
110
+ if attributes.key?(:'href')
111
+ self.href = attributes[:'href']
112
+ end
113
+
114
+
115
+ if attributes.key?(:'metadata')
116
+ self.metadata = attributes[:'metadata']
117
+ end
118
+
119
+
120
+ if attributes.key?(:'properties')
121
+ self.properties = attributes[:'properties']
122
+ end
123
+ end
124
+
125
+ # Show invalid properties with the reasons. Usually used together with valid?
126
+ # @return Array for valid properties with the reasons
127
+ def list_invalid_properties
128
+ invalid_properties = Array.new
129
+
130
+
131
+
132
+
133
+
134
+ if @properties.nil?
135
+ invalid_properties.push('invalid value for "properties", properties cannot be nil.')
136
+ end
137
+
138
+ invalid_properties
139
+ end
140
+
141
+ # Check to see if the all the properties in the model are valid
142
+ # @return true if the model is valid
143
+ def valid?
144
+
145
+
146
+
147
+
148
+
149
+ return false if @properties.nil?
150
+ true
151
+ end
152
+
153
+
154
+
155
+
156
+
157
+
158
+ # Checks equality by comparing each attribute.
159
+ # @param [Object] Object to be compared
160
+ def ==(o)
161
+ return true if self.equal?(o)
162
+ self.class == o.class &&
163
+ id == o.id &&
164
+ type == o.type &&
165
+ href == o.href &&
166
+ metadata == o.metadata &&
167
+ properties == o.properties
168
+ end
169
+
170
+ # @see the `==` method
171
+ # @param [Object] Object to be compared
172
+ def eql?(o)
173
+ self == o
174
+ end
175
+
176
+ # Calculates hash code according to all attributes.
177
+ # @return [Integer] Hash code
178
+ def hash
179
+ [id, type, href, metadata, properties].hash
180
+ end
181
+
182
+ # Builds the object from hash
183
+ # @param [Hash] attributes Model attributes in the form of hash
184
+ # @return [Object] Returns the model itself
185
+ def self.build_from_hash(attributes)
186
+ new.build_from_hash(attributes)
187
+ end
188
+
189
+ # Builds the object from hash
190
+ # @param [Hash] attributes Model attributes in the form of hash
191
+ # @return [Object] Returns the model itself
192
+ def build_from_hash(attributes)
193
+ return nil unless attributes.is_a?(Hash)
194
+ self.class.openapi_types.each_pair do |key, type|
195
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
196
+ self.send("#{key}=", nil)
197
+ elsif type =~ /\AArray<(.*)>/i
198
+ # check to ensure the input is an array given that the attribute
199
+ # is documented as an array but the input is not
200
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
201
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
202
+ end
203
+ elsif !attributes[self.class.attribute_map[key]].nil?
204
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
205
+ end
206
+ end
207
+
208
+ self
209
+ end
210
+
211
+ # Deserializes the data based on type
212
+ # @param string type Data type
213
+ # @param string value Value to be deserialized
214
+ # @return [Object] Deserialized data
215
+ def _deserialize(type, value)
216
+ case type.to_sym
217
+ when :Time
218
+ Time.parse(value)
219
+ when :Date
220
+ Date.parse(value)
221
+ when :String
222
+ value.to_s
223
+ when :Integer
224
+ value.to_i
225
+ when :Float
226
+ value.to_f
227
+ when :Boolean
228
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
229
+ true
230
+ else
231
+ false
232
+ end
233
+ when :Object
234
+ # generic object (usually a Hash), return directly
235
+ value
236
+ when /\AArray<(?<inner_type>.+)>\z/
237
+ inner_type = Regexp.last_match[:inner_type]
238
+ value.map { |v| _deserialize(inner_type, v) }
239
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
240
+ k_type = Regexp.last_match[:k_type]
241
+ v_type = Regexp.last_match[:v_type]
242
+ {}.tap do |hash|
243
+ value.each do |k, v|
244
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
245
+ end
246
+ end
247
+ else # model
248
+ # models (e.g. Pet) or oneOf
249
+ klass = Ionoscloud.const_get(type)
250
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
251
+ end
252
+ end
253
+
254
+ # Returns the string representation of the object
255
+ # @return [String] String presentation of the object
256
+ def to_s
257
+ to_hash.to_s
258
+ end
259
+
260
+ # to_body is an alias to to_hash (backward compatibility)
261
+ # @return [Hash] Returns the object in the form of hash
262
+ def to_body
263
+ to_hash
264
+ end
265
+
266
+ # Returns the object in the form of hash
267
+ # @return [Hash] Returns the object in the form of hash
268
+ def to_hash
269
+ hash = {}
270
+ self.class.attribute_map.each_pair do |attr, param|
271
+ value = self.send(attr)
272
+ if value.nil?
273
+ is_nullable = self.class.openapi_nullable.include?(attr)
274
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
275
+ end
276
+
277
+ hash[param] = _to_hash(value)
278
+ end
279
+ hash
280
+ end
281
+
282
+ # Outputs non-array value in the form of hash
283
+ # For object, use to_hash. Otherwise, just return the value
284
+ # @param [Object] value Any valid value
285
+ # @return [Hash] Returns the value in the form of hash
286
+ def _to_hash(value)
287
+ if value.is_a?(Array)
288
+ value.compact.map { |v| _to_hash(v) }
289
+ elsif value.is_a?(Hash)
290
+ {}.tap do |hash|
291
+ value.each { |k, v| hash[k] = _to_hash(v) }
292
+ end
293
+ elsif value.respond_to? :to_hash
294
+ value.to_hash
295
+ else
296
+ value
297
+ end
298
+ end
299
+
300
+ end
301
+
302
+ end
@@ -0,0 +1,263 @@
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 TargetGroupHealthCheck
18
+
19
+ # The maximum time in milliseconds to wait for a target to respond to a check. For target VMs with 'Check Interval' set, the lesser of the two values is used once the TCP connection is established.
20
+ attr_accessor :check_timeout
21
+
22
+
23
+ # The interval in milliseconds between consecutive health checks; default is 2000.
24
+ attr_accessor :check_interval
25
+
26
+
27
+ # The maximum number of attempts to reconnect to a target after a connection failure. Valid range is 0 to 65535, and default is three reconnection attempts.
28
+ attr_accessor :retries
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+
34
+ :'check_timeout' => :'checkTimeout',
35
+
36
+ :'check_interval' => :'checkInterval',
37
+
38
+ :'retries' => :'retries'
39
+ }
40
+ end
41
+
42
+ # Returns all the JSON keys this model knows about
43
+ def self.acceptable_attributes
44
+ attribute_map.values
45
+ end
46
+
47
+ # Attribute type mapping.
48
+ def self.openapi_types
49
+ {
50
+
51
+ :'check_timeout' => :'Integer',
52
+
53
+ :'check_interval' => :'Integer',
54
+
55
+ :'retries' => :'Integer'
56
+ }
57
+ end
58
+
59
+ # List of attributes with nullable: true
60
+ def self.openapi_nullable
61
+ Set.new([
62
+
63
+
64
+
65
+ ])
66
+ end
67
+
68
+ # Initializes the object
69
+ # @param [Hash] attributes Model attributes in the form of hash
70
+ def initialize(attributes = {})
71
+ if (!attributes.is_a?(Hash))
72
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Ionoscloud::TargetGroupHealthCheck` initialize method"
73
+ end
74
+
75
+ # check to see if the attribute exists and convert string to symbol for hash key
76
+ attributes = attributes.each_with_object({}) { |(k, v), h|
77
+ if (!self.class.attribute_map.key?(k.to_sym))
78
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Ionoscloud::TargetGroupHealthCheck`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
79
+ end
80
+ h[k.to_sym] = v
81
+ }
82
+
83
+
84
+ if attributes.key?(:'check_timeout')
85
+ self.check_timeout = attributes[:'check_timeout']
86
+ end
87
+
88
+
89
+ if attributes.key?(:'check_interval')
90
+ self.check_interval = attributes[:'check_interval']
91
+ end
92
+
93
+
94
+ if attributes.key?(:'retries')
95
+ self.retries = attributes[:'retries']
96
+ end
97
+ end
98
+
99
+ # Show invalid properties with the reasons. Usually used together with valid?
100
+ # @return Array for valid properties with the reasons
101
+ def list_invalid_properties
102
+ invalid_properties = Array.new
103
+
104
+
105
+
106
+ invalid_properties
107
+ end
108
+
109
+ # Check to see if the all the properties in the model are valid
110
+ # @return true if the model is valid
111
+ def valid?
112
+
113
+
114
+
115
+ true
116
+ end
117
+
118
+
119
+
120
+
121
+ # Checks equality by comparing each attribute.
122
+ # @param [Object] Object to be compared
123
+ def ==(o)
124
+ return true if self.equal?(o)
125
+ self.class == o.class &&
126
+ check_timeout == o.check_timeout &&
127
+ check_interval == o.check_interval &&
128
+ retries == o.retries
129
+ end
130
+
131
+ # @see the `==` method
132
+ # @param [Object] Object to be compared
133
+ def eql?(o)
134
+ self == o
135
+ end
136
+
137
+ # Calculates hash code according to all attributes.
138
+ # @return [Integer] Hash code
139
+ def hash
140
+ [check_timeout, check_interval, retries].hash
141
+ end
142
+
143
+ # Builds the object from hash
144
+ # @param [Hash] attributes Model attributes in the form of hash
145
+ # @return [Object] Returns the model itself
146
+ def self.build_from_hash(attributes)
147
+ new.build_from_hash(attributes)
148
+ end
149
+
150
+ # Builds the object from hash
151
+ # @param [Hash] attributes Model attributes in the form of hash
152
+ # @return [Object] Returns the model itself
153
+ def build_from_hash(attributes)
154
+ return nil unless attributes.is_a?(Hash)
155
+ self.class.openapi_types.each_pair do |key, type|
156
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
157
+ self.send("#{key}=", nil)
158
+ elsif type =~ /\AArray<(.*)>/i
159
+ # check to ensure the input is an array given that the attribute
160
+ # is documented as an array but the input is not
161
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
162
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
163
+ end
164
+ elsif !attributes[self.class.attribute_map[key]].nil?
165
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
166
+ end
167
+ end
168
+
169
+ self
170
+ end
171
+
172
+ # Deserializes the data based on type
173
+ # @param string type Data type
174
+ # @param string value Value to be deserialized
175
+ # @return [Object] Deserialized data
176
+ def _deserialize(type, value)
177
+ case type.to_sym
178
+ when :Time
179
+ Time.parse(value)
180
+ when :Date
181
+ Date.parse(value)
182
+ when :String
183
+ value.to_s
184
+ when :Integer
185
+ value.to_i
186
+ when :Float
187
+ value.to_f
188
+ when :Boolean
189
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
190
+ true
191
+ else
192
+ false
193
+ end
194
+ when :Object
195
+ # generic object (usually a Hash), return directly
196
+ value
197
+ when /\AArray<(?<inner_type>.+)>\z/
198
+ inner_type = Regexp.last_match[:inner_type]
199
+ value.map { |v| _deserialize(inner_type, v) }
200
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
201
+ k_type = Regexp.last_match[:k_type]
202
+ v_type = Regexp.last_match[:v_type]
203
+ {}.tap do |hash|
204
+ value.each do |k, v|
205
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
206
+ end
207
+ end
208
+ else # model
209
+ # models (e.g. Pet) or oneOf
210
+ klass = Ionoscloud.const_get(type)
211
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
212
+ end
213
+ end
214
+
215
+ # Returns the string representation of the object
216
+ # @return [String] String presentation of the object
217
+ def to_s
218
+ to_hash.to_s
219
+ end
220
+
221
+ # to_body is an alias to to_hash (backward compatibility)
222
+ # @return [Hash] Returns the object in the form of hash
223
+ def to_body
224
+ to_hash
225
+ end
226
+
227
+ # Returns the object in the form of hash
228
+ # @return [Hash] Returns the object in the form of hash
229
+ def to_hash
230
+ hash = {}
231
+ self.class.attribute_map.each_pair do |attr, param|
232
+ value = self.send(attr)
233
+ if value.nil?
234
+ is_nullable = self.class.openapi_nullable.include?(attr)
235
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
236
+ end
237
+
238
+ hash[param] = _to_hash(value)
239
+ end
240
+ hash
241
+ end
242
+
243
+ # Outputs non-array value in the form of hash
244
+ # For object, use to_hash. Otherwise, just return the value
245
+ # @param [Object] value Any valid value
246
+ # @return [Hash] Returns the value in the form of hash
247
+ def _to_hash(value)
248
+ if value.is_a?(Array)
249
+ value.compact.map { |v| _to_hash(v) }
250
+ elsif value.is_a?(Hash)
251
+ {}.tap do |hash|
252
+ value.each { |k, v| hash[k] = _to_hash(v) }
253
+ end
254
+ elsif value.respond_to? :to_hash
255
+ value.to_hash
256
+ else
257
+ value
258
+ end
259
+ end
260
+
261
+ end
262
+
263
+ end