Class: OCI::DataIntegration::Models::GroupedNamePatternRule
- Inherits:
-
ProjectionRule
- Object
- ProjectionRule
- OCI::DataIntegration::Models::GroupedNamePatternRule
- Defined in:
- lib/oci/data_integration/models/grouped_name_pattern_rule.rb
Overview
This rule projects fields as a group recognised as name pattern.
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.
-
#name ⇒ String
Name of the group.
-
#pattern ⇒ String
The rule pattern.
-
#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 = {}) ⇒ GroupedNamePatternRule
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 = {}) ⇒ GroupedNamePatternRule
Initializes the object
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 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 |
# File 'lib/oci/data_integration/models/grouped_name_pattern_rule.rb', line 127 def initialize(attributes = {}) return unless attributes.is_a?(Hash) attributes['modelType'] = 'GROUPED_NAME_PATTERN_RULE' super(attributes) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.name = attributes[:'name'] if attributes[:'name'] 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'] self.matching_strategy = "NAME_ONLY" if matching_strategy.nil? && !attributes.key?(:'matchingStrategy') # rubocop:disable Style/StringLiterals 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.matching_strategy = "NAME_ONLY" if matching_strategy.nil? && !attributes.key?(:'matchingStrategy') && !attributes.key?(:'matching_strategy') # rubocop:disable Style/StringLiterals self.is_case_sensitive = attributes[:'isCaseSensitive'] unless attributes[:'isCaseSensitive'].nil? self.is_case_sensitive = true if is_case_sensitive.nil? && !attributes.key?(:'isCaseSensitive') # rubocop:disable Style/StringLiterals 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.is_case_sensitive = true if is_case_sensitive.nil? && !attributes.key?(:'isCaseSensitive') && !attributes.key?(:'is_case_sensitive') # rubocop:disable Style/StringLiterals self.rule_type = attributes[:'ruleType'] if attributes[:'ruleType'] self.rule_type = "EXCLUDE" if rule_type.nil? && !attributes.key?(:'ruleType') # rubocop:disable Style/StringLiterals 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.rule_type = "EXCLUDE" if rule_type.nil? && !attributes.key?(:'ruleType') && !attributes.key?(:'rule_type') # rubocop:disable Style/StringLiterals self.pattern = attributes[:'pattern'] if attributes[:'pattern'] end |
Instance Attribute Details
#is_cascade ⇒ BOOLEAN
Specifies whether to cascade or not.
40 41 42 |
# File 'lib/oci/data_integration/models/grouped_name_pattern_rule.rb', line 40 def is_cascade @is_cascade end |
#is_case_sensitive ⇒ BOOLEAN
Specifies if the rule is case sensitive.
48 49 50 |
# File 'lib/oci/data_integration/models/grouped_name_pattern_rule.rb', line 48 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.
32 33 34 |
# File 'lib/oci/data_integration/models/grouped_name_pattern_rule.rb', line 32 def is_skip_remaining_rules_on_match @is_skip_remaining_rules_on_match end |
#matching_strategy ⇒ String
The pattern matching strategy.
44 45 46 |
# File 'lib/oci/data_integration/models/grouped_name_pattern_rule.rb', line 44 def matching_strategy @matching_strategy end |
#name ⇒ String
Name of the group.
28 29 30 |
# File 'lib/oci/data_integration/models/grouped_name_pattern_rule.rb', line 28 def name @name end |
#pattern ⇒ String
The rule pattern.
56 57 58 |
# File 'lib/oci/data_integration/models/grouped_name_pattern_rule.rb', line 56 def pattern @pattern end |
#rule_type ⇒ String
The rule type.
52 53 54 |
# File 'lib/oci/data_integration/models/grouped_name_pattern_rule.rb', line 52 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.
36 37 38 |
# File 'lib/oci/data_integration/models/grouped_name_pattern_rule.rb', line 36 def scope @scope end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/oci/data_integration/models/grouped_name_pattern_rule.rb', line 59 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', 'name': :'name', 'is_skip_remaining_rules_on_match': :'isSkipRemainingRulesOnMatch', 'scope': :'scope', 'is_cascade': :'isCascade', 'matching_strategy': :'matchingStrategy', 'is_case_sensitive': :'isCaseSensitive', 'rule_type': :'ruleType', 'pattern': :'pattern' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
# File 'lib/oci/data_integration/models/grouped_name_pattern_rule.rb', line 83 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', 'name': :'String', 'is_skip_remaining_rules_on_match': :'BOOLEAN', 'scope': :'Object', 'is_cascade': :'BOOLEAN', 'matching_strategy': :'String', 'is_case_sensitive': :'BOOLEAN', 'rule_type': :'String', 'pattern': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 |
# File 'lib/oci/data_integration/models/grouped_name_pattern_rule.rb', line 213 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 && name == other.name && 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 && pattern == other.pattern end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 |
# File 'lib/oci/data_integration/models/grouped_name_pattern_rule.rb', line 258 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
238 239 240 |
# File 'lib/oci/data_integration/models/grouped_name_pattern_rule.rb', line 238 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
247 248 249 |
# File 'lib/oci/data_integration/models/grouped_name_pattern_rule.rb', line 247 def hash [model_type, key, model_version, parent_ref, is_java_regex_syntax, config_values, object_status, description, name, is_skip_remaining_rules_on_match, scope, is_cascade, matching_strategy, is_case_sensitive, rule_type, pattern].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
291 292 293 294 295 296 297 298 299 300 |
# File 'lib/oci/data_integration/models/grouped_name_pattern_rule.rb', line 291 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
285 286 287 |
# File 'lib/oci/data_integration/models/grouped_name_pattern_rule.rb', line 285 def to_s to_hash.to_s end |