Class: OCI::OsManagement::Models::SoftwareSource
- Inherits:
-
Object
- Object
- OCI::OsManagement::Models::SoftwareSource
- Defined in:
- lib/oci/os_management/models/software_source.rb
Overview
A software source contains a collection of packages
Constant Summary collapse
- ARCH_TYPE_ENUM =
[ ARCH_TYPE_IA_32 = 'IA_32'.freeze, ARCH_TYPE_X86_64 = 'X86_64'.freeze, ARCH_TYPE_AARCH64 = 'AARCH64'.freeze, ARCH_TYPE_SPARC = 'SPARC'.freeze, ARCH_TYPE_AMD64_DEBIAN = 'AMD64_DEBIAN'.freeze, ARCH_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- CHECKSUM_TYPE_ENUM =
[ CHECKSUM_TYPE_SHA1 = 'SHA1'.freeze, CHECKSUM_TYPE_SHA256 = 'SHA256'.freeze, CHECKSUM_TYPE_SHA384 = 'SHA384'.freeze, CHECKSUM_TYPE_SHA512 = 'SHA512'.freeze, CHECKSUM_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- STATUS_ENUM =
[ STATUS_NORMAL = 'NORMAL'.freeze, STATUS_UNREACHABLE = 'UNREACHABLE'.freeze, STATUS_ERROR = 'ERROR'.freeze, STATUS_WARNING = 'WARNING'.freeze, STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- LIFECYCLE_STATE_ENUM =
[ LIFECYCLE_STATE_CREATING = 'CREATING'.freeze, LIFECYCLE_STATE_UPDATING = 'UPDATING'.freeze, LIFECYCLE_STATE_ACTIVE = 'ACTIVE'.freeze, LIFECYCLE_STATE_DELETING = 'DELETING'.freeze, LIFECYCLE_STATE_DELETED = 'DELETED'.freeze, LIFECYCLE_STATE_FAILED = 'FAILED'.freeze, LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#arch_type ⇒ String
The architecture type supported by the Software Source.
-
#associated_managed_instances ⇒ Array<OCI::OsManagement::Models::Id>
list of the Managed Instances associated with this Software Sources.
-
#checksum_type ⇒ String
The yum repository checksum type used by this software source.
-
#compartment_id ⇒ String
[Required] OCID for the Compartment.
-
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource.
-
#description ⇒ String
Information specified by the user about the software source.
-
#display_name ⇒ String
[Required] User friendly name for the software source.
-
#freeform_tags ⇒ Hash<String, String>
Simple key-value pair that is applied without any predefined name, type or scope.
-
#gpg_key_fingerprint ⇒ String
Fingerprint of the GPG key for this software source.
-
#gpg_key_id ⇒ String
ID of the GPG key for this software source.
-
#gpg_key_url ⇒ String
URL of the GPG key for this software source.
-
#id ⇒ String
[Required] OCID for the Software Source.
-
#lifecycle_state ⇒ String
The current state of the Software Source.
-
#maintainer_email ⇒ String
Email address of the person maintaining this software source.
-
#maintainer_name ⇒ String
Name of the person maintaining this software source.
-
#maintainer_phone ⇒ String
Phone number of the person maintaining this software source.
-
#packages ⇒ Integer
Number of packages.
-
#parent_id ⇒ String
OCID for the parent software source, if there is one.
-
#parent_name ⇒ String
Display name the parent software source, if there is one.
-
#repo_type ⇒ String
[Required] Type of the Software Source.
-
#status ⇒ String
status of the software source.
-
#url ⇒ String
[Required] URL for the repostiory.
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 = {}) ⇒ SoftwareSource
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 = {}) ⇒ SoftwareSource
Initializes the object
226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 |
# File 'lib/oci/os_management/models/software_source.rb', line 226 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.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId'] raise 'You cannot provide both :compartmentId and :compartment_id' if attributes.key?(:'compartmentId') && attributes.key?(:'compartment_id') self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_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.description = attributes[:'description'] if attributes[:'description'] self.repo_type = attributes[:'repoType'] if attributes[:'repoType'] raise 'You cannot provide both :repoType and :repo_type' if attributes.key?(:'repoType') && attributes.key?(:'repo_type') self.repo_type = attributes[:'repo_type'] if attributes[:'repo_type'] 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.url = attributes[:'url'] if attributes[:'url'] self.parent_id = attributes[:'parentId'] if attributes[:'parentId'] raise 'You cannot provide both :parentId and :parent_id' if attributes.key?(:'parentId') && attributes.key?(:'parent_id') self.parent_id = attributes[:'parent_id'] if attributes[:'parent_id'] self.parent_name = attributes[:'parentName'] if attributes[:'parentName'] raise 'You cannot provide both :parentName and :parent_name' if attributes.key?(:'parentName') && attributes.key?(:'parent_name') self.parent_name = attributes[:'parent_name'] if attributes[:'parent_name'] self.checksum_type = attributes[:'checksumType'] if attributes[:'checksumType'] raise 'You cannot provide both :checksumType and :checksum_type' if attributes.key?(:'checksumType') && attributes.key?(:'checksum_type') self.checksum_type = attributes[:'checksum_type'] if attributes[:'checksum_type'] self.maintainer_name = attributes[:'maintainerName'] if attributes[:'maintainerName'] raise 'You cannot provide both :maintainerName and :maintainer_name' if attributes.key?(:'maintainerName') && attributes.key?(:'maintainer_name') self.maintainer_name = attributes[:'maintainer_name'] if attributes[:'maintainer_name'] self.maintainer_email = attributes[:'maintainerEmail'] if attributes[:'maintainerEmail'] raise 'You cannot provide both :maintainerEmail and :maintainer_email' if attributes.key?(:'maintainerEmail') && attributes.key?(:'maintainer_email') self.maintainer_email = attributes[:'maintainer_email'] if attributes[:'maintainer_email'] self.maintainer_phone = attributes[:'maintainerPhone'] if attributes[:'maintainerPhone'] raise 'You cannot provide both :maintainerPhone and :maintainer_phone' if attributes.key?(:'maintainerPhone') && attributes.key?(:'maintainer_phone') self.maintainer_phone = attributes[:'maintainer_phone'] if attributes[:'maintainer_phone'] self.gpg_key_url = attributes[:'gpgKeyUrl'] if attributes[:'gpgKeyUrl'] raise 'You cannot provide both :gpgKeyUrl and :gpg_key_url' if attributes.key?(:'gpgKeyUrl') && attributes.key?(:'gpg_key_url') self.gpg_key_url = attributes[:'gpg_key_url'] if attributes[:'gpg_key_url'] self.gpg_key_id = attributes[:'gpgKeyId'] if attributes[:'gpgKeyId'] raise 'You cannot provide both :gpgKeyId and :gpg_key_id' if attributes.key?(:'gpgKeyId') && attributes.key?(:'gpg_key_id') self.gpg_key_id = attributes[:'gpg_key_id'] if attributes[:'gpg_key_id'] self.gpg_key_fingerprint = attributes[:'gpgKeyFingerprint'] if attributes[:'gpgKeyFingerprint'] raise 'You cannot provide both :gpgKeyFingerprint and :gpg_key_fingerprint' if attributes.key?(:'gpgKeyFingerprint') && attributes.key?(:'gpg_key_fingerprint') self.gpg_key_fingerprint = attributes[:'gpg_key_fingerprint'] if attributes[:'gpg_key_fingerprint'] self.status = attributes[:'status'] if attributes[:'status'] self.lifecycle_state = attributes[:'lifecycleState'] if attributes[:'lifecycleState'] raise 'You cannot provide both :lifecycleState and :lifecycle_state' if attributes.key?(:'lifecycleState') && attributes.key?(:'lifecycle_state') self.lifecycle_state = attributes[:'lifecycle_state'] if attributes[:'lifecycle_state'] self.packages = attributes[:'packages'] if attributes[:'packages'] self.associated_managed_instances = attributes[:'associatedManagedInstances'] if attributes[:'associatedManagedInstances'] raise 'You cannot provide both :associatedManagedInstances and :associated_managed_instances' if attributes.key?(:'associatedManagedInstances') && attributes.key?(:'associated_managed_instances') self.associated_managed_instances = attributes[:'associated_managed_instances'] if attributes[:'associated_managed_instances'] self. = attributes[:'freeformTags'] if attributes[:'freeformTags'] raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags') self. = attributes[:'freeform_tags'] if attributes[:'freeform_tags'] self. = attributes[:'definedTags'] if attributes[:'definedTags'] raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags') self. = attributes[:'defined_tags'] if attributes[:'defined_tags'] end |
Instance Attribute Details
#arch_type ⇒ String
The architecture type supported by the Software Source
68 69 70 |
# File 'lib/oci/os_management/models/software_source.rb', line 68 def arch_type @arch_type end |
#associated_managed_instances ⇒ Array<OCI::OsManagement::Models::Id>
list of the Managed Instances associated with this Software Sources
124 125 126 |
# File 'lib/oci/os_management/models/software_source.rb', line 124 def associated_managed_instances @associated_managed_instances end |
#checksum_type ⇒ String
The yum repository checksum type used by this software source
84 85 86 |
# File 'lib/oci/os_management/models/software_source.rb', line 84 def checksum_type @checksum_type end |
#compartment_id ⇒ String
[Required] OCID for the Compartment
52 53 54 |
# File 'lib/oci/os_management/models/software_source.rb', line 52 def compartment_id @compartment_id end |
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {\"foo-namespace\": {\"bar-key\": \"value\"}}
136 137 138 |
# File 'lib/oci/os_management/models/software_source.rb', line 136 def @defined_tags end |
#description ⇒ String
Information specified by the user about the software source
60 61 62 |
# File 'lib/oci/os_management/models/software_source.rb', line 60 def description @description end |
#display_name ⇒ String
[Required] User friendly name for the software source
56 57 58 |
# File 'lib/oci/os_management/models/software_source.rb', line 56 def display_name @display_name end |
#freeform_tags ⇒ Hash<String, String>
Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {\"bar-key\": \"value\"}
130 131 132 |
# File 'lib/oci/os_management/models/software_source.rb', line 130 def @freeform_tags end |
#gpg_key_fingerprint ⇒ String
Fingerprint of the GPG key for this software source
108 109 110 |
# File 'lib/oci/os_management/models/software_source.rb', line 108 def gpg_key_fingerprint @gpg_key_fingerprint end |
#gpg_key_id ⇒ String
ID of the GPG key for this software source
104 105 106 |
# File 'lib/oci/os_management/models/software_source.rb', line 104 def gpg_key_id @gpg_key_id end |
#gpg_key_url ⇒ String
URL of the GPG key for this software source
100 101 102 |
# File 'lib/oci/os_management/models/software_source.rb', line 100 def gpg_key_url @gpg_key_url end |
#id ⇒ String
[Required] OCID for the Software Source
48 49 50 |
# File 'lib/oci/os_management/models/software_source.rb', line 48 def id @id end |
#lifecycle_state ⇒ String
The current state of the Software Source.
116 117 118 |
# File 'lib/oci/os_management/models/software_source.rb', line 116 def lifecycle_state @lifecycle_state end |
#maintainer_email ⇒ String
Email address of the person maintaining this software source
92 93 94 |
# File 'lib/oci/os_management/models/software_source.rb', line 92 def maintainer_email @maintainer_email end |
#maintainer_name ⇒ String
Name of the person maintaining this software source
88 89 90 |
# File 'lib/oci/os_management/models/software_source.rb', line 88 def maintainer_name @maintainer_name end |
#maintainer_phone ⇒ String
Phone number of the person maintaining this software source
96 97 98 |
# File 'lib/oci/os_management/models/software_source.rb', line 96 def maintainer_phone @maintainer_phone end |
#packages ⇒ Integer
Number of packages
120 121 122 |
# File 'lib/oci/os_management/models/software_source.rb', line 120 def packages @packages end |
#parent_id ⇒ String
OCID for the parent software source, if there is one
76 77 78 |
# File 'lib/oci/os_management/models/software_source.rb', line 76 def parent_id @parent_id end |
#parent_name ⇒ String
Display name the parent software source, if there is one
80 81 82 |
# File 'lib/oci/os_management/models/software_source.rb', line 80 def parent_name @parent_name end |
#repo_type ⇒ String
[Required] Type of the Software Source
64 65 66 |
# File 'lib/oci/os_management/models/software_source.rb', line 64 def repo_type @repo_type end |
#status ⇒ String
status of the software source.
112 113 114 |
# File 'lib/oci/os_management/models/software_source.rb', line 112 def status @status end |
#url ⇒ String
[Required] URL for the repostiory
72 73 74 |
# File 'lib/oci/os_management/models/software_source.rb', line 72 def url @url end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
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 |
# File 'lib/oci/os_management/models/software_source.rb', line 139 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'id': :'id', 'compartment_id': :'compartmentId', 'display_name': :'displayName', 'description': :'description', 'repo_type': :'repoType', 'arch_type': :'archType', 'url': :'url', 'parent_id': :'parentId', 'parent_name': :'parentName', 'checksum_type': :'checksumType', 'maintainer_name': :'maintainerName', 'maintainer_email': :'maintainerEmail', 'maintainer_phone': :'maintainerPhone', 'gpg_key_url': :'gpgKeyUrl', 'gpg_key_id': :'gpgKeyId', 'gpg_key_fingerprint': :'gpgKeyFingerprint', 'status': :'status', 'lifecycle_state': :'lifecycleState', 'packages': :'packages', 'associated_managed_instances': :'associatedManagedInstances', 'freeform_tags': :'freeformTags', 'defined_tags': :'definedTags' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/oci/os_management/models/software_source.rb', line 169 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'id': :'String', 'compartment_id': :'String', 'display_name': :'String', 'description': :'String', 'repo_type': :'String', 'arch_type': :'String', 'url': :'String', 'parent_id': :'String', 'parent_name': :'String', 'checksum_type': :'String', 'maintainer_name': :'String', 'maintainer_email': :'String', 'maintainer_phone': :'String', 'gpg_key_url': :'String', 'gpg_key_id': :'String', 'gpg_key_fingerprint': :'String', 'status': :'String', 'lifecycle_state': :'String', 'packages': :'Integer', 'associated_managed_instances': :'Array<OCI::OsManagement::Models::Id>', 'freeform_tags': :'Hash<String, String>', 'defined_tags': :'Hash<String, Hash<String, Object>>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 |
# File 'lib/oci/os_management/models/software_source.rb', line 404 def ==(other) return true if equal?(other) self.class == other.class && id == other.id && compartment_id == other.compartment_id && display_name == other.display_name && description == other.description && repo_type == other.repo_type && arch_type == other.arch_type && url == other.url && parent_id == other.parent_id && parent_name == other.parent_name && checksum_type == other.checksum_type && maintainer_name == other.maintainer_name && maintainer_email == other.maintainer_email && maintainer_phone == other.maintainer_phone && gpg_key_url == other.gpg_key_url && gpg_key_id == other.gpg_key_id && gpg_key_fingerprint == other.gpg_key_fingerprint && status == other.status && lifecycle_state == other.lifecycle_state && packages == other.packages && associated_managed_instances == other.associated_managed_instances && == other. && == other. end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 |
# File 'lib/oci/os_management/models/software_source.rb', line 455 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
435 436 437 |
# File 'lib/oci/os_management/models/software_source.rb', line 435 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
444 445 446 |
# File 'lib/oci/os_management/models/software_source.rb', line 444 def hash [id, compartment_id, display_name, description, repo_type, arch_type, url, parent_id, parent_name, checksum_type, maintainer_name, maintainer_email, maintainer_phone, gpg_key_url, gpg_key_id, gpg_key_fingerprint, status, lifecycle_state, packages, associated_managed_instances, , ].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
488 489 490 491 492 493 494 495 496 497 |
# File 'lib/oci/os_management/models/software_source.rb', line 488 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
482 483 484 |
# File 'lib/oci/os_management/models/software_source.rb', line 482 def to_s to_hash.to_s end |