ionoscloud 5.0.0.beta.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/DOCS.md +14618 -0
- data/Gemfile +9 -0
- data/README.md +55 -0
- data/Rakefile +10 -0
- data/git_push.sh +58 -0
- data/ionoscloud.gemspec +38 -0
- data/lib/ionoscloud.rb +181 -0
- data/lib/ionoscloud/api/_api.rb +96 -0
- data/lib/ionoscloud/api/backup_unit_api.rb +583 -0
- data/lib/ionoscloud/api/contract_api.rb +96 -0
- data/lib/ionoscloud/api/data_center_api.rb +532 -0
- data/lib/ionoscloud/api/image_api.rb +432 -0
- data/lib/ionoscloud/api/ip_blocks_api.rb +514 -0
- data/lib/ionoscloud/api/kubernetes_api.rb +1479 -0
- data/lib/ionoscloud/api/label_api.rb +2460 -0
- data/lib/ionoscloud/api/lan_api.rb +858 -0
- data/lib/ionoscloud/api/load_balancer_api.rb +950 -0
- data/lib/ionoscloud/api/location_api.rb +262 -0
- data/lib/ionoscloud/api/nic_api.rb +1222 -0
- data/lib/ionoscloud/api/private_cross_connect_api.rb +426 -0
- data/lib/ionoscloud/api/request_api.rb +283 -0
- data/lib/ionoscloud/api/server_api.rb +1679 -0
- data/lib/ionoscloud/api/snapshot_api.rb +432 -0
- data/lib/ionoscloud/api/user_management_api.rb +2495 -0
- data/lib/ionoscloud/api/volume_api.rb +763 -0
- data/lib/ionoscloud/api_client.rb +521 -0
- data/lib/ionoscloud/api_error.rb +57 -0
- data/lib/ionoscloud/configuration.rb +291 -0
- data/lib/ionoscloud/models/attached_volumes.rb +278 -0
- data/lib/ionoscloud/models/backup_unit.rb +294 -0
- data/lib/ionoscloud/models/backup_unit_properties.rb +242 -0
- data/lib/ionoscloud/models/backup_unit_sso.rb +217 -0
- data/lib/ionoscloud/models/backup_units.rb +283 -0
- data/lib/ionoscloud/models/balanced_nics.rb +278 -0
- data/lib/ionoscloud/models/cdroms.rb +278 -0
- data/lib/ionoscloud/models/connectable_datacenter.rb +234 -0
- data/lib/ionoscloud/models/contract.rb +231 -0
- data/lib/ionoscloud/models/contract_properties.rb +256 -0
- data/lib/ionoscloud/models/data_center_entities.rb +243 -0
- data/lib/ionoscloud/models/datacenter.rb +269 -0
- data/lib/ionoscloud/models/datacenter_element_metadata.rb +321 -0
- data/lib/ionoscloud/models/datacenter_properties.rb +296 -0
- data/lib/ionoscloud/models/datacenters.rb +278 -0
- data/lib/ionoscloud/models/error.rb +228 -0
- data/lib/ionoscloud/models/error_message.rb +227 -0
- data/lib/ionoscloud/models/firewall_rule.rb +260 -0
- data/lib/ionoscloud/models/firewall_rules.rb +278 -0
- data/lib/ionoscloud/models/firewallrule_properties.rb +468 -0
- data/lib/ionoscloud/models/group.rb +260 -0
- data/lib/ionoscloud/models/group_entities.rb +225 -0
- data/lib/ionoscloud/models/group_members.rb +249 -0
- data/lib/ionoscloud/models/group_properties.rb +307 -0
- data/lib/ionoscloud/models/group_share.rb +251 -0
- data/lib/ionoscloud/models/group_share_properties.rb +227 -0
- data/lib/ionoscloud/models/group_shares.rb +249 -0
- data/lib/ionoscloud/models/group_users.rb +250 -0
- data/lib/ionoscloud/models/groups.rb +249 -0
- data/lib/ionoscloud/models/image.rb +260 -0
- data/lib/ionoscloud/models/image_properties.rb +428 -0
- data/lib/ionoscloud/models/images.rb +249 -0
- data/lib/ionoscloud/models/info.rb +237 -0
- data/lib/ionoscloud/models/ip_block.rb +260 -0
- data/lib/ionoscloud/models/ip_block_properties.rb +271 -0
- data/lib/ionoscloud/models/ip_blocks.rb +249 -0
- data/lib/ionoscloud/models/ip_consumer.rb +270 -0
- data/lib/ionoscloud/models/ip_failover.rb +225 -0
- data/lib/ionoscloud/models/kubernetes_auto_scaling.rb +227 -0
- data/lib/ionoscloud/models/kubernetes_cluster.rb +303 -0
- data/lib/ionoscloud/models/kubernetes_cluster_entities.rb +216 -0
- data/lib/ionoscloud/models/kubernetes_cluster_properties.rb +265 -0
- data/lib/ionoscloud/models/kubernetes_cluster_properties_for_post_and_put.rb +241 -0
- data/lib/ionoscloud/models/kubernetes_clusters.rb +283 -0
- data/lib/ionoscloud/models/kubernetes_config.rb +285 -0
- data/lib/ionoscloud/models/kubernetes_config_properties.rb +217 -0
- data/lib/ionoscloud/models/kubernetes_maintenance_window.rb +261 -0
- data/lib/ionoscloud/models/kubernetes_node.rb +294 -0
- data/lib/ionoscloud/models/kubernetes_node_metadata.rb +291 -0
- data/lib/ionoscloud/models/kubernetes_node_pool.rb +294 -0
- data/lib/ionoscloud/models/kubernetes_node_pool_for_put.rb +294 -0
- data/lib/ionoscloud/models/kubernetes_node_pool_lan.rb +217 -0
- data/lib/ionoscloud/models/kubernetes_node_pool_properties.rb +476 -0
- data/lib/ionoscloud/models/kubernetes_node_pool_properties_for_post.rb +464 -0
- data/lib/ionoscloud/models/kubernetes_node_pool_properties_for_put.rb +464 -0
- data/lib/ionoscloud/models/kubernetes_node_pools.rb +283 -0
- data/lib/ionoscloud/models/kubernetes_node_properties.rb +252 -0
- data/lib/ionoscloud/models/kubernetes_nodes.rb +283 -0
- data/lib/ionoscloud/models/label.rb +294 -0
- data/lib/ionoscloud/models/label_properties.rb +257 -0
- data/lib/ionoscloud/models/label_resource.rb +294 -0
- data/lib/ionoscloud/models/label_resource_properties.rb +227 -0
- data/lib/ionoscloud/models/label_resources.rb +312 -0
- data/lib/ionoscloud/models/labels.rb +283 -0
- data/lib/ionoscloud/models/lan.rb +269 -0
- data/lib/ionoscloud/models/lan_entities.rb +216 -0
- data/lib/ionoscloud/models/lan_nics.rb +278 -0
- data/lib/ionoscloud/models/lan_post.rb +269 -0
- data/lib/ionoscloud/models/lan_properties.rb +249 -0
- data/lib/ionoscloud/models/lan_properties_post.rb +249 -0
- data/lib/ionoscloud/models/lans.rb +278 -0
- data/lib/ionoscloud/models/loadbalancer.rb +269 -0
- data/lib/ionoscloud/models/loadbalancer_entities.rb +216 -0
- data/lib/ionoscloud/models/loadbalancer_properties.rb +271 -0
- data/lib/ionoscloud/models/loadbalancers.rb +278 -0
- data/lib/ionoscloud/models/location.rb +260 -0
- data/lib/ionoscloud/models/location_properties.rb +263 -0
- data/lib/ionoscloud/models/locations.rb +249 -0
- data/lib/ionoscloud/models/nic.rb +269 -0
- data/lib/ionoscloud/models/nic_entities.rb +216 -0
- data/lib/ionoscloud/models/nic_properties.rb +284 -0
- data/lib/ionoscloud/models/nics.rb +278 -0
- data/lib/ionoscloud/models/no_state_meta_data.rb +277 -0
- data/lib/ionoscloud/models/pagination_links.rb +237 -0
- data/lib/ionoscloud/models/peer.rb +252 -0
- data/lib/ionoscloud/models/private_cross_connect.rb +260 -0
- data/lib/ionoscloud/models/private_cross_connect_properties.rb +251 -0
- data/lib/ionoscloud/models/private_cross_connects.rb +249 -0
- data/lib/ionoscloud/models/request.rb +260 -0
- data/lib/ionoscloud/models/request_metadata.rb +246 -0
- data/lib/ionoscloud/models/request_properties.rb +245 -0
- data/lib/ionoscloud/models/request_status.rb +246 -0
- data/lib/ionoscloud/models/request_status_metadata.rb +280 -0
- data/lib/ionoscloud/models/request_target.rb +259 -0
- data/lib/ionoscloud/models/requests.rb +293 -0
- data/lib/ionoscloud/models/resource.rb +265 -0
- data/lib/ionoscloud/models/resource_entities.rb +216 -0
- data/lib/ionoscloud/models/resource_groups.rb +250 -0
- data/lib/ionoscloud/models/resource_limits.rb +462 -0
- data/lib/ionoscloud/models/resource_properties.rb +227 -0
- data/lib/ionoscloud/models/resource_reference.rb +242 -0
- data/lib/ionoscloud/models/resources.rb +250 -0
- data/lib/ionoscloud/models/resources_users.rb +250 -0
- data/lib/ionoscloud/models/s3_key.rb +260 -0
- data/lib/ionoscloud/models/s3_key_metadata.rb +227 -0
- data/lib/ionoscloud/models/s3_key_properties.rb +227 -0
- data/lib/ionoscloud/models/s3_keys.rb +249 -0
- data/lib/ionoscloud/models/s3_object_storage_sso.rb +217 -0
- data/lib/ionoscloud/models/server.rb +269 -0
- data/lib/ionoscloud/models/server_entities.rb +234 -0
- data/lib/ionoscloud/models/server_properties.rb +341 -0
- data/lib/ionoscloud/models/servers.rb +278 -0
- data/lib/ionoscloud/models/snapshot.rb +260 -0
- data/lib/ionoscloud/models/snapshot_properties.rb +401 -0
- data/lib/ionoscloud/models/snapshots.rb +249 -0
- data/lib/ionoscloud/models/type.rb +59 -0
- data/lib/ionoscloud/models/user.rb +269 -0
- data/lib/ionoscloud/models/user_metadata.rb +237 -0
- data/lib/ionoscloud/models/user_properties.rb +297 -0
- data/lib/ionoscloud/models/users.rb +249 -0
- data/lib/ionoscloud/models/users_entities.rb +225 -0
- data/lib/ionoscloud/models/volume.rb +260 -0
- data/lib/ionoscloud/models/volume_properties.rb +463 -0
- data/lib/ionoscloud/models/volumes.rb +278 -0
- data/lib/ionoscloud/version.rb +15 -0
- data/spec/api/_api_spec.rb +49 -0
- data/spec/api/backup_unit_api_spec.rb +140 -0
- data/spec/api/contract_api_spec.rb +49 -0
- data/spec/api/data_center_api_spec.rb +128 -0
- data/spec/api/image_api_spec.rb +111 -0
- data/spec/api/ip_blocks_api_spec.rb +126 -0
- data/spec/api/kubernetes_api_spec.rb +306 -0
- data/spec/api/label_api_spec.rb +480 -0
- data/spec/api/lan_api_spec.rb +186 -0
- data/spec/api/load_balancer_api_spec.rb +203 -0
- data/spec/api/location_api_spec.rb +80 -0
- data/spec/api/nic_api_spec.rb +251 -0
- data/spec/api/private_cross_connect_api_spec.rb +110 -0
- data/spec/api/request_api_spec.rb +84 -0
- data/spec/api/server_api_spec.rb +337 -0
- data/spec/api/snapshot_api_spec.rb +111 -0
- data/spec/api/user_management_api_spec.rb +495 -0
- data/spec/api/volume_api_spec.rb +171 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/attached_volumes_spec.rb +70 -0
- data/spec/models/backup_unit_properties_spec.rb +46 -0
- data/spec/models/backup_unit_spec.rb +62 -0
- data/spec/models/backup_unit_sso_spec.rb +34 -0
- data/spec/models/backup_units_spec.rb +56 -0
- data/spec/models/balanced_nics_spec.rb +70 -0
- data/spec/models/cdroms_spec.rb +70 -0
- data/spec/models/connectable_datacenter_spec.rb +46 -0
- data/spec/models/contract_properties_spec.rb +58 -0
- data/spec/models/contract_spec.rb +40 -0
- data/spec/models/data_center_entities_spec.rb +52 -0
- data/spec/models/datacenter_element_metadata_spec.rb +80 -0
- data/spec/models/datacenter_properties_spec.rb +68 -0
- data/spec/models/datacenter_spec.rb +64 -0
- data/spec/models/datacenters_spec.rb +70 -0
- data/spec/models/error_message_spec.rb +40 -0
- data/spec/models/error_spec.rb +40 -0
- data/spec/models/firewall_rule_spec.rb +58 -0
- data/spec/models/firewall_rules_spec.rb +70 -0
- data/spec/models/firewallrule_properties_spec.rb +98 -0
- data/spec/models/group_entities_spec.rb +40 -0
- data/spec/models/group_members_spec.rb +52 -0
- data/spec/models/group_properties_spec.rb +88 -0
- data/spec/models/group_share_properties_spec.rb +40 -0
- data/spec/models/group_share_spec.rb +52 -0
- data/spec/models/group_shares_spec.rb +52 -0
- data/spec/models/group_spec.rb +58 -0
- data/spec/models/group_users_spec.rb +52 -0
- data/spec/models/groups_spec.rb +52 -0
- data/spec/models/image_properties_spec.rb +138 -0
- data/spec/models/image_spec.rb +58 -0
- data/spec/models/images_spec.rb +52 -0
- data/spec/models/info_spec.rb +46 -0
- data/spec/models/ip_block_properties_spec.rb +58 -0
- data/spec/models/ip_block_spec.rb +58 -0
- data/spec/models/ip_blocks_spec.rb +52 -0
- data/spec/models/ip_consumer_spec.rb +70 -0
- data/spec/models/ip_failover_spec.rb +40 -0
- data/spec/models/kubernetes_auto_scaling_spec.rb +40 -0
- data/spec/models/kubernetes_cluster_entities_spec.rb +34 -0
- data/spec/models/kubernetes_cluster_properties_for_post_and_put_spec.rb +46 -0
- data/spec/models/kubernetes_cluster_properties_spec.rb +58 -0
- data/spec/models/kubernetes_cluster_spec.rb +68 -0
- data/spec/models/kubernetes_clusters_spec.rb +56 -0
- data/spec/models/kubernetes_config_properties_spec.rb +34 -0
- data/spec/models/kubernetes_config_spec.rb +56 -0
- data/spec/models/kubernetes_maintenance_window_spec.rb +44 -0
- data/spec/models/kubernetes_node_metadata_spec.rb +62 -0
- data/spec/models/kubernetes_node_pool_for_put_spec.rb +62 -0
- data/spec/models/kubernetes_node_pool_lan_spec.rb +34 -0
- data/spec/models/kubernetes_node_pool_properties_for_post_spec.rb +132 -0
- data/spec/models/kubernetes_node_pool_properties_for_put_spec.rb +132 -0
- data/spec/models/kubernetes_node_pool_properties_spec.rb +138 -0
- data/spec/models/kubernetes_node_pool_spec.rb +62 -0
- data/spec/models/kubernetes_node_pools_spec.rb +56 -0
- data/spec/models/kubernetes_node_properties_spec.rb +46 -0
- data/spec/models/kubernetes_node_spec.rb +62 -0
- data/spec/models/kubernetes_nodes_spec.rb +56 -0
- data/spec/models/label_properties_spec.rb +58 -0
- data/spec/models/label_resource_properties_spec.rb +40 -0
- data/spec/models/label_resource_spec.rb +62 -0
- data/spec/models/label_resources_spec.rb +74 -0
- data/spec/models/label_spec.rb +62 -0
- data/spec/models/labels_spec.rb +56 -0
- data/spec/models/lan_entities_spec.rb +34 -0
- data/spec/models/lan_nics_spec.rb +70 -0
- data/spec/models/lan_post_spec.rb +64 -0
- data/spec/models/lan_properties_post_spec.rb +52 -0
- data/spec/models/lan_properties_spec.rb +52 -0
- data/spec/models/lan_spec.rb +64 -0
- data/spec/models/lans_spec.rb +70 -0
- data/spec/models/loadbalancer_entities_spec.rb +34 -0
- data/spec/models/loadbalancer_properties_spec.rb +50 -0
- data/spec/models/loadbalancer_spec.rb +64 -0
- data/spec/models/loadbalancers_spec.rb +70 -0
- data/spec/models/location_properties_spec.rb +50 -0
- data/spec/models/location_spec.rb +58 -0
- data/spec/models/locations_spec.rb +52 -0
- data/spec/models/nic_entities_spec.rb +34 -0
- data/spec/models/nic_properties_spec.rb +70 -0
- data/spec/models/nic_spec.rb +64 -0
- data/spec/models/nics_spec.rb +70 -0
- data/spec/models/no_state_meta_data_spec.rb +70 -0
- data/spec/models/pagination_links_spec.rb +46 -0
- data/spec/models/peer_spec.rb +58 -0
- data/spec/models/private_cross_connect_properties_spec.rb +52 -0
- data/spec/models/private_cross_connect_spec.rb +58 -0
- data/spec/models/private_cross_connects_spec.rb +52 -0
- data/spec/models/request_metadata_spec.rb +52 -0
- data/spec/models/request_properties_spec.rb +52 -0
- data/spec/models/request_spec.rb +58 -0
- data/spec/models/request_status_metadata_spec.rb +56 -0
- data/spec/models/request_status_spec.rb +52 -0
- data/spec/models/request_target_spec.rb +44 -0
- data/spec/models/requests_spec.rb +70 -0
- data/spec/models/resource_entities_spec.rb +34 -0
- data/spec/models/resource_groups_spec.rb +52 -0
- data/spec/models/resource_limits_spec.rb +130 -0
- data/spec/models/resource_properties_spec.rb +40 -0
- data/spec/models/resource_reference_spec.rb +46 -0
- data/spec/models/resource_spec.rb +64 -0
- data/spec/models/resources_spec.rb +52 -0
- data/spec/models/resources_users_spec.rb +52 -0
- data/spec/models/s3_key_metadata_spec.rb +40 -0
- data/spec/models/s3_key_properties_spec.rb +40 -0
- data/spec/models/s3_key_spec.rb +58 -0
- data/spec/models/s3_keys_spec.rb +52 -0
- data/spec/models/s3_object_storage_sso_spec.rb +34 -0
- data/spec/models/server_entities_spec.rb +46 -0
- data/spec/models/server_properties_spec.rb +84 -0
- data/spec/models/server_spec.rb +64 -0
- data/spec/models/servers_spec.rb +70 -0
- data/spec/models/snapshot_properties_spec.rb +128 -0
- data/spec/models/snapshot_spec.rb +58 -0
- data/spec/models/snapshots_spec.rb +52 -0
- data/spec/models/type_spec.rb +28 -0
- data/spec/models/user_metadata_spec.rb +46 -0
- data/spec/models/user_properties_spec.rb +82 -0
- data/spec/models/user_spec.rb +64 -0
- data/spec/models/users_entities_spec.rb +40 -0
- data/spec/models/users_spec.rb +52 -0
- data/spec/models/volume_properties_spec.rb +152 -0
- data/spec/models/volume_spec.rb +58 -0
- data/spec/models/volumes_spec.rb +70 -0
- data/spec/spec_helper.rb +111 -0
- metadata +532 -0
@@ -0,0 +1,476 @@
|
|
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 KubernetesNodePoolProperties
|
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
|
+
attr_accessor :name
|
20
|
+
|
21
|
+
# A valid uuid of the datacenter on which user has access
|
22
|
+
attr_accessor :datacenter_id
|
23
|
+
|
24
|
+
# Number of nodes part of the Node Pool
|
25
|
+
attr_accessor :node_count
|
26
|
+
|
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
|
+
# 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
|
+
attr_accessor :k8s_version
|
47
|
+
|
48
|
+
attr_accessor :maintenance_window
|
49
|
+
|
50
|
+
attr_accessor :auto_scaling
|
51
|
+
|
52
|
+
# array of additional LANs attached to worker nodes
|
53
|
+
attr_accessor :lans
|
54
|
+
|
55
|
+
# map of labels attached to node pool
|
56
|
+
attr_accessor :labels
|
57
|
+
|
58
|
+
# map of annotations attached to node pool
|
59
|
+
attr_accessor :annotations
|
60
|
+
|
61
|
+
# 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
|
+
attr_accessor :public_ips
|
63
|
+
|
64
|
+
# List of available versions for upgrading the node pool
|
65
|
+
attr_accessor :available_upgrade_versions
|
66
|
+
|
67
|
+
class EnumAttributeValidator
|
68
|
+
attr_reader :datatype
|
69
|
+
attr_reader :allowable_values
|
70
|
+
|
71
|
+
def initialize(datatype, allowable_values)
|
72
|
+
@allowable_values = allowable_values.map do |value|
|
73
|
+
case datatype.to_s
|
74
|
+
when /Integer/i
|
75
|
+
value.to_i
|
76
|
+
when /Float/i
|
77
|
+
value.to_f
|
78
|
+
else
|
79
|
+
value
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
def valid?(value)
|
85
|
+
!value || allowable_values.include?(value)
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
90
|
+
def self.attribute_map
|
91
|
+
{
|
92
|
+
:'name' => :'name',
|
93
|
+
:'datacenter_id' => :'datacenterId',
|
94
|
+
:'node_count' => :'nodeCount',
|
95
|
+
:'cpu_family' => :'cpuFamily',
|
96
|
+
:'cores_count' => :'coresCount',
|
97
|
+
:'ram_size' => :'ramSize',
|
98
|
+
:'availability_zone' => :'availabilityZone',
|
99
|
+
:'storage_type' => :'storageType',
|
100
|
+
:'storage_size' => :'storageSize',
|
101
|
+
:'k8s_version' => :'k8sVersion',
|
102
|
+
:'maintenance_window' => :'maintenanceWindow',
|
103
|
+
:'auto_scaling' => :'autoScaling',
|
104
|
+
:'lans' => :'lans',
|
105
|
+
:'labels' => :'labels',
|
106
|
+
:'annotations' => :'annotations',
|
107
|
+
:'public_ips' => :'publicIps',
|
108
|
+
:'available_upgrade_versions' => :'availableUpgradeVersions'
|
109
|
+
}
|
110
|
+
end
|
111
|
+
|
112
|
+
# Returns all the JSON keys this model knows about
|
113
|
+
def self.acceptable_attributes
|
114
|
+
attribute_map.values
|
115
|
+
end
|
116
|
+
|
117
|
+
# Attribute type mapping.
|
118
|
+
def self.openapi_types
|
119
|
+
{
|
120
|
+
:'name' => :'String',
|
121
|
+
:'datacenter_id' => :'String',
|
122
|
+
:'node_count' => :'Integer',
|
123
|
+
:'cpu_family' => :'String',
|
124
|
+
:'cores_count' => :'Integer',
|
125
|
+
:'ram_size' => :'Integer',
|
126
|
+
:'availability_zone' => :'String',
|
127
|
+
:'storage_type' => :'String',
|
128
|
+
:'storage_size' => :'Integer',
|
129
|
+
:'k8s_version' => :'String',
|
130
|
+
:'maintenance_window' => :'KubernetesMaintenanceWindow',
|
131
|
+
:'auto_scaling' => :'KubernetesAutoScaling',
|
132
|
+
:'lans' => :'Array<KubernetesNodePoolLan>',
|
133
|
+
:'labels' => :'Hash<String, String>',
|
134
|
+
:'annotations' => :'Hash<String, String>',
|
135
|
+
:'public_ips' => :'Array<String>',
|
136
|
+
:'available_upgrade_versions' => :'Array<String>'
|
137
|
+
}
|
138
|
+
end
|
139
|
+
|
140
|
+
# List of attributes with nullable: true
|
141
|
+
def self.openapi_nullable
|
142
|
+
Set.new([
|
143
|
+
])
|
144
|
+
end
|
145
|
+
|
146
|
+
# Initializes the object
|
147
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
148
|
+
def initialize(attributes = {})
|
149
|
+
if (!attributes.is_a?(Hash))
|
150
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Ionoscloud::KubernetesNodePoolProperties` initialize method"
|
151
|
+
end
|
152
|
+
|
153
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
154
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
155
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
156
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Ionoscloud::KubernetesNodePoolProperties`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
157
|
+
end
|
158
|
+
h[k.to_sym] = v
|
159
|
+
}
|
160
|
+
|
161
|
+
if attributes.key?(:'name')
|
162
|
+
self.name = attributes[:'name']
|
163
|
+
end
|
164
|
+
|
165
|
+
if attributes.key?(:'datacenter_id')
|
166
|
+
self.datacenter_id = attributes[:'datacenter_id']
|
167
|
+
end
|
168
|
+
|
169
|
+
if attributes.key?(:'node_count')
|
170
|
+
self.node_count = attributes[:'node_count']
|
171
|
+
end
|
172
|
+
|
173
|
+
if attributes.key?(:'cpu_family')
|
174
|
+
self.cpu_family = attributes[:'cpu_family']
|
175
|
+
end
|
176
|
+
|
177
|
+
if attributes.key?(:'cores_count')
|
178
|
+
self.cores_count = attributes[:'cores_count']
|
179
|
+
end
|
180
|
+
|
181
|
+
if attributes.key?(:'ram_size')
|
182
|
+
self.ram_size = attributes[:'ram_size']
|
183
|
+
end
|
184
|
+
|
185
|
+
if attributes.key?(:'availability_zone')
|
186
|
+
self.availability_zone = attributes[:'availability_zone']
|
187
|
+
end
|
188
|
+
|
189
|
+
if attributes.key?(:'storage_type')
|
190
|
+
self.storage_type = attributes[:'storage_type']
|
191
|
+
end
|
192
|
+
|
193
|
+
if attributes.key?(:'storage_size')
|
194
|
+
self.storage_size = attributes[:'storage_size']
|
195
|
+
end
|
196
|
+
|
197
|
+
if attributes.key?(:'k8s_version')
|
198
|
+
self.k8s_version = attributes[:'k8s_version']
|
199
|
+
end
|
200
|
+
|
201
|
+
if attributes.key?(:'maintenance_window')
|
202
|
+
self.maintenance_window = attributes[:'maintenance_window']
|
203
|
+
end
|
204
|
+
|
205
|
+
if attributes.key?(:'auto_scaling')
|
206
|
+
self.auto_scaling = attributes[:'auto_scaling']
|
207
|
+
end
|
208
|
+
|
209
|
+
if attributes.key?(:'lans')
|
210
|
+
if (value = attributes[:'lans']).is_a?(Array)
|
211
|
+
self.lans = value
|
212
|
+
end
|
213
|
+
end
|
214
|
+
|
215
|
+
if attributes.key?(:'labels')
|
216
|
+
if (value = attributes[:'labels']).is_a?(Hash)
|
217
|
+
self.labels = value
|
218
|
+
end
|
219
|
+
end
|
220
|
+
|
221
|
+
if attributes.key?(:'annotations')
|
222
|
+
if (value = attributes[:'annotations']).is_a?(Hash)
|
223
|
+
self.annotations = value
|
224
|
+
end
|
225
|
+
end
|
226
|
+
|
227
|
+
if attributes.key?(:'public_ips')
|
228
|
+
if (value = attributes[:'public_ips']).is_a?(Array)
|
229
|
+
self.public_ips = value
|
230
|
+
end
|
231
|
+
end
|
232
|
+
|
233
|
+
if attributes.key?(:'available_upgrade_versions')
|
234
|
+
if (value = attributes[:'available_upgrade_versions']).is_a?(Array)
|
235
|
+
self.available_upgrade_versions = value
|
236
|
+
end
|
237
|
+
end
|
238
|
+
end
|
239
|
+
|
240
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
241
|
+
# @return Array for valid properties with the reasons
|
242
|
+
def list_invalid_properties
|
243
|
+
invalid_properties = Array.new
|
244
|
+
if @name.nil?
|
245
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
246
|
+
end
|
247
|
+
|
248
|
+
if @datacenter_id.nil?
|
249
|
+
invalid_properties.push('invalid value for "datacenter_id", datacenter_id cannot be nil.')
|
250
|
+
end
|
251
|
+
|
252
|
+
if @node_count.nil?
|
253
|
+
invalid_properties.push('invalid value for "node_count", node_count cannot be nil.')
|
254
|
+
end
|
255
|
+
|
256
|
+
if @cpu_family.nil?
|
257
|
+
invalid_properties.push('invalid value for "cpu_family", cpu_family cannot be nil.')
|
258
|
+
end
|
259
|
+
|
260
|
+
if @cores_count.nil?
|
261
|
+
invalid_properties.push('invalid value for "cores_count", cores_count cannot be nil.')
|
262
|
+
end
|
263
|
+
|
264
|
+
if @ram_size.nil?
|
265
|
+
invalid_properties.push('invalid value for "ram_size", ram_size cannot be nil.')
|
266
|
+
end
|
267
|
+
|
268
|
+
if @availability_zone.nil?
|
269
|
+
invalid_properties.push('invalid value for "availability_zone", availability_zone cannot be nil.')
|
270
|
+
end
|
271
|
+
|
272
|
+
if @storage_type.nil?
|
273
|
+
invalid_properties.push('invalid value for "storage_type", storage_type cannot be nil.')
|
274
|
+
end
|
275
|
+
|
276
|
+
if @storage_size.nil?
|
277
|
+
invalid_properties.push('invalid value for "storage_size", storage_size cannot be nil.')
|
278
|
+
end
|
279
|
+
|
280
|
+
invalid_properties
|
281
|
+
end
|
282
|
+
|
283
|
+
# Check to see if the all the properties in the model are valid
|
284
|
+
# @return true if the model is valid
|
285
|
+
def valid?
|
286
|
+
return false if @name.nil?
|
287
|
+
return false if @datacenter_id.nil?
|
288
|
+
return false if @node_count.nil?
|
289
|
+
return false if @cpu_family.nil?
|
290
|
+
return false if @cores_count.nil?
|
291
|
+
return false if @ram_size.nil?
|
292
|
+
return false if @availability_zone.nil?
|
293
|
+
availability_zone_validator = EnumAttributeValidator.new('String', ["AUTO", "ZONE_1", "ZONE_2"])
|
294
|
+
return false unless availability_zone_validator.valid?(@availability_zone)
|
295
|
+
return false if @storage_type.nil?
|
296
|
+
storage_type_validator = EnumAttributeValidator.new('String', ["HDD", "SSD"])
|
297
|
+
return false unless storage_type_validator.valid?(@storage_type)
|
298
|
+
return false if @storage_size.nil?
|
299
|
+
true
|
300
|
+
end
|
301
|
+
|
302
|
+
# Custom attribute writer method checking allowed values (enum).
|
303
|
+
# @param [Object] availability_zone Object to be assigned
|
304
|
+
def availability_zone=(availability_zone)
|
305
|
+
validator = EnumAttributeValidator.new('String', ["AUTO", "ZONE_1", "ZONE_2"])
|
306
|
+
unless validator.valid?(availability_zone)
|
307
|
+
fail ArgumentError, "invalid value for \"availability_zone\", must be one of #{validator.allowable_values}."
|
308
|
+
end
|
309
|
+
@availability_zone = availability_zone
|
310
|
+
end
|
311
|
+
|
312
|
+
# Custom attribute writer method checking allowed values (enum).
|
313
|
+
# @param [Object] storage_type Object to be assigned
|
314
|
+
def storage_type=(storage_type)
|
315
|
+
validator = EnumAttributeValidator.new('String', ["HDD", "SSD"])
|
316
|
+
unless validator.valid?(storage_type)
|
317
|
+
fail ArgumentError, "invalid value for \"storage_type\", must be one of #{validator.allowable_values}."
|
318
|
+
end
|
319
|
+
@storage_type = storage_type
|
320
|
+
end
|
321
|
+
|
322
|
+
# Checks equality by comparing each attribute.
|
323
|
+
# @param [Object] Object to be compared
|
324
|
+
def ==(o)
|
325
|
+
return true if self.equal?(o)
|
326
|
+
self.class == o.class &&
|
327
|
+
name == o.name &&
|
328
|
+
datacenter_id == o.datacenter_id &&
|
329
|
+
node_count == o.node_count &&
|
330
|
+
cpu_family == o.cpu_family &&
|
331
|
+
cores_count == o.cores_count &&
|
332
|
+
ram_size == o.ram_size &&
|
333
|
+
availability_zone == o.availability_zone &&
|
334
|
+
storage_type == o.storage_type &&
|
335
|
+
storage_size == o.storage_size &&
|
336
|
+
k8s_version == o.k8s_version &&
|
337
|
+
maintenance_window == o.maintenance_window &&
|
338
|
+
auto_scaling == o.auto_scaling &&
|
339
|
+
lans == o.lans &&
|
340
|
+
labels == o.labels &&
|
341
|
+
annotations == o.annotations &&
|
342
|
+
public_ips == o.public_ips &&
|
343
|
+
available_upgrade_versions == o.available_upgrade_versions
|
344
|
+
end
|
345
|
+
|
346
|
+
# @see the `==` method
|
347
|
+
# @param [Object] Object to be compared
|
348
|
+
def eql?(o)
|
349
|
+
self == o
|
350
|
+
end
|
351
|
+
|
352
|
+
# Calculates hash code according to all attributes.
|
353
|
+
# @return [Integer] Hash code
|
354
|
+
def hash
|
355
|
+
[name, datacenter_id, node_count, cpu_family, cores_count, ram_size, availability_zone, storage_type, storage_size, k8s_version, maintenance_window, auto_scaling, lans, labels, annotations, public_ips, available_upgrade_versions].hash
|
356
|
+
end
|
357
|
+
|
358
|
+
# Builds the object from hash
|
359
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
360
|
+
# @return [Object] Returns the model itself
|
361
|
+
def self.build_from_hash(attributes)
|
362
|
+
new.build_from_hash(attributes)
|
363
|
+
end
|
364
|
+
|
365
|
+
# Builds the object from hash
|
366
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
367
|
+
# @return [Object] Returns the model itself
|
368
|
+
def build_from_hash(attributes)
|
369
|
+
return nil unless attributes.is_a?(Hash)
|
370
|
+
self.class.openapi_types.each_pair do |key, type|
|
371
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
372
|
+
self.send("#{key}=", nil)
|
373
|
+
elsif type =~ /\AArray<(.*)>/i
|
374
|
+
# check to ensure the input is an array given that the attribute
|
375
|
+
# is documented as an array but the input is not
|
376
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
377
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
378
|
+
end
|
379
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
380
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
381
|
+
end
|
382
|
+
end
|
383
|
+
|
384
|
+
self
|
385
|
+
end
|
386
|
+
|
387
|
+
# Deserializes the data based on type
|
388
|
+
# @param string type Data type
|
389
|
+
# @param string value Value to be deserialized
|
390
|
+
# @return [Object] Deserialized data
|
391
|
+
def _deserialize(type, value)
|
392
|
+
case type.to_sym
|
393
|
+
when :Time
|
394
|
+
Time.parse(value)
|
395
|
+
when :Date
|
396
|
+
Date.parse(value)
|
397
|
+
when :String
|
398
|
+
value.to_s
|
399
|
+
when :Integer
|
400
|
+
value.to_i
|
401
|
+
when :Float
|
402
|
+
value.to_f
|
403
|
+
when :Boolean
|
404
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
405
|
+
true
|
406
|
+
else
|
407
|
+
false
|
408
|
+
end
|
409
|
+
when :Object
|
410
|
+
# generic object (usually a Hash), return directly
|
411
|
+
value
|
412
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
413
|
+
inner_type = Regexp.last_match[:inner_type]
|
414
|
+
value.map { |v| _deserialize(inner_type, v) }
|
415
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
416
|
+
k_type = Regexp.last_match[:k_type]
|
417
|
+
v_type = Regexp.last_match[:v_type]
|
418
|
+
{}.tap do |hash|
|
419
|
+
value.each do |k, v|
|
420
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
421
|
+
end
|
422
|
+
end
|
423
|
+
else # model
|
424
|
+
# models (e.g. Pet) or oneOf
|
425
|
+
klass = Ionoscloud.const_get(type)
|
426
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
427
|
+
end
|
428
|
+
end
|
429
|
+
|
430
|
+
# Returns the string representation of the object
|
431
|
+
# @return [String] String presentation of the object
|
432
|
+
def to_s
|
433
|
+
to_hash.to_s
|
434
|
+
end
|
435
|
+
|
436
|
+
# to_body is an alias to to_hash (backward compatibility)
|
437
|
+
# @return [Hash] Returns the object in the form of hash
|
438
|
+
def to_body
|
439
|
+
to_hash
|
440
|
+
end
|
441
|
+
|
442
|
+
# Returns the object in the form of hash
|
443
|
+
# @return [Hash] Returns the object in the form of hash
|
444
|
+
def to_hash
|
445
|
+
hash = {}
|
446
|
+
self.class.attribute_map.each_pair do |attr, param|
|
447
|
+
value = self.send(attr)
|
448
|
+
if value.nil?
|
449
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
450
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
451
|
+
end
|
452
|
+
|
453
|
+
hash[param] = _to_hash(value)
|
454
|
+
end
|
455
|
+
hash
|
456
|
+
end
|
457
|
+
|
458
|
+
# Outputs non-array value in the form of hash
|
459
|
+
# For object, use to_hash. Otherwise, just return the value
|
460
|
+
# @param [Object] value Any valid value
|
461
|
+
# @return [Hash] Returns the value in the form of hash
|
462
|
+
def _to_hash(value)
|
463
|
+
if value.is_a?(Array)
|
464
|
+
value.compact.map { |v| _to_hash(v) }
|
465
|
+
elsif value.is_a?(Hash)
|
466
|
+
{}.tap do |hash|
|
467
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
468
|
+
end
|
469
|
+
elsif value.respond_to? :to_hash
|
470
|
+
value.to_hash
|
471
|
+
else
|
472
|
+
value
|
473
|
+
end
|
474
|
+
end
|
475
|
+
end
|
476
|
+
end
|