ionoscloud 5.0.1 → 5.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +65 -0
  3. data/docs/AttachedVolumes.md +1 -1
  4. data/docs/Cdroms.md +1 -1
  5. data/docs/DefaultApi.md +6 -1
  6. data/docs/ImageProperties.md +5 -1
  7. data/docs/IpBlockProperties.md +1 -1
  8. data/docs/IpConsumer.md +5 -1
  9. data/docs/KubernetesApi.md +12 -12
  10. data/docs/KubernetesClusterForPost.md +28 -0
  11. data/docs/KubernetesClusterForPut.md +28 -0
  12. data/docs/KubernetesClusterProperties.md +5 -1
  13. data/docs/KubernetesClusterPropertiesForPost.md +26 -0
  14. data/docs/{KubernetesClusterPropertiesForPostAndPut.md → KubernetesClusterPropertiesForPut.md} +3 -3
  15. data/docs/KubernetesNodePoolForPost.md +26 -0
  16. data/docs/KubernetesNodePoolProperties.md +1 -1
  17. data/docs/KubernetesNodePoolPropertiesForPost.md +1 -1
  18. data/docs/KubernetesNodePoolPropertiesForPut.md +0 -14
  19. data/docs/KubernetesNodeProperties.md +3 -1
  20. data/docs/Nics.md +1 -1
  21. data/docs/README.md +3 -3
  22. data/docs/RequestApi.md +22 -6
  23. data/docs/S3KeyProperties.md +2 -2
  24. data/docs/UserManagementApi.md +7 -7
  25. data/docs/UserPost.md +18 -0
  26. data/docs/UserProperties.md +0 -2
  27. data/docs/UserPropertiesPost.md +32 -0
  28. data/docs/UserPropertiesPut.md +30 -0
  29. data/docs/UserPut.md +20 -0
  30. data/docs/VolumeProperties.md +1 -1
  31. data/docs/summary.md +17 -1
  32. data/lib/ionoscloud.rb +9 -1
  33. data/lib/ionoscloud/api/_api.rb +1 -1
  34. data/lib/ionoscloud/api/kubernetes_api.rb +11 -11
  35. data/lib/ionoscloud/api/request_api.rb +30 -6
  36. data/lib/ionoscloud/api/user_management_api.rb +8 -8
  37. data/lib/ionoscloud/api_client.rb +13 -14
  38. data/lib/ionoscloud/configuration.rb +2 -2
  39. data/lib/ionoscloud/models/datacenter_properties.rb +0 -22
  40. data/lib/ionoscloud/models/image_properties.rb +38 -4
  41. data/lib/ionoscloud/models/ip_consumer.rb +22 -4
  42. data/lib/ionoscloud/models/kubernetes_cluster_for_post.rb +303 -0
  43. data/lib/ionoscloud/models/kubernetes_cluster_for_put.rb +303 -0
  44. data/lib/ionoscloud/models/kubernetes_cluster_properties.rb +26 -4
  45. data/lib/ionoscloud/models/kubernetes_cluster_properties_for_post.rb +263 -0
  46. data/lib/ionoscloud/models/{kubernetes_cluster_properties_for_post_and_put.rb → kubernetes_cluster_properties_for_put.rb} +4 -4
  47. data/lib/ionoscloud/models/kubernetes_node_pool_for_post.rb +294 -0
  48. data/lib/ionoscloud/models/kubernetes_node_pool_properties.rb +1 -1
  49. data/lib/ionoscloud/models/kubernetes_node_pool_properties_for_post.rb +1 -1
  50. data/lib/ionoscloud/models/kubernetes_node_pool_properties_for_put.rb +1 -152
  51. data/lib/ionoscloud/models/kubernetes_node_properties.rb +11 -6
  52. data/lib/ionoscloud/models/location_properties.rb +0 -22
  53. data/lib/ionoscloud/models/s3_key_properties.rb +2 -2
  54. data/lib/ionoscloud/models/user_post.rb +221 -0
  55. data/lib/ionoscloud/models/user_properties.rb +1 -11
  56. data/lib/ionoscloud/models/user_properties_post.rb +287 -0
  57. data/lib/ionoscloud/models/user_properties_put.rb +277 -0
  58. data/lib/ionoscloud/models/user_put.rb +231 -0
  59. data/lib/ionoscloud/models/volume_properties.rb +1 -1
  60. data/lib/ionoscloud/version.rb +1 -1
  61. data/spec/api/kubernetes_api_spec.rb +4 -4
  62. data/spec/api/request_api_spec.rb +11 -3
  63. data/spec/api/user_management_api_spec.rb +2 -2
  64. data/spec/models/datacenter_properties_spec.rb +0 -4
  65. data/spec/models/image_properties_spec.rb +16 -0
  66. data/spec/models/ip_consumer_spec.rb +12 -0
  67. data/spec/models/kubernetes_cluster_for_post_spec.rb +68 -0
  68. data/spec/models/kubernetes_cluster_for_put_spec.rb +68 -0
  69. data/spec/models/kubernetes_cluster_properties_for_post_spec.rb +58 -0
  70. data/spec/models/{kubernetes_cluster_properties_for_post_and_put_spec.rb → kubernetes_cluster_properties_for_put_spec.rb} +6 -6
  71. data/spec/models/kubernetes_cluster_properties_spec.rb +12 -0
  72. data/spec/models/kubernetes_node_pool_for_post_spec.rb +62 -0
  73. data/spec/models/kubernetes_node_pool_properties_for_put_spec.rb +0 -50
  74. data/spec/models/kubernetes_node_properties_spec.rb +6 -0
  75. data/spec/models/location_properties_spec.rb +0 -4
  76. data/spec/models/user_post_spec.rb +34 -0
  77. data/spec/models/user_properties_post_spec.rb +76 -0
  78. data/spec/models/user_properties_put_spec.rb +70 -0
  79. data/spec/models/user_properties_spec.rb +0 -6
  80. data/spec/models/user_put_spec.rb +40 -0
  81. metadata +157 -124
@@ -0,0 +1,277 @@
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 UserPropertiesPut
18
+ # first name of the user
19
+ attr_accessor :firstname
20
+
21
+ # last name of the user
22
+ attr_accessor :lastname
23
+
24
+ # email address of the user
25
+ attr_accessor :email
26
+
27
+ # indicates if the user has admin rights or not
28
+ attr_accessor :administrator
29
+
30
+ # indicates if secure authentication should be forced on the user or not
31
+ attr_accessor :force_sec_auth
32
+
33
+ # indicates if secure authentication is active for the user or not
34
+ attr_accessor :sec_auth_active
35
+
36
+ # indicates if the user is active
37
+ attr_accessor :active
38
+
39
+ # Attribute mapping from ruby-style variable name to JSON key.
40
+ def self.attribute_map
41
+ {
42
+ :'firstname' => :'firstname',
43
+ :'lastname' => :'lastname',
44
+ :'email' => :'email',
45
+ :'administrator' => :'administrator',
46
+ :'force_sec_auth' => :'forceSecAuth',
47
+ :'sec_auth_active' => :'secAuthActive',
48
+ :'active' => :'active'
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
+ :'firstname' => :'String',
61
+ :'lastname' => :'String',
62
+ :'email' => :'String',
63
+ :'administrator' => :'Boolean',
64
+ :'force_sec_auth' => :'Boolean',
65
+ :'sec_auth_active' => :'Boolean',
66
+ :'active' => :'Boolean'
67
+ }
68
+ end
69
+
70
+ # List of attributes with nullable: true
71
+ def self.openapi_nullable
72
+ Set.new([
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::UserPropertiesPut` 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::UserPropertiesPut`. 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
+ if attributes.key?(:'firstname')
92
+ self.firstname = attributes[:'firstname']
93
+ end
94
+
95
+ if attributes.key?(:'lastname')
96
+ self.lastname = attributes[:'lastname']
97
+ end
98
+
99
+ if attributes.key?(:'email')
100
+ self.email = attributes[:'email']
101
+ end
102
+
103
+ if attributes.key?(:'administrator')
104
+ self.administrator = attributes[:'administrator']
105
+ end
106
+
107
+ if attributes.key?(:'force_sec_auth')
108
+ self.force_sec_auth = attributes[:'force_sec_auth']
109
+ end
110
+
111
+ if attributes.key?(:'sec_auth_active')
112
+ self.sec_auth_active = attributes[:'sec_auth_active']
113
+ end
114
+
115
+ if attributes.key?(:'active')
116
+ self.active = attributes[:'active']
117
+ end
118
+ end
119
+
120
+ # Show invalid properties with the reasons. Usually used together with valid?
121
+ # @return Array for valid properties with the reasons
122
+ def list_invalid_properties
123
+ invalid_properties = Array.new
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
+ true
131
+ end
132
+
133
+ # Checks equality by comparing each attribute.
134
+ # @param [Object] Object to be compared
135
+ def ==(o)
136
+ return true if self.equal?(o)
137
+ self.class == o.class &&
138
+ firstname == o.firstname &&
139
+ lastname == o.lastname &&
140
+ email == o.email &&
141
+ administrator == o.administrator &&
142
+ force_sec_auth == o.force_sec_auth &&
143
+ sec_auth_active == o.sec_auth_active &&
144
+ active == o.active
145
+ end
146
+
147
+ # @see the `==` method
148
+ # @param [Object] Object to be compared
149
+ def eql?(o)
150
+ self == o
151
+ end
152
+
153
+ # Calculates hash code according to all attributes.
154
+ # @return [Integer] Hash code
155
+ def hash
156
+ [firstname, lastname, email, administrator, force_sec_auth, sec_auth_active, active].hash
157
+ end
158
+
159
+ # Builds the object from hash
160
+ # @param [Hash] attributes Model attributes in the form of hash
161
+ # @return [Object] Returns the model itself
162
+ def self.build_from_hash(attributes)
163
+ new.build_from_hash(attributes)
164
+ end
165
+
166
+ # Builds the object from hash
167
+ # @param [Hash] attributes Model attributes in the form of hash
168
+ # @return [Object] Returns the model itself
169
+ def build_from_hash(attributes)
170
+ return nil unless attributes.is_a?(Hash)
171
+ self.class.openapi_types.each_pair do |key, type|
172
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
173
+ self.send("#{key}=", nil)
174
+ elsif type =~ /\AArray<(.*)>/i
175
+ # check to ensure the input is an array given that the attribute
176
+ # is documented as an array but the input is not
177
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
178
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
179
+ end
180
+ elsif !attributes[self.class.attribute_map[key]].nil?
181
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
182
+ end
183
+ end
184
+
185
+ self
186
+ end
187
+
188
+ # Deserializes the data based on type
189
+ # @param string type Data type
190
+ # @param string value Value to be deserialized
191
+ # @return [Object] Deserialized data
192
+ def _deserialize(type, value)
193
+ case type.to_sym
194
+ when :Time
195
+ Time.parse(value)
196
+ when :Date
197
+ Date.parse(value)
198
+ when :String
199
+ value.to_s
200
+ when :Integer
201
+ value.to_i
202
+ when :Float
203
+ value.to_f
204
+ when :Boolean
205
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
206
+ true
207
+ else
208
+ false
209
+ end
210
+ when :Object
211
+ # generic object (usually a Hash), return directly
212
+ value
213
+ when /\AArray<(?<inner_type>.+)>\z/
214
+ inner_type = Regexp.last_match[:inner_type]
215
+ value.map { |v| _deserialize(inner_type, v) }
216
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
217
+ k_type = Regexp.last_match[:k_type]
218
+ v_type = Regexp.last_match[:v_type]
219
+ {}.tap do |hash|
220
+ value.each do |k, v|
221
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
222
+ end
223
+ end
224
+ else # model
225
+ # models (e.g. Pet) or oneOf
226
+ klass = Ionoscloud.const_get(type)
227
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
228
+ end
229
+ end
230
+
231
+ # Returns the string representation of the object
232
+ # @return [String] String presentation of the object
233
+ def to_s
234
+ to_hash.to_s
235
+ end
236
+
237
+ # to_body is an alias to to_hash (backward compatibility)
238
+ # @return [Hash] Returns the object in the form of hash
239
+ def to_body
240
+ to_hash
241
+ end
242
+
243
+ # Returns the object in the form of hash
244
+ # @return [Hash] Returns the object in the form of hash
245
+ def to_hash
246
+ hash = {}
247
+ self.class.attribute_map.each_pair do |attr, param|
248
+ value = self.send(attr)
249
+ if value.nil?
250
+ is_nullable = self.class.openapi_nullable.include?(attr)
251
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
252
+ end
253
+
254
+ hash[param] = _to_hash(value)
255
+ end
256
+ hash
257
+ end
258
+
259
+ # Outputs non-array value in the form of hash
260
+ # For object, use to_hash. Otherwise, just return the value
261
+ # @param [Object] value Any valid value
262
+ # @return [Hash] Returns the value in the form of hash
263
+ def _to_hash(value)
264
+ if value.is_a?(Array)
265
+ value.compact.map { |v| _to_hash(v) }
266
+ elsif value.is_a?(Hash)
267
+ {}.tap do |hash|
268
+ value.each { |k, v| hash[k] = _to_hash(v) }
269
+ end
270
+ elsif value.respond_to? :to_hash
271
+ value.to_hash
272
+ else
273
+ value
274
+ end
275
+ end
276
+ end
277
+ end
@@ -0,0 +1,231 @@
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 UserPut
18
+ # The resource's unique identifier
19
+ attr_accessor :id
20
+
21
+ attr_accessor :properties
22
+
23
+ # Attribute mapping from ruby-style variable name to JSON key.
24
+ def self.attribute_map
25
+ {
26
+ :'id' => :'id',
27
+ :'properties' => :'properties'
28
+ }
29
+ end
30
+
31
+ # Returns all the JSON keys this model knows about
32
+ def self.acceptable_attributes
33
+ attribute_map.values
34
+ end
35
+
36
+ # Attribute type mapping.
37
+ def self.openapi_types
38
+ {
39
+ :'id' => :'String',
40
+ :'properties' => :'UserPropertiesPut'
41
+ }
42
+ end
43
+
44
+ # List of attributes with nullable: true
45
+ def self.openapi_nullable
46
+ Set.new([
47
+ ])
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param [Hash] attributes Model attributes in the form of hash
52
+ def initialize(attributes = {})
53
+ if (!attributes.is_a?(Hash))
54
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Ionoscloud::UserPut` initialize method"
55
+ end
56
+
57
+ # check to see if the attribute exists and convert string to symbol for hash key
58
+ attributes = attributes.each_with_object({}) { |(k, v), h|
59
+ if (!self.class.attribute_map.key?(k.to_sym))
60
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Ionoscloud::UserPut`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
61
+ end
62
+ h[k.to_sym] = v
63
+ }
64
+
65
+ if attributes.key?(:'id')
66
+ self.id = attributes[:'id']
67
+ end
68
+
69
+ if attributes.key?(:'properties')
70
+ self.properties = attributes[:'properties']
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
+ invalid_properties = Array.new
78
+ if @properties.nil?
79
+ invalid_properties.push('invalid value for "properties", properties cannot be nil.')
80
+ end
81
+
82
+ invalid_properties
83
+ end
84
+
85
+ # Check to see if the all the properties in the model are valid
86
+ # @return true if the model is valid
87
+ def valid?
88
+ return false if @properties.nil?
89
+ true
90
+ end
91
+
92
+ # Checks equality by comparing each attribute.
93
+ # @param [Object] Object to be compared
94
+ def ==(o)
95
+ return true if self.equal?(o)
96
+ self.class == o.class &&
97
+ id == o.id &&
98
+ properties == o.properties
99
+ end
100
+
101
+ # @see the `==` method
102
+ # @param [Object] Object to be compared
103
+ def eql?(o)
104
+ self == o
105
+ end
106
+
107
+ # Calculates hash code according to all attributes.
108
+ # @return [Integer] Hash code
109
+ def hash
110
+ [id, properties].hash
111
+ end
112
+
113
+ # Builds the object from hash
114
+ # @param [Hash] attributes Model attributes in the form of hash
115
+ # @return [Object] Returns the model itself
116
+ def self.build_from_hash(attributes)
117
+ new.build_from_hash(attributes)
118
+ end
119
+
120
+ # Builds the object from hash
121
+ # @param [Hash] attributes Model attributes in the form of hash
122
+ # @return [Object] Returns the model itself
123
+ def build_from_hash(attributes)
124
+ return nil unless attributes.is_a?(Hash)
125
+ self.class.openapi_types.each_pair do |key, type|
126
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
127
+ self.send("#{key}=", nil)
128
+ elsif type =~ /\AArray<(.*)>/i
129
+ # check to ensure the input is an array given that the attribute
130
+ # is documented as an array but the input is not
131
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
132
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
133
+ end
134
+ elsif !attributes[self.class.attribute_map[key]].nil?
135
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
136
+ end
137
+ end
138
+
139
+ self
140
+ end
141
+
142
+ # Deserializes the data based on type
143
+ # @param string type Data type
144
+ # @param string value Value to be deserialized
145
+ # @return [Object] Deserialized data
146
+ def _deserialize(type, value)
147
+ case type.to_sym
148
+ when :Time
149
+ Time.parse(value)
150
+ when :Date
151
+ Date.parse(value)
152
+ when :String
153
+ value.to_s
154
+ when :Integer
155
+ value.to_i
156
+ when :Float
157
+ value.to_f
158
+ when :Boolean
159
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
160
+ true
161
+ else
162
+ false
163
+ end
164
+ when :Object
165
+ # generic object (usually a Hash), return directly
166
+ value
167
+ when /\AArray<(?<inner_type>.+)>\z/
168
+ inner_type = Regexp.last_match[:inner_type]
169
+ value.map { |v| _deserialize(inner_type, v) }
170
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
171
+ k_type = Regexp.last_match[:k_type]
172
+ v_type = Regexp.last_match[:v_type]
173
+ {}.tap do |hash|
174
+ value.each do |k, v|
175
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
176
+ end
177
+ end
178
+ else # model
179
+ # models (e.g. Pet) or oneOf
180
+ klass = Ionoscloud.const_get(type)
181
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
182
+ end
183
+ end
184
+
185
+ # Returns the string representation of the object
186
+ # @return [String] String presentation of the object
187
+ def to_s
188
+ to_hash.to_s
189
+ end
190
+
191
+ # to_body is an alias to to_hash (backward compatibility)
192
+ # @return [Hash] Returns the object in the form of hash
193
+ def to_body
194
+ to_hash
195
+ end
196
+
197
+ # Returns the object in the form of hash
198
+ # @return [Hash] Returns the object in the form of hash
199
+ def to_hash
200
+ hash = {}
201
+ self.class.attribute_map.each_pair do |attr, param|
202
+ value = self.send(attr)
203
+ if value.nil?
204
+ is_nullable = self.class.openapi_nullable.include?(attr)
205
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
206
+ end
207
+
208
+ hash[param] = _to_hash(value)
209
+ end
210
+ hash
211
+ end
212
+
213
+ # Outputs non-array value in the form of hash
214
+ # For object, use to_hash. Otherwise, just return the value
215
+ # @param [Object] value Any valid value
216
+ # @return [Hash] Returns the value in the form of hash
217
+ def _to_hash(value)
218
+ if value.is_a?(Array)
219
+ value.compact.map { |v| _to_hash(v) }
220
+ elsif value.is_a?(Hash)
221
+ {}.tap do |hash|
222
+ value.each { |k, v| hash[k] = _to_hash(v) }
223
+ end
224
+ elsif value.respond_to? :to_hash
225
+ value.to_hash
226
+ else
227
+ value
228
+ end
229
+ end
230
+ end
231
+ end