Class: OCI::OsManagementHub::Models::SoftwareSourceRepoSummary
- Inherits:
-
Object
- Object
- OCI::OsManagementHub::Models::SoftwareSourceRepoSummary
- Defined in:
- lib/oci/os_management_hub/models/software_source_repo_summary.rb
Overview
Provides summary information for available repos to add directly to compartments. A software source contains a collection of packages. For more information, see Managing Software Sources.
Constant Summary collapse
- SOFTWARE_SOURCE_TYPE_ENUM =
[ SOFTWARE_SOURCE_TYPE_VENDOR = 'VENDOR'.freeze, SOFTWARE_SOURCE_TYPE_CUSTOM = 'CUSTOM'.freeze, SOFTWARE_SOURCE_TYPE_VERSIONED = 'VERSIONED'.freeze, SOFTWARE_SOURCE_TYPE_PRIVATE = 'PRIVATE'.freeze, SOFTWARE_SOURCE_TYPE_THIRD_PARTY = 'THIRD_PARTY'.freeze, SOFTWARE_SOURCE_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
Instance Attribute Summary collapse
-
#arch_type ⇒ String
[Required] The architecture type supported by the software source.
-
#description ⇒ String
Description of the software source.
-
#display_name ⇒ String
[Required] User-friendly name for the software source.
-
#os_family ⇒ String
[Required] The OS family of the software source.
-
#repo_id ⇒ String
[Required] The repository ID for the software source.
-
#software_source_type ⇒ String
[Required] 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 = {}) ⇒ SoftwareSourceRepoSummary
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 = {}) ⇒ SoftwareSourceRepoSummary
Initializes the object
116 117 118 119 120 121 122 123 124 125 126 127 128 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 |
# File 'lib/oci/os_management_hub/models/software_source_repo_summary.rb', line 116 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.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.repo_id = attributes[:'repoId'] if attributes[:'repoId'] raise 'You cannot provide both :repoId and :repo_id' if attributes.key?(:'repoId') && attributes.key?(:'repo_id') self.repo_id = attributes[:'repo_id'] if attributes[:'repo_id'] self.software_source_type = attributes[:'softwareSourceType'] if attributes[:'softwareSourceType'] raise 'You cannot provide both :softwareSourceType and :software_source_type' if attributes.key?(:'softwareSourceType') && attributes.key?(:'software_source_type') self.software_source_type = attributes[:'software_source_type'] if attributes[:'software_source_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.description = attributes[:'description'] if attributes[:'description'] end |
Instance Attribute Details
#arch_type ⇒ String
[Required] The architecture type supported by the software source.
70 71 72 |
# File 'lib/oci/os_management_hub/models/software_source_repo_summary.rb', line 70 def arch_type @arch_type end |
#description ⇒ String
Description of the software source. For custom software sources, this is user-specified.
74 75 76 |
# File 'lib/oci/os_management_hub/models/software_source_repo_summary.rb', line 74 def description @description end |
#display_name ⇒ String
[Required] User-friendly name for the software source.
54 55 56 |
# File 'lib/oci/os_management_hub/models/software_source_repo_summary.rb', line 54 def display_name @display_name end |
#os_family ⇒ String
[Required] The OS family of the software source.
66 67 68 |
# File 'lib/oci/os_management_hub/models/software_source_repo_summary.rb', line 66 def os_family @os_family end |
#repo_id ⇒ String
[Required] The repository ID for the software source.
58 59 60 |
# File 'lib/oci/os_management_hub/models/software_source_repo_summary.rb', line 58 def repo_id @repo_id end |
#software_source_type ⇒ String
[Required] Type of software source.
62 63 64 |
# File 'lib/oci/os_management_hub/models/software_source_repo_summary.rb', line 62 def software_source_type @software_source_type end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/oci/os_management_hub/models/software_source_repo_summary.rb', line 77 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'display_name': :'displayName', 'repo_id': :'repoId', 'software_source_type': :'softwareSourceType', 'os_family': :'osFamily', 'arch_type': :'archType', 'description': :'description' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
91 92 93 94 95 96 97 98 99 100 101 102 |
# File 'lib/oci/os_management_hub/models/software_source_repo_summary.rb', line 91 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'display_name': :'String', 'repo_id': :'String', 'software_source_type': :'String', 'os_family': :'String', 'arch_type': :'String', 'description': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
201 202 203 204 205 206 207 208 209 210 211 |
# File 'lib/oci/os_management_hub/models/software_source_repo_summary.rb', line 201 def ==(other) return true if equal?(other) self.class == other.class && display_name == other.display_name && repo_id == other.repo_id && software_source_type == other.software_source_type && os_family == other.os_family && arch_type == other.arch_type && description == other.description end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 |
# File 'lib/oci/os_management_hub/models/software_source_repo_summary.rb', line 236 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
216 217 218 |
# File 'lib/oci/os_management_hub/models/software_source_repo_summary.rb', line 216 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
225 226 227 |
# File 'lib/oci/os_management_hub/models/software_source_repo_summary.rb', line 225 def hash [display_name, repo_id, software_source_type, os_family, arch_type, description].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
269 270 271 272 273 274 275 276 277 278 |
# File 'lib/oci/os_management_hub/models/software_source_repo_summary.rb', line 269 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
263 264 265 |
# File 'lib/oci/os_management_hub/models/software_source_repo_summary.rb', line 263 def to_s to_hash.to_s end |