Class: OCI::OsManagementHub::Models::ModuleStream
- Inherits:
-
Object
- Object
- OCI::OsManagementHub::Models::ModuleStream
- Defined in:
- lib/oci/os_management_hub/models/module_stream.rb
Overview
An object that defines a module stream provided by a software source.
Constant Summary collapse
- 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_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#arch_type ⇒ String
The architecture for which the packages in this module stream were built.
-
#description ⇒ String
A description of the contents of the module stream.
-
#is_default ⇒ BOOLEAN
Indicates if this stream is the default for its module.
-
#is_latest ⇒ BOOLEAN
Indicates whether this module stream is the latest.
-
#module_name ⇒ String
[Required] The name of the module that contains the stream.
-
#name ⇒ String
[Required] The name of the stream.
-
#packages ⇒ Array<String>
A list of packages that are contained by the stream.
-
#profiles ⇒ Array<String>
A list of profiles that are part of the stream.
-
#software_source_id ⇒ String
The OCID of the software source that provides this module stream.
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 = {}) ⇒ ModuleStream
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 = {}) ⇒ ModuleStream
Initializes the object
114 115 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 154 155 156 157 |
# File 'lib/oci/os_management_hub/models/module_stream.rb', line 114 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.module_name = attributes[:'moduleName'] if attributes[:'moduleName'] raise 'You cannot provide both :moduleName and :module_name' if attributes.key?(:'moduleName') && attributes.key?(:'module_name') self.module_name = attributes[:'module_name'] if attributes[:'module_name'] self.name = attributes[:'name'] if attributes[:'name'] self.is_default = attributes[:'isDefault'] unless attributes[:'isDefault'].nil? raise 'You cannot provide both :isDefault and :is_default' if attributes.key?(:'isDefault') && attributes.key?(:'is_default') self.is_default = attributes[:'is_default'] unless attributes[:'is_default'].nil? self.software_source_id = attributes[:'softwareSourceId'] if attributes[:'softwareSourceId'] raise 'You cannot provide both :softwareSourceId and :software_source_id' if attributes.key?(:'softwareSourceId') && attributes.key?(:'software_source_id') self.software_source_id = attributes[:'software_source_id'] if attributes[:'software_source_id'] 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'] self.profiles = attributes[:'profiles'] if attributes[:'profiles'] self.packages = attributes[:'packages'] if attributes[:'packages'] self.is_latest = attributes[:'isLatest'] unless attributes[:'isLatest'].nil? raise 'You cannot provide both :isLatest and :is_latest' if attributes.key?(:'isLatest') && attributes.key?(:'is_latest') self.is_latest = attributes[:'is_latest'] unless attributes[:'is_latest'].nil? end |
Instance Attribute Details
#arch_type ⇒ String
The architecture for which the packages in this module stream were built.
39 40 41 |
# File 'lib/oci/os_management_hub/models/module_stream.rb', line 39 def arch_type @arch_type end |
#description ⇒ String
A description of the contents of the module stream.
43 44 45 |
# File 'lib/oci/os_management_hub/models/module_stream.rb', line 43 def description @description end |
#is_default ⇒ BOOLEAN
Indicates if this stream is the default for its module.
31 32 33 |
# File 'lib/oci/os_management_hub/models/module_stream.rb', line 31 def is_default @is_default end |
#is_latest ⇒ BOOLEAN
Indicates whether this module stream is the latest.
63 64 65 |
# File 'lib/oci/os_management_hub/models/module_stream.rb', line 63 def is_latest @is_latest end |
#module_name ⇒ String
[Required] The name of the module that contains the stream.
23 24 25 |
# File 'lib/oci/os_management_hub/models/module_stream.rb', line 23 def module_name @module_name end |
#name ⇒ String
[Required] The name of the stream.
27 28 29 |
# File 'lib/oci/os_management_hub/models/module_stream.rb', line 27 def name @name end |
#packages ⇒ Array<String>
A list of packages that are contained by the stream. Each element in the list is the name of a package. The name is suitable to use as an argument to other OS Management Hub APIs that interact directly with packages.
59 60 61 |
# File 'lib/oci/os_management_hub/models/module_stream.rb', line 59 def packages @packages end |
#profiles ⇒ Array<String>
A list of profiles that are part of the stream. Each element in the list is the name of a profile. The name is suitable to use as an argument to other OS Management Hub APIs that interact directly with module stream profiles. However, it is not URL encoded.
51 52 53 |
# File 'lib/oci/os_management_hub/models/module_stream.rb', line 51 def profiles @profiles end |
#software_source_id ⇒ String
The OCID of the software source that provides this module stream.
35 36 37 |
# File 'lib/oci/os_management_hub/models/module_stream.rb', line 35 def software_source_id @software_source_id end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/oci/os_management_hub/models/module_stream.rb', line 66 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'module_name': :'moduleName', 'name': :'name', 'is_default': :'isDefault', 'software_source_id': :'softwareSourceId', 'arch_type': :'archType', 'description': :'description', 'profiles': :'profiles', 'packages': :'packages', 'is_latest': :'isLatest' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
# File 'lib/oci/os_management_hub/models/module_stream.rb', line 83 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'module_name': :'String', 'name': :'String', 'is_default': :'BOOLEAN', 'software_source_id': :'String', 'arch_type': :'String', 'description': :'String', 'profiles': :'Array<String>', 'packages': :'Array<String>', 'is_latest': :'BOOLEAN' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
179 180 181 182 183 184 185 186 187 188 189 190 191 192 |
# File 'lib/oci/os_management_hub/models/module_stream.rb', line 179 def ==(other) return true if equal?(other) self.class == other.class && module_name == other.module_name && name == other.name && is_default == other.is_default && software_source_id == other.software_source_id && arch_type == other.arch_type && description == other.description && profiles == other.profiles && packages == other.packages && is_latest == other.is_latest end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 |
# File 'lib/oci/os_management_hub/models/module_stream.rb', line 217 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
197 198 199 |
# File 'lib/oci/os_management_hub/models/module_stream.rb', line 197 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
206 207 208 |
# File 'lib/oci/os_management_hub/models/module_stream.rb', line 206 def hash [module_name, name, is_default, software_source_id, arch_type, description, profiles, packages, is_latest].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
250 251 252 253 254 255 256 257 258 259 |
# File 'lib/oci/os_management_hub/models/module_stream.rb', line 250 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
244 245 246 |
# File 'lib/oci/os_management_hub/models/module_stream.rb', line 244 def to_s to_hash.to_s end |