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_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
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
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 159 160 161 |
# File 'lib/oci/os_management_hub/models/module_stream.rb', line 118 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.
43 44 45 |
# File 'lib/oci/os_management_hub/models/module_stream.rb', line 43 def arch_type @arch_type end |
#description ⇒ String
A description of the contents of the module stream.
47 48 49 |
# File 'lib/oci/os_management_hub/models/module_stream.rb', line 47 def description @description end |
#is_default ⇒ BOOLEAN
Indicates if this stream is the default for its module.
35 36 37 |
# File 'lib/oci/os_management_hub/models/module_stream.rb', line 35 def is_default @is_default end |
#is_latest ⇒ BOOLEAN
Indicates whether this module stream is the latest.
67 68 69 |
# File 'lib/oci/os_management_hub/models/module_stream.rb', line 67 def is_latest @is_latest end |
#module_name ⇒ String
[Required] The name of the module that contains the stream.
27 28 29 |
# File 'lib/oci/os_management_hub/models/module_stream.rb', line 27 def module_name @module_name end |
#name ⇒ String
[Required] The name of the stream.
31 32 33 |
# File 'lib/oci/os_management_hub/models/module_stream.rb', line 31 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.
63 64 65 |
# File 'lib/oci/os_management_hub/models/module_stream.rb', line 63 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.
55 56 57 |
# File 'lib/oci/os_management_hub/models/module_stream.rb', line 55 def profiles @profiles end |
#software_source_id ⇒ String
The OCID of the software source that provides this module stream.
39 40 41 |
# File 'lib/oci/os_management_hub/models/module_stream.rb', line 39 def software_source_id @software_source_id end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/oci/os_management_hub/models/module_stream.rb', line 70 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.
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/oci/os_management_hub/models/module_stream.rb', line 87 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.
183 184 185 186 187 188 189 190 191 192 193 194 195 196 |
# File 'lib/oci/os_management_hub/models/module_stream.rb', line 183 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
221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 |
# File 'lib/oci/os_management_hub/models/module_stream.rb', line 221 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
201 202 203 |
# File 'lib/oci/os_management_hub/models/module_stream.rb', line 201 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
210 211 212 |
# File 'lib/oci/os_management_hub/models/module_stream.rb', line 210 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
254 255 256 257 258 259 260 261 262 263 |
# File 'lib/oci/os_management_hub/models/module_stream.rb', line 254 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
248 249 250 |
# File 'lib/oci/os_management_hub/models/module_stream.rb', line 248 def to_s to_hash.to_s end |