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
| 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 344 | # File 'lib/oci/os_management/models/software_source.rb', line 227 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
| 69 70 71 | # File 'lib/oci/os_management/models/software_source.rb', line 69 def arch_type @arch_type end | 
#associated_managed_instances ⇒ Array<OCI::OsManagement::Models::Id>
list of the Managed Instances associated with this Software Sources
| 125 126 127 | # File 'lib/oci/os_management/models/software_source.rb', line 125 def associated_managed_instances @associated_managed_instances end | 
#checksum_type ⇒ String
The yum repository checksum type used by this software source
| 85 86 87 | # File 'lib/oci/os_management/models/software_source.rb', line 85 def checksum_type @checksum_type end | 
#compartment_id ⇒ String
[Required] OCID for the Compartment
| 53 54 55 | # File 'lib/oci/os_management/models/software_source.rb', line 53 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\"}}
| 137 138 139 | # File 'lib/oci/os_management/models/software_source.rb', line 137 def @defined_tags end | 
#description ⇒ String
Information specified by the user about the software source
| 61 62 63 | # File 'lib/oci/os_management/models/software_source.rb', line 61 def description @description end | 
#display_name ⇒ String
[Required] User friendly name for the software source
| 57 58 59 | # File 'lib/oci/os_management/models/software_source.rb', line 57 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\"}
| 131 132 133 | # File 'lib/oci/os_management/models/software_source.rb', line 131 def @freeform_tags end | 
#gpg_key_fingerprint ⇒ String
Fingerprint of the GPG key for this software source
| 109 110 111 | # File 'lib/oci/os_management/models/software_source.rb', line 109 def gpg_key_fingerprint @gpg_key_fingerprint end | 
#gpg_key_id ⇒ String
ID of the GPG key for this software source
| 105 106 107 | # File 'lib/oci/os_management/models/software_source.rb', line 105 def gpg_key_id @gpg_key_id end | 
#gpg_key_url ⇒ String
URL of the GPG key for this software source
| 101 102 103 | # File 'lib/oci/os_management/models/software_source.rb', line 101 def gpg_key_url @gpg_key_url end | 
#id ⇒ String
[Required] OCID for the Software Source
| 49 50 51 | # File 'lib/oci/os_management/models/software_source.rb', line 49 def id @id end | 
#lifecycle_state ⇒ String
The current state of the Software Source.
| 117 118 119 | # File 'lib/oci/os_management/models/software_source.rb', line 117 def lifecycle_state @lifecycle_state end | 
#maintainer_email ⇒ String
Email address of the person maintaining this software source
| 93 94 95 | # File 'lib/oci/os_management/models/software_source.rb', line 93 def maintainer_email @maintainer_email end | 
#maintainer_name ⇒ String
Name of the person maintaining this software source
| 89 90 91 | # File 'lib/oci/os_management/models/software_source.rb', line 89 def maintainer_name @maintainer_name end | 
#maintainer_phone ⇒ String
Phone number of the person maintaining this software source
| 97 98 99 | # File 'lib/oci/os_management/models/software_source.rb', line 97 def maintainer_phone @maintainer_phone end | 
#packages ⇒ Integer
Number of packages
| 121 122 123 | # File 'lib/oci/os_management/models/software_source.rb', line 121 def packages @packages end | 
#parent_id ⇒ String
OCID for the parent software source, if there is one
| 77 78 79 | # File 'lib/oci/os_management/models/software_source.rb', line 77 def parent_id @parent_id end | 
#parent_name ⇒ String
Display name the parent software source, if there is one
| 81 82 83 | # File 'lib/oci/os_management/models/software_source.rb', line 81 def parent_name @parent_name end | 
#repo_type ⇒ String
[Required] Type of the Software Source
| 65 66 67 | # File 'lib/oci/os_management/models/software_source.rb', line 65 def repo_type @repo_type end | 
#status ⇒ String
status of the software source.
| 113 114 115 | # File 'lib/oci/os_management/models/software_source.rb', line 113 def status @status end | 
#url ⇒ String
[Required] URL for the repostiory
| 73 74 75 | # File 'lib/oci/os_management/models/software_source.rb', line 73 def url @url end | 
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
| 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 | # File 'lib/oci/os_management/models/software_source.rb', line 140 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.
| 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 | # File 'lib/oci/os_management/models/software_source.rb', line 170 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.
| 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 431 | # File 'lib/oci/os_management/models/software_source.rb', line 405 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
| 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 | # File 'lib/oci/os_management/models/software_source.rb', line 456 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
| 436 437 438 | # File 'lib/oci/os_management/models/software_source.rb', line 436 def eql?(other) self == other end | 
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
| 445 446 447 | # File 'lib/oci/os_management/models/software_source.rb', line 445 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
| 489 490 491 492 493 494 495 496 497 498 | # File 'lib/oci/os_management/models/software_source.rb', line 489 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
| 483 484 485 | # File 'lib/oci/os_management/models/software_source.rb', line 483 def to_s to_hash.to_s end |