Class: OCI::DataIntegration::Models::FlattenProjectionPreferences
- Inherits:
-
Object
- Object
- OCI::DataIntegration::Models::FlattenProjectionPreferences
- Defined in:
- lib/oci/data_integration/models/flatten_projection_preferences.rb
Overview
The preferences for the flatten operation.
Constant Summary collapse
- CREATE_ARRAY_INDEX_ENUM =
[ CREATE_ARRAY_INDEX_ALLOW = 'ALLOW'.freeze, CREATE_ARRAY_INDEX_DO_NOT_ALLOW = 'DO_NOT_ALLOW'.freeze, CREATE_ARRAY_INDEX_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- RETAIN_ALL_ATTRIBUTES_ENUM =
[ RETAIN_ALL_ATTRIBUTES_ALLOW = 'ALLOW'.freeze, RETAIN_ALL_ATTRIBUTES_DO_NOT_ALLOW = 'DO_NOT_ALLOW'.freeze, RETAIN_ALL_ATTRIBUTES_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- IGNORE_NULL_VALUES_ENUM =
[ IGNORE_NULL_VALUES_ALLOW = 'ALLOW'.freeze, IGNORE_NULL_VALUES_DO_NOT_ALLOW = 'DO_NOT_ALLOW'.freeze, IGNORE_NULL_VALUES_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- RETAIN_PARENT_NAME_LINEAGE_ENUM =
[ RETAIN_PARENT_NAME_LINEAGE_ALLOW = 'ALLOW'.freeze, RETAIN_PARENT_NAME_LINEAGE_DO_NOT_ALLOW = 'DO_NOT_ALLOW'.freeze, RETAIN_PARENT_NAME_LINEAGE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#create_array_index ⇒ String
**[Required]** Property defining whether to create array indexes in flattened result.
-
#ignore_null_values ⇒ String
**[Required]** Property defining whether to ignore null values in flattened result.
-
#retain_all_attributes ⇒ String
**[Required]** Property defining whether to retain all attributes in flattened result.
-
#retain_parent_name_lineage ⇒ String
**[Required]** Property defining whether to retain parent name lineage.
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 = {}) ⇒ FlattenProjectionPreferences
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 = {}) ⇒ FlattenProjectionPreferences
Initializes the object
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 111 112 113 114 |
# File 'lib/oci/data_integration/models/flatten_projection_preferences.rb', line 85 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.create_array_index = attributes[:'createArrayIndex'] if attributes[:'createArrayIndex'] raise 'You cannot provide both :createArrayIndex and :create_array_index' if attributes.key?(:'createArrayIndex') && attributes.key?(:'create_array_index') self.create_array_index = attributes[:'create_array_index'] if attributes[:'create_array_index'] self.retain_all_attributes = attributes[:'retainAllAttributes'] if attributes[:'retainAllAttributes'] raise 'You cannot provide both :retainAllAttributes and :retain_all_attributes' if attributes.key?(:'retainAllAttributes') && attributes.key?(:'retain_all_attributes') self.retain_all_attributes = attributes[:'retain_all_attributes'] if attributes[:'retain_all_attributes'] self.ignore_null_values = attributes[:'ignoreNullValues'] if attributes[:'ignoreNullValues'] raise 'You cannot provide both :ignoreNullValues and :ignore_null_values' if attributes.key?(:'ignoreNullValues') && attributes.key?(:'ignore_null_values') self.ignore_null_values = attributes[:'ignore_null_values'] if attributes[:'ignore_null_values'] self.retain_parent_name_lineage = attributes[:'retainParentNameLineage'] if attributes[:'retainParentNameLineage'] raise 'You cannot provide both :retainParentNameLineage and :retain_parent_name_lineage' if attributes.key?(:'retainParentNameLineage') && attributes.key?(:'retain_parent_name_lineage') self.retain_parent_name_lineage = attributes[:'retain_parent_name_lineage'] if attributes[:'retain_parent_name_lineage'] end |
Instance Attribute Details
#create_array_index ⇒ String
**[Required]** Property defining whether to create array indexes in flattened result.
37 38 39 |
# File 'lib/oci/data_integration/models/flatten_projection_preferences.rb', line 37 def create_array_index @create_array_index end |
#ignore_null_values ⇒ String
**[Required]** Property defining whether to ignore null values in flattened result.
45 46 47 |
# File 'lib/oci/data_integration/models/flatten_projection_preferences.rb', line 45 def ignore_null_values @ignore_null_values end |
#retain_all_attributes ⇒ String
**[Required]** Property defining whether to retain all attributes in flattened result.
41 42 43 |
# File 'lib/oci/data_integration/models/flatten_projection_preferences.rb', line 41 def retain_all_attributes @retain_all_attributes end |
#retain_parent_name_lineage ⇒ String
**[Required]** Property defining whether to retain parent name lineage.
49 50 51 |
# File 'lib/oci/data_integration/models/flatten_projection_preferences.rb', line 49 def retain_parent_name_lineage @retain_parent_name_lineage end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
52 53 54 55 56 57 58 59 60 61 |
# File 'lib/oci/data_integration/models/flatten_projection_preferences.rb', line 52 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'create_array_index': :'createArrayIndex', 'retain_all_attributes': :'retainAllAttributes', 'ignore_null_values': :'ignoreNullValues', 'retain_parent_name_lineage': :'retainParentNameLineage' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
64 65 66 67 68 69 70 71 72 73 |
# File 'lib/oci/data_integration/models/flatten_projection_preferences.rb', line 64 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'create_array_index': :'String', 'retain_all_attributes': :'String', 'ignore_null_values': :'String', 'retain_parent_name_lineage': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
175 176 177 178 179 180 181 182 183 |
# File 'lib/oci/data_integration/models/flatten_projection_preferences.rb', line 175 def ==(other) return true if equal?(other) self.class == other.class && create_array_index == other.create_array_index && retain_all_attributes == other.retain_all_attributes && ignore_null_values == other.ignore_null_values && retain_parent_name_lineage == other.retain_parent_name_lineage end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 |
# File 'lib/oci/data_integration/models/flatten_projection_preferences.rb', line 208 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
188 189 190 |
# File 'lib/oci/data_integration/models/flatten_projection_preferences.rb', line 188 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
197 198 199 |
# File 'lib/oci/data_integration/models/flatten_projection_preferences.rb', line 197 def hash [create_array_index, retain_all_attributes, ignore_null_values, retain_parent_name_lineage].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
241 242 243 244 245 246 247 248 249 250 |
# File 'lib/oci/data_integration/models/flatten_projection_preferences.rb', line 241 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
235 236 237 |
# File 'lib/oci/data_integration/models/flatten_projection_preferences.rb', line 235 def to_s to_hash.to_s end |