Class: OCI::DataSafe::Models::CreateReferentialRelationDetails
- Inherits:
-
Object
- Object
- OCI::DataSafe::Models::CreateReferentialRelationDetails
- Defined in:
- lib/oci/data_safe/models/create_referential_relation_details.rb
Overview
A sensitive column is a resource corresponding to a database column that is considered sensitive. It's a subresource of sensitive data model resource and is always associated with a sensitive data model. Note that referential relationships are also managed as part of sensitive columns.
Constant Summary collapse
- RELATION_TYPE_ENUM =
[ RELATION_TYPE_APP_DEFINED = 'APP_DEFINED'.freeze, RELATION_TYPE_DB_DEFINED = 'DB_DEFINED'.freeze ].freeze
Instance Attribute Summary collapse
-
#child ⇒ OCI::DataSafe::Models::ColumnsInfo
This attribute is required.
-
#is_sensitive ⇒ BOOLEAN
Add to sensitive data model if passed true.
-
#parent ⇒ OCI::DataSafe::Models::ColumnsInfo
This attribute is required.
-
#relation_type ⇒ String
[Required] The type of referential relationship the sensitive column has with its parent.
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 = {}) ⇒ CreateReferentialRelationDetails
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 = {}) ⇒ CreateReferentialRelationDetails
Initializes the object
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/oci/data_safe/models/create_referential_relation_details.rb', line 76 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.relation_type = attributes[:'relationType'] if attributes[:'relationType'] raise 'You cannot provide both :relationType and :relation_type' if attributes.key?(:'relationType') && attributes.key?(:'relation_type') self.relation_type = attributes[:'relation_type'] if attributes[:'relation_type'] self.parent = attributes[:'parent'] if attributes[:'parent'] self.child = attributes[:'child'] if attributes[:'child'] self.is_sensitive = attributes[:'isSensitive'] unless attributes[:'isSensitive'].nil? self.is_sensitive = false if is_sensitive.nil? && !attributes.key?(:'isSensitive') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :isSensitive and :is_sensitive' if attributes.key?(:'isSensitive') && attributes.key?(:'is_sensitive') self.is_sensitive = attributes[:'is_sensitive'] unless attributes[:'is_sensitive'].nil? self.is_sensitive = false if is_sensitive.nil? && !attributes.key?(:'isSensitive') && !attributes.key?(:'is_sensitive') # rubocop:disable Style/StringLiterals end |
Instance Attribute Details
#child ⇒ OCI::DataSafe::Models::ColumnsInfo
This attribute is required.
32 33 34 |
# File 'lib/oci/data_safe/models/create_referential_relation_details.rb', line 32 def child @child end |
#is_sensitive ⇒ BOOLEAN
Add to sensitive data model if passed true. If false is passed, then the columns will not be added in the sensitive data model as sensitive columns and if sensitive type OCIDs are assigned to the columns, then the sensitive type OCIDs will not be retained.
40 41 42 |
# File 'lib/oci/data_safe/models/create_referential_relation_details.rb', line 40 def is_sensitive @is_sensitive end |
#parent ⇒ OCI::DataSafe::Models::ColumnsInfo
This attribute is required.
28 29 30 |
# File 'lib/oci/data_safe/models/create_referential_relation_details.rb', line 28 def parent @parent end |
#relation_type ⇒ String
[Required] The type of referential relationship the sensitive column has with its parent. DB_DEFINED indicates that the relationship is defined in the database dictionary. APP_DEFINED indicates that the relationship is defined at the application level and not in the database dictionary.
24 25 26 |
# File 'lib/oci/data_safe/models/create_referential_relation_details.rb', line 24 def relation_type @relation_type end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
43 44 45 46 47 48 49 50 51 52 |
# File 'lib/oci/data_safe/models/create_referential_relation_details.rb', line 43 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'relation_type': :'relationType', 'parent': :'parent', 'child': :'child', 'is_sensitive': :'isSensitive' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
55 56 57 58 59 60 61 62 63 64 |
# File 'lib/oci/data_safe/models/create_referential_relation_details.rb', line 55 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'relation_type': :'String', 'parent': :'OCI::DataSafe::Models::ColumnsInfo', 'child': :'OCI::DataSafe::Models::ColumnsInfo', 'is_sensitive': :'BOOLEAN' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
116 117 118 119 120 121 122 123 124 |
# File 'lib/oci/data_safe/models/create_referential_relation_details.rb', line 116 def ==(other) return true if equal?(other) self.class == other.class && relation_type == other.relation_type && parent == other.parent && child == other.child && is_sensitive == other.is_sensitive end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 |
# File 'lib/oci/data_safe/models/create_referential_relation_details.rb', line 149 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
129 130 131 |
# File 'lib/oci/data_safe/models/create_referential_relation_details.rb', line 129 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
138 139 140 |
# File 'lib/oci/data_safe/models/create_referential_relation_details.rb', line 138 def hash [relation_type, parent, child, is_sensitive].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
182 183 184 185 186 187 188 189 190 191 |
# File 'lib/oci/data_safe/models/create_referential_relation_details.rb', line 182 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
176 177 178 |
# File 'lib/oci/data_safe/models/create_referential_relation_details.rb', line 176 def to_s to_hash.to_s end |