lib/ionoscloud/models/kubernetes_node_properties.rb in ionoscloud-5.1.1 vs lib/ionoscloud/models/kubernetes_node_properties.rb in ionoscloud-5.1.2

- old
+ new

@@ -13,28 +13,36 @@ require 'date' require 'time' module Ionoscloud class KubernetesNodeProperties + # A Kubernetes Node Name. attr_accessor :name + # A valid public IP. attr_accessor :public_ip + # A valid private IP. attr_accessor :private_ip + # 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. attr_accessor :k8s_version # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { + :'name' => :'name', + :'public_ip' => :'publicIP', + :'private_ip' => :'privateIP', + :'k8s_version' => :'k8sVersion' } end # Returns all the JSON keys this model knows about @@ -43,20 +51,28 @@ end # Attribute type mapping. def self.openapi_types { + :'name' => :'String', + :'public_ip' => :'String', + :'private_ip' => :'String', + :'k8s_version' => :'String' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + + + + ]) end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash @@ -70,59 +86,75 @@ if (!self.class.attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `Ionoscloud::KubernetesNodeProperties`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } + if attributes.key?(:'name') self.name = attributes[:'name'] end + if attributes.key?(:'public_ip') self.public_ip = attributes[:'public_ip'] end + if attributes.key?(:'private_ip') self.private_ip = attributes[:'private_ip'] end + if attributes.key?(:'k8s_version') self.k8s_version = attributes[:'k8s_version'] 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 @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 @name.nil? + + + return false if @k8s_version.nil? true end + + + + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) return true if self.equal?(o) self.class == o.class && - name == o.name && - public_ip == o.public_ip && - private_ip == o.private_ip && - k8s_version == o.k8s_version + name == o.name && + public_ip == o.public_ip && + private_ip == o.private_ip && + k8s_version == o.k8s_version end # @see the `==` method # @param [Object] Object to be compared def eql?(o)