Class: OCI::OsManagementHub::Models::MirrorSummary
- Inherits:
-
Object
- Object
- OCI::OsManagementHub::Models::MirrorSummary
- Defined in:
- lib/oci/os_management_hub/models/mirror_summary.rb
Overview
Provides summary information for a software source mirror.
Constant Summary collapse
- TYPE_ENUM =
[ TYPE_CUSTOM = 'CUSTOM'.freeze, TYPE_VENDOR = 'VENDOR'.freeze, TYPE_VERSIONED = 'VERSIONED'.freeze, TYPE_PRIVATE = 'PRIVATE'.freeze, TYPE_THIRD_PARTY = 'THIRD_PARTY'.freeze, TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- OS_FAMILY_ENUM =
[ OS_FAMILY_ORACLE_LINUX_10 = 'ORACLE_LINUX_10'.freeze, 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_ORACLE_LINUX_6 = 'ORACLE_LINUX_6'.freeze, OS_FAMILY_WINDOWS_SERVER_2016 = 'WINDOWS_SERVER_2016'.freeze, OS_FAMILY_WINDOWS_SERVER_2019 = 'WINDOWS_SERVER_2019'.freeze, OS_FAMILY_WINDOWS_SERVER_2022 = 'WINDOWS_SERVER_2022'.freeze, OS_FAMILY_WINDOWS_SERVER_2025 = 'WINDOWS_SERVER_2025'.freeze, OS_FAMILY_WINDOWS_11 = 'WINDOWS_11'.freeze, OS_FAMILY_ALL = 'ALL'.freeze, OS_FAMILY_UBUNTU_20_04 = 'UBUNTU_20_04'.freeze, OS_FAMILY_UBUNTU_22_04 = 'UBUNTU_22_04'.freeze, OS_FAMILY_UBUNTU_24_04 = 'UBUNTU_24_04'.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_I386 = 'I386'.freeze, ARCH_TYPE_AMD64 = 'AMD64'.freeze, ARCH_TYPE_ARM64 = 'ARM64'.freeze, ARCH_TYPE_ALL = 'ALL'.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] The OCID of the software source.
-
#log ⇒ String
[Required] The current log from the management station plugin.
-
#os_family ⇒ String
The OS family of the software source.
-
#package_count ⇒ Integer
[Required] The number of packages within the mirrored software source.
-
#percentage ⇒ Integer
[Required] A decimal number representing the percentage of the software source that has been synced.
-
#size ⇒ Integer
[Required] The size the mirrored software source in bytes.
-
#state ⇒ String
[Required] Current state of the software source mirror.
-
#time_last_synced ⇒ DateTime
[Required] Time that the software source was last synced (in RFC 3339 format).
-
#type ⇒ String
Type of software source.
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
161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 |
# File 'lib/oci/os_management_hub/models/mirror_summary.rb', line 161 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'] self.package_count = attributes[:'packageCount'] if attributes[:'packageCount'] raise 'You cannot provide both :packageCount and :package_count' if attributes.key?(:'packageCount') && attributes.key?(:'package_count') self.package_count = attributes[:'package_count'] if attributes[:'package_count'] self.size = attributes[:'size'] if attributes[:'size'] end |
Instance Attribute Details
#arch_type ⇒ String
The architecture type supported by the software source.
79 80 81 |
# File 'lib/oci/os_management_hub/models/mirror_summary.rb', line 79 def arch_type @arch_type end |
#display_name ⇒ String
Display name of the mirror.
67 68 69 |
# File 'lib/oci/os_management_hub/models/mirror_summary.rb', line 67 def display_name @display_name end |
#id ⇒ String
[Required] The OCID of the software source.
63 64 65 |
# File 'lib/oci/os_management_hub/models/mirror_summary.rb', line 63 def id @id end |
#log ⇒ String
[Required] The current log from the management station plugin.
96 97 98 |
# File 'lib/oci/os_management_hub/models/mirror_summary.rb', line 96 def log @log end |
#os_family ⇒ String
The OS family of the software source.
75 76 77 |
# File 'lib/oci/os_management_hub/models/mirror_summary.rb', line 75 def os_family @os_family end |
#package_count ⇒ Integer
[Required] The number of packages within the mirrored software source.
100 101 102 |
# File 'lib/oci/os_management_hub/models/mirror_summary.rb', line 100 def package_count @package_count end |
#percentage ⇒ Integer
[Required] A decimal number representing the percentage of the software source that has been synced.
87 88 89 |
# File 'lib/oci/os_management_hub/models/mirror_summary.rb', line 87 def percentage @percentage end |
#size ⇒ Integer
[Required] The size the mirrored software source in bytes.
104 105 106 |
# File 'lib/oci/os_management_hub/models/mirror_summary.rb', line 104 def size @size end |
#state ⇒ String
[Required] Current state of the software source mirror.
83 84 85 |
# File 'lib/oci/os_management_hub/models/mirror_summary.rb', line 83 def state @state end |
#time_last_synced ⇒ DateTime
[Required] Time that the software source was last synced (in RFC 3339 format).
92 93 94 |
# File 'lib/oci/os_management_hub/models/mirror_summary.rb', line 92 def time_last_synced @time_last_synced end |
#type ⇒ String
Type of software source.
71 72 73 |
# File 'lib/oci/os_management_hub/models/mirror_summary.rb', line 71 def type @type end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
# File 'lib/oci/os_management_hub/models/mirror_summary.rb', line 107 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', 'package_count': :'packageCount', 'size': :'size' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 |
# File 'lib/oci/os_management_hub/models/mirror_summary.rb', line 126 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', 'package_count': :'Integer', 'size': :'Integer' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 |
# File 'lib/oci/os_management_hub/models/mirror_summary.rb', line 269 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 && package_count == other.package_count && size == other.size end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 |
# File 'lib/oci/os_management_hub/models/mirror_summary.rb', line 309 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
289 290 291 |
# File 'lib/oci/os_management_hub/models/mirror_summary.rb', line 289 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
298 299 300 |
# File 'lib/oci/os_management_hub/models/mirror_summary.rb', line 298 def hash [id, display_name, type, os_family, arch_type, state, percentage, time_last_synced, log, package_count, size].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
342 343 344 345 346 347 348 349 350 351 |
# File 'lib/oci/os_management_hub/models/mirror_summary.rb', line 342 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
336 337 338 |
# File 'lib/oci/os_management_hub/models/mirror_summary.rb', line 336 def to_s to_hash.to_s end |