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_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_ALL = 'ALL'.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_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
152 153 154 155 156 157 158 159 160 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 |
# File 'lib/oci/os_management_hub/models/mirror_summary.rb', line 152 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.
70 71 72 |
# File 'lib/oci/os_management_hub/models/mirror_summary.rb', line 70 def arch_type @arch_type end |
#display_name ⇒ String
Display name of the mirror.
58 59 60 |
# File 'lib/oci/os_management_hub/models/mirror_summary.rb', line 58 def display_name @display_name end |
#id ⇒ String
[Required] The OCID of the software source.
54 55 56 |
# File 'lib/oci/os_management_hub/models/mirror_summary.rb', line 54 def id @id end |
#log ⇒ String
[Required] The current log from the management station plugin.
87 88 89 |
# File 'lib/oci/os_management_hub/models/mirror_summary.rb', line 87 def log @log end |
#os_family ⇒ String
The OS family of the software source.
66 67 68 |
# File 'lib/oci/os_management_hub/models/mirror_summary.rb', line 66 def os_family @os_family end |
#package_count ⇒ Integer
[Required] The number of packages within the mirrored software source.
91 92 93 |
# File 'lib/oci/os_management_hub/models/mirror_summary.rb', line 91 def package_count @package_count end |
#percentage ⇒ Integer
[Required] A decimal number representing the percentage of the software source that has been synced.
78 79 80 |
# File 'lib/oci/os_management_hub/models/mirror_summary.rb', line 78 def percentage @percentage end |
#size ⇒ Integer
[Required] The size the mirrored software source in bytes.
95 96 97 |
# File 'lib/oci/os_management_hub/models/mirror_summary.rb', line 95 def size @size end |
#state ⇒ String
[Required] Current state of the software source mirror.
74 75 76 |
# File 'lib/oci/os_management_hub/models/mirror_summary.rb', line 74 def state @state end |
#time_last_synced ⇒ DateTime
[Required] Time that the software source was last synced (in RFC 3339 format).
83 84 85 |
# File 'lib/oci/os_management_hub/models/mirror_summary.rb', line 83 def time_last_synced @time_last_synced end |
#type ⇒ String
Type of software source.
62 63 64 |
# File 'lib/oci/os_management_hub/models/mirror_summary.rb', line 62 def type @type end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
# File 'lib/oci/os_management_hub/models/mirror_summary.rb', line 98 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.
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 |
# File 'lib/oci/os_management_hub/models/mirror_summary.rb', line 117 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.
260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 |
# File 'lib/oci/os_management_hub/models/mirror_summary.rb', line 260 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
300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 |
# File 'lib/oci/os_management_hub/models/mirror_summary.rb', line 300 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
280 281 282 |
# File 'lib/oci/os_management_hub/models/mirror_summary.rb', line 280 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
289 290 291 |
# File 'lib/oci/os_management_hub/models/mirror_summary.rb', line 289 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
333 334 335 336 337 338 339 340 341 342 |
# File 'lib/oci/os_management_hub/models/mirror_summary.rb', line 333 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
327 328 329 |
# File 'lib/oci/os_management_hub/models/mirror_summary.rb', line 327 def to_s to_hash.to_s end |