Class: OCI::OsManagementHub::Models::CreateSoftwareSourceProfileDetails

Inherits:
CreateProfileDetails show all
Defined in:
lib/oci/os_management_hub/models/create_software_source_profile_details.rb

Overview

Provides the information used to create the software source registration profile.

Constant Summary collapse

VENDOR_NAME_ENUM =
[
  VENDOR_NAME_ORACLE = 'ORACLE'.freeze,
  VENDOR_NAME_MICROSOFT = 'MICROSOFT'.freeze,
  VENDOR_NAME_CANONICAL = 'CANONICAL'.freeze
].freeze
OS_FAMILY_ENUM =
[
  OS_FAMILY_ORACLE_LINUX_10 = 'ORACLE_LINUX_10'.freeze,
  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,
  OS_FAMILY_ORACLE_LINUX_6 = 'ORACLE_LINUX_6'.freeze,
  OS_FAMILY_WINDOWS_SERVER_2016 = 'WINDOWS_SERVER_2016'.freeze,
  OS_FAMILY_WINDOWS_SERVER_2019 = 'WINDOWS_SERVER_2019'.freeze,
  OS_FAMILY_WINDOWS_SERVER_2022 = 'WINDOWS_SERVER_2022'.freeze,
  OS_FAMILY_WINDOWS_SERVER_2025 = 'WINDOWS_SERVER_2025'.freeze,
  OS_FAMILY_WINDOWS_11 = 'WINDOWS_11'.freeze,
  OS_FAMILY_ALL = 'ALL'.freeze,
  OS_FAMILY_UBUNTU_20_04 = 'UBUNTU_20_04'.freeze,
  OS_FAMILY_UBUNTU_22_04 = 'UBUNTU_22_04'.freeze,
  OS_FAMILY_UBUNTU_24_04 = 'UBUNTU_24_04'.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,
  ARCH_TYPE_I386 = 'I386'.freeze,
  ARCH_TYPE_AMD64 = 'AMD64'.freeze,
  ARCH_TYPE_ARM64 = 'ARM64'.freeze,
  ARCH_TYPE_ALL = 'ALL'.freeze
].freeze

Constants inherited from CreateProfileDetails

OCI::OsManagementHub::Models::CreateProfileDetails::PROFILE_TYPE_ENUM

Instance Attribute Summary collapse

Attributes inherited from CreateProfileDetails

#compartment_id, #defined_tags, #description, #display_name, #freeform_tags, #is_default_profile, #management_station_id, #profile_type, #registration_type

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from CreateProfileDetails

get_subtype

Constructor Details

#initialize(attributes = {}) ⇒ CreateSoftwareSourceProfileDetails

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash

Options Hash (attributes):

  • :display_name (String)

    The value to assign to the #display_name proprety

  • :compartment_id (String)

    The value to assign to the #compartment_id proprety

  • :description (String)

    The value to assign to the #description proprety

  • :management_station_id (String)

    The value to assign to the #management_station_id proprety

  • :registration_type (String)

    The value to assign to the #registration_type proprety

  • :is_default_profile (BOOLEAN)

    The value to assign to the #is_default_profile proprety

  • :freeform_tags (Hash<String, String>)

    The value to assign to the #freeform_tags proprety

  • :defined_tags (Hash<String, Hash<String, Object>>)

    The value to assign to the #defined_tags proprety

  • :vendor_name (String)

    The value to assign to the #vendor_name property

  • :os_family (String)

    The value to assign to the #os_family property

  • :arch_type (String)

    The value to assign to the #arch_type property

  • :software_source_ids (Array<String>)

    The value to assign to the #software_source_ids property



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
# File 'lib/oci/os_management_hub/models/create_software_source_profile_details.rb', line 123

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_typeString

[Required] The architecture type.

Returns:

  • (String)


57
58
59
# File 'lib/oci/os_management_hub/models/create_software_source_profile_details.rb', line 57

def arch_type
  @arch_type
end

#os_familyString

[Required] The operating system family.

Returns:

  • (String)


53
54
55
# File 'lib/oci/os_management_hub/models/create_software_source_profile_details.rb', line 53

def os_family
  @os_family
end

#software_source_idsArray<String>

The list of software source OCIDs that the registration profile will use.

Returns:

  • (Array<String>)


61
62
63
# File 'lib/oci/os_management_hub/models/create_software_source_profile_details.rb', line 61

def software_source_ids
  @software_source_ids
end

#vendor_nameString

[Required] The vendor of the operating system for the instance.

Returns:

  • (String)


49
50
51
# File 'lib/oci/os_management_hub/models/create_software_source_profile_details.rb', line 49

def vendor_name
  @vendor_name
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



64
65
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 64

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'display_name': :'displayName',
    'compartment_id': :'compartmentId',
    'description': :'description',
    'management_station_id': :'managementStationId',
    'profile_type': :'profileType',
    'registration_type': :'registrationType',
    'is_default_profile': :'isDefaultProfile',
    '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_typesObject

Attribute type mapping.



85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# File 'lib/oci/os_management_hub/models/create_software_source_profile_details.rb', line 85

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'display_name': :'String',
    'compartment_id': :'String',
    'description': :'String',
    'management_station_id': :'String',
    'profile_type': :'String',
    'registration_type': :'String',
    'is_default_profile': :'BOOLEAN',
    '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.

Parameters:

  • other (Object)

    the other object to be compared



189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
# File 'lib/oci/os_management_hub/models/create_software_source_profile_details.rb', line 189

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 &&
    registration_type == other.registration_type &&
    is_default_profile == other.is_default_profile &&
    freeform_tags == other.freeform_tags &&
    defined_tags == other.defined_tags &&
    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

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
# File 'lib/oci/os_management_hub/models/create_software_source_profile_details.rb', line 231

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

Parameters:

  • other (Object)

    the other object to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


211
212
213
# File 'lib/oci/os_management_hub/models/create_software_source_profile_details.rb', line 211

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



220
221
222
# File 'lib/oci/os_management_hub/models/create_software_source_profile_details.rb', line 220

def hash
  [display_name, compartment_id, description, management_station_id, profile_type, registration_type, is_default_profile, freeform_tags, defined_tags, vendor_name, os_family, arch_type, software_source_ids].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



264
265
266
267
268
269
270
271
272
273
# File 'lib/oci/os_management_hub/models/create_software_source_profile_details.rb', line 264

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_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



258
259
260
# File 'lib/oci/os_management_hub/models/create_software_source_profile_details.rb', line 258

def to_s
  to_hash.to_s
end