Class: OCI::ComputeCloudAtCustomer::Models::CccUpgradeInformation
- Inherits:
-
Object
- Object
- OCI::ComputeCloudAtCustomer::Models::CccUpgradeInformation
- Defined in:
- lib/oci/compute_cloud_at_customer/models/ccc_upgrade_information.rb
Overview
Upgrade information that relates to a Compute Cloud@Customer infrastructure. This information cannot be updated.
Instance Attribute Summary collapse
-
#current_version ⇒ String
The current version of software installed on the Compute Cloud@Customer infrastructure.
-
#is_active ⇒ BOOLEAN
Indication that the Compute Cloud@Customer infrastructure is in the process of an upgrade or an upgrade activity (such as preloading upgrade images).
-
#scheduled_upgrade_duration ⇒ String
Expected duration of Compute Cloud@Customer infrastructure scheduled upgrade.
-
#time_of_scheduled_upgrade ⇒ DateTime
Compute Cloud@Customer infrastructure next upgrade time.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ CccUpgradeInformation
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Constructor Details
#initialize(attributes = {}) ⇒ CccUpgradeInformation
Initializes the object
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
# File 'lib/oci/compute_cloud_at_customer/models/ccc_upgrade_information.rb', line 71 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.current_version = attributes[:'currentVersion'] if attributes[:'currentVersion'] raise 'You cannot provide both :currentVersion and :current_version' if attributes.key?(:'currentVersion') && attributes.key?(:'current_version') self.current_version = attributes[:'current_version'] if attributes[:'current_version'] self.time_of_scheduled_upgrade = attributes[:'timeOfScheduledUpgrade'] if attributes[:'timeOfScheduledUpgrade'] raise 'You cannot provide both :timeOfScheduledUpgrade and :time_of_scheduled_upgrade' if attributes.key?(:'timeOfScheduledUpgrade') && attributes.key?(:'time_of_scheduled_upgrade') self.time_of_scheduled_upgrade = attributes[:'time_of_scheduled_upgrade'] if attributes[:'time_of_scheduled_upgrade'] self.scheduled_upgrade_duration = attributes[:'scheduledUpgradeDuration'] if attributes[:'scheduledUpgradeDuration'] raise 'You cannot provide both :scheduledUpgradeDuration and :scheduled_upgrade_duration' if attributes.key?(:'scheduledUpgradeDuration') && attributes.key?(:'scheduled_upgrade_duration') self.scheduled_upgrade_duration = attributes[:'scheduled_upgrade_duration'] if attributes[:'scheduled_upgrade_duration'] self.is_active = attributes[:'isActive'] unless attributes[:'isActive'].nil? self.is_active = false if is_active.nil? && !attributes.key?(:'isActive') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :isActive and :is_active' if attributes.key?(:'isActive') && attributes.key?(:'is_active') self.is_active = attributes[:'is_active'] unless attributes[:'is_active'].nil? self.is_active = false if is_active.nil? && !attributes.key?(:'isActive') && !attributes.key?(:'is_active') # rubocop:disable Style/StringLiterals end |
Instance Attribute Details
#current_version ⇒ String
The current version of software installed on the Compute Cloud@Customer infrastructure.
16 17 18 |
# File 'lib/oci/compute_cloud_at_customer/models/ccc_upgrade_information.rb', line 16 def current_version @current_version end |
#is_active ⇒ BOOLEAN
Indication that the Compute Cloud@Customer infrastructure is in the process of an upgrade or an upgrade activity (such as preloading upgrade images).
35 36 37 |
# File 'lib/oci/compute_cloud_at_customer/models/ccc_upgrade_information.rb', line 35 def is_active @is_active end |
#scheduled_upgrade_duration ⇒ String
Expected duration of Compute Cloud@Customer infrastructure scheduled upgrade. The actual upgrade time might be longer or shorter than this duration depending on rack activity, this is only an estimate.
29 30 31 |
# File 'lib/oci/compute_cloud_at_customer/models/ccc_upgrade_information.rb', line 29 def scheduled_upgrade_duration @scheduled_upgrade_duration end |
#time_of_scheduled_upgrade ⇒ DateTime
Compute Cloud@Customer infrastructure next upgrade time. The rack might have performance impacts during this time.
22 23 24 |
# File 'lib/oci/compute_cloud_at_customer/models/ccc_upgrade_information.rb', line 22 def time_of_scheduled_upgrade @time_of_scheduled_upgrade end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
38 39 40 41 42 43 44 45 46 47 |
# File 'lib/oci/compute_cloud_at_customer/models/ccc_upgrade_information.rb', line 38 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'current_version': :'currentVersion', 'time_of_scheduled_upgrade': :'timeOfScheduledUpgrade', 'scheduled_upgrade_duration': :'scheduledUpgradeDuration', 'is_active': :'isActive' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
50 51 52 53 54 55 56 57 58 59 |
# File 'lib/oci/compute_cloud_at_customer/models/ccc_upgrade_information.rb', line 50 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'current_version': :'String', 'time_of_scheduled_upgrade': :'DateTime', 'scheduled_upgrade_duration': :'String', 'is_active': :'BOOLEAN' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
111 112 113 114 115 116 117 118 119 |
# File 'lib/oci/compute_cloud_at_customer/models/ccc_upgrade_information.rb', line 111 def ==(other) return true if equal?(other) self.class == other.class && current_version == other.current_version && time_of_scheduled_upgrade == other.time_of_scheduled_upgrade && scheduled_upgrade_duration == other.scheduled_upgrade_duration && is_active == other.is_active end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 |
# File 'lib/oci/compute_cloud_at_customer/models/ccc_upgrade_information.rb', line 144 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /^Array<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) public_method("#{key}=").call( attributes[self.class.attribute_map[key]] .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? public_method("#{key}=").call( OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]) ) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(other) ⇒ Boolean
124 125 126 |
# File 'lib/oci/compute_cloud_at_customer/models/ccc_upgrade_information.rb', line 124 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
133 134 135 |
# File 'lib/oci/compute_cloud_at_customer/models/ccc_upgrade_information.rb', line 133 def hash [current_version, time_of_scheduled_upgrade, scheduled_upgrade_duration, is_active].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
177 178 179 180 181 182 183 184 185 186 |
# File 'lib/oci/compute_cloud_at_customer/models/ccc_upgrade_information.rb', line 177 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = public_method(attr).call next if value.nil? && !instance_variable_defined?("@#{attr}") hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
171 172 173 |
# File 'lib/oci/compute_cloud_at_customer/models/ccc_upgrade_information.rb', line 171 def to_s to_hash.to_s end |