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_I386 = 'I386'.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
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 158 |
# File 'lib/oci/os_management_hub/models/module_stream.rb', line 115 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.
40 41 42 |
# File 'lib/oci/os_management_hub/models/module_stream.rb', line 40 def arch_type @arch_type end |
#description ⇒ String
A description of the contents of the module stream.
44 45 46 |
# File 'lib/oci/os_management_hub/models/module_stream.rb', line 44 def description @description end |
#is_default ⇒ BOOLEAN
Indicates if this stream is the default for its module.
32 33 34 |
# File 'lib/oci/os_management_hub/models/module_stream.rb', line 32 def is_default @is_default end |
#is_latest ⇒ BOOLEAN
Indicates whether this module stream is the latest.
64 65 66 |
# File 'lib/oci/os_management_hub/models/module_stream.rb', line 64 def is_latest @is_latest end |
#module_name ⇒ String
[Required] The name of the module that contains the stream.
24 25 26 |
# File 'lib/oci/os_management_hub/models/module_stream.rb', line 24 def module_name @module_name end |
#name ⇒ String
[Required] The name of the stream.
28 29 30 |
# File 'lib/oci/os_management_hub/models/module_stream.rb', line 28 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.
60 61 62 |
# File 'lib/oci/os_management_hub/models/module_stream.rb', line 60 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.
52 53 54 |
# File 'lib/oci/os_management_hub/models/module_stream.rb', line 52 def profiles @profiles end |
#software_source_id ⇒ String
The OCID of the software source that provides this module stream.
36 37 38 |
# File 'lib/oci/os_management_hub/models/module_stream.rb', line 36 def software_source_id @software_source_id end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/oci/os_management_hub/models/module_stream.rb', line 67 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.
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/oci/os_management_hub/models/module_stream.rb', line 84 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.
180 181 182 183 184 185 186 187 188 189 190 191 192 193 |
# File 'lib/oci/os_management_hub/models/module_stream.rb', line 180 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
218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 |
# File 'lib/oci/os_management_hub/models/module_stream.rb', line 218 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
198 199 200 |
# File 'lib/oci/os_management_hub/models/module_stream.rb', line 198 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
207 208 209 |
# File 'lib/oci/os_management_hub/models/module_stream.rb', line 207 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
251 252 253 254 255 256 257 258 259 260 |
# File 'lib/oci/os_management_hub/models/module_stream.rb', line 251 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
245 246 247 |
# File 'lib/oci/os_management_hub/models/module_stream.rb', line 245 def to_s to_hash.to_s end |