Class: OCI::OsManagementHub::Models::MirrorSummary
- Inherits:
-
Object
- Object
- OCI::OsManagementHub::Models::MirrorSummary
- Defined in:
- lib/oci/os_management_hub/models/mirror_summary.rb
Overview
Summary of a Mirror
Constant Summary collapse
- TYPE_ENUM =
[ TYPE_CUSTOM = 'CUSTOM'.freeze, TYPE_VENDOR = 'VENDOR'.freeze, TYPE_VERSIONED = 'VERSIONED'.freeze, TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- OS_FAMILY_ENUM =
[ OS_FAMILY_ORACLE_LINUX_9 = 'ORACLE_LINUX_9'.freeze, OS_FAMILY_ORACLE_LINUX_8 = 'ORACLE_LINUX_8'.freeze, OS_FAMILY_ORACLE_LINUX_7 = 'ORACLE_LINUX_7'.freeze, OS_FAMILY_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- ARCH_TYPE_ENUM =
[ ARCH_TYPE_X86_64 = 'X86_64'.freeze, ARCH_TYPE_AARCH64 = 'AARCH64'.freeze, ARCH_TYPE_I686 = 'I686'.freeze, ARCH_TYPE_NOARCH = 'NOARCH'.freeze, ARCH_TYPE_SRC = 'SRC'.freeze, ARCH_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- STATE_ENUM =
[ STATE_UNSYNCED = 'UNSYNCED'.freeze, STATE_QUEUED = 'QUEUED'.freeze, STATE_SYNCING = 'SYNCING'.freeze, STATE_SYNCED = 'SYNCED'.freeze, STATE_FAILED = 'FAILED'.freeze, STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#arch_type ⇒ String
The architecture type supported by the Software Source.
-
#display_name ⇒ String
Display name of the mirror.
-
#id ⇒ String
[Required] OCID of a software source.
-
#log ⇒ String
[Required] The current log from the management station plugin.
-
#os_family ⇒ String
The OS family the Software Source belongs to.
-
#percentage ⇒ Integer
[Required] A decimal number representing the completness percentage.
-
#state ⇒ String
[Required] Current state of the mirror.
-
#time_last_synced ⇒ DateTime
[Required] Timestamp of the last time the mirror was sync.
-
#type ⇒ String
Type of the mirror.
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 = {}) ⇒ MirrorSummary
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 = {}) ⇒ MirrorSummary
Initializes the object
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 |
# File 'lib/oci/os_management_hub/models/mirror_summary.rb', line 129 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.id = attributes[:'id'] if attributes[:'id'] self.display_name = attributes[:'displayName'] if attributes[:'displayName'] raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name') self.display_name = attributes[:'display_name'] if attributes[:'display_name'] self.type = attributes[:'type'] if attributes[:'type'] self.os_family = attributes[:'osFamily'] if attributes[:'osFamily'] raise 'You cannot provide both :osFamily and :os_family' if attributes.key?(:'osFamily') && attributes.key?(:'os_family') self.os_family = attributes[:'os_family'] if attributes[:'os_family'] self.arch_type = attributes[:'archType'] if attributes[:'archType'] raise 'You cannot provide both :archType and :arch_type' if attributes.key?(:'archType') && attributes.key?(:'arch_type') self.arch_type = attributes[:'arch_type'] if attributes[:'arch_type'] self.state = attributes[:'state'] if attributes[:'state'] self.percentage = attributes[:'percentage'] if attributes[:'percentage'] self.time_last_synced = attributes[:'timeLastSynced'] if attributes[:'timeLastSynced'] raise 'You cannot provide both :timeLastSynced and :time_last_synced' if attributes.key?(:'timeLastSynced') && attributes.key?(:'time_last_synced') self.time_last_synced = attributes[:'time_last_synced'] if attributes[:'time_last_synced'] self.log = attributes[:'log'] if attributes[:'log'] end |
Instance Attribute Details
#arch_type ⇒ String
The architecture type supported by the Software Source
62 63 64 |
# File 'lib/oci/os_management_hub/models/mirror_summary.rb', line 62 def arch_type @arch_type end |
#display_name ⇒ String
Display name of the mirror
50 51 52 |
# File 'lib/oci/os_management_hub/models/mirror_summary.rb', line 50 def display_name @display_name end |
#id ⇒ String
[Required] OCID of a software source
46 47 48 |
# File 'lib/oci/os_management_hub/models/mirror_summary.rb', line 46 def id @id end |
#log ⇒ String
[Required] The current log from the management station plugin.
78 79 80 |
# File 'lib/oci/os_management_hub/models/mirror_summary.rb', line 78 def log @log end |
#os_family ⇒ String
The OS family the Software Source belongs to
58 59 60 |
# File 'lib/oci/os_management_hub/models/mirror_summary.rb', line 58 def os_family @os_family end |
#percentage ⇒ Integer
[Required] A decimal number representing the completness percentage
70 71 72 |
# File 'lib/oci/os_management_hub/models/mirror_summary.rb', line 70 def percentage @percentage end |
#state ⇒ String
[Required] Current state of the mirror
66 67 68 |
# File 'lib/oci/os_management_hub/models/mirror_summary.rb', line 66 def state @state end |
#time_last_synced ⇒ DateTime
[Required] Timestamp of the last time the mirror was sync
74 75 76 |
# File 'lib/oci/os_management_hub/models/mirror_summary.rb', line 74 def time_last_synced @time_last_synced end |
#type ⇒ String
Type of the mirror
54 55 56 |
# File 'lib/oci/os_management_hub/models/mirror_summary.rb', line 54 def type @type end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
# File 'lib/oci/os_management_hub/models/mirror_summary.rb', line 81 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'id': :'id', 'display_name': :'displayName', 'type': :'type', 'os_family': :'osFamily', 'arch_type': :'archType', 'state': :'state', 'percentage': :'percentage', 'time_last_synced': :'timeLastSynced', 'log': :'log' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
# File 'lib/oci/os_management_hub/models/mirror_summary.rb', line 98 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'id': :'String', 'display_name': :'String', 'type': :'String', 'os_family': :'String', 'arch_type': :'String', 'state': :'String', 'percentage': :'Integer', 'time_last_synced': :'DateTime', 'log': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
229 230 231 232 233 234 235 236 237 238 239 240 241 242 |
# File 'lib/oci/os_management_hub/models/mirror_summary.rb', line 229 def ==(other) return true if equal?(other) self.class == other.class && id == other.id && display_name == other.display_name && type == other.type && os_family == other.os_family && arch_type == other.arch_type && state == other.state && percentage == other.percentage && time_last_synced == other.time_last_synced && log == other.log end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 |
# File 'lib/oci/os_management_hub/models/mirror_summary.rb', line 267 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
247 248 249 |
# File 'lib/oci/os_management_hub/models/mirror_summary.rb', line 247 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
256 257 258 |
# File 'lib/oci/os_management_hub/models/mirror_summary.rb', line 256 def hash [id, display_name, type, os_family, arch_type, state, percentage, time_last_synced, log].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
300 301 302 303 304 305 306 307 308 309 |
# File 'lib/oci/os_management_hub/models/mirror_summary.rb', line 300 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
294 295 296 |
# File 'lib/oci/os_management_hub/models/mirror_summary.rb', line 294 def to_s to_hash.to_s end |