Class: OCI::OsManagementHub::Models::CreateSoftwareSourceProfileDetails
- Inherits:
-
CreateProfileDetails
- Object
- CreateProfileDetails
- OCI::OsManagementHub::Models::CreateSoftwareSourceProfileDetails
- Defined in:
- lib/oci/os_management_hub/models/create_software_source_profile_details.rb
Overview
Description of a software source registration profile to be created.
Constant Summary collapse
- VENDOR_NAME_ENUM =
[ VENDOR_NAME_ORACLE = 'ORACLE'.freeze ].freeze
- OS_FAMILY_ENUM =
[ OS_FAMILY_ORACLE_LINUX_9 = 'ORACLE_LINUX_9'.freeze, OS_FAMILY_ORACLE_LINUX_8 = 'ORACLE_LINUX_8'.freeze, OS_FAMILY_ORACLE_LINUX_7 = 'ORACLE_LINUX_7'.freeze ].freeze
- 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 ].freeze
Constants inherited from CreateProfileDetails
OCI::OsManagementHub::Models::CreateProfileDetails::PROFILE_TYPE_ENUM
Instance Attribute Summary collapse
-
#arch_type ⇒ String
[Required] The architecture type.
-
#os_family ⇒ String
[Required] The operating system family.
-
#software_source_ids ⇒ Array<String>
[Required] The list of software source OCIDs that the registration profile will use.
-
#vendor_name ⇒ String
[Required] The software source vendor name.
Attributes inherited from CreateProfileDetails
#compartment_id, #defined_tags, #description, #display_name, #freeform_tags, #management_station_id, #profile_type
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 = {}) ⇒ CreateSoftwareSourceProfileDetails
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.
Methods inherited from CreateProfileDetails
Constructor Details
#initialize(attributes = {}) ⇒ CreateSoftwareSourceProfileDetails
Initializes the object
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 |
# File 'lib/oci/os_management_hub/models/create_software_source_profile_details.rb', line 100 def initialize(attributes = {}) return unless attributes.is_a?(Hash) attributes['profileType'] = 'SOFTWARESOURCE' super(attributes) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.vendor_name = attributes[:'vendorName'] if attributes[:'vendorName'] raise 'You cannot provide both :vendorName and :vendor_name' if attributes.key?(:'vendorName') && attributes.key?(:'vendor_name') self.vendor_name = attributes[:'vendor_name'] if attributes[:'vendor_name'] self.os_family = attributes[:'osFamily'] if attributes[:'osFamily'] raise 'You cannot provide both :osFamily and :os_family' if attributes.key?(:'osFamily') && attributes.key?(:'os_family') self.os_family = attributes[:'os_family'] if attributes[:'os_family'] 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.software_source_ids = attributes[:'softwareSourceIds'] if attributes[:'softwareSourceIds'] raise 'You cannot provide both :softwareSourceIds and :software_source_ids' if attributes.key?(:'softwareSourceIds') && attributes.key?(:'software_source_ids') self.software_source_ids = attributes[:'software_source_ids'] if attributes[:'software_source_ids'] end |
Instance Attribute Details
#arch_type ⇒ String
[Required] The architecture type.
40 41 42 |
# File 'lib/oci/os_management_hub/models/create_software_source_profile_details.rb', line 40 def arch_type @arch_type end |
#os_family ⇒ String
[Required] The operating system family.
36 37 38 |
# File 'lib/oci/os_management_hub/models/create_software_source_profile_details.rb', line 36 def os_family @os_family end |
#software_source_ids ⇒ Array<String>
[Required] The list of software source OCIDs that the registration profile will use.
44 45 46 |
# File 'lib/oci/os_management_hub/models/create_software_source_profile_details.rb', line 44 def software_source_ids @software_source_ids end |
#vendor_name ⇒ String
[Required] The software source vendor name.
32 33 34 |
# File 'lib/oci/os_management_hub/models/create_software_source_profile_details.rb', line 32 def vendor_name @vendor_name end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/oci/os_management_hub/models/create_software_source_profile_details.rb', line 47 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'display_name': :'displayName', 'compartment_id': :'compartmentId', 'description': :'description', 'management_station_id': :'managementStationId', 'profile_type': :'profileType', 'freeform_tags': :'freeformTags', 'defined_tags': :'definedTags', 'vendor_name': :'vendorName', 'os_family': :'osFamily', 'arch_type': :'archType', 'software_source_ids': :'softwareSourceIds' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'lib/oci/os_management_hub/models/create_software_source_profile_details.rb', line 66 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'display_name': :'String', 'compartment_id': :'String', 'description': :'String', 'management_station_id': :'String', 'profile_type': :'String', 'freeform_tags': :'Hash<String, String>', 'defined_tags': :'Hash<String, Hash<String, Object>>', 'vendor_name': :'String', 'os_family': :'String', 'arch_type': :'String', 'software_source_ids': :'Array<String>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 |
# File 'lib/oci/os_management_hub/models/create_software_source_profile_details.rb', line 166 def ==(other) return true if equal?(other) self.class == other.class && display_name == other.display_name && compartment_id == other.compartment_id && description == other.description && management_station_id == other.management_station_id && profile_type == other.profile_type && == other. && == other. && vendor_name == other.vendor_name && os_family == other.os_family && arch_type == other.arch_type && software_source_ids == other.software_source_ids end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 |
# File 'lib/oci/os_management_hub/models/create_software_source_profile_details.rb', line 206 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
186 187 188 |
# File 'lib/oci/os_management_hub/models/create_software_source_profile_details.rb', line 186 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
195 196 197 |
# File 'lib/oci/os_management_hub/models/create_software_source_profile_details.rb', line 195 def hash [display_name, compartment_id, description, management_station_id, profile_type, , , vendor_name, os_family, arch_type, software_source_ids].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
239 240 241 242 243 244 245 246 247 248 |
# File 'lib/oci/os_management_hub/models/create_software_source_profile_details.rb', line 239 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
233 234 235 |
# File 'lib/oci/os_management_hub/models/create_software_source_profile_details.rb', line 233 def to_s to_hash.to_s end |