lib/ionoscloud/models/datacenter_element_metadata.rb in ionoscloud-5.1.1 vs lib/ionoscloud/models/datacenter_element_metadata.rb in ionoscloud-5.1.2
- old
+ new
@@ -13,31 +13,39 @@
require 'date'
require 'time'
module Ionoscloud
class DatacenterElementMetadata
+
# Resource's Entity Tag as defined in http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11 . Entity Tag is also added as an 'ETag response header to requests which don't use 'depth' parameter.
attr_accessor :etag
+
# The last time the resource was created
attr_accessor :created_date
+
# The user who created the resource.
attr_accessor :created_by
+
# The user id of the user who has created the resource.
attr_accessor :created_by_user_id
+
# The last time the resource has been modified
attr_accessor :last_modified_date
+
# The user who last modified the resource.
attr_accessor :last_modified_by
+
# The user id of the user who has last modified the resource.
attr_accessor :last_modified_by_user_id
+
# State of the resource. *AVAILABLE* There are no pending modification requests for this item; *BUSY* There is at least one modification request pending and all following requests will be queued; *INACTIVE* Resource has been de-provisioned; *DEPLOYING* Resource state DEPLOYING - relevant for Kubernetes cluster/nodepool; *ACTIVE* Resource state ACTIVE - relevant for Kubernetes cluster/nodepool; *FAILED* Resource state FAILED - relevant for Kubernetes cluster/nodepool; *SUSPENDED* Resource state SUSPENDED - relevant for Kubernetes cluster/nodepool; *FAILED_SUSPENDED* Resource state FAILED_SUSPENDED - relevant for Kubernetes cluster; *UPDATING* Resource state UPDATING - relevant for Kubernetes cluster/nodepool; *FAILED_UPDATING* Resource state FAILED_UPDATING - relevant for Kubernetes cluster/nodepool; *DESTROYING* Resource state DESTROYING - relevant for Kubernetes cluster; *FAILED_DESTROYING* Resource state FAILED_DESTROYING - relevant for Kubernetes cluster/nodepool; *TERMINATED* Resource state TERMINATED - relevant for Kubernetes cluster/nodepool
attr_accessor :state
class EnumAttributeValidator
attr_reader :datatype
@@ -62,17 +70,25 @@
end
# Attribute mapping from ruby-style variable name to JSON key.
def self.attribute_map
{
+
:'etag' => :'etag',
+
:'created_date' => :'createdDate',
+
:'created_by' => :'createdBy',
+
:'created_by_user_id' => :'createdByUserId',
+
:'last_modified_date' => :'lastModifiedDate',
+
:'last_modified_by' => :'lastModifiedBy',
+
:'last_modified_by_user_id' => :'lastModifiedByUserId',
+
:'state' => :'state'
}
end
# Returns all the JSON keys this model knows about
@@ -81,24 +97,40 @@
end
# Attribute type mapping.
def self.openapi_types
{
+
:'etag' => :'String',
+
:'created_date' => :'Time',
+
:'created_by' => :'String',
+
:'created_by_user_id' => :'String',
+
:'last_modified_date' => :'Time',
+
:'last_modified_by' => :'String',
+
:'last_modified_by_user_id' => :'String',
+
:'state' => :'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
@@ -112,59 +144,91 @@
if (!self.class.attribute_map.key?(k.to_sym))
fail ArgumentError, "`#{k}` is not a valid attribute in `Ionoscloud::DatacenterElementMetadata`. 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?(:'etag')
self.etag = attributes[:'etag']
end
+
if attributes.key?(:'created_date')
self.created_date = attributes[:'created_date']
end
+
if attributes.key?(:'created_by')
self.created_by = attributes[:'created_by']
end
+
if attributes.key?(:'created_by_user_id')
self.created_by_user_id = attributes[:'created_by_user_id']
end
+
if attributes.key?(:'last_modified_date')
self.last_modified_date = attributes[:'last_modified_date']
end
+
if attributes.key?(:'last_modified_by')
self.last_modified_by = attributes[:'last_modified_by']
end
+
if attributes.key?(:'last_modified_by_user_id')
self.last_modified_by_user_id = attributes[:'last_modified_by_user_id']
end
+
if attributes.key?(:'state')
self.state = attributes[:'state']
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
+
+
+
+
+
+
+
+
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?
+
+
+
+
+
+
+
+
state_validator = EnumAttributeValidator.new('String', ["AVAILABLE", "INACTIVE", "BUSY", "DEPLOYING", "ACTIVE", "FAILED", "SUSPENDED", "FAILED_SUSPENDED", "UPDATING", "FAILED_UPDATING", "DESTROYING", "FAILED_DESTROYING", "TERMINATED", "UNKNOWN"])
return false unless state_validator.valid?(@state)
true
end
+
+
+
+
+
+
+
+
# Custom attribute writer method checking allowed values (enum).
# @param [Object] state Object to be assigned
def state=(state)
validator = EnumAttributeValidator.new('String', ["AVAILABLE", "INACTIVE", "BUSY", "DEPLOYING", "ACTIVE", "FAILED", "SUSPENDED", "FAILED_SUSPENDED", "UPDATING", "FAILED_UPDATING", "DESTROYING", "FAILED_DESTROYING", "TERMINATED", "UNKNOWN"])
unless validator.valid?(state)
@@ -176,17 +240,17 @@
# Checks equality by comparing each attribute.
# @param [Object] Object to be compared
def ==(o)
return true if self.equal?(o)
self.class == o.class &&
- etag == o.etag &&
- created_date == o.created_date &&
- created_by == o.created_by &&
- created_by_user_id == o.created_by_user_id &&
- last_modified_date == o.last_modified_date &&
- last_modified_by == o.last_modified_by &&
- last_modified_by_user_id == o.last_modified_by_user_id &&
- state == o.state
+ etag == o.etag &&
+ created_date == o.created_date &&
+ created_by == o.created_by &&
+ created_by_user_id == o.created_by_user_id &&
+ last_modified_date == o.last_modified_date &&
+ last_modified_by == o.last_modified_by &&
+ last_modified_by_user_id == o.last_modified_by_user_id &&
+ state == o.state
end
# @see the `==` method
# @param [Object] Object to be compared
def eql?(o)