class OCI::DataIntegration::Models::UpdateTaskFromSQLTask
The information about the SQL task.
Constants
- SQL_SCRIPT_TYPE_ENUM
Attributes
Describes the shape of the execution result @return [Object]
@return [OCI::DataIntegration::Models::Script]
Indicates whether the task is invoking a custom SQL script or stored procedure. @return [String]
Public Class Methods
Attribute mapping from ruby-style variable name to JSON key.
# File lib/oci/data_integration/models/update_task_from_sql_task.rb, line 28 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'model_type': :'modelType', 'key': :'key', 'model_version': :'modelVersion', 'parent_ref': :'parentRef', 'name': :'name', 'description': :'description', 'object_status': :'objectStatus', 'object_version': :'objectVersion', 'identifier': :'identifier', 'input_ports': :'inputPorts', 'output_ports': :'outputPorts', 'parameters': :'parameters', 'op_config_values': :'opConfigValues', 'config_provider_delegate': :'configProviderDelegate', 'registry_metadata': :'registryMetadata', 'script': :'script', 'sql_script_type': :'sqlScriptType', 'operation': :'operation' # rubocop:enable Style/SymbolLiteral } end
Initializes the object @param [Hash] attributes Model attributes in the form of hash @option attributes [String] :key The value to assign to the {OCI::DataIntegration::Models::UpdateTaskDetails#key key
} proprety @option attributes [String] :model_version The value to assign to the {OCI::DataIntegration::Models::UpdateTaskDetails#model_version model_version
} proprety @option attributes [OCI::DataIntegration::Models::ParentReference] :parent_ref The value to assign to the {OCI::DataIntegration::Models::UpdateTaskDetails#parent_ref parent_ref
} proprety @option attributes [String] :name The value to assign to the {OCI::DataIntegration::Models::UpdateTaskDetails#name name
} proprety @option attributes [String] :description The value to assign to the {OCI::DataIntegration::Models::UpdateTaskDetails#description description
} proprety @option attributes [Integer] :object_status The value to assign to the {OCI::DataIntegration::Models::UpdateTaskDetails#object_status object_status
} proprety @option attributes [Integer] :object_version The value to assign to the {OCI::DataIntegration::Models::UpdateTaskDetails#object_version object_version
} proprety @option attributes [String] :identifier The value to assign to the {OCI::DataIntegration::Models::UpdateTaskDetails#identifier identifier
} proprety @option attributes [Array<OCI::DataIntegration::Models::InputPort>] :input_ports The value to assign to the {OCI::DataIntegration::Models::UpdateTaskDetails#input_ports input_ports
} proprety @option attributes [Array<OCI::DataIntegration::Models::OutputPort>] :output_ports The value to assign to the {OCI::DataIntegration::Models::UpdateTaskDetails#output_ports output_ports
} proprety @option attributes [Array<OCI::DataIntegration::Models::Parameter>] :parameters The value to assign to the {OCI::DataIntegration::Models::UpdateTaskDetails#parameters parameters
} proprety @option attributes [OCI::DataIntegration::Models::ConfigValues] :op_config_values The value to assign to the {OCI::DataIntegration::Models::UpdateTaskDetails#op_config_values op_config_values
} proprety @option attributes [OCI::DataIntegration::Models::ConfigProvider] :config_provider_delegate The value to assign to the {OCI::DataIntegration::Models::UpdateTaskDetails#config_provider_delegate config_provider_delegate
} proprety @option attributes [OCI::DataIntegration::Models::RegistryMetadata] :registry_metadata The value to assign to the {OCI::DataIntegration::Models::UpdateTaskDetails#registry_metadata registry_metadata
} proprety @option attributes [OCI::DataIntegration::Models::Script] :script The value to assign to the {#script} property @option attributes [String] :sql_script_type The value to assign to the {#sql_script_type} property @option attributes [Object] :operation The value to assign to the {#operation} property
OCI::DataIntegration::Models::UpdateTaskDetails::new
# File lib/oci/data_integration/models/update_task_from_sql_task.rb, line 102 def initialize(attributes = {}) return unless attributes.is_a?(Hash) attributes['modelType'] = 'SQL_TASK' super(attributes) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.script = attributes[:'script'] if attributes[:'script'] self.sql_script_type = attributes[:'sqlScriptType'] if attributes[:'sqlScriptType'] raise 'You cannot provide both :sqlScriptType and :sql_script_type' if attributes.key?(:'sqlScriptType') && attributes.key?(:'sql_script_type') self.sql_script_type = attributes[:'sql_script_type'] if attributes[:'sql_script_type'] self.operation = attributes[:'operation'] if attributes[:'operation'] end
Attribute type mapping.
# File lib/oci/data_integration/models/update_task_from_sql_task.rb, line 54 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'model_type': :'String', 'key': :'String', 'model_version': :'String', 'parent_ref': :'OCI::DataIntegration::Models::ParentReference', 'name': :'String', 'description': :'String', 'object_status': :'Integer', 'object_version': :'Integer', 'identifier': :'String', 'input_ports': :'Array<OCI::DataIntegration::Models::InputPort>', 'output_ports': :'Array<OCI::DataIntegration::Models::OutputPort>', 'parameters': :'Array<OCI::DataIntegration::Models::Parameter>', 'op_config_values': :'OCI::DataIntegration::Models::ConfigValues', 'config_provider_delegate': :'OCI::DataIntegration::Models::ConfigProvider', 'registry_metadata': :'OCI::DataIntegration::Models::RegistryMetadata', 'script': :'OCI::DataIntegration::Models::Script', 'sql_script_type': :'String', 'operation': :'Object' # rubocop:enable Style/SymbolLiteral } end
Public Instance Methods
Checks equality by comparing each attribute. @param [Object] other the other object to be compared
# File lib/oci/data_integration/models/update_task_from_sql_task.rb, line 138 def ==(other) return true if equal?(other) self.class == other.class && model_type == other.model_type && key == other.key && model_version == other.model_version && parent_ref == other.parent_ref && name == other.name && description == other.description && object_status == other.object_status && object_version == other.object_version && identifier == other.identifier && input_ports == other.input_ports && output_ports == other.output_ports && parameters == other.parameters && op_config_values == other.op_config_values && config_provider_delegate == other.config_provider_delegate && registry_metadata == other.registry_metadata && script == other.script && sql_script_type == other.sql_script_type && operation == other.operation end
Builds the object from hash @param [Hash] attributes Model attributes in the form of hash @return [Object] Returns the model itself
# File lib/oci/data_integration/models/update_task_from_sql_task.rb, line 185 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
@see the `==` method @param [Object] other the other object to be compared
# File lib/oci/data_integration/models/update_task_from_sql_task.rb, line 165 def eql?(other) self == other end
Calculates hash code according to all attributes. @return [Fixnum] Hash code
# File lib/oci/data_integration/models/update_task_from_sql_task.rb, line 174 def hash [model_type, key, model_version, parent_ref, name, description, object_status, object_version, identifier, input_ports, output_ports, parameters, op_config_values, config_provider_delegate, registry_metadata, script, sql_script_type, operation].hash end
Custom attribute writer method checking allowed values (enum). @param [Object] sql_script_type
Object
to be assigned
# File lib/oci/data_integration/models/update_task_from_sql_task.rb, line 127 def sql_script_type=(sql_script_type) raise "Invalid value for 'sql_script_type': this must be one of the values in SQL_SCRIPT_TYPE_ENUM." if sql_script_type && !SQL_SCRIPT_TYPE_ENUM.include?(sql_script_type) @sql_script_type = sql_script_type end
Returns the object in the form of hash @return [Hash] Returns the object in the form of hash
# File lib/oci/data_integration/models/update_task_from_sql_task.rb, line 218 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
Returns the string representation of the object @return [String] String presentation of the object
# File lib/oci/data_integration/models/update_task_from_sql_task.rb, line 212 def to_s to_hash.to_s end
Private Instance Methods
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value @param [Object] value Any valid value @return [Hash] Returns the value in the form of hash
# File lib/oci/data_integration/models/update_task_from_sql_task.rb, line 235 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end