lib/ionoscloud/models/kubernetes_maintenance_window.rb in ionoscloud-6.0.0.beta.4 vs lib/ionoscloud/models/kubernetes_maintenance_window.rb in ionoscloud-6.0.0
- old
+ new
@@ -1,11 +1,11 @@
=begin
#CLOUD API
#IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on.
-The version of the OpenAPI document: 6.0-SDK.3
+The version of the OpenAPI document: 6.0
Generated by: https://openapi-generator.tech
OpenAPI Generator version: 5.2.1-SNAPSHOT
=end
@@ -13,13 +13,15 @@
require 'date'
require 'time'
module Ionoscloud
class KubernetesMaintenanceWindow
+
# The day of the week for a maintenance window.
attr_accessor :day_of_the_week
+
# The time to use for a maintenance window. Accepted formats are: HH:mm:ss; HH:mm:ss\"Z\"; HH:mm:ssZ. This time may varies by 15 minutes.
attr_accessor :time
class EnumAttributeValidator
attr_reader :datatype
@@ -44,11 +46,13 @@
end
# Attribute mapping from ruby-style variable name to JSON key.
def self.attribute_map
{
+
:'day_of_the_week' => :'dayOfTheWeek',
+
:'time' => :'time'
}
end
# Returns all the JSON keys this model knows about
@@ -57,18 +61,22 @@
end
# Attribute type mapping.
def self.openapi_types
{
+
:'day_of_the_week' => :'String',
+
:'time' => :'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
@@ -82,61 +90,69 @@
if (!self.class.attribute_map.key?(k.to_sym))
fail ArgumentError, "`#{k}` is not a valid attribute in `Ionoscloud::KubernetesMaintenanceWindow`. 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?(:'day_of_the_week')
self.day_of_the_week = attributes[:'day_of_the_week']
end
+
if attributes.key?(:'time')
self.time = attributes[:'time']
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 @day_of_the_week.nil?
invalid_properties.push('invalid value for "day_of_the_week", day_of_the_week cannot be nil.')
end
+
if @time.nil?
invalid_properties.push('invalid value for "time", time 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 @day_of_the_week.nil?
day_of_the_week_validator = EnumAttributeValidator.new('String', ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"])
return false unless day_of_the_week_validator.valid?(@day_of_the_week)
+
return false if @time.nil?
true
end
+
# Custom attribute writer method checking allowed values (enum).
# @param [Object] day_of_the_week Object to be assigned
def day_of_the_week=(day_of_the_week)
validator = EnumAttributeValidator.new('String', ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"])
unless validator.valid?(day_of_the_week)
fail ArgumentError, "invalid value for \"day_of_the_week\", must be one of #{validator.allowable_values}."
end
@day_of_the_week = day_of_the_week
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 &&
- day_of_the_week == o.day_of_the_week &&
- time == o.time
+ day_of_the_week == o.day_of_the_week &&
+ time == o.time
end
# @see the `==` method
# @param [Object] Object to be compared
def eql?(o)