Class: OCI::DatabaseMigration::Models::UpdateMySqlInitialLoadSettings
- Inherits:
-
Object
- Object
- OCI::DatabaseMigration::Models::UpdateMySqlInitialLoadSettings
- Defined in:
- lib/oci/database_migration/models/update_my_sql_initial_load_settings.rb
Overview
Optional dump settings
Constant Summary collapse
- PRIMARY_KEY_COMPATIBILITY_ENUM =
[ PRIMARY_KEY_COMPATIBILITY_NONE = 'NONE'.freeze, PRIMARY_KEY_COMPATIBILITY_IGNORE_MISSING_PKS = 'IGNORE_MISSING_PKS'.freeze, PRIMARY_KEY_COMPATIBILITY_CREATE_INVISIBLE_PKS = 'CREATE_INVISIBLE_PKS'.freeze ].freeze
- HANDLE_GRANT_ERRORS_ENUM =
[ HANDLE_GRANT_ERRORS_ABORT = 'ABORT'.freeze, HANDLE_GRANT_ERRORS_DROP_ACCOUNT = 'DROP_ACCOUNT'.freeze, HANDLE_GRANT_ERRORS_IGNORE = 'IGNORE'.freeze ].freeze
- JOB_MODE_ENUM =
[ JOB_MODE_FULL = 'FULL'.freeze, JOB_MODE_SCHEMA = 'SCHEMA'.freeze ].freeze
Instance Attribute Summary collapse
-
#compatibility ⇒ Array<OCI::DatabaseMigration::Models::CompatibilityOption>
Apply the specified requirements for compatibility with MySQL Database Service for all tables in the dump output, altering the dump files as necessary.
-
#handle_grant_errors ⇒ String
The action taken in the event of errors related to GRANT or REVOKE errors.
-
#is_consistent ⇒ BOOLEAN
Enable (true) or disable (false) consistent data dumps by locking the instance for backup during the dump.
-
#is_ignore_existing_objects ⇒ BOOLEAN
Import the dump even if it contains objects that already exist in the target schema in the MySQL instance.
-
#is_tz_utc ⇒ BOOLEAN
Include a statement at the start of the dump to set the time zone to UTC.
-
#job_mode ⇒ String
[Required] MySql Job Mode.
-
#primary_key_compatibility ⇒ String
Primary key compatibility option.
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 = {}) ⇒ UpdateMySqlInitialLoadSettings
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 = {}) ⇒ UpdateMySqlInitialLoadSettings
Initializes the object
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 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 |
# File 'lib/oci/database_migration/models/update_my_sql_initial_load_settings.rb', line 104 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.is_consistent = attributes[:'isConsistent'] unless attributes[:'isConsistent'].nil? self.is_consistent = true if is_consistent.nil? && !attributes.key?(:'isConsistent') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :isConsistent and :is_consistent' if attributes.key?(:'isConsistent') && attributes.key?(:'is_consistent') self.is_consistent = attributes[:'is_consistent'] unless attributes[:'is_consistent'].nil? self.is_consistent = true if is_consistent.nil? && !attributes.key?(:'isConsistent') && !attributes.key?(:'is_consistent') # rubocop:disable Style/StringLiterals self.is_tz_utc = attributes[:'isTzUtc'] unless attributes[:'isTzUtc'].nil? self.is_tz_utc = true if is_tz_utc.nil? && !attributes.key?(:'isTzUtc') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :isTzUtc and :is_tz_utc' if attributes.key?(:'isTzUtc') && attributes.key?(:'is_tz_utc') self.is_tz_utc = attributes[:'is_tz_utc'] unless attributes[:'is_tz_utc'].nil? self.is_tz_utc = true if is_tz_utc.nil? && !attributes.key?(:'isTzUtc') && !attributes.key?(:'is_tz_utc') # rubocop:disable Style/StringLiterals self.compatibility = attributes[:'compatibility'] if attributes[:'compatibility'] self.primary_key_compatibility = attributes[:'primaryKeyCompatibility'] if attributes[:'primaryKeyCompatibility'] self.primary_key_compatibility = "NONE" if primary_key_compatibility.nil? && !attributes.key?(:'primaryKeyCompatibility') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :primaryKeyCompatibility and :primary_key_compatibility' if attributes.key?(:'primaryKeyCompatibility') && attributes.key?(:'primary_key_compatibility') self.primary_key_compatibility = attributes[:'primary_key_compatibility'] if attributes[:'primary_key_compatibility'] self.primary_key_compatibility = "NONE" if primary_key_compatibility.nil? && !attributes.key?(:'primaryKeyCompatibility') && !attributes.key?(:'primary_key_compatibility') # rubocop:disable Style/StringLiterals self.is_ignore_existing_objects = attributes[:'isIgnoreExistingObjects'] unless attributes[:'isIgnoreExistingObjects'].nil? self.is_ignore_existing_objects = false if is_ignore_existing_objects.nil? && !attributes.key?(:'isIgnoreExistingObjects') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :isIgnoreExistingObjects and :is_ignore_existing_objects' if attributes.key?(:'isIgnoreExistingObjects') && attributes.key?(:'is_ignore_existing_objects') self.is_ignore_existing_objects = attributes[:'is_ignore_existing_objects'] unless attributes[:'is_ignore_existing_objects'].nil? self.is_ignore_existing_objects = false if is_ignore_existing_objects.nil? && !attributes.key?(:'isIgnoreExistingObjects') && !attributes.key?(:'is_ignore_existing_objects') # rubocop:disable Style/StringLiterals self.handle_grant_errors = attributes[:'handleGrantErrors'] if attributes[:'handleGrantErrors'] raise 'You cannot provide both :handleGrantErrors and :handle_grant_errors' if attributes.key?(:'handleGrantErrors') && attributes.key?(:'handle_grant_errors') self.handle_grant_errors = attributes[:'handle_grant_errors'] if attributes[:'handle_grant_errors'] self.job_mode = attributes[:'jobMode'] if attributes[:'jobMode'] raise 'You cannot provide both :jobMode and :job_mode' if attributes.key?(:'jobMode') && attributes.key?(:'job_mode') self.job_mode = attributes[:'job_mode'] if attributes[:'job_mode'] end |
Instance Attribute Details
#compatibility ⇒ Array<OCI::DatabaseMigration::Models::CompatibilityOption>
Apply the specified requirements for compatibility with MySQL Database Service for all tables in the dump output, altering the dump files as necessary.
42 43 44 |
# File 'lib/oci/database_migration/models/update_my_sql_initial_load_settings.rb', line 42 def compatibility @compatibility end |
#handle_grant_errors ⇒ String
The action taken in the event of errors related to GRANT or REVOKE errors.
55 56 57 |
# File 'lib/oci/database_migration/models/update_my_sql_initial_load_settings.rb', line 55 def handle_grant_errors @handle_grant_errors end |
#is_consistent ⇒ BOOLEAN
Enable (true) or disable (false) consistent data dumps by locking the instance for backup during the dump.
31 32 33 |
# File 'lib/oci/database_migration/models/update_my_sql_initial_load_settings.rb', line 31 def is_consistent @is_consistent end |
#is_ignore_existing_objects ⇒ BOOLEAN
Import the dump even if it contains objects that already exist in the target schema in the MySQL instance.
51 52 53 |
# File 'lib/oci/database_migration/models/update_my_sql_initial_load_settings.rb', line 51 def is_ignore_existing_objects @is_ignore_existing_objects end |
#is_tz_utc ⇒ BOOLEAN
Include a statement at the start of the dump to set the time zone to UTC.
36 37 38 |
# File 'lib/oci/database_migration/models/update_my_sql_initial_load_settings.rb', line 36 def is_tz_utc @is_tz_utc end |
#job_mode ⇒ String
[Required] MySql Job Mode
59 60 61 |
# File 'lib/oci/database_migration/models/update_my_sql_initial_load_settings.rb', line 59 def job_mode @job_mode end |
#primary_key_compatibility ⇒ String
Primary key compatibility option
46 47 48 |
# File 'lib/oci/database_migration/models/update_my_sql_initial_load_settings.rb', line 46 def primary_key_compatibility @primary_key_compatibility end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
62 63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/oci/database_migration/models/update_my_sql_initial_load_settings.rb', line 62 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'is_consistent': :'isConsistent', 'is_tz_utc': :'isTzUtc', 'compatibility': :'compatibility', 'primary_key_compatibility': :'primaryKeyCompatibility', 'is_ignore_existing_objects': :'isIgnoreExistingObjects', 'handle_grant_errors': :'handleGrantErrors', 'job_mode': :'jobMode' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
77 78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/oci/database_migration/models/update_my_sql_initial_load_settings.rb', line 77 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'is_consistent': :'BOOLEAN', 'is_tz_utc': :'BOOLEAN', 'compatibility': :'Array<OCI::DatabaseMigration::Models::CompatibilityOption>', 'primary_key_compatibility': :'String', 'is_ignore_existing_objects': :'BOOLEAN', 'handle_grant_errors': :'String', 'job_mode': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
188 189 190 191 192 193 194 195 196 197 198 199 |
# File 'lib/oci/database_migration/models/update_my_sql_initial_load_settings.rb', line 188 def ==(other) return true if equal?(other) self.class == other.class && is_consistent == other.is_consistent && is_tz_utc == other.is_tz_utc && compatibility == other.compatibility && primary_key_compatibility == other.primary_key_compatibility && is_ignore_existing_objects == other.is_ignore_existing_objects && handle_grant_errors == other.handle_grant_errors && job_mode == other.job_mode end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 |
# File 'lib/oci/database_migration/models/update_my_sql_initial_load_settings.rb', line 224 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
204 205 206 |
# File 'lib/oci/database_migration/models/update_my_sql_initial_load_settings.rb', line 204 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
213 214 215 |
# File 'lib/oci/database_migration/models/update_my_sql_initial_load_settings.rb', line 213 def hash [is_consistent, is_tz_utc, compatibility, primary_key_compatibility, is_ignore_existing_objects, handle_grant_errors, job_mode].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
257 258 259 260 261 262 263 264 265 266 |
# File 'lib/oci/database_migration/models/update_my_sql_initial_load_settings.rb', line 257 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
251 252 253 |
# File 'lib/oci/database_migration/models/update_my_sql_initial_load_settings.rb', line 251 def to_s to_hash.to_s end |