Method: OCI::Mysql::Models::StopDbSystemDetails#initialize

Defined in:
lib/oci/mysql/models/stop_db_system_details.rb

#initialize(attributes = {}) ⇒ StopDbSystemDetails

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):

  • :shutdown_type (String)

    The value to assign to the #shutdown_type property



47
48
49
50
51
52
53
54
55
56
57
58
59
60
# File 'lib/oci/mysql/models/stop_db_system_details.rb', line 47

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.shutdown_type = attributes[:'shutdownType'] if attributes[:'shutdownType']
  self.shutdown_type = "FAST" if shutdown_type.nil? && !attributes.key?(:'shutdownType') # rubocop:disable Style/StringLiterals

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

  self.shutdown_type = attributes[:'shutdown_type'] if attributes[:'shutdown_type']
  self.shutdown_type = "FAST" if shutdown_type.nil? && !attributes.key?(:'shutdownType') && !attributes.key?(:'shutdown_type') # rubocop:disable Style/StringLiterals
end