Class: OCI::DataSafe::Models::TemplateAnalyticsDimensions
- Inherits:
-
Object
- Object
- OCI::DataSafe::Models::TemplateAnalyticsDimensions
- Defined in:
- lib/oci/data_safe/models/template_analytics_dimensions.rb
Overview
The scope of analytics data.
Instance Attribute Summary collapse
-
#is_compared ⇒ BOOLEAN
Indicates whether or not the comparison between the latest assessment and the template baseline assessment is done.
-
#is_compliant ⇒ BOOLEAN
Indicates whether or not the latest assessment is compliant with the template baseline assessment.
-
#is_group ⇒ BOOLEAN
Indicates whether or not the template security assessment is applied to a target group.
-
#target_database_group_id ⇒ String
The OCID of the target database group that the group assessment is created for.
-
#target_id ⇒ String
The OCID of the target database.
-
#template_assessment_id ⇒ String
The OCID of the security assessment of type TEMPLATE.
-
#template_baseline_assessment_id ⇒ String
The OCID of the security assessment of type TEMPLATE_BASELINE.
-
#time_last_compared ⇒ DateTime
The date and time when the comparison was made upon the template baseline.
-
#total_checks ⇒ Integer
The number of checks inside the template assessment.
-
#total_checks_failed ⇒ Integer
Indicates how many checks in the template have drifts in the comparison report.
-
#total_non_compliant_targets ⇒ Integer
The number of the target(s) that have drifts in the comparison report.
-
#total_targets ⇒ Integer
The number of the target(s) inside the target group for which the template baseline assessment was created for.
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 = {}) ⇒ TemplateAnalyticsDimensions
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 = {}) ⇒ TemplateAnalyticsDimensions
Initializes the object
130 131 132 133 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 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 |
# File 'lib/oci/data_safe/models/template_analytics_dimensions.rb', line 130 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.template_assessment_id = attributes[:'templateAssessmentId'] if attributes[:'templateAssessmentId'] raise 'You cannot provide both :templateAssessmentId and :template_assessment_id' if attributes.key?(:'templateAssessmentId') && attributes.key?(:'template_assessment_id') self.template_assessment_id = attributes[:'template_assessment_id'] if attributes[:'template_assessment_id'] self.total_checks = attributes[:'totalChecks'] if attributes[:'totalChecks'] raise 'You cannot provide both :totalChecks and :total_checks' if attributes.key?(:'totalChecks') && attributes.key?(:'total_checks') self.total_checks = attributes[:'total_checks'] if attributes[:'total_checks'] self.template_baseline_assessment_id = attributes[:'templateBaselineAssessmentId'] if attributes[:'templateBaselineAssessmentId'] raise 'You cannot provide both :templateBaselineAssessmentId and :template_baseline_assessment_id' if attributes.key?(:'templateBaselineAssessmentId') && attributes.key?(:'template_baseline_assessment_id') self.template_baseline_assessment_id = attributes[:'template_baseline_assessment_id'] if attributes[:'template_baseline_assessment_id'] self.target_id = attributes[:'targetId'] if attributes[:'targetId'] raise 'You cannot provide both :targetId and :target_id' if attributes.key?(:'targetId') && attributes.key?(:'target_id') self.target_id = attributes[:'target_id'] if attributes[:'target_id'] self.target_database_group_id = attributes[:'targetDatabaseGroupId'] if attributes[:'targetDatabaseGroupId'] raise 'You cannot provide both :targetDatabaseGroupId and :target_database_group_id' if attributes.key?(:'targetDatabaseGroupId') && attributes.key?(:'target_database_group_id') self.target_database_group_id = attributes[:'target_database_group_id'] if attributes[:'target_database_group_id'] self.is_group = attributes[:'isGroup'] unless attributes[:'isGroup'].nil? raise 'You cannot provide both :isGroup and :is_group' if attributes.key?(:'isGroup') && attributes.key?(:'is_group') self.is_group = attributes[:'is_group'] unless attributes[:'is_group'].nil? self.is_compared = attributes[:'isCompared'] unless attributes[:'isCompared'].nil? raise 'You cannot provide both :isCompared and :is_compared' if attributes.key?(:'isCompared') && attributes.key?(:'is_compared') self.is_compared = attributes[:'is_compared'] unless attributes[:'is_compared'].nil? self.time_last_compared = attributes[:'timeLastCompared'] if attributes[:'timeLastCompared'] raise 'You cannot provide both :timeLastCompared and :time_last_compared' if attributes.key?(:'timeLastCompared') && attributes.key?(:'time_last_compared') self.time_last_compared = attributes[:'time_last_compared'] if attributes[:'time_last_compared'] self.is_compliant = attributes[:'isCompliant'] unless attributes[:'isCompliant'].nil? raise 'You cannot provide both :isCompliant and :is_compliant' if attributes.key?(:'isCompliant') && attributes.key?(:'is_compliant') self.is_compliant = attributes[:'is_compliant'] unless attributes[:'is_compliant'].nil? self.total_checks_failed = attributes[:'totalChecksFailed'] if attributes[:'totalChecksFailed'] raise 'You cannot provide both :totalChecksFailed and :total_checks_failed' if attributes.key?(:'totalChecksFailed') && attributes.key?(:'total_checks_failed') self.total_checks_failed = attributes[:'total_checks_failed'] if attributes[:'total_checks_failed'] self.total_targets = attributes[:'totalTargets'] if attributes[:'totalTargets'] raise 'You cannot provide both :totalTargets and :total_targets' if attributes.key?(:'totalTargets') && attributes.key?(:'total_targets') self.total_targets = attributes[:'total_targets'] if attributes[:'total_targets'] self.total_non_compliant_targets = attributes[:'totalNonCompliantTargets'] if attributes[:'totalNonCompliantTargets'] raise 'You cannot provide both :totalNonCompliantTargets and :total_non_compliant_targets' if attributes.key?(:'totalNonCompliantTargets') && attributes.key?(:'total_non_compliant_targets') self.total_non_compliant_targets = attributes[:'total_non_compliant_targets'] if attributes[:'total_non_compliant_targets'] end |
Instance Attribute Details
#is_compared ⇒ BOOLEAN
Indicates whether or not the comparison between the latest assessment and the template baseline assessment is done. If the value is false, it means the comparison is not done yet.
43 44 45 |
# File 'lib/oci/data_safe/models/template_analytics_dimensions.rb', line 43 def is_compared @is_compared end |
#is_compliant ⇒ BOOLEAN
Indicates whether or not the latest assessment is compliant with the template baseline assessment. If the value is false, it means there is drift in the comparison report and the totalChecksFailed field will have a non-zero value.
53 54 55 |
# File 'lib/oci/data_safe/models/template_analytics_dimensions.rb', line 53 def is_compliant @is_compliant end |
#is_group ⇒ BOOLEAN
Indicates whether or not the template security assessment is applied to a target group. If the value is false, it means the template security assessment is applied to a individual target.
37 38 39 |
# File 'lib/oci/data_safe/models/template_analytics_dimensions.rb', line 37 def is_group @is_group end |
#target_database_group_id ⇒ String
The OCID of the target database group that the group assessment is created for. This field will be in the response if the template was applied on a target group.
31 32 33 |
# File 'lib/oci/data_safe/models/template_analytics_dimensions.rb', line 31 def target_database_group_id @target_database_group_id end |
#target_id ⇒ String
The OCID of the target database. This field will be in the response if the template was applied on an individual target.
25 26 27 |
# File 'lib/oci/data_safe/models/template_analytics_dimensions.rb', line 25 def target_id @target_id end |
#template_assessment_id ⇒ String
The OCID of the security assessment of type TEMPLATE.
13 14 15 |
# File 'lib/oci/data_safe/models/template_analytics_dimensions.rb', line 13 def template_assessment_id @template_assessment_id end |
#template_baseline_assessment_id ⇒ String
The OCID of the security assessment of type TEMPLATE_BASELINE.
21 22 23 |
# File 'lib/oci/data_safe/models/template_analytics_dimensions.rb', line 21 def template_baseline_assessment_id @template_baseline_assessment_id end |
#time_last_compared ⇒ DateTime
The date and time when the comparison was made upon the template baseline. Conforms to the format defined by RFC3339.
47 48 49 |
# File 'lib/oci/data_safe/models/template_analytics_dimensions.rb', line 47 def time_last_compared @time_last_compared end |
#total_checks ⇒ Integer
The number of checks inside the template assessment.
17 18 19 |
# File 'lib/oci/data_safe/models/template_analytics_dimensions.rb', line 17 def total_checks @total_checks end |
#total_checks_failed ⇒ Integer
Indicates how many checks in the template have drifts in the comparison report. This field is only present if isCompliant is false.
58 59 60 |
# File 'lib/oci/data_safe/models/template_analytics_dimensions.rb', line 58 def total_checks_failed @total_checks_failed end |
#total_non_compliant_targets ⇒ Integer
The number of the target(s) that have drifts in the comparison report. This field is only present if isCompared is true.
70 71 72 |
# File 'lib/oci/data_safe/models/template_analytics_dimensions.rb', line 70 def total_non_compliant_targets @total_non_compliant_targets end |
#total_targets ⇒ Integer
The number of the target(s) inside the target group for which the template baseline assessment was created for. If the isGroup field is false, the value will be 1, representing the single target.
64 65 66 |
# File 'lib/oci/data_safe/models/template_analytics_dimensions.rb', line 64 def total_targets @total_targets end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
# File 'lib/oci/data_safe/models/template_analytics_dimensions.rb', line 73 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'template_assessment_id': :'templateAssessmentId', 'total_checks': :'totalChecks', 'template_baseline_assessment_id': :'templateBaselineAssessmentId', 'target_id': :'targetId', 'target_database_group_id': :'targetDatabaseGroupId', 'is_group': :'isGroup', 'is_compared': :'isCompared', 'time_last_compared': :'timeLastCompared', 'is_compliant': :'isCompliant', 'total_checks_failed': :'totalChecksFailed', 'total_targets': :'totalTargets', 'total_non_compliant_targets': :'totalNonCompliantTargets' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
# File 'lib/oci/data_safe/models/template_analytics_dimensions.rb', line 93 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'template_assessment_id': :'String', 'total_checks': :'Integer', 'template_baseline_assessment_id': :'String', 'target_id': :'String', 'target_database_group_id': :'String', 'is_group': :'BOOLEAN', 'is_compared': :'BOOLEAN', 'time_last_compared': :'DateTime', 'is_compliant': :'BOOLEAN', 'total_checks_failed': :'Integer', 'total_targets': :'Integer', 'total_non_compliant_targets': :'Integer' # 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 |
# File 'lib/oci/data_safe/models/template_analytics_dimensions.rb', line 216 def ==(other) return true if equal?(other) self.class == other.class && template_assessment_id == other.template_assessment_id && total_checks == other.total_checks && template_baseline_assessment_id == other.template_baseline_assessment_id && target_id == other.target_id && target_database_group_id == other.target_database_group_id && is_group == other.is_group && is_compared == other.is_compared && time_last_compared == other.time_last_compared && is_compliant == other.is_compliant && total_checks_failed == other.total_checks_failed && total_targets == other.total_targets && total_non_compliant_targets == other.total_non_compliant_targets end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 |
# File 'lib/oci/data_safe/models/template_analytics_dimensions.rb', line 257 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
237 238 239 |
# File 'lib/oci/data_safe/models/template_analytics_dimensions.rb', line 237 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
246 247 248 |
# File 'lib/oci/data_safe/models/template_analytics_dimensions.rb', line 246 def hash [template_assessment_id, total_checks, template_baseline_assessment_id, target_id, target_database_group_id, is_group, is_compared, time_last_compared, is_compliant, total_checks_failed, total_targets, total_non_compliant_targets].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
290 291 292 293 294 295 296 297 298 299 |
# File 'lib/oci/data_safe/models/template_analytics_dimensions.rb', line 290 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
284 285 286 |
# File 'lib/oci/data_safe/models/template_analytics_dimensions.rb', line 284 def to_s to_hash.to_s end |