lib/ionoscloud/models/kubernetes_node_properties.rb in ionoscloud-6.1.1 vs lib/ionoscloud/models/kubernetes_node_properties.rb in ionoscloud-6.1.2
- old
+ new
@@ -14,36 +14,36 @@
require 'time'
module Ionoscloud
class KubernetesNodeProperties
- # A Kubernetes node name.
- attr_accessor :name
+ # The Kubernetes version running in the node pool. Note that this imposes restrictions on which Kubernetes versions can run in the node pools of a cluster. Also, not all Kubernetes versions are suitable upgrade targets for all earlier versions.
+ attr_accessor :k8s_version
- # A valid public IP.
- attr_accessor :public_ip
+ # The Kubernetes node name.
+ attr_accessor :name
- # A valid private IP.
+ # The private IP associated with the node.
attr_accessor :private_ip
- # The Kubernetes version the 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.
- attr_accessor :k8s_version
+ # The public IP associated with the node.
+ attr_accessor :public_ip
# Attribute mapping from ruby-style variable name to JSON key.
def self.attribute_map
{
+ :'k8s_version' => :'k8sVersion',
+
:'name' => :'name',
- :'public_ip' => :'publicIP',
-
:'private_ip' => :'privateIP',
- :'k8s_version' => :'k8sVersion'
+ :'public_ip' => :'publicIP'
}
end
# Returns all the JSON keys this model knows about
def self.acceptable_attributes
@@ -52,17 +52,17 @@
# Attribute type mapping.
def self.openapi_types
{
+ :'k8s_version' => :'String',
+
:'name' => :'String',
- :'public_ip' => :'String',
-
:'private_ip' => :'String',
- :'k8s_version' => :'String'
+ :'public_ip' => :'String'
}
end
# List of attributes with nullable: true
def self.openapi_nullable
@@ -88,58 +88,58 @@
end
h[k.to_sym] = v
}
- if attributes.key?(:'name')
- self.name = attributes[:'name']
+ if attributes.key?(:'k8s_version')
+ self.k8s_version = attributes[:'k8s_version']
end
- if attributes.key?(:'public_ip')
- self.public_ip = attributes[:'public_ip']
+ if attributes.key?(:'name')
+ self.name = attributes[:'name']
end
if attributes.key?(:'private_ip')
self.private_ip = attributes[:'private_ip']
end
- if attributes.key?(:'k8s_version')
- self.k8s_version = attributes[:'k8s_version']
+ if attributes.key?(:'public_ip')
+ self.public_ip = attributes[:'public_ip']
end
end
# Show invalid properties with the reasons. Usually used together with valid?
# @return Array for valid properties with the reasons
def list_invalid_properties
invalid_properties = Array.new
+ if @k8s_version.nil?
+ invalid_properties.push('invalid value for "k8s_version", k8s_version cannot be nil.')
+ end
+
+
if @name.nil?
invalid_properties.push('invalid value for "name", name cannot be nil.')
end
-
- if @k8s_version.nil?
- invalid_properties.push('invalid value for "k8s_version", k8s_version cannot be nil.')
- end
-
invalid_properties
end
# Check to see if the all the properties in the model are valid
# @return true if the model is valid
def valid?
+ return false if @k8s_version.nil?
+
return false if @name.nil?
-
- return false if @k8s_version.nil?
true
end
@@ -148,14 +148,14 @@
# Checks equality by comparing each attribute.
# @param [Object] Object to be compared
def ==(o)
return true if self.equal?(o)
self.class == o.class &&
+ k8s_version == o.k8s_version &&
name == o.name &&
- public_ip == o.public_ip &&
private_ip == o.private_ip &&
- k8s_version == o.k8s_version
+ public_ip == o.public_ip
end
# @see the `==` method
# @param [Object] Object to be compared
def eql?(o)
@@ -163,10 +163,10 @@
end
# Calculates hash code according to all attributes.
# @return [Integer] Hash code
def hash
- [name, public_ip, private_ip, k8s_version].hash
+ [k8s_version, name, private_ip, public_ip].hash
end
# Builds the object from hash
# @param [Hash] attributes Model attributes in the form of hash
# @return [Object] Returns the model itself