Class: OCI::DataSafe::Models::SecurityAssessmentComparisonPerTarget
- Inherits:
-
Object
- Object
- OCI::DataSafe::Models::SecurityAssessmentComparisonPerTarget
- Defined in:
- lib/oci/data_safe/models/security_assessment_comparison_per_target.rb
Overview
The results of the comparison between two security assessment resources.
Instance Attribute Summary collapse
-
#auditing ⇒ Array<OCI::DataSafe::Models::Diffs>
A comparison between findings belonging to Auditing category.
-
#authorization_control ⇒ Array<OCI::DataSafe::Models::Diffs>
A comparison between findings belonging to Authorization Control category.
-
#baseline_target_id ⇒ String
The OCID of the target that is used as a baseline in this comparison.
-
#current_target_id ⇒ String
The OCID of the target to be compared against the baseline target.
-
#data_encryption ⇒ Array<OCI::DataSafe::Models::Diffs>
Comparison between findings belonging to Data Encryption category.
-
#db_configuration ⇒ Array<OCI::DataSafe::Models::Diffs>
Comparison between findings belonging to Database Configuration category.
-
#fine_grained_access_control ⇒ Array<OCI::DataSafe::Models::Diffs>
Comparison between findings belonging to Fine-Grained Access Control category.
-
#privileges_and_roles ⇒ Array<OCI::DataSafe::Models::Diffs>
Comparison between findings belonging to Privileges and Roles category.
-
#user_accounts ⇒ Array<OCI::DataSafe::Models::Diffs>
Comparison between findings belonging to User Accounts category.
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 = {}) ⇒ SecurityAssessmentComparisonPerTarget
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 = {}) ⇒ SecurityAssessmentComparisonPerTarget
Initializes the object
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 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 |
# File 'lib/oci/data_safe/models/security_assessment_comparison_per_target.rb', line 96 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.baseline_target_id = attributes[:'baselineTargetId'] if attributes[:'baselineTargetId'] raise 'You cannot provide both :baselineTargetId and :baseline_target_id' if attributes.key?(:'baselineTargetId') && attributes.key?(:'baseline_target_id') self.baseline_target_id = attributes[:'baseline_target_id'] if attributes[:'baseline_target_id'] self.current_target_id = attributes[:'currentTargetId'] if attributes[:'currentTargetId'] raise 'You cannot provide both :currentTargetId and :current_target_id' if attributes.key?(:'currentTargetId') && attributes.key?(:'current_target_id') self.current_target_id = attributes[:'current_target_id'] if attributes[:'current_target_id'] self.auditing = attributes[:'auditing'] if attributes[:'auditing'] self. = attributes[:'authorizationControl'] if attributes[:'authorizationControl'] raise 'You cannot provide both :authorizationControl and :authorization_control' if attributes.key?(:'authorizationControl') && attributes.key?(:'authorization_control') self. = attributes[:'authorization_control'] if attributes[:'authorization_control'] self.data_encryption = attributes[:'dataEncryption'] if attributes[:'dataEncryption'] raise 'You cannot provide both :dataEncryption and :data_encryption' if attributes.key?(:'dataEncryption') && attributes.key?(:'data_encryption') self.data_encryption = attributes[:'data_encryption'] if attributes[:'data_encryption'] self.db_configuration = attributes[:'dbConfiguration'] if attributes[:'dbConfiguration'] raise 'You cannot provide both :dbConfiguration and :db_configuration' if attributes.key?(:'dbConfiguration') && attributes.key?(:'db_configuration') self.db_configuration = attributes[:'db_configuration'] if attributes[:'db_configuration'] self.fine_grained_access_control = attributes[:'fineGrainedAccessControl'] if attributes[:'fineGrainedAccessControl'] raise 'You cannot provide both :fineGrainedAccessControl and :fine_grained_access_control' if attributes.key?(:'fineGrainedAccessControl') && attributes.key?(:'fine_grained_access_control') self.fine_grained_access_control = attributes[:'fine_grained_access_control'] if attributes[:'fine_grained_access_control'] self.privileges_and_roles = attributes[:'privilegesAndRoles'] if attributes[:'privilegesAndRoles'] raise 'You cannot provide both :privilegesAndRoles and :privileges_and_roles' if attributes.key?(:'privilegesAndRoles') && attributes.key?(:'privileges_and_roles') self.privileges_and_roles = attributes[:'privileges_and_roles'] if attributes[:'privileges_and_roles'] self.user_accounts = attributes[:'userAccounts'] if attributes[:'userAccounts'] raise 'You cannot provide both :userAccounts and :user_accounts' if attributes.key?(:'userAccounts') && attributes.key?(:'user_accounts') self.user_accounts = attributes[:'user_accounts'] if attributes[:'user_accounts'] end |
Instance Attribute Details
#auditing ⇒ Array<OCI::DataSafe::Models::Diffs>
A comparison between findings belonging to Auditing category.
21 22 23 |
# File 'lib/oci/data_safe/models/security_assessment_comparison_per_target.rb', line 21 def auditing @auditing end |
#authorization_control ⇒ Array<OCI::DataSafe::Models::Diffs>
A comparison between findings belonging to Authorization Control category.
25 26 27 |
# File 'lib/oci/data_safe/models/security_assessment_comparison_per_target.rb', line 25 def end |
#baseline_target_id ⇒ String
The OCID of the target that is used as a baseline in this comparison.
13 14 15 |
# File 'lib/oci/data_safe/models/security_assessment_comparison_per_target.rb', line 13 def baseline_target_id @baseline_target_id end |
#current_target_id ⇒ String
The OCID of the target to be compared against the baseline target.
17 18 19 |
# File 'lib/oci/data_safe/models/security_assessment_comparison_per_target.rb', line 17 def current_target_id @current_target_id end |
#data_encryption ⇒ Array<OCI::DataSafe::Models::Diffs>
Comparison between findings belonging to Data Encryption category.
29 30 31 |
# File 'lib/oci/data_safe/models/security_assessment_comparison_per_target.rb', line 29 def data_encryption @data_encryption end |
#db_configuration ⇒ Array<OCI::DataSafe::Models::Diffs>
Comparison between findings belonging to Database Configuration category.
33 34 35 |
# File 'lib/oci/data_safe/models/security_assessment_comparison_per_target.rb', line 33 def db_configuration @db_configuration end |
#fine_grained_access_control ⇒ Array<OCI::DataSafe::Models::Diffs>
Comparison between findings belonging to Fine-Grained Access Control category.
37 38 39 |
# File 'lib/oci/data_safe/models/security_assessment_comparison_per_target.rb', line 37 def fine_grained_access_control @fine_grained_access_control end |
#privileges_and_roles ⇒ Array<OCI::DataSafe::Models::Diffs>
Comparison between findings belonging to Privileges and Roles category.
41 42 43 |
# File 'lib/oci/data_safe/models/security_assessment_comparison_per_target.rb', line 41 def privileges_and_roles @privileges_and_roles end |
#user_accounts ⇒ Array<OCI::DataSafe::Models::Diffs>
Comparison between findings belonging to User Accounts category.
45 46 47 |
# File 'lib/oci/data_safe/models/security_assessment_comparison_per_target.rb', line 45 def user_accounts @user_accounts end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/oci/data_safe/models/security_assessment_comparison_per_target.rb', line 48 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'baseline_target_id': :'baselineTargetId', 'current_target_id': :'currentTargetId', 'auditing': :'auditing', 'authorization_control': :'authorizationControl', 'data_encryption': :'dataEncryption', 'db_configuration': :'dbConfiguration', 'fine_grained_access_control': :'fineGrainedAccessControl', 'privileges_and_roles': :'privilegesAndRoles', 'user_accounts': :'userAccounts' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/oci/data_safe/models/security_assessment_comparison_per_target.rb', line 65 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'baseline_target_id': :'String', 'current_target_id': :'String', 'auditing': :'Array<OCI::DataSafe::Models::Diffs>', 'authorization_control': :'Array<OCI::DataSafe::Models::Diffs>', 'data_encryption': :'Array<OCI::DataSafe::Models::Diffs>', 'db_configuration': :'Array<OCI::DataSafe::Models::Diffs>', 'fine_grained_access_control': :'Array<OCI::DataSafe::Models::Diffs>', 'privileges_and_roles': :'Array<OCI::DataSafe::Models::Diffs>', 'user_accounts': :'Array<OCI::DataSafe::Models::Diffs>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
160 161 162 163 164 165 166 167 168 169 170 171 172 173 |
# File 'lib/oci/data_safe/models/security_assessment_comparison_per_target.rb', line 160 def ==(other) return true if equal?(other) self.class == other.class && baseline_target_id == other.baseline_target_id && current_target_id == other.current_target_id && auditing == other.auditing && == other. && data_encryption == other.data_encryption && db_configuration == other.db_configuration && fine_grained_access_control == other.fine_grained_access_control && privileges_and_roles == other.privileges_and_roles && user_accounts == other.user_accounts end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 |
# File 'lib/oci/data_safe/models/security_assessment_comparison_per_target.rb', line 198 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
178 179 180 |
# File 'lib/oci/data_safe/models/security_assessment_comparison_per_target.rb', line 178 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
187 188 189 |
# File 'lib/oci/data_safe/models/security_assessment_comparison_per_target.rb', line 187 def hash [baseline_target_id, current_target_id, auditing, , data_encryption, db_configuration, fine_grained_access_control, privileges_and_roles, user_accounts].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
231 232 233 234 235 236 237 238 239 240 |
# File 'lib/oci/data_safe/models/security_assessment_comparison_per_target.rb', line 231 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
225 226 227 |
# File 'lib/oci/data_safe/models/security_assessment_comparison_per_target.rb', line 225 def to_s to_hash.to_s end |