ionoscloud 5.0.1 → 5.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +65 -0
- data/docs/AttachedVolumes.md +1 -1
- data/docs/Cdroms.md +1 -1
- data/docs/DefaultApi.md +6 -1
- data/docs/ImageProperties.md +5 -1
- data/docs/IpBlockProperties.md +1 -1
- data/docs/IpConsumer.md +5 -1
- data/docs/KubernetesApi.md +12 -12
- data/docs/KubernetesClusterForPost.md +28 -0
- data/docs/KubernetesClusterForPut.md +28 -0
- data/docs/KubernetesClusterProperties.md +5 -1
- data/docs/KubernetesClusterPropertiesForPost.md +26 -0
- data/docs/{KubernetesClusterPropertiesForPostAndPut.md → KubernetesClusterPropertiesForPut.md} +3 -3
- data/docs/KubernetesNodePoolForPost.md +26 -0
- data/docs/KubernetesNodePoolProperties.md +1 -1
- data/docs/KubernetesNodePoolPropertiesForPost.md +1 -1
- data/docs/KubernetesNodePoolPropertiesForPut.md +0 -14
- data/docs/KubernetesNodeProperties.md +3 -1
- data/docs/Nics.md +1 -1
- data/docs/README.md +3 -3
- data/docs/RequestApi.md +22 -6
- data/docs/S3KeyProperties.md +2 -2
- data/docs/UserManagementApi.md +7 -7
- data/docs/UserPost.md +18 -0
- data/docs/UserProperties.md +0 -2
- data/docs/UserPropertiesPost.md +32 -0
- data/docs/UserPropertiesPut.md +30 -0
- data/docs/UserPut.md +20 -0
- data/docs/VolumeProperties.md +1 -1
- data/docs/summary.md +17 -1
- data/lib/ionoscloud.rb +9 -1
- data/lib/ionoscloud/api/_api.rb +1 -1
- data/lib/ionoscloud/api/kubernetes_api.rb +11 -11
- data/lib/ionoscloud/api/request_api.rb +30 -6
- data/lib/ionoscloud/api/user_management_api.rb +8 -8
- data/lib/ionoscloud/api_client.rb +13 -14
- data/lib/ionoscloud/configuration.rb +2 -2
- data/lib/ionoscloud/models/datacenter_properties.rb +0 -22
- data/lib/ionoscloud/models/image_properties.rb +38 -4
- data/lib/ionoscloud/models/ip_consumer.rb +22 -4
- data/lib/ionoscloud/models/kubernetes_cluster_for_post.rb +303 -0
- data/lib/ionoscloud/models/kubernetes_cluster_for_put.rb +303 -0
- data/lib/ionoscloud/models/kubernetes_cluster_properties.rb +26 -4
- data/lib/ionoscloud/models/kubernetes_cluster_properties_for_post.rb +263 -0
- data/lib/ionoscloud/models/{kubernetes_cluster_properties_for_post_and_put.rb → kubernetes_cluster_properties_for_put.rb} +4 -4
- data/lib/ionoscloud/models/kubernetes_node_pool_for_post.rb +294 -0
- data/lib/ionoscloud/models/kubernetes_node_pool_properties.rb +1 -1
- data/lib/ionoscloud/models/kubernetes_node_pool_properties_for_post.rb +1 -1
- data/lib/ionoscloud/models/kubernetes_node_pool_properties_for_put.rb +1 -152
- data/lib/ionoscloud/models/kubernetes_node_properties.rb +11 -6
- data/lib/ionoscloud/models/location_properties.rb +0 -22
- data/lib/ionoscloud/models/s3_key_properties.rb +2 -2
- data/lib/ionoscloud/models/user_post.rb +221 -0
- data/lib/ionoscloud/models/user_properties.rb +1 -11
- data/lib/ionoscloud/models/user_properties_post.rb +287 -0
- data/lib/ionoscloud/models/user_properties_put.rb +277 -0
- data/lib/ionoscloud/models/user_put.rb +231 -0
- data/lib/ionoscloud/models/volume_properties.rb +1 -1
- data/lib/ionoscloud/version.rb +1 -1
- data/spec/api/kubernetes_api_spec.rb +4 -4
- data/spec/api/request_api_spec.rb +11 -3
- data/spec/api/user_management_api_spec.rb +2 -2
- data/spec/models/datacenter_properties_spec.rb +0 -4
- data/spec/models/image_properties_spec.rb +16 -0
- data/spec/models/ip_consumer_spec.rb +12 -0
- data/spec/models/kubernetes_cluster_for_post_spec.rb +68 -0
- data/spec/models/kubernetes_cluster_for_put_spec.rb +68 -0
- data/spec/models/kubernetes_cluster_properties_for_post_spec.rb +58 -0
- data/spec/models/{kubernetes_cluster_properties_for_post_and_put_spec.rb → kubernetes_cluster_properties_for_put_spec.rb} +6 -6
- data/spec/models/kubernetes_cluster_properties_spec.rb +12 -0
- data/spec/models/kubernetes_node_pool_for_post_spec.rb +62 -0
- data/spec/models/kubernetes_node_pool_properties_for_put_spec.rb +0 -50
- data/spec/models/kubernetes_node_properties_spec.rb +6 -0
- data/spec/models/location_properties_spec.rb +0 -4
- data/spec/models/user_post_spec.rb +34 -0
- data/spec/models/user_properties_post_spec.rb +76 -0
- data/spec/models/user_properties_put_spec.rb +70 -0
- data/spec/models/user_properties_spec.rb +0 -6
- data/spec/models/user_put_spec.rb +40 -0
- metadata +157 -124
@@ -14,8 +14,8 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module Ionoscloud
|
17
|
-
class
|
18
|
-
# A Kubernetes Cluster Name
|
17
|
+
class KubernetesClusterPropertiesForPut
|
18
|
+
# A Kubernetes Cluster Name. Valid Kubernetes Cluster name must be 63 characters or less and must be empty or begin and end with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between.
|
19
19
|
attr_accessor :name
|
20
20
|
|
21
21
|
# The kubernetes version in which a cluster is running. This imposes restrictions on what kubernetes versions can be run in a cluster's nodepools. Additionally, not all kubernetes versions are viable upgrade targets for all prior versions.
|
@@ -56,13 +56,13 @@ module Ionoscloud
|
|
56
56
|
# @param [Hash] attributes Model attributes in the form of hash
|
57
57
|
def initialize(attributes = {})
|
58
58
|
if (!attributes.is_a?(Hash))
|
59
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Ionoscloud::
|
59
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Ionoscloud::KubernetesClusterPropertiesForPut` initialize method"
|
60
60
|
end
|
61
61
|
|
62
62
|
# check to see if the attribute exists and convert string to symbol for hash key
|
63
63
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
64
64
|
if (!self.class.attribute_map.key?(k.to_sym))
|
65
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Ionoscloud::
|
65
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Ionoscloud::KubernetesClusterPropertiesForPut`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
66
66
|
end
|
67
67
|
h[k.to_sym] = v
|
68
68
|
}
|
@@ -0,0 +1,294 @@
|
|
1
|
+
=begin
|
2
|
+
#CLOUD API
|
3
|
+
|
4
|
+
#An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API. The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 5.0
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 5.0.1-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module Ionoscloud
|
17
|
+
class KubernetesNodePoolForPost
|
18
|
+
# The resource's unique identifier.
|
19
|
+
attr_accessor :id
|
20
|
+
|
21
|
+
# The type of object
|
22
|
+
attr_accessor :type
|
23
|
+
|
24
|
+
# URL to the object representation (absolute path)
|
25
|
+
attr_accessor :href
|
26
|
+
|
27
|
+
attr_accessor :metadata
|
28
|
+
|
29
|
+
attr_accessor :properties
|
30
|
+
|
31
|
+
class EnumAttributeValidator
|
32
|
+
attr_reader :datatype
|
33
|
+
attr_reader :allowable_values
|
34
|
+
|
35
|
+
def initialize(datatype, allowable_values)
|
36
|
+
@allowable_values = allowable_values.map do |value|
|
37
|
+
case datatype.to_s
|
38
|
+
when /Integer/i
|
39
|
+
value.to_i
|
40
|
+
when /Float/i
|
41
|
+
value.to_f
|
42
|
+
else
|
43
|
+
value
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
def valid?(value)
|
49
|
+
!value || allowable_values.include?(value)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
54
|
+
def self.attribute_map
|
55
|
+
{
|
56
|
+
:'id' => :'id',
|
57
|
+
:'type' => :'type',
|
58
|
+
:'href' => :'href',
|
59
|
+
:'metadata' => :'metadata',
|
60
|
+
:'properties' => :'properties'
|
61
|
+
}
|
62
|
+
end
|
63
|
+
|
64
|
+
# Returns all the JSON keys this model knows about
|
65
|
+
def self.acceptable_attributes
|
66
|
+
attribute_map.values
|
67
|
+
end
|
68
|
+
|
69
|
+
# Attribute type mapping.
|
70
|
+
def self.openapi_types
|
71
|
+
{
|
72
|
+
:'id' => :'String',
|
73
|
+
:'type' => :'String',
|
74
|
+
:'href' => :'String',
|
75
|
+
:'metadata' => :'DatacenterElementMetadata',
|
76
|
+
:'properties' => :'KubernetesNodePoolPropertiesForPost'
|
77
|
+
}
|
78
|
+
end
|
79
|
+
|
80
|
+
# List of attributes with nullable: true
|
81
|
+
def self.openapi_nullable
|
82
|
+
Set.new([
|
83
|
+
])
|
84
|
+
end
|
85
|
+
|
86
|
+
# Initializes the object
|
87
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
88
|
+
def initialize(attributes = {})
|
89
|
+
if (!attributes.is_a?(Hash))
|
90
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Ionoscloud::KubernetesNodePoolForPost` initialize method"
|
91
|
+
end
|
92
|
+
|
93
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
94
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
95
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
96
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Ionoscloud::KubernetesNodePoolForPost`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
97
|
+
end
|
98
|
+
h[k.to_sym] = v
|
99
|
+
}
|
100
|
+
|
101
|
+
if attributes.key?(:'id')
|
102
|
+
self.id = attributes[:'id']
|
103
|
+
end
|
104
|
+
|
105
|
+
if attributes.key?(:'type')
|
106
|
+
self.type = attributes[:'type']
|
107
|
+
end
|
108
|
+
|
109
|
+
if attributes.key?(:'href')
|
110
|
+
self.href = attributes[:'href']
|
111
|
+
end
|
112
|
+
|
113
|
+
if attributes.key?(:'metadata')
|
114
|
+
self.metadata = attributes[:'metadata']
|
115
|
+
end
|
116
|
+
|
117
|
+
if attributes.key?(:'properties')
|
118
|
+
self.properties = attributes[:'properties']
|
119
|
+
end
|
120
|
+
end
|
121
|
+
|
122
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
123
|
+
# @return Array for valid properties with the reasons
|
124
|
+
def list_invalid_properties
|
125
|
+
invalid_properties = Array.new
|
126
|
+
if @properties.nil?
|
127
|
+
invalid_properties.push('invalid value for "properties", properties cannot be nil.')
|
128
|
+
end
|
129
|
+
|
130
|
+
invalid_properties
|
131
|
+
end
|
132
|
+
|
133
|
+
# Check to see if the all the properties in the model are valid
|
134
|
+
# @return true if the model is valid
|
135
|
+
def valid?
|
136
|
+
type_validator = EnumAttributeValidator.new('String', ["nodepool"])
|
137
|
+
return false unless type_validator.valid?(@type)
|
138
|
+
return false if @properties.nil?
|
139
|
+
true
|
140
|
+
end
|
141
|
+
|
142
|
+
# Custom attribute writer method checking allowed values (enum).
|
143
|
+
# @param [Object] type Object to be assigned
|
144
|
+
def type=(type)
|
145
|
+
validator = EnumAttributeValidator.new('String', ["nodepool"])
|
146
|
+
unless validator.valid?(type)
|
147
|
+
fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
|
148
|
+
end
|
149
|
+
@type = type
|
150
|
+
end
|
151
|
+
|
152
|
+
# Checks equality by comparing each attribute.
|
153
|
+
# @param [Object] Object to be compared
|
154
|
+
def ==(o)
|
155
|
+
return true if self.equal?(o)
|
156
|
+
self.class == o.class &&
|
157
|
+
id == o.id &&
|
158
|
+
type == o.type &&
|
159
|
+
href == o.href &&
|
160
|
+
metadata == o.metadata &&
|
161
|
+
properties == o.properties
|
162
|
+
end
|
163
|
+
|
164
|
+
# @see the `==` method
|
165
|
+
# @param [Object] Object to be compared
|
166
|
+
def eql?(o)
|
167
|
+
self == o
|
168
|
+
end
|
169
|
+
|
170
|
+
# Calculates hash code according to all attributes.
|
171
|
+
# @return [Integer] Hash code
|
172
|
+
def hash
|
173
|
+
[id, type, href, metadata, properties].hash
|
174
|
+
end
|
175
|
+
|
176
|
+
# Builds the object from hash
|
177
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
178
|
+
# @return [Object] Returns the model itself
|
179
|
+
def self.build_from_hash(attributes)
|
180
|
+
new.build_from_hash(attributes)
|
181
|
+
end
|
182
|
+
|
183
|
+
# Builds the object from hash
|
184
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
185
|
+
# @return [Object] Returns the model itself
|
186
|
+
def build_from_hash(attributes)
|
187
|
+
return nil unless attributes.is_a?(Hash)
|
188
|
+
self.class.openapi_types.each_pair do |key, type|
|
189
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
190
|
+
self.send("#{key}=", nil)
|
191
|
+
elsif type =~ /\AArray<(.*)>/i
|
192
|
+
# check to ensure the input is an array given that the attribute
|
193
|
+
# is documented as an array but the input is not
|
194
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
195
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
196
|
+
end
|
197
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
198
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
199
|
+
end
|
200
|
+
end
|
201
|
+
|
202
|
+
self
|
203
|
+
end
|
204
|
+
|
205
|
+
# Deserializes the data based on type
|
206
|
+
# @param string type Data type
|
207
|
+
# @param string value Value to be deserialized
|
208
|
+
# @return [Object] Deserialized data
|
209
|
+
def _deserialize(type, value)
|
210
|
+
case type.to_sym
|
211
|
+
when :Time
|
212
|
+
Time.parse(value)
|
213
|
+
when :Date
|
214
|
+
Date.parse(value)
|
215
|
+
when :String
|
216
|
+
value.to_s
|
217
|
+
when :Integer
|
218
|
+
value.to_i
|
219
|
+
when :Float
|
220
|
+
value.to_f
|
221
|
+
when :Boolean
|
222
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
223
|
+
true
|
224
|
+
else
|
225
|
+
false
|
226
|
+
end
|
227
|
+
when :Object
|
228
|
+
# generic object (usually a Hash), return directly
|
229
|
+
value
|
230
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
231
|
+
inner_type = Regexp.last_match[:inner_type]
|
232
|
+
value.map { |v| _deserialize(inner_type, v) }
|
233
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
234
|
+
k_type = Regexp.last_match[:k_type]
|
235
|
+
v_type = Regexp.last_match[:v_type]
|
236
|
+
{}.tap do |hash|
|
237
|
+
value.each do |k, v|
|
238
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
239
|
+
end
|
240
|
+
end
|
241
|
+
else # model
|
242
|
+
# models (e.g. Pet) or oneOf
|
243
|
+
klass = Ionoscloud.const_get(type)
|
244
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
245
|
+
end
|
246
|
+
end
|
247
|
+
|
248
|
+
# Returns the string representation of the object
|
249
|
+
# @return [String] String presentation of the object
|
250
|
+
def to_s
|
251
|
+
to_hash.to_s
|
252
|
+
end
|
253
|
+
|
254
|
+
# to_body is an alias to to_hash (backward compatibility)
|
255
|
+
# @return [Hash] Returns the object in the form of hash
|
256
|
+
def to_body
|
257
|
+
to_hash
|
258
|
+
end
|
259
|
+
|
260
|
+
# Returns the object in the form of hash
|
261
|
+
# @return [Hash] Returns the object in the form of hash
|
262
|
+
def to_hash
|
263
|
+
hash = {}
|
264
|
+
self.class.attribute_map.each_pair do |attr, param|
|
265
|
+
value = self.send(attr)
|
266
|
+
if value.nil?
|
267
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
268
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
269
|
+
end
|
270
|
+
|
271
|
+
hash[param] = _to_hash(value)
|
272
|
+
end
|
273
|
+
hash
|
274
|
+
end
|
275
|
+
|
276
|
+
# Outputs non-array value in the form of hash
|
277
|
+
# For object, use to_hash. Otherwise, just return the value
|
278
|
+
# @param [Object] value Any valid value
|
279
|
+
# @return [Hash] Returns the value in the form of hash
|
280
|
+
def _to_hash(value)
|
281
|
+
if value.is_a?(Array)
|
282
|
+
value.compact.map { |v| _to_hash(v) }
|
283
|
+
elsif value.is_a?(Hash)
|
284
|
+
{}.tap do |hash|
|
285
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
286
|
+
end
|
287
|
+
elsif value.respond_to? :to_hash
|
288
|
+
value.to_hash
|
289
|
+
else
|
290
|
+
value
|
291
|
+
end
|
292
|
+
end
|
293
|
+
end
|
294
|
+
end
|
@@ -30,7 +30,7 @@ module Ionoscloud
|
|
30
30
|
# Number of cores for node
|
31
31
|
attr_accessor :cores_count
|
32
32
|
|
33
|
-
# RAM size for node, minimum size
|
33
|
+
# RAM size for node, minimum size is 2048MB. Ram size must be set to multiple of 1024MB.
|
34
34
|
attr_accessor :ram_size
|
35
35
|
|
36
36
|
# The availability zone in which the target VM should exist
|
@@ -30,7 +30,7 @@ module Ionoscloud
|
|
30
30
|
# Number of cores for node
|
31
31
|
attr_accessor :cores_count
|
32
32
|
|
33
|
-
# RAM size for node, minimum size
|
33
|
+
# RAM size for node, minimum size is 2048MB. Ram size must be set to multiple of 1024MB.
|
34
34
|
attr_accessor :ram_size
|
35
35
|
|
36
36
|
# The availability zone in which the target VM should exist
|
@@ -18,30 +18,9 @@ module Ionoscloud
|
|
18
18
|
# A Kubernetes Node Pool Name. Valid Kubernetes Node Pool name must be 63 characters or less and must be empty or begin and end with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between.
|
19
19
|
attr_accessor :name
|
20
20
|
|
21
|
-
# A valid uuid of the datacenter on which user has access
|
22
|
-
attr_accessor :datacenter_id
|
23
|
-
|
24
21
|
# Number of nodes part of the Node Pool
|
25
22
|
attr_accessor :node_count
|
26
23
|
|
27
|
-
# A valid cpu family name
|
28
|
-
attr_accessor :cpu_family
|
29
|
-
|
30
|
-
# Number of cores for node
|
31
|
-
attr_accessor :cores_count
|
32
|
-
|
33
|
-
# RAM size for node, minimum size 2048MB is recommended. Ram size must be set to multiple of 1024MB.
|
34
|
-
attr_accessor :ram_size
|
35
|
-
|
36
|
-
# The availability zone in which the target VM should exist
|
37
|
-
attr_accessor :availability_zone
|
38
|
-
|
39
|
-
# Hardware type of the volume
|
40
|
-
attr_accessor :storage_type
|
41
|
-
|
42
|
-
# The size of the volume in GB. The size should be greater than 10GB.
|
43
|
-
attr_accessor :storage_size
|
44
|
-
|
45
24
|
# The kubernetes version in which a nodepool is running. This imposes restrictions on what kubernetes versions can be run in a cluster's nodepools. Additionally, not all kubernetes versions are viable upgrade targets for all prior versions.
|
46
25
|
attr_accessor :k8s_version
|
47
26
|
|
@@ -61,40 +40,11 @@ module Ionoscloud
|
|
61
40
|
# Optional array of reserved public IP addresses to be used by the nodes. IPs must be from same location as the data center used for the node pool. The array must contain one extra IP than maximum number of nodes could be. (nodeCount+1 if fixed node amount or maxNodeCount+1 if auto scaling is used) The extra provided IP Will be used during rebuilding of nodes.
|
62
41
|
attr_accessor :public_ips
|
63
42
|
|
64
|
-
class EnumAttributeValidator
|
65
|
-
attr_reader :datatype
|
66
|
-
attr_reader :allowable_values
|
67
|
-
|
68
|
-
def initialize(datatype, allowable_values)
|
69
|
-
@allowable_values = allowable_values.map do |value|
|
70
|
-
case datatype.to_s
|
71
|
-
when /Integer/i
|
72
|
-
value.to_i
|
73
|
-
when /Float/i
|
74
|
-
value.to_f
|
75
|
-
else
|
76
|
-
value
|
77
|
-
end
|
78
|
-
end
|
79
|
-
end
|
80
|
-
|
81
|
-
def valid?(value)
|
82
|
-
!value || allowable_values.include?(value)
|
83
|
-
end
|
84
|
-
end
|
85
|
-
|
86
43
|
# Attribute mapping from ruby-style variable name to JSON key.
|
87
44
|
def self.attribute_map
|
88
45
|
{
|
89
46
|
:'name' => :'name',
|
90
|
-
:'datacenter_id' => :'datacenterId',
|
91
47
|
:'node_count' => :'nodeCount',
|
92
|
-
:'cpu_family' => :'cpuFamily',
|
93
|
-
:'cores_count' => :'coresCount',
|
94
|
-
:'ram_size' => :'ramSize',
|
95
|
-
:'availability_zone' => :'availabilityZone',
|
96
|
-
:'storage_type' => :'storageType',
|
97
|
-
:'storage_size' => :'storageSize',
|
98
48
|
:'k8s_version' => :'k8sVersion',
|
99
49
|
:'maintenance_window' => :'maintenanceWindow',
|
100
50
|
:'auto_scaling' => :'autoScaling',
|
@@ -114,14 +64,7 @@ module Ionoscloud
|
|
114
64
|
def self.openapi_types
|
115
65
|
{
|
116
66
|
:'name' => :'String',
|
117
|
-
:'datacenter_id' => :'String',
|
118
67
|
:'node_count' => :'Integer',
|
119
|
-
:'cpu_family' => :'String',
|
120
|
-
:'cores_count' => :'Integer',
|
121
|
-
:'ram_size' => :'Integer',
|
122
|
-
:'availability_zone' => :'String',
|
123
|
-
:'storage_type' => :'String',
|
124
|
-
:'storage_size' => :'Integer',
|
125
68
|
:'k8s_version' => :'String',
|
126
69
|
:'maintenance_window' => :'KubernetesMaintenanceWindow',
|
127
70
|
:'auto_scaling' => :'KubernetesAutoScaling',
|
@@ -157,38 +100,10 @@ module Ionoscloud
|
|
157
100
|
self.name = attributes[:'name']
|
158
101
|
end
|
159
102
|
|
160
|
-
if attributes.key?(:'datacenter_id')
|
161
|
-
self.datacenter_id = attributes[:'datacenter_id']
|
162
|
-
end
|
163
|
-
|
164
103
|
if attributes.key?(:'node_count')
|
165
104
|
self.node_count = attributes[:'node_count']
|
166
105
|
end
|
167
106
|
|
168
|
-
if attributes.key?(:'cpu_family')
|
169
|
-
self.cpu_family = attributes[:'cpu_family']
|
170
|
-
end
|
171
|
-
|
172
|
-
if attributes.key?(:'cores_count')
|
173
|
-
self.cores_count = attributes[:'cores_count']
|
174
|
-
end
|
175
|
-
|
176
|
-
if attributes.key?(:'ram_size')
|
177
|
-
self.ram_size = attributes[:'ram_size']
|
178
|
-
end
|
179
|
-
|
180
|
-
if attributes.key?(:'availability_zone')
|
181
|
-
self.availability_zone = attributes[:'availability_zone']
|
182
|
-
end
|
183
|
-
|
184
|
-
if attributes.key?(:'storage_type')
|
185
|
-
self.storage_type = attributes[:'storage_type']
|
186
|
-
end
|
187
|
-
|
188
|
-
if attributes.key?(:'storage_size')
|
189
|
-
self.storage_size = attributes[:'storage_size']
|
190
|
-
end
|
191
|
-
|
192
107
|
if attributes.key?(:'k8s_version')
|
193
108
|
self.k8s_version = attributes[:'k8s_version']
|
194
109
|
end
|
@@ -234,38 +149,10 @@ module Ionoscloud
|
|
234
149
|
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
235
150
|
end
|
236
151
|
|
237
|
-
if @datacenter_id.nil?
|
238
|
-
invalid_properties.push('invalid value for "datacenter_id", datacenter_id cannot be nil.')
|
239
|
-
end
|
240
|
-
|
241
152
|
if @node_count.nil?
|
242
153
|
invalid_properties.push('invalid value for "node_count", node_count cannot be nil.')
|
243
154
|
end
|
244
155
|
|
245
|
-
if @cpu_family.nil?
|
246
|
-
invalid_properties.push('invalid value for "cpu_family", cpu_family cannot be nil.')
|
247
|
-
end
|
248
|
-
|
249
|
-
if @cores_count.nil?
|
250
|
-
invalid_properties.push('invalid value for "cores_count", cores_count cannot be nil.')
|
251
|
-
end
|
252
|
-
|
253
|
-
if @ram_size.nil?
|
254
|
-
invalid_properties.push('invalid value for "ram_size", ram_size cannot be nil.')
|
255
|
-
end
|
256
|
-
|
257
|
-
if @availability_zone.nil?
|
258
|
-
invalid_properties.push('invalid value for "availability_zone", availability_zone cannot be nil.')
|
259
|
-
end
|
260
|
-
|
261
|
-
if @storage_type.nil?
|
262
|
-
invalid_properties.push('invalid value for "storage_type", storage_type cannot be nil.')
|
263
|
-
end
|
264
|
-
|
265
|
-
if @storage_size.nil?
|
266
|
-
invalid_properties.push('invalid value for "storage_size", storage_size cannot be nil.')
|
267
|
-
end
|
268
|
-
|
269
156
|
invalid_properties
|
270
157
|
end
|
271
158
|
|
@@ -273,55 +160,17 @@ module Ionoscloud
|
|
273
160
|
# @return true if the model is valid
|
274
161
|
def valid?
|
275
162
|
return false if @name.nil?
|
276
|
-
return false if @datacenter_id.nil?
|
277
163
|
return false if @node_count.nil?
|
278
|
-
return false if @cpu_family.nil?
|
279
|
-
return false if @cores_count.nil?
|
280
|
-
return false if @ram_size.nil?
|
281
|
-
return false if @availability_zone.nil?
|
282
|
-
availability_zone_validator = EnumAttributeValidator.new('String', ["AUTO", "ZONE_1", "ZONE_2"])
|
283
|
-
return false unless availability_zone_validator.valid?(@availability_zone)
|
284
|
-
return false if @storage_type.nil?
|
285
|
-
storage_type_validator = EnumAttributeValidator.new('String', ["HDD", "SSD"])
|
286
|
-
return false unless storage_type_validator.valid?(@storage_type)
|
287
|
-
return false if @storage_size.nil?
|
288
164
|
true
|
289
165
|
end
|
290
166
|
|
291
|
-
# Custom attribute writer method checking allowed values (enum).
|
292
|
-
# @param [Object] availability_zone Object to be assigned
|
293
|
-
def availability_zone=(availability_zone)
|
294
|
-
validator = EnumAttributeValidator.new('String', ["AUTO", "ZONE_1", "ZONE_2"])
|
295
|
-
unless validator.valid?(availability_zone)
|
296
|
-
fail ArgumentError, "invalid value for \"availability_zone\", must be one of #{validator.allowable_values}."
|
297
|
-
end
|
298
|
-
@availability_zone = availability_zone
|
299
|
-
end
|
300
|
-
|
301
|
-
# Custom attribute writer method checking allowed values (enum).
|
302
|
-
# @param [Object] storage_type Object to be assigned
|
303
|
-
def storage_type=(storage_type)
|
304
|
-
validator = EnumAttributeValidator.new('String', ["HDD", "SSD"])
|
305
|
-
unless validator.valid?(storage_type)
|
306
|
-
fail ArgumentError, "invalid value for \"storage_type\", must be one of #{validator.allowable_values}."
|
307
|
-
end
|
308
|
-
@storage_type = storage_type
|
309
|
-
end
|
310
|
-
|
311
167
|
# Checks equality by comparing each attribute.
|
312
168
|
# @param [Object] Object to be compared
|
313
169
|
def ==(o)
|
314
170
|
return true if self.equal?(o)
|
315
171
|
self.class == o.class &&
|
316
172
|
name == o.name &&
|
317
|
-
datacenter_id == o.datacenter_id &&
|
318
173
|
node_count == o.node_count &&
|
319
|
-
cpu_family == o.cpu_family &&
|
320
|
-
cores_count == o.cores_count &&
|
321
|
-
ram_size == o.ram_size &&
|
322
|
-
availability_zone == o.availability_zone &&
|
323
|
-
storage_type == o.storage_type &&
|
324
|
-
storage_size == o.storage_size &&
|
325
174
|
k8s_version == o.k8s_version &&
|
326
175
|
maintenance_window == o.maintenance_window &&
|
327
176
|
auto_scaling == o.auto_scaling &&
|
@@ -340,7 +189,7 @@ module Ionoscloud
|
|
340
189
|
# Calculates hash code according to all attributes.
|
341
190
|
# @return [Integer] Hash code
|
342
191
|
def hash
|
343
|
-
[name,
|
192
|
+
[name, node_count, k8s_version, maintenance_window, auto_scaling, lans, labels, annotations, public_ips].hash
|
344
193
|
end
|
345
194
|
|
346
195
|
# Builds the object from hash
|