Class: OCI::DataIntegration::Models::TypedNamePatternRule
- Inherits:
-
ProjectionRule
- Object
- ProjectionRule
- OCI::DataIntegration::Models::TypedNamePatternRule
- Defined in:
- lib/oci/data_integration/models/typed_name_pattern_rule.rb
Overview
The typed name rule for field projection.
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.
-
#pattern ⇒ String
The rule pattern.
-
#rule_type ⇒ String
The rule type.
-
#scope ⇒ Object
Reference to a typed object.
-
#types ⇒ Array<Object>
An array of types.
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 = {}) ⇒ TypedNamePatternRule
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 = {}) ⇒ TypedNamePatternRule
Initializes the object
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 179 180 181 |
# File 'lib/oci/data_integration/models/typed_name_pattern_rule.rb', line 134 def initialize(attributes = {}) return unless attributes.is_a?(Hash) attributes['modelType'] = 'TYPED_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.types = attributes[:'types'] if attributes[:'types'] 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.pattern = attributes[:'pattern'] if attributes[:'pattern'] self.names = attributes[:'names'] if attributes[:'names'] end |
Instance Attribute Details
#is_cascade ⇒ BOOLEAN
Specifies whether to cascade or not.
40 41 42 |
# File 'lib/oci/data_integration/models/typed_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/typed_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/typed_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/typed_name_pattern_rule.rb', line 44 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.
60 61 62 |
# File 'lib/oci/data_integration/models/typed_name_pattern_rule.rb', line 60 def names @names end |
#pattern ⇒ String
The rule pattern.
56 57 58 |
# File 'lib/oci/data_integration/models/typed_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/typed_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/typed_name_pattern_rule.rb', line 36 def scope @scope end |
#types ⇒ Array<Object>
An array of types.
28 29 30 |
# File 'lib/oci/data_integration/models/typed_name_pattern_rule.rb', line 28 def types @types end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/oci/data_integration/models/typed_name_pattern_rule.rb', line 63 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', 'types': :'types', 'is_skip_remaining_rules_on_match': :'isSkipRemainingRulesOnMatch', 'scope': :'scope', 'is_cascade': :'isCascade', 'matching_strategy': :'matchingStrategy', 'is_case_sensitive': :'isCaseSensitive', 'rule_type': :'ruleType', 'pattern': :'pattern', 'names': :'names' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
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/data_integration/models/typed_name_pattern_rule.rb', line 88 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', 'types': :'Array<Object>', 'is_skip_remaining_rules_on_match': :'BOOLEAN', 'scope': :'Object', 'is_cascade': :'BOOLEAN', 'matching_strategy': :'String', 'is_case_sensitive': :'BOOLEAN', 'rule_type': :'String', 'pattern': :'String', 'names': :'Array<String>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 |
# File 'lib/oci/data_integration/models/typed_name_pattern_rule.rb', line 216 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 && types == other.types && 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 && names == other.names end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 |
# File 'lib/oci/data_integration/models/typed_name_pattern_rule.rb', line 262 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
242 243 244 |
# File 'lib/oci/data_integration/models/typed_name_pattern_rule.rb', line 242 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
251 252 253 |
# File 'lib/oci/data_integration/models/typed_name_pattern_rule.rb', line 251 def hash [model_type, key, model_version, parent_ref, is_java_regex_syntax, config_values, object_status, description, types, is_skip_remaining_rules_on_match, scope, is_cascade, matching_strategy, is_case_sensitive, rule_type, pattern, names].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
295 296 297 298 299 300 301 302 303 304 |
# File 'lib/oci/data_integration/models/typed_name_pattern_rule.rb', line 295 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
289 290 291 |
# File 'lib/oci/data_integration/models/typed_name_pattern_rule.rb', line 289 def to_s to_hash.to_s end |