ionoscloud 6.0.0 → 6.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (210) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +70 -0
  3. data/README.md +10 -1
  4. data/docs/CHANGELOG.md +22 -0
  5. data/docs/README.md +2 -2
  6. data/docs/api/ApplicationLoadBalancersApi.md +1586 -0
  7. data/docs/api/BackupUnitsApi.md +14 -14
  8. data/docs/api/ContractResourcesApi.md +2 -2
  9. data/docs/api/DataCentersApi.md +15 -15
  10. data/docs/api/DefaultApi.md +2 -2
  11. data/docs/api/FirewallRulesApi.md +14 -14
  12. data/docs/api/FlowLogsApi.md +2 -2
  13. data/docs/api/IPBlocksApi.md +14 -14
  14. data/docs/api/ImagesApi.md +10 -10
  15. data/docs/api/KubernetesApi.md +30 -30
  16. data/docs/api/LANsApi.md +22 -22
  17. data/docs/api/LabelsApi.md +54 -54
  18. data/docs/api/LoadBalancersApi.md +22 -22
  19. data/docs/api/LocationsApi.md +6 -6
  20. data/docs/api/NATGatewaysApi.md +26 -26
  21. data/docs/api/NetworkInterfacesApi.md +14 -14
  22. data/docs/api/NetworkLoadBalancersApi.md +38 -38
  23. data/docs/api/PrivateCrossConnectsApi.md +10 -10
  24. data/docs/api/RequestsApi.md +8 -8
  25. data/docs/api/ServersApi.md +62 -52
  26. data/docs/api/SnapshotsApi.md +10 -10
  27. data/docs/api/TargetGroupsApi.md +516 -0
  28. data/docs/api/UserManagementApi.md +50 -50
  29. data/docs/api/UserS3KeysApi.md +12 -12
  30. data/docs/api/VolumesApi.md +18 -18
  31. data/docs/models/ApplicationLoadBalancer.md +28 -0
  32. data/docs/models/ApplicationLoadBalancerEntities.md +18 -0
  33. data/docs/models/ApplicationLoadBalancerForwardingRule.md +26 -0
  34. data/docs/models/ApplicationLoadBalancerForwardingRuleProperties.md +30 -0
  35. data/docs/models/ApplicationLoadBalancerForwardingRulePut.md +24 -0
  36. data/docs/models/ApplicationLoadBalancerForwardingRules.md +30 -0
  37. data/docs/models/ApplicationLoadBalancerHttpRule.md +34 -0
  38. data/docs/models/ApplicationLoadBalancerHttpRuleCondition.md +26 -0
  39. data/docs/models/ApplicationLoadBalancerProperties.md +26 -0
  40. data/docs/models/ApplicationLoadBalancerPut.md +24 -0
  41. data/docs/models/ApplicationLoadBalancers.md +30 -0
  42. data/docs/models/AttachedVolumes.md +1 -1
  43. data/docs/models/BackupUnits.md +1 -1
  44. data/docs/models/BalancedNics.md +1 -1
  45. data/docs/models/Cdroms.md +1 -1
  46. data/docs/models/Contracts.md +1 -1
  47. data/docs/models/Datacenters.md +1 -1
  48. data/docs/models/ErrorMessage.md +1 -1
  49. data/docs/models/FirewallRules.md +1 -1
  50. data/docs/models/FirewallruleProperties.md +1 -1
  51. data/docs/models/FlowLogs.md +1 -1
  52. data/docs/models/GroupMembers.md +1 -1
  53. data/docs/models/GroupShares.md +1 -1
  54. data/docs/models/GroupUsers.md +1 -1
  55. data/docs/models/Groups.md +1 -1
  56. data/docs/models/Images.md +1 -1
  57. data/docs/models/IpBlocks.md +3 -3
  58. data/docs/models/KubernetesClusterProperties.md +1 -1
  59. data/docs/models/KubernetesClusterPropertiesForPost.md +1 -1
  60. data/docs/models/KubernetesClusterPropertiesForPut.md +1 -1
  61. data/docs/models/KubernetesClusters.md +1 -1
  62. data/docs/models/KubernetesNodePoolProperties.md +1 -1
  63. data/docs/models/KubernetesNodePoolPropertiesForPost.md +1 -1
  64. data/docs/models/KubernetesNodePoolPropertiesForPut.md +1 -1
  65. data/docs/models/KubernetesNodePools.md +1 -1
  66. data/docs/models/KubernetesNodes.md +1 -1
  67. data/docs/models/LabelResources.md +1 -1
  68. data/docs/models/Labels.md +1 -1
  69. data/docs/models/LanNics.md +1 -1
  70. data/docs/models/Lans.md +1 -1
  71. data/docs/models/Loadbalancers.md +1 -1
  72. data/docs/models/Locations.md +1 -1
  73. data/docs/models/NatGatewayProperties.md +1 -1
  74. data/docs/models/NatGatewayRules.md +1 -1
  75. data/docs/models/NatGateways.md +1 -1
  76. data/docs/models/NetworkLoadBalancerForwardingRuleHealthCheck.md +4 -4
  77. data/docs/models/NetworkLoadBalancerForwardingRuleProperties.md +5 -5
  78. data/docs/models/NetworkLoadBalancerForwardingRuleTarget.md +3 -3
  79. data/docs/models/NetworkLoadBalancerForwardingRuleTargetHealthCheck.md +3 -3
  80. data/docs/models/NetworkLoadBalancerForwardingRules.md +1 -1
  81. data/docs/models/NetworkLoadBalancerProperties.md +2 -2
  82. data/docs/models/NetworkLoadBalancers.md +1 -1
  83. data/docs/models/NicProperties.md +3 -3
  84. data/docs/models/Nics.md +1 -1
  85. data/docs/models/PrivateCrossConnects.md +1 -1
  86. data/docs/models/Requests.md +3 -3
  87. data/docs/models/ResourceGroups.md +1 -1
  88. data/docs/models/Resources.md +1 -1
  89. data/docs/models/ResourcesUsers.md +1 -1
  90. data/docs/models/S3Keys.md +1 -1
  91. data/docs/models/Servers.md +1 -1
  92. data/docs/models/Snapshots.md +1 -1
  93. data/docs/models/TargetGroup.md +26 -0
  94. data/docs/models/TargetGroupHealthCheck.md +22 -0
  95. data/docs/models/TargetGroupHttpHealthCheck.md +28 -0
  96. data/docs/models/TargetGroupProperties.md +28 -0
  97. data/docs/models/TargetGroupPut.md +24 -0
  98. data/docs/models/TargetGroupTarget.md +26 -0
  99. data/docs/models/TargetGroups.md +30 -0
  100. data/docs/models/Templates.md +1 -1
  101. data/docs/models/Users.md +1 -1
  102. data/docs/models/VolumeProperties.md +4 -2
  103. data/docs/models/Volumes.md +1 -1
  104. data/git_push.sh +0 -3
  105. data/lib/ionoscloud/api/_api.rb +2 -2
  106. data/lib/ionoscloud/api/application_load_balancers_api.rb +1690 -0
  107. data/lib/ionoscloud/api/backup_units_api.rb +14 -14
  108. data/lib/ionoscloud/api/contract_resources_api.rb +2 -2
  109. data/lib/ionoscloud/api/data_centers_api.rb +16 -16
  110. data/lib/ionoscloud/api/firewall_rules_api.rb +14 -14
  111. data/lib/ionoscloud/api/flow_logs_api.rb +2 -2
  112. data/lib/ionoscloud/api/images_api.rb +10 -10
  113. data/lib/ionoscloud/api/ip_blocks_api.rb +14 -14
  114. data/lib/ionoscloud/api/kubernetes_api.rb +30 -30
  115. data/lib/ionoscloud/api/labels_api.rb +54 -54
  116. data/lib/ionoscloud/api/lans_api.rb +22 -22
  117. data/lib/ionoscloud/api/load_balancers_api.rb +22 -22
  118. data/lib/ionoscloud/api/locations_api.rb +6 -6
  119. data/lib/ionoscloud/api/nat_gateways_api.rb +26 -26
  120. data/lib/ionoscloud/api/network_interfaces_api.rb +14 -14
  121. data/lib/ionoscloud/api/network_load_balancers_api.rb +38 -38
  122. data/lib/ionoscloud/api/private_cross_connects_api.rb +10 -10
  123. data/lib/ionoscloud/api/requests_api.rb +8 -8
  124. data/lib/ionoscloud/api/servers_api.rb +52 -52
  125. data/lib/ionoscloud/api/snapshots_api.rb +10 -10
  126. data/lib/ionoscloud/api/target_groups_api.rb +530 -0
  127. data/lib/ionoscloud/api/user_management_api.rb +50 -50
  128. data/lib/ionoscloud/api/user_s3_keys_api.rb +12 -12
  129. data/lib/ionoscloud/api/volumes_api.rb +19 -19
  130. data/lib/ionoscloud/api_client.rb +1 -1
  131. data/lib/ionoscloud/configuration.rb +11 -26
  132. data/lib/ionoscloud/models/application_load_balancer.rb +319 -0
  133. data/lib/ionoscloud/models/application_load_balancer_entities.rb +226 -0
  134. data/lib/ionoscloud/models/application_load_balancer_forwarding_rule.rb +302 -0
  135. data/lib/ionoscloud/models/application_load_balancer_forwarding_rule_properties.rb +389 -0
  136. data/lib/ionoscloud/models/application_load_balancer_forwarding_rule_put.rb +285 -0
  137. data/lib/ionoscloud/models/application_load_balancer_forwarding_rules.rb +334 -0
  138. data/lib/ionoscloud/models/application_load_balancer_http_rule.rb +427 -0
  139. data/lib/ionoscloud/models/application_load_balancer_http_rule_condition.rb +355 -0
  140. data/lib/ionoscloud/models/application_load_balancer_properties.rb +314 -0
  141. data/lib/ionoscloud/models/application_load_balancer_put.rb +285 -0
  142. data/lib/ionoscloud/models/application_load_balancers.rb +334 -0
  143. data/lib/ionoscloud/models/attached_volumes.rb +1 -1
  144. data/lib/ionoscloud/models/backup_units.rb +1 -1
  145. data/lib/ionoscloud/models/balanced_nics.rb +1 -1
  146. data/lib/ionoscloud/models/cdroms.rb +1 -1
  147. data/lib/ionoscloud/models/contracts.rb +1 -1
  148. data/lib/ionoscloud/models/datacenters.rb +1 -1
  149. data/lib/ionoscloud/models/error_message.rb +1 -1
  150. data/lib/ionoscloud/models/firewall_rules.rb +1 -1
  151. data/lib/ionoscloud/models/firewallrule_properties.rb +6 -1
  152. data/lib/ionoscloud/models/flow_logs.rb +1 -1
  153. data/lib/ionoscloud/models/group_members.rb +1 -1
  154. data/lib/ionoscloud/models/group_shares.rb +1 -1
  155. data/lib/ionoscloud/models/group_users.rb +1 -1
  156. data/lib/ionoscloud/models/groups.rb +1 -1
  157. data/lib/ionoscloud/models/image_properties.rb +2 -2
  158. data/lib/ionoscloud/models/images.rb +1 -1
  159. data/lib/ionoscloud/models/ip_blocks.rb +3 -3
  160. data/lib/ionoscloud/models/kubernetes_cluster_properties.rb +1 -1
  161. data/lib/ionoscloud/models/kubernetes_cluster_properties_for_post.rb +1 -1
  162. data/lib/ionoscloud/models/kubernetes_cluster_properties_for_put.rb +1 -1
  163. data/lib/ionoscloud/models/kubernetes_clusters.rb +1 -1
  164. data/lib/ionoscloud/models/kubernetes_node_pool_properties.rb +1 -1
  165. data/lib/ionoscloud/models/kubernetes_node_pool_properties_for_post.rb +1 -1
  166. data/lib/ionoscloud/models/kubernetes_node_pool_properties_for_put.rb +1 -1
  167. data/lib/ionoscloud/models/kubernetes_node_pools.rb +1 -1
  168. data/lib/ionoscloud/models/kubernetes_nodes.rb +1 -1
  169. data/lib/ionoscloud/models/label_resources.rb +1 -1
  170. data/lib/ionoscloud/models/labels.rb +1 -1
  171. data/lib/ionoscloud/models/lan_nics.rb +1 -1
  172. data/lib/ionoscloud/models/lans.rb +1 -1
  173. data/lib/ionoscloud/models/loadbalancer_properties.rb +1 -0
  174. data/lib/ionoscloud/models/loadbalancers.rb +1 -1
  175. data/lib/ionoscloud/models/locations.rb +1 -1
  176. data/lib/ionoscloud/models/nat_gateway_properties.rb +1 -1
  177. data/lib/ionoscloud/models/nat_gateway_rules.rb +1 -1
  178. data/lib/ionoscloud/models/nat_gateways.rb +1 -1
  179. data/lib/ionoscloud/models/network_load_balancer_forwarding_rule_health_check.rb +4 -4
  180. data/lib/ionoscloud/models/network_load_balancer_forwarding_rule_properties.rb +5 -5
  181. data/lib/ionoscloud/models/network_load_balancer_forwarding_rule_target.rb +3 -3
  182. data/lib/ionoscloud/models/network_load_balancer_forwarding_rule_target_health_check.rb +3 -3
  183. data/lib/ionoscloud/models/network_load_balancer_forwarding_rules.rb +1 -1
  184. data/lib/ionoscloud/models/network_load_balancer_properties.rb +2 -2
  185. data/lib/ionoscloud/models/network_load_balancers.rb +1 -1
  186. data/lib/ionoscloud/models/nic_properties.rb +4 -3
  187. data/lib/ionoscloud/models/nics.rb +1 -1
  188. data/lib/ionoscloud/models/private_cross_connects.rb +1 -1
  189. data/lib/ionoscloud/models/requests.rb +3 -3
  190. data/lib/ionoscloud/models/resource_groups.rb +1 -1
  191. data/lib/ionoscloud/models/resources.rb +1 -1
  192. data/lib/ionoscloud/models/resources_users.rb +1 -1
  193. data/lib/ionoscloud/models/s3_keys.rb +1 -1
  194. data/lib/ionoscloud/models/servers.rb +1 -1
  195. data/lib/ionoscloud/models/snapshot_properties.rb +2 -2
  196. data/lib/ionoscloud/models/snapshots.rb +1 -1
  197. data/lib/ionoscloud/models/target_group.rb +302 -0
  198. data/lib/ionoscloud/models/target_group_health_check.rb +263 -0
  199. data/lib/ionoscloud/models/target_group_http_health_check.rb +373 -0
  200. data/lib/ionoscloud/models/target_group_properties.rb +376 -0
  201. data/lib/ionoscloud/models/target_group_put.rb +285 -0
  202. data/lib/ionoscloud/models/target_group_target.rb +314 -0
  203. data/lib/ionoscloud/models/target_groups.rb +334 -0
  204. data/lib/ionoscloud/models/templates.rb +1 -1
  205. data/lib/ionoscloud/models/users.rb +1 -1
  206. data/lib/ionoscloud/models/volume_properties.rb +25 -7
  207. data/lib/ionoscloud/models/volumes.rb +1 -1
  208. data/lib/ionoscloud/version.rb +1 -1
  209. data/lib/ionoscloud.rb +20 -0
  210. metadata +46 -5
@@ -0,0 +1,285 @@
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 ApplicationLoadBalancerPut
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 :properties
32
+
33
+ # Attribute mapping from ruby-style variable name to JSON key.
34
+ def self.attribute_map
35
+ {
36
+
37
+ :'id' => :'id',
38
+
39
+ :'type' => :'type',
40
+
41
+ :'href' => :'href',
42
+
43
+ :'properties' => :'properties'
44
+ }
45
+ end
46
+
47
+ # Returns all the JSON keys this model knows about
48
+ def self.acceptable_attributes
49
+ attribute_map.values
50
+ end
51
+
52
+ # Attribute type mapping.
53
+ def self.openapi_types
54
+ {
55
+
56
+ :'id' => :'String',
57
+
58
+ :'type' => :'Type',
59
+
60
+ :'href' => :'String',
61
+
62
+ :'properties' => :'ApplicationLoadBalancerProperties'
63
+ }
64
+ end
65
+
66
+ # List of attributes with nullable: true
67
+ def self.openapi_nullable
68
+ Set.new([
69
+
70
+
71
+
72
+
73
+ ])
74
+ end
75
+
76
+ # Initializes the object
77
+ # @param [Hash] attributes Model attributes in the form of hash
78
+ def initialize(attributes = {})
79
+ if (!attributes.is_a?(Hash))
80
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Ionoscloud::ApplicationLoadBalancerPut` initialize method"
81
+ end
82
+
83
+ # check to see if the attribute exists and convert string to symbol for hash key
84
+ attributes = attributes.each_with_object({}) { |(k, v), h|
85
+ if (!self.class.attribute_map.key?(k.to_sym))
86
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Ionoscloud::ApplicationLoadBalancerPut`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
87
+ end
88
+ h[k.to_sym] = v
89
+ }
90
+
91
+
92
+ if attributes.key?(:'id')
93
+ self.id = attributes[:'id']
94
+ end
95
+
96
+
97
+ if attributes.key?(:'type')
98
+ self.type = attributes[:'type']
99
+ end
100
+
101
+
102
+ if attributes.key?(:'href')
103
+ self.href = attributes[:'href']
104
+ end
105
+
106
+
107
+ if attributes.key?(:'properties')
108
+ self.properties = attributes[:'properties']
109
+ end
110
+ end
111
+
112
+ # Show invalid properties with the reasons. Usually used together with valid?
113
+ # @return Array for valid properties with the reasons
114
+ def list_invalid_properties
115
+ invalid_properties = Array.new
116
+
117
+
118
+
119
+
120
+ if @properties.nil?
121
+ invalid_properties.push('invalid value for "properties", properties cannot be nil.')
122
+ end
123
+
124
+ invalid_properties
125
+ end
126
+
127
+ # Check to see if the all the properties in the model are valid
128
+ # @return true if the model is valid
129
+ def valid?
130
+
131
+
132
+
133
+
134
+ return false if @properties.nil?
135
+ true
136
+ end
137
+
138
+
139
+
140
+
141
+
142
+ # Checks equality by comparing each attribute.
143
+ # @param [Object] Object to be compared
144
+ def ==(o)
145
+ return true if self.equal?(o)
146
+ self.class == o.class &&
147
+ id == o.id &&
148
+ type == o.type &&
149
+ href == o.href &&
150
+ properties == o.properties
151
+ end
152
+
153
+ # @see the `==` method
154
+ # @param [Object] Object to be compared
155
+ def eql?(o)
156
+ self == o
157
+ end
158
+
159
+ # Calculates hash code according to all attributes.
160
+ # @return [Integer] Hash code
161
+ def hash
162
+ [id, type, href, properties].hash
163
+ end
164
+
165
+ # Builds the object from hash
166
+ # @param [Hash] attributes Model attributes in the form of hash
167
+ # @return [Object] Returns the model itself
168
+ def self.build_from_hash(attributes)
169
+ new.build_from_hash(attributes)
170
+ end
171
+
172
+ # Builds the object from hash
173
+ # @param [Hash] attributes Model attributes in the form of hash
174
+ # @return [Object] Returns the model itself
175
+ def build_from_hash(attributes)
176
+ return nil unless attributes.is_a?(Hash)
177
+ self.class.openapi_types.each_pair do |key, type|
178
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
179
+ self.send("#{key}=", nil)
180
+ elsif type =~ /\AArray<(.*)>/i
181
+ # check to ensure the input is an array given that the attribute
182
+ # is documented as an array but the input is not
183
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
184
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
185
+ end
186
+ elsif !attributes[self.class.attribute_map[key]].nil?
187
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
188
+ end
189
+ end
190
+
191
+ self
192
+ end
193
+
194
+ # Deserializes the data based on type
195
+ # @param string type Data type
196
+ # @param string value Value to be deserialized
197
+ # @return [Object] Deserialized data
198
+ def _deserialize(type, value)
199
+ case type.to_sym
200
+ when :Time
201
+ Time.parse(value)
202
+ when :Date
203
+ Date.parse(value)
204
+ when :String
205
+ value.to_s
206
+ when :Integer
207
+ value.to_i
208
+ when :Float
209
+ value.to_f
210
+ when :Boolean
211
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
212
+ true
213
+ else
214
+ false
215
+ end
216
+ when :Object
217
+ # generic object (usually a Hash), return directly
218
+ value
219
+ when /\AArray<(?<inner_type>.+)>\z/
220
+ inner_type = Regexp.last_match[:inner_type]
221
+ value.map { |v| _deserialize(inner_type, v) }
222
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
223
+ k_type = Regexp.last_match[:k_type]
224
+ v_type = Regexp.last_match[:v_type]
225
+ {}.tap do |hash|
226
+ value.each do |k, v|
227
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
228
+ end
229
+ end
230
+ else # model
231
+ # models (e.g. Pet) or oneOf
232
+ klass = Ionoscloud.const_get(type)
233
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
234
+ end
235
+ end
236
+
237
+ # Returns the string representation of the object
238
+ # @return [String] String presentation of the object
239
+ def to_s
240
+ to_hash.to_s
241
+ end
242
+
243
+ # to_body is an alias to to_hash (backward compatibility)
244
+ # @return [Hash] Returns the object in the form of hash
245
+ def to_body
246
+ to_hash
247
+ end
248
+
249
+ # Returns the object in the form of hash
250
+ # @return [Hash] Returns the object in the form of hash
251
+ def to_hash
252
+ hash = {}
253
+ self.class.attribute_map.each_pair do |attr, param|
254
+ value = self.send(attr)
255
+ if value.nil?
256
+ is_nullable = self.class.openapi_nullable.include?(attr)
257
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
258
+ end
259
+
260
+ hash[param] = _to_hash(value)
261
+ end
262
+ hash
263
+ end
264
+
265
+ # Outputs non-array value in the form of hash
266
+ # For object, use to_hash. Otherwise, just return the value
267
+ # @param [Object] value Any valid value
268
+ # @return [Hash] Returns the value in the form of hash
269
+ def _to_hash(value)
270
+ if value.is_a?(Array)
271
+ value.compact.map { |v| _to_hash(v) }
272
+ elsif value.is_a?(Hash)
273
+ {}.tap do |hash|
274
+ value.each { |k, v| hash[k] = _to_hash(v) }
275
+ end
276
+ elsif value.respond_to? :to_hash
277
+ value.to_hash
278
+ else
279
+ value
280
+ end
281
+ end
282
+
283
+ end
284
+
285
+ end
@@ -0,0 +1,334 @@
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 ApplicationLoadBalancers
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
+ # Array of items in the collection.
32
+ attr_accessor :items
33
+
34
+
35
+ # The offset (if specified in the request).
36
+ attr_accessor :offset
37
+
38
+
39
+ # The limit (if specified in the request).
40
+ attr_accessor :limit
41
+
42
+
43
+ attr_accessor :_links
44
+
45
+ # Attribute mapping from ruby-style variable name to JSON key.
46
+ def self.attribute_map
47
+ {
48
+
49
+ :'id' => :'id',
50
+
51
+ :'type' => :'type',
52
+
53
+ :'href' => :'href',
54
+
55
+ :'items' => :'items',
56
+
57
+ :'offset' => :'offset',
58
+
59
+ :'limit' => :'limit',
60
+
61
+ :'_links' => :'_links'
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
+
74
+ :'id' => :'String',
75
+
76
+ :'type' => :'Type',
77
+
78
+ :'href' => :'String',
79
+
80
+ :'items' => :'Array<ApplicationLoadBalancer>',
81
+
82
+ :'offset' => :'Float',
83
+
84
+ :'limit' => :'Float',
85
+
86
+ :'_links' => :'PaginationLinks'
87
+ }
88
+ end
89
+
90
+ # List of attributes with nullable: true
91
+ def self.openapi_nullable
92
+ Set.new([
93
+
94
+
95
+
96
+
97
+
98
+
99
+
100
+ ])
101
+ end
102
+
103
+ # Initializes the object
104
+ # @param [Hash] attributes Model attributes in the form of hash
105
+ def initialize(attributes = {})
106
+ if (!attributes.is_a?(Hash))
107
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Ionoscloud::ApplicationLoadBalancers` initialize method"
108
+ end
109
+
110
+ # check to see if the attribute exists and convert string to symbol for hash key
111
+ attributes = attributes.each_with_object({}) { |(k, v), h|
112
+ if (!self.class.attribute_map.key?(k.to_sym))
113
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Ionoscloud::ApplicationLoadBalancers`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
114
+ end
115
+ h[k.to_sym] = v
116
+ }
117
+
118
+
119
+ if attributes.key?(:'id')
120
+ self.id = attributes[:'id']
121
+ end
122
+
123
+
124
+ if attributes.key?(:'type')
125
+ self.type = attributes[:'type']
126
+ end
127
+
128
+
129
+ if attributes.key?(:'href')
130
+ self.href = attributes[:'href']
131
+ end
132
+
133
+
134
+ if attributes.key?(:'items') && (value = attributes[:'items']).is_a?(Array)
135
+ self.items = value
136
+ end
137
+
138
+
139
+ if attributes.key?(:'offset')
140
+ self.offset = attributes[:'offset']
141
+ end
142
+
143
+
144
+ if attributes.key?(:'limit')
145
+ self.limit = attributes[:'limit']
146
+ end
147
+
148
+
149
+ if attributes.key?(:'_links')
150
+ self._links = attributes[:'_links']
151
+ end
152
+ end
153
+
154
+ # Show invalid properties with the reasons. Usually used together with valid?
155
+ # @return Array for valid properties with the reasons
156
+ def list_invalid_properties
157
+ invalid_properties = Array.new
158
+
159
+
160
+
161
+
162
+
163
+
164
+
165
+ invalid_properties
166
+ end
167
+
168
+ # Check to see if the all the properties in the model are valid
169
+ # @return true if the model is valid
170
+ def valid?
171
+
172
+
173
+
174
+
175
+
176
+
177
+
178
+ true
179
+ end
180
+
181
+
182
+
183
+
184
+
185
+
186
+
187
+
188
+ # Checks equality by comparing each attribute.
189
+ # @param [Object] Object to be compared
190
+ def ==(o)
191
+ return true if self.equal?(o)
192
+ self.class == o.class &&
193
+ id == o.id &&
194
+ type == o.type &&
195
+ href == o.href &&
196
+ items == o.items &&
197
+ offset == o.offset &&
198
+ limit == o.limit &&
199
+ _links == o._links
200
+ end
201
+
202
+ # @see the `==` method
203
+ # @param [Object] Object to be compared
204
+ def eql?(o)
205
+ self == o
206
+ end
207
+
208
+ # Calculates hash code according to all attributes.
209
+ # @return [Integer] Hash code
210
+ def hash
211
+ [id, type, href, items, offset, limit, _links].hash
212
+ end
213
+
214
+ # Builds the object from hash
215
+ # @param [Hash] attributes Model attributes in the form of hash
216
+ # @return [Object] Returns the model itself
217
+ def self.build_from_hash(attributes)
218
+ new.build_from_hash(attributes)
219
+ end
220
+
221
+ # Builds the object from hash
222
+ # @param [Hash] attributes Model attributes in the form of hash
223
+ # @return [Object] Returns the model itself
224
+ def build_from_hash(attributes)
225
+ return nil unless attributes.is_a?(Hash)
226
+ self.class.openapi_types.each_pair do |key, type|
227
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
228
+ self.send("#{key}=", nil)
229
+ elsif type =~ /\AArray<(.*)>/i
230
+ # check to ensure the input is an array given that the attribute
231
+ # is documented as an array but the input is not
232
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
233
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
234
+ end
235
+ elsif !attributes[self.class.attribute_map[key]].nil?
236
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
237
+ end
238
+ end
239
+
240
+ self
241
+ end
242
+
243
+ # Deserializes the data based on type
244
+ # @param string type Data type
245
+ # @param string value Value to be deserialized
246
+ # @return [Object] Deserialized data
247
+ def _deserialize(type, value)
248
+ case type.to_sym
249
+ when :Time
250
+ Time.parse(value)
251
+ when :Date
252
+ Date.parse(value)
253
+ when :String
254
+ value.to_s
255
+ when :Integer
256
+ value.to_i
257
+ when :Float
258
+ value.to_f
259
+ when :Boolean
260
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
261
+ true
262
+ else
263
+ false
264
+ end
265
+ when :Object
266
+ # generic object (usually a Hash), return directly
267
+ value
268
+ when /\AArray<(?<inner_type>.+)>\z/
269
+ inner_type = Regexp.last_match[:inner_type]
270
+ value.map { |v| _deserialize(inner_type, v) }
271
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
272
+ k_type = Regexp.last_match[:k_type]
273
+ v_type = Regexp.last_match[:v_type]
274
+ {}.tap do |hash|
275
+ value.each do |k, v|
276
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
277
+ end
278
+ end
279
+ else # model
280
+ # models (e.g. Pet) or oneOf
281
+ klass = Ionoscloud.const_get(type)
282
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
283
+ end
284
+ end
285
+
286
+ # Returns the string representation of the object
287
+ # @return [String] String presentation of the object
288
+ def to_s
289
+ to_hash.to_s
290
+ end
291
+
292
+ # to_body is an alias to to_hash (backward compatibility)
293
+ # @return [Hash] Returns the object in the form of hash
294
+ def to_body
295
+ to_hash
296
+ end
297
+
298
+ # Returns the object in the form of hash
299
+ # @return [Hash] Returns the object in the form of hash
300
+ def to_hash
301
+ hash = {}
302
+ self.class.attribute_map.each_pair do |attr, param|
303
+ value = self.send(attr)
304
+ if value.nil?
305
+ is_nullable = self.class.openapi_nullable.include?(attr)
306
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
307
+ end
308
+
309
+ hash[param] = _to_hash(value)
310
+ end
311
+ hash
312
+ end
313
+
314
+ # Outputs non-array value in the form of hash
315
+ # For object, use to_hash. Otherwise, just return the value
316
+ # @param [Object] value Any valid value
317
+ # @return [Hash] Returns the value in the form of hash
318
+ def _to_hash(value)
319
+ if value.is_a?(Array)
320
+ value.compact.map { |v| _to_hash(v) }
321
+ elsif value.is_a?(Hash)
322
+ {}.tap do |hash|
323
+ value.each { |k, v| hash[k] = _to_hash(v) }
324
+ end
325
+ elsif value.respond_to? :to_hash
326
+ value.to_hash
327
+ else
328
+ value
329
+ end
330
+ end
331
+
332
+ end
333
+
334
+ end
@@ -28,7 +28,7 @@ module Ionoscloud
28
28
  attr_accessor :href
29
29
 
30
30
 
31
- # Array of items in that collection.
31
+ # Array of items in the collection.
32
32
  attr_accessor :items
33
33
 
34
34
 
@@ -28,7 +28,7 @@ module Ionoscloud
28
28
  attr_accessor :href
29
29
 
30
30
 
31
- # Array of items in that collection.
31
+ # Array of items in the collection.
32
32
  attr_accessor :items
33
33
 
34
34
  class EnumAttributeValidator
@@ -28,7 +28,7 @@ module Ionoscloud
28
28
  attr_accessor :href
29
29
 
30
30
 
31
- # Array of items in that collection.
31
+ # Array of items in the collection.
32
32
  attr_accessor :items
33
33
 
34
34
 
@@ -28,7 +28,7 @@ module Ionoscloud
28
28
  attr_accessor :href
29
29
 
30
30
 
31
- # Array of items in that collection.
31
+ # Array of items in the collection.
32
32
  attr_accessor :items
33
33
 
34
34
 
@@ -28,7 +28,7 @@ module Ionoscloud
28
28
  attr_accessor :href
29
29
 
30
30
 
31
- # Array of items in that collection.
31
+ # Array of items in the collection.
32
32
  attr_accessor :items
33
33
 
34
34
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -28,7 +28,7 @@ module Ionoscloud
28
28
  attr_accessor :href
29
29
 
30
30
 
31
- # Array of items in that collection.
31
+ # Array of items in the collection.
32
32
  attr_accessor :items
33
33
 
34
34
 
@@ -20,7 +20,7 @@ module Ionoscloud
20
20
  attr_accessor :error_code
21
21
 
22
22
 
23
- # Human-readable message.
23
+ # A human-readable message.
24
24
  attr_accessor :message
25
25
 
26
26
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -28,7 +28,7 @@ module Ionoscloud
28
28
  attr_accessor :href
29
29
 
30
30
 
31
- # Array of items in that collection.
31
+ # Array of items in the collection.
32
32
  attr_accessor :items
33
33
 
34
34