Class: OCI::DataSafe::Models::SecurityAssessmentStatistics
- Inherits:
-
Object
- Object
- OCI::DataSafe::Models::SecurityAssessmentStatistics
- Defined in:
- lib/oci/data_safe/models/security_assessment_statistics.rb
Overview
Statistics showing the number of findings for each category grouped by risk levels for all the targets in the specified security assessment.
The categories include Auditing, Authorization Control, Data Encryption, Database Configuration, Fine-Grained Access Control, Privileges and Roles, and User Accounts. The risk levels include High Risk, Medium Risk, Low Risk, Advisory, Evaluate, and Pass.
Instance Attribute Summary collapse
- #advisory ⇒ OCI::DataSafe::Models::SectionStatistics
- #deferred ⇒ OCI::DataSafe::Models::SectionStatistics
- #evaluate ⇒ OCI::DataSafe::Models::SectionStatistics
- #high_risk ⇒ OCI::DataSafe::Models::SectionStatistics
- #low_risk ⇒ OCI::DataSafe::Models::SectionStatistics
- #medium_risk ⇒ OCI::DataSafe::Models::SectionStatistics
- #pass ⇒ OCI::DataSafe::Models::SectionStatistics
-
#targets_count ⇒ Integer
The total number of targets in this security assessment.
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 = {}) ⇒ SecurityAssessmentStatistics
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 = {}) ⇒ SecurityAssessmentStatistics
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 |
# File 'lib/oci/data_safe/models/security_assessment_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.high_risk = attributes[:'highRisk'] if attributes[:'highRisk'] raise 'You cannot provide both :highRisk and :high_risk' if attributes.key?(:'highRisk') && attributes.key?(:'high_risk') self.high_risk = attributes[:'high_risk'] if attributes[:'high_risk'] self.medium_risk = attributes[:'mediumRisk'] if attributes[:'mediumRisk'] raise 'You cannot provide both :mediumRisk and :medium_risk' if attributes.key?(:'mediumRisk') && attributes.key?(:'medium_risk') self.medium_risk = attributes[:'medium_risk'] if attributes[:'medium_risk'] self.low_risk = attributes[:'lowRisk'] if attributes[:'lowRisk'] raise 'You cannot provide both :lowRisk and :low_risk' if attributes.key?(:'lowRisk') && attributes.key?(:'low_risk') self.low_risk = attributes[:'low_risk'] if attributes[:'low_risk'] self.advisory = attributes[:'advisory'] if attributes[:'advisory'] self.evaluate = attributes[:'evaluate'] if attributes[:'evaluate'] self.pass = attributes[:'pass'] if attributes[:'pass'] self.deferred = attributes[:'deferred'] if attributes[:'deferred'] end |
Instance Attribute Details
#advisory ⇒ OCI::DataSafe::Models::SectionStatistics
31 32 33 |
# File 'lib/oci/data_safe/models/security_assessment_statistics.rb', line 31 def advisory @advisory end |
#deferred ⇒ OCI::DataSafe::Models::SectionStatistics
40 41 42 |
# File 'lib/oci/data_safe/models/security_assessment_statistics.rb', line 40 def deferred @deferred end |
#evaluate ⇒ OCI::DataSafe::Models::SectionStatistics
34 35 36 |
# File 'lib/oci/data_safe/models/security_assessment_statistics.rb', line 34 def evaluate @evaluate end |
#high_risk ⇒ OCI::DataSafe::Models::SectionStatistics
22 23 24 |
# File 'lib/oci/data_safe/models/security_assessment_statistics.rb', line 22 def high_risk @high_risk end |
#low_risk ⇒ OCI::DataSafe::Models::SectionStatistics
28 29 30 |
# File 'lib/oci/data_safe/models/security_assessment_statistics.rb', line 28 def low_risk @low_risk end |
#medium_risk ⇒ OCI::DataSafe::Models::SectionStatistics
25 26 27 |
# File 'lib/oci/data_safe/models/security_assessment_statistics.rb', line 25 def medium_risk @medium_risk end |
#pass ⇒ OCI::DataSafe::Models::SectionStatistics
37 38 39 |
# File 'lib/oci/data_safe/models/security_assessment_statistics.rb', line 37 def pass @pass end |
#targets_count ⇒ Integer
The total number of targets in this security assessment.
19 20 21 |
# File 'lib/oci/data_safe/models/security_assessment_statistics.rb', line 19 def targets_count @targets_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/security_assessment_statistics.rb', line 43 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'targets_count': :'targetsCount', 'high_risk': :'highRisk', 'medium_risk': :'mediumRisk', 'low_risk': :'lowRisk', 'advisory': :'advisory', 'evaluate': :'evaluate', 'pass': :'pass', 'deferred': :'deferred' # 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/security_assessment_statistics.rb', line 59 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'targets_count': :'Integer', 'high_risk': :'OCI::DataSafe::Models::SectionStatistics', 'medium_risk': :'OCI::DataSafe::Models::SectionStatistics', 'low_risk': :'OCI::DataSafe::Models::SectionStatistics', 'advisory': :'OCI::DataSafe::Models::SectionStatistics', 'evaluate': :'OCI::DataSafe::Models::SectionStatistics', 'pass': :'OCI::DataSafe::Models::SectionStatistics', 'deferred': :'OCI::DataSafe::Models::SectionStatistics' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
134 135 136 137 138 139 140 141 142 143 144 145 146 |
# File 'lib/oci/data_safe/models/security_assessment_statistics.rb', line 134 def ==(other) return true if equal?(other) self.class == other.class && targets_count == other.targets_count && high_risk == other.high_risk && medium_risk == other.medium_risk && low_risk == other.low_risk && advisory == other.advisory && evaluate == other.evaluate && pass == other.pass && deferred == other.deferred end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 |
# File 'lib/oci/data_safe/models/security_assessment_statistics.rb', line 171 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
151 152 153 |
# File 'lib/oci/data_safe/models/security_assessment_statistics.rb', line 151 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
160 161 162 |
# File 'lib/oci/data_safe/models/security_assessment_statistics.rb', line 160 def hash [targets_count, high_risk, medium_risk, low_risk, advisory, evaluate, pass, deferred].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
204 205 206 207 208 209 210 211 212 213 |
# File 'lib/oci/data_safe/models/security_assessment_statistics.rb', line 204 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
198 199 200 |
# File 'lib/oci/data_safe/models/security_assessment_statistics.rb', line 198 def to_s to_hash.to_s end |