Method: OCI::Database::Models::DatabaseConnectionStrings#initialize

Defined in:
lib/oci/database/models/database_connection_strings.rb

#initialize(attributes = {}) ⇒ DatabaseConnectionStrings

Initializes the object

Parameters:

  • (defaults to: {})

    Model attributes in the form of hash

Options Hash (attributes):

  • :cdb_default (String)

    The value to assign to the #cdb_default property

  • :cdb_ip_default (String)

    The value to assign to the #cdb_ip_default property

  • :all_connection_strings (Hash<String, String>)

    The value to assign to the #all_connection_strings property



53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# File 'lib/oci/database/models/database_connection_strings.rb', line 53

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.cdb_default = attributes[:'cdbDefault'] if attributes[:'cdbDefault']

  raise 'You cannot provide both :cdbDefault and :cdb_default' if attributes.key?(:'cdbDefault') && attributes.key?(:'cdb_default')

  self.cdb_default = attributes[:'cdb_default'] if attributes[:'cdb_default']

  self.cdb_ip_default = attributes[:'cdbIpDefault'] if attributes[:'cdbIpDefault']

  raise 'You cannot provide both :cdbIpDefault and :cdb_ip_default' if attributes.key?(:'cdbIpDefault') && attributes.key?(:'cdb_ip_default')

  self.cdb_ip_default = attributes[:'cdb_ip_default'] if attributes[:'cdb_ip_default']

  self.all_connection_strings = attributes[:'allConnectionStrings'] if attributes[:'allConnectionStrings']

  raise 'You cannot provide both :allConnectionStrings and :all_connection_strings' if attributes.key?(:'allConnectionStrings') && attributes.key?(:'all_connection_strings')

  self.all_connection_strings = attributes[:'all_connection_strings'] if attributes[:'all_connection_strings']
end