Class: OCI::GoldenGate::Models::ProcessOptions
- Inherits:
-
Object
- Object
- OCI::GoldenGate::Models::ProcessOptions
- Defined in:
- lib/oci/golden_gate/models/process_options.rb
Overview
Required pipeline options to configure the replication process (Extract or Replicat).
Constant Summary collapse
- SHOULD_RESTART_ON_FAILURE_ENUM =
[ SHOULD_RESTART_ON_FAILURE_ENABLED = 'ENABLED'.freeze, SHOULD_RESTART_ON_FAILURE_DISABLED = 'DISABLED'.freeze, SHOULD_RESTART_ON_FAILURE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- START_USING_DEFAULT_MAPPING_ENUM =
[ START_USING_DEFAULT_MAPPING_ENABLED = 'ENABLED'.freeze, START_USING_DEFAULT_MAPPING_DISABLED = 'DISABLED'.freeze, START_USING_DEFAULT_MAPPING_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#initial_data_load ⇒ OCI::GoldenGate::Models::InitialDataLoad
This attribute is required.
-
#replicate_schema_change ⇒ OCI::GoldenGate::Models::ReplicateSchemaChange
This attribute is required.
-
#should_restart_on_failure ⇒ String
[Required] If ENABLED, then the replication process restarts itself upon failure.
-
#start_using_default_mapping ⇒ String
If ENABLED, then the pipeline is started as part of pipeline creation.
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 = {}) ⇒ ProcessOptions
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 = {}) ⇒ ProcessOptions
Initializes the object
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
# File 'lib/oci/golden_gate/models/process_options.rb', line 77 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.initial_data_load = attributes[:'initialDataLoad'] if attributes[:'initialDataLoad'] raise 'You cannot provide both :initialDataLoad and :initial_data_load' if attributes.key?(:'initialDataLoad') && attributes.key?(:'initial_data_load') self.initial_data_load = attributes[:'initial_data_load'] if attributes[:'initial_data_load'] self.replicate_schema_change = attributes[:'replicateSchemaChange'] if attributes[:'replicateSchemaChange'] raise 'You cannot provide both :replicateSchemaChange and :replicate_schema_change' if attributes.key?(:'replicateSchemaChange') && attributes.key?(:'replicate_schema_change') self.replicate_schema_change = attributes[:'replicate_schema_change'] if attributes[:'replicate_schema_change'] self.should_restart_on_failure = attributes[:'shouldRestartOnFailure'] if attributes[:'shouldRestartOnFailure'] self.should_restart_on_failure = "ENABLED" if should_restart_on_failure.nil? && !attributes.key?(:'shouldRestartOnFailure') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :shouldRestartOnFailure and :should_restart_on_failure' if attributes.key?(:'shouldRestartOnFailure') && attributes.key?(:'should_restart_on_failure') self.should_restart_on_failure = attributes[:'should_restart_on_failure'] if attributes[:'should_restart_on_failure'] self.should_restart_on_failure = "ENABLED" if should_restart_on_failure.nil? && !attributes.key?(:'shouldRestartOnFailure') && !attributes.key?(:'should_restart_on_failure') # rubocop:disable Style/StringLiterals self.start_using_default_mapping = attributes[:'startUsingDefaultMapping'] if attributes[:'startUsingDefaultMapping'] self.start_using_default_mapping = "DISABLED" if start_using_default_mapping.nil? && !attributes.key?(:'startUsingDefaultMapping') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :startUsingDefaultMapping and :start_using_default_mapping' if attributes.key?(:'startUsingDefaultMapping') && attributes.key?(:'start_using_default_mapping') self.start_using_default_mapping = attributes[:'start_using_default_mapping'] if attributes[:'start_using_default_mapping'] self.start_using_default_mapping = "DISABLED" if start_using_default_mapping.nil? && !attributes.key?(:'startUsingDefaultMapping') && !attributes.key?(:'start_using_default_mapping') # rubocop:disable Style/StringLiterals end |
Instance Attribute Details
#initial_data_load ⇒ OCI::GoldenGate::Models::InitialDataLoad
This attribute is required.
27 28 29 |
# File 'lib/oci/golden_gate/models/process_options.rb', line 27 def initial_data_load @initial_data_load end |
#replicate_schema_change ⇒ OCI::GoldenGate::Models::ReplicateSchemaChange
This attribute is required.
31 32 33 |
# File 'lib/oci/golden_gate/models/process_options.rb', line 31 def replicate_schema_change @replicate_schema_change end |
#should_restart_on_failure ⇒ String
[Required] If ENABLED, then the replication process restarts itself upon failure. This option applies when creating or updating a pipeline.
36 37 38 |
# File 'lib/oci/golden_gate/models/process_options.rb', line 36 def should_restart_on_failure @should_restart_on_failure end |
#start_using_default_mapping ⇒ String
If ENABLED, then the pipeline is started as part of pipeline creation. It uses default mapping. This option applies when creating or updating a pipeline.
41 42 43 |
# File 'lib/oci/golden_gate/models/process_options.rb', line 41 def start_using_default_mapping @start_using_default_mapping end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
44 45 46 47 48 49 50 51 52 53 |
# File 'lib/oci/golden_gate/models/process_options.rb', line 44 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'initial_data_load': :'initialDataLoad', 'replicate_schema_change': :'replicateSchemaChange', 'should_restart_on_failure': :'shouldRestartOnFailure', 'start_using_default_mapping': :'startUsingDefaultMapping' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
56 57 58 59 60 61 62 63 64 65 |
# File 'lib/oci/golden_gate/models/process_options.rb', line 56 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'initial_data_load': :'OCI::GoldenGate::Models::InitialDataLoad', 'replicate_schema_change': :'OCI::GoldenGate::Models::ReplicateSchemaChange', 'should_restart_on_failure': :'String', 'start_using_default_mapping': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
145 146 147 148 149 150 151 152 153 |
# File 'lib/oci/golden_gate/models/process_options.rb', line 145 def ==(other) return true if equal?(other) self.class == other.class && initial_data_load == other.initial_data_load && replicate_schema_change == other.replicate_schema_change && should_restart_on_failure == other.should_restart_on_failure && start_using_default_mapping == other.start_using_default_mapping end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 |
# File 'lib/oci/golden_gate/models/process_options.rb', line 178 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
158 159 160 |
# File 'lib/oci/golden_gate/models/process_options.rb', line 158 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
167 168 169 |
# File 'lib/oci/golden_gate/models/process_options.rb', line 167 def hash [initial_data_load, replicate_schema_change, should_restart_on_failure, start_using_default_mapping].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
211 212 213 214 215 216 217 218 219 220 |
# File 'lib/oci/golden_gate/models/process_options.rb', line 211 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
205 206 207 |
# File 'lib/oci/golden_gate/models/process_options.rb', line 205 def to_s to_hash.to_s end |