Class: OCI::DataIntegration::Models::NameListRule
- Inherits:
-
ProjectionRule
- Object
- ProjectionRule
- OCI::DataIntegration::Models::NameListRule
- Defined in:
- lib/oci/data_integration/models/name_list_rule.rb
Overview
The name list rule which defines how fields are projected. For example, this may be all fields begining with STR.
Constant Summary collapse
- MATCHING_STRATEGY_ENUM =
[ MATCHING_STRATEGY_NAME_OR_TAGS = 'NAME_OR_TAGS'.freeze, MATCHING_STRATEGY_TAGS_ONLY = 'TAGS_ONLY'.freeze, MATCHING_STRATEGY_NAME_ONLY = 'NAME_ONLY'.freeze, MATCHING_STRATEGY_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- RULE_TYPE_ENUM =
[ RULE_TYPE_INCLUDE = 'INCLUDE'.freeze, RULE_TYPE_EXCLUDE = 'EXCLUDE'.freeze, RULE_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Constants inherited from ProjectionRule
ProjectionRule::MODEL_TYPE_ENUM
Instance Attribute Summary collapse
-
#is_cascade ⇒ BOOLEAN
Specifies whether to cascade or not.
-
#is_case_sensitive ⇒ BOOLEAN
Specifies if the rule is case sensitive.
-
#is_skip_remaining_rules_on_match ⇒ BOOLEAN
Specifies whether to skip remaining rules when a match is found.
-
#matching_strategy ⇒ String
The pattern matching strategy.
-
#names ⇒ Array<String>
Free form text without any restriction on permitted characters.
-
#rule_type ⇒ String
The rule type.
-
#scope ⇒ Object
Reference to a typed object.
Attributes inherited from ProjectionRule
#config_values, #description, #is_java_regex_syntax, #key, #model_type, #model_version, #object_status, #parent_ref
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 = {}) ⇒ NameListRule
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.
Methods inherited from ProjectionRule
Constructor Details
#initialize(attributes = {}) ⇒ NameListRule
Initializes the object
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 156 157 158 159 160 161 162 163 |
# File 'lib/oci/data_integration/models/name_list_rule.rb', line 120 def initialize(attributes = {}) return unless attributes.is_a?(Hash) attributes['modelType'] = 'NAME_LIST_RULE' super(attributes) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.is_skip_remaining_rules_on_match = attributes[:'isSkipRemainingRulesOnMatch'] unless attributes[:'isSkipRemainingRulesOnMatch'].nil? raise 'You cannot provide both :isSkipRemainingRulesOnMatch and :is_skip_remaining_rules_on_match' if attributes.key?(:'isSkipRemainingRulesOnMatch') && attributes.key?(:'is_skip_remaining_rules_on_match') self.is_skip_remaining_rules_on_match = attributes[:'is_skip_remaining_rules_on_match'] unless attributes[:'is_skip_remaining_rules_on_match'].nil? self.scope = attributes[:'scope'] if attributes[:'scope'] self.is_cascade = attributes[:'isCascade'] unless attributes[:'isCascade'].nil? raise 'You cannot provide both :isCascade and :is_cascade' if attributes.key?(:'isCascade') && attributes.key?(:'is_cascade') self.is_cascade = attributes[:'is_cascade'] unless attributes[:'is_cascade'].nil? self.matching_strategy = attributes[:'matchingStrategy'] if attributes[:'matchingStrategy'] raise 'You cannot provide both :matchingStrategy and :matching_strategy' if attributes.key?(:'matchingStrategy') && attributes.key?(:'matching_strategy') self.matching_strategy = attributes[:'matching_strategy'] if attributes[:'matching_strategy'] self.is_case_sensitive = attributes[:'isCaseSensitive'] unless attributes[:'isCaseSensitive'].nil? raise 'You cannot provide both :isCaseSensitive and :is_case_sensitive' if attributes.key?(:'isCaseSensitive') && attributes.key?(:'is_case_sensitive') self.is_case_sensitive = attributes[:'is_case_sensitive'] unless attributes[:'is_case_sensitive'].nil? self.rule_type = attributes[:'ruleType'] if attributes[:'ruleType'] raise 'You cannot provide both :ruleType and :rule_type' if attributes.key?(:'ruleType') && attributes.key?(:'rule_type') self.rule_type = attributes[:'rule_type'] if attributes[:'rule_type'] self.names = attributes[:'names'] if attributes[:'names'] end |
Instance Attribute Details
#is_cascade ⇒ BOOLEAN
Specifies whether to cascade or not.
36 37 38 |
# File 'lib/oci/data_integration/models/name_list_rule.rb', line 36 def is_cascade @is_cascade end |
#is_case_sensitive ⇒ BOOLEAN
Specifies if the rule is case sensitive.
44 45 46 |
# File 'lib/oci/data_integration/models/name_list_rule.rb', line 44 def is_case_sensitive @is_case_sensitive end |
#is_skip_remaining_rules_on_match ⇒ BOOLEAN
Specifies whether to skip remaining rules when a match is found.
28 29 30 |
# File 'lib/oci/data_integration/models/name_list_rule.rb', line 28 def is_skip_remaining_rules_on_match @is_skip_remaining_rules_on_match end |
#matching_strategy ⇒ String
The pattern matching strategy.
40 41 42 |
# File 'lib/oci/data_integration/models/name_list_rule.rb', line 40 def matching_strategy @matching_strategy end |
#names ⇒ Array<String>
Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters.
52 53 54 |
# File 'lib/oci/data_integration/models/name_list_rule.rb', line 52 def names @names end |
#rule_type ⇒ String
The rule type.
48 49 50 |
# File 'lib/oci/data_integration/models/name_list_rule.rb', line 48 def rule_type @rule_type end |
#scope ⇒ Object
Reference to a typed object. This can be either a key value to an object within the document, a shall referenced to a TypedObject
, or a full TypedObject
definition.
32 33 34 |
# File 'lib/oci/data_integration/models/name_list_rule.rb', line 32 def scope @scope end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/oci/data_integration/models/name_list_rule.rb', line 55 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'model_type': :'modelType', 'key': :'key', 'model_version': :'modelVersion', 'parent_ref': :'parentRef', 'is_java_regex_syntax': :'isJavaRegexSyntax', 'config_values': :'configValues', 'object_status': :'objectStatus', 'description': :'description', 'is_skip_remaining_rules_on_match': :'isSkipRemainingRulesOnMatch', 'scope': :'scope', 'is_cascade': :'isCascade', 'matching_strategy': :'matchingStrategy', 'is_case_sensitive': :'isCaseSensitive', 'rule_type': :'ruleType', 'names': :'names' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/oci/data_integration/models/name_list_rule.rb', line 78 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'model_type': :'String', 'key': :'String', 'model_version': :'String', 'parent_ref': :'OCI::DataIntegration::Models::ParentReference', 'is_java_regex_syntax': :'BOOLEAN', 'config_values': :'OCI::DataIntegration::Models::ConfigValues', 'object_status': :'Integer', 'description': :'String', 'is_skip_remaining_rules_on_match': :'BOOLEAN', 'scope': :'Object', 'is_cascade': :'BOOLEAN', 'matching_strategy': :'String', 'is_case_sensitive': :'BOOLEAN', 'rule_type': :'String', 'names': :'Array<String>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 |
# File 'lib/oci/data_integration/models/name_list_rule.rb', line 198 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 && is_java_regex_syntax == other.is_java_regex_syntax && config_values == other.config_values && object_status == other.object_status && description == other.description && is_skip_remaining_rules_on_match == other.is_skip_remaining_rules_on_match && scope == other.scope && is_cascade == other.is_cascade && matching_strategy == other.matching_strategy && is_case_sensitive == other.is_case_sensitive && rule_type == other.rule_type && names == other.names end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 |
# File 'lib/oci/data_integration/models/name_list_rule.rb', line 242 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
222 223 224 |
# File 'lib/oci/data_integration/models/name_list_rule.rb', line 222 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
231 232 233 |
# File 'lib/oci/data_integration/models/name_list_rule.rb', line 231 def hash [model_type, key, model_version, parent_ref, is_java_regex_syntax, config_values, object_status, description, is_skip_remaining_rules_on_match, scope, is_cascade, matching_strategy, is_case_sensitive, rule_type, names].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
275 276 277 278 279 280 281 282 283 284 |
# File 'lib/oci/data_integration/models/name_list_rule.rb', line 275 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
269 270 271 |
# File 'lib/oci/data_integration/models/name_list_rule.rb', line 269 def to_s to_hash.to_s end |