Class: OCI::DataSafe::Models::SectionStatistics
- Inherits:
-
Object
- Object
- OCI::DataSafe::Models::SectionStatistics
- Defined in:
- lib/oci/data_safe/models/section_statistics.rb
Overview
Statistics showing the number of findings with a particular risk level for each category.
Instance Attribute Summary collapse
-
#auditing_findings_count ⇒ Integer
The number of findings in the Auditing category.
-
#authorization_control_findings_count ⇒ Integer
The number of findings in the Authorization Control category.
-
#data_encryption_findings_count ⇒ Integer
The number of findings in the Data Encryption category.
-
#db_configuration_findings_count ⇒ Integer
The number of findings in the Database Configuration category.
-
#fine_grained_access_control_findings_count ⇒ Integer
The number of findings in the Fine-Grained Access Control category.
-
#privileges_and_roles_findings_count ⇒ Integer
The number of findings in the Privileges and Roles category.
-
#targets_count ⇒ Integer
The number of targets that contributed to the counts at this risk level.
-
#user_accounts_findings_count ⇒ Integer
The number of findings in the 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 = {}) ⇒ SectionStatistics
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 = {}) ⇒ SectionStatistics
Initializes the object
88 89 90 91 92 93 94 95 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 |
# File 'lib/oci/data_safe/models/section_statistics.rb', line 88 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.targets_count = attributes[:'targetsCount'] if attributes[:'targetsCount'] raise 'You cannot provide both :targetsCount and :targets_count' if attributes.key?(:'targetsCount') && attributes.key?(:'targets_count') self.targets_count = attributes[:'targets_count'] if attributes[:'targets_count'] self.auditing_findings_count = attributes[:'auditingFindingsCount'] if attributes[:'auditingFindingsCount'] raise 'You cannot provide both :auditingFindingsCount and :auditing_findings_count' if attributes.key?(:'auditingFindingsCount') && attributes.key?(:'auditing_findings_count') self.auditing_findings_count = attributes[:'auditing_findings_count'] if attributes[:'auditing_findings_count'] self. = attributes[:'authorizationControlFindingsCount'] if attributes[:'authorizationControlFindingsCount'] raise 'You cannot provide both :authorizationControlFindingsCount and :authorization_control_findings_count' if attributes.key?(:'authorizationControlFindingsCount') && attributes.key?(:'authorization_control_findings_count') self. = attributes[:'authorization_control_findings_count'] if attributes[:'authorization_control_findings_count'] self.data_encryption_findings_count = attributes[:'dataEncryptionFindingsCount'] if attributes[:'dataEncryptionFindingsCount'] raise 'You cannot provide both :dataEncryptionFindingsCount and :data_encryption_findings_count' if attributes.key?(:'dataEncryptionFindingsCount') && attributes.key?(:'data_encryption_findings_count') self.data_encryption_findings_count = attributes[:'data_encryption_findings_count'] if attributes[:'data_encryption_findings_count'] self.db_configuration_findings_count = attributes[:'dbConfigurationFindingsCount'] if attributes[:'dbConfigurationFindingsCount'] raise 'You cannot provide both :dbConfigurationFindingsCount and :db_configuration_findings_count' if attributes.key?(:'dbConfigurationFindingsCount') && attributes.key?(:'db_configuration_findings_count') self.db_configuration_findings_count = attributes[:'db_configuration_findings_count'] if attributes[:'db_configuration_findings_count'] self.fine_grained_access_control_findings_count = attributes[:'fineGrainedAccessControlFindingsCount'] if attributes[:'fineGrainedAccessControlFindingsCount'] raise 'You cannot provide both :fineGrainedAccessControlFindingsCount and :fine_grained_access_control_findings_count' if attributes.key?(:'fineGrainedAccessControlFindingsCount') && attributes.key?(:'fine_grained_access_control_findings_count') self.fine_grained_access_control_findings_count = attributes[:'fine_grained_access_control_findings_count'] if attributes[:'fine_grained_access_control_findings_count'] self.privileges_and_roles_findings_count = attributes[:'privilegesAndRolesFindingsCount'] if attributes[:'privilegesAndRolesFindingsCount'] raise 'You cannot provide both :privilegesAndRolesFindingsCount and :privileges_and_roles_findings_count' if attributes.key?(:'privilegesAndRolesFindingsCount') && attributes.key?(:'privileges_and_roles_findings_count') self.privileges_and_roles_findings_count = attributes[:'privileges_and_roles_findings_count'] if attributes[:'privileges_and_roles_findings_count'] self.user_accounts_findings_count = attributes[:'userAccountsFindingsCount'] if attributes[:'userAccountsFindingsCount'] raise 'You cannot provide both :userAccountsFindingsCount and :user_accounts_findings_count' if attributes.key?(:'userAccountsFindingsCount') && attributes.key?(:'user_accounts_findings_count') self.user_accounts_findings_count = attributes[:'user_accounts_findings_count'] if attributes[:'user_accounts_findings_count'] end |
Instance Attribute Details
#auditing_findings_count ⇒ Integer
The number of findings in the Auditing category.
16 17 18 |
# File 'lib/oci/data_safe/models/section_statistics.rb', line 16 def auditing_findings_count @auditing_findings_count end |
#authorization_control_findings_count ⇒ Integer
The number of findings in the Authorization Control category.
20 21 22 |
# File 'lib/oci/data_safe/models/section_statistics.rb', line 20 def @authorization_control_findings_count end |
#data_encryption_findings_count ⇒ Integer
The number of findings in the Data Encryption category.
24 25 26 |
# File 'lib/oci/data_safe/models/section_statistics.rb', line 24 def data_encryption_findings_count @data_encryption_findings_count end |
#db_configuration_findings_count ⇒ Integer
The number of findings in the Database Configuration category.
28 29 30 |
# File 'lib/oci/data_safe/models/section_statistics.rb', line 28 def db_configuration_findings_count @db_configuration_findings_count end |
#fine_grained_access_control_findings_count ⇒ Integer
The number of findings in the Fine-Grained Access Control category.
32 33 34 |
# File 'lib/oci/data_safe/models/section_statistics.rb', line 32 def fine_grained_access_control_findings_count @fine_grained_access_control_findings_count end |
#privileges_and_roles_findings_count ⇒ Integer
The number of findings in the Privileges and Roles category.
36 37 38 |
# File 'lib/oci/data_safe/models/section_statistics.rb', line 36 def privileges_and_roles_findings_count @privileges_and_roles_findings_count end |
#targets_count ⇒ Integer
The number of targets that contributed to the counts at this risk level.
12 13 14 |
# File 'lib/oci/data_safe/models/section_statistics.rb', line 12 def targets_count @targets_count end |
#user_accounts_findings_count ⇒ Integer
The number of findings in the User Accounts category.
40 41 42 |
# File 'lib/oci/data_safe/models/section_statistics.rb', line 40 def user_accounts_findings_count @user_accounts_findings_count 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 53 54 55 56 |
# File 'lib/oci/data_safe/models/section_statistics.rb', line 43 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'targets_count': :'targetsCount', 'auditing_findings_count': :'auditingFindingsCount', 'authorization_control_findings_count': :'authorizationControlFindingsCount', 'data_encryption_findings_count': :'dataEncryptionFindingsCount', 'db_configuration_findings_count': :'dbConfigurationFindingsCount', 'fine_grained_access_control_findings_count': :'fineGrainedAccessControlFindingsCount', 'privileges_and_roles_findings_count': :'privilegesAndRolesFindingsCount', 'user_accounts_findings_count': :'userAccountsFindingsCount' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/oci/data_safe/models/section_statistics.rb', line 59 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'targets_count': :'Integer', 'auditing_findings_count': :'Integer', 'authorization_control_findings_count': :'Integer', 'data_encryption_findings_count': :'Integer', 'db_configuration_findings_count': :'Integer', 'fine_grained_access_control_findings_count': :'Integer', 'privileges_and_roles_findings_count': :'Integer', 'user_accounts_findings_count': :'Integer' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
150 151 152 153 154 155 156 157 158 159 160 161 162 |
# File 'lib/oci/data_safe/models/section_statistics.rb', line 150 def ==(other) return true if equal?(other) self.class == other.class && targets_count == other.targets_count && auditing_findings_count == other.auditing_findings_count && == other. && data_encryption_findings_count == other.data_encryption_findings_count && db_configuration_findings_count == other.db_configuration_findings_count && fine_grained_access_control_findings_count == other.fine_grained_access_control_findings_count && privileges_and_roles_findings_count == other.privileges_and_roles_findings_count && user_accounts_findings_count == other.user_accounts_findings_count end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 |
# File 'lib/oci/data_safe/models/section_statistics.rb', line 187 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
167 168 169 |
# File 'lib/oci/data_safe/models/section_statistics.rb', line 167 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
176 177 178 |
# File 'lib/oci/data_safe/models/section_statistics.rb', line 176 def hash [targets_count, auditing_findings_count, , data_encryption_findings_count, db_configuration_findings_count, fine_grained_access_control_findings_count, privileges_and_roles_findings_count, user_accounts_findings_count].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
220 221 222 223 224 225 226 227 228 229 |
# File 'lib/oci/data_safe/models/section_statistics.rb', line 220 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
214 215 216 |
# File 'lib/oci/data_safe/models/section_statistics.rb', line 214 def to_s to_hash.to_s end |