Class: OCI::DataSafe::Models::SecurityAssessmentTemplateBaselineComparison

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/data_safe/models/security_assessment_template_baseline_comparison.rb

Overview

Provides a list of the differences in a comparison of the security assessment with the template baseline value.

Constant Summary collapse

LIFECYCLE_STATE_ENUM =
[
  LIFECYCLE_STATE_IN_PROGRESS = 'IN_PROGRESS'.freeze,
  LIFECYCLE_STATE_SUCCEEDED = 'SUCCEEDED'.freeze,
  LIFECYCLE_STATE_FAILED = 'FAILED'.freeze,
  LIFECYCLE_STATE_DELETED = 'DELETED'.freeze,
  LIFECYCLE_STATE_DELETING = 'DELETING'.freeze,
  LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ SecurityAssessmentTemplateBaselineComparison

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash

Options Hash (attributes):



128
129
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
# File 'lib/oci/data_safe/models/security_assessment_template_baseline_comparison.rb', line 128

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.id = attributes[:'id'] if attributes[:'id']

  self.template_baseline_id = attributes[:'templateBaselineId'] if attributes[:'templateBaselineId']

  raise 'You cannot provide both :templateBaselineId and :template_baseline_id' if attributes.key?(:'templateBaselineId') && attributes.key?(:'template_baseline_id')

  self.template_baseline_id = attributes[:'template_baseline_id'] if attributes[:'template_baseline_id']

  self.template_baseline_name = attributes[:'templateBaselineName'] if attributes[:'templateBaselineName']

  raise 'You cannot provide both :templateBaselineName and :template_baseline_name' if attributes.key?(:'templateBaselineName') && attributes.key?(:'template_baseline_name')

  self.template_baseline_name = attributes[:'template_baseline_name'] if attributes[:'template_baseline_name']

  self.lifecycle_state = attributes[:'lifecycleState'] if attributes[:'lifecycleState']

  raise 'You cannot provide both :lifecycleState and :lifecycle_state' if attributes.key?(:'lifecycleState') && attributes.key?(:'lifecycle_state')

  self.lifecycle_state = attributes[:'lifecycle_state'] if attributes[:'lifecycle_state']

  self.time_created = attributes[:'timeCreated'] if attributes[:'timeCreated']

  raise 'You cannot provide both :timeCreated and :time_created' if attributes.key?(:'timeCreated') && attributes.key?(:'time_created')

  self.time_created = attributes[:'time_created'] if attributes[:'time_created']

  self.auditing = attributes[:'auditing'] if attributes[:'auditing']

  self.authorization_control = attributes[:'authorizationControl'] if attributes[:'authorizationControl']

  raise 'You cannot provide both :authorizationControl and :authorization_control' if attributes.key?(:'authorizationControl') && attributes.key?(:'authorization_control')

  self.authorization_control = 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

#auditingArray<OCI::DataSafe::Models::TemplateBaselineDiffs>

A comparison between findings belonging to Auditing category.



44
45
46
# File 'lib/oci/data_safe/models/security_assessment_template_baseline_comparison.rb', line 44

def auditing
  @auditing
end

#authorization_controlArray<OCI::DataSafe::Models::TemplateBaselineDiffs>

A comparison between findings belonging to Authorization Control category.



48
49
50
# File 'lib/oci/data_safe/models/security_assessment_template_baseline_comparison.rb', line 48

def authorization_control
  @authorization_control
end

#data_encryptionArray<OCI::DataSafe::Models::TemplateBaselineDiffs>

Comparison between findings belonging to Data Encryption category.



52
53
54
# File 'lib/oci/data_safe/models/security_assessment_template_baseline_comparison.rb', line 52

def data_encryption
  @data_encryption
end

#db_configurationArray<OCI::DataSafe::Models::TemplateBaselineDiffs>

Comparison between findings belonging to Database Configuration category.



56
57
58
# File 'lib/oci/data_safe/models/security_assessment_template_baseline_comparison.rb', line 56

def db_configuration
  @db_configuration
end

#fine_grained_access_controlArray<OCI::DataSafe::Models::TemplateBaselineDiffs>

Comparison between findings belonging to Fine-Grained Access Control category.



60
61
62
# File 'lib/oci/data_safe/models/security_assessment_template_baseline_comparison.rb', line 60

def fine_grained_access_control
  @fine_grained_access_control
end

#idString

[Required] The OCID of the security assessment that is being compared with a template baseline security assessment.

Returns:

  • (String)


24
25
26
# File 'lib/oci/data_safe/models/security_assessment_template_baseline_comparison.rb', line 24

def id
  @id
end

#lifecycle_stateString

[Required] The current state of the security assessment comparison.

Returns:

  • (String)


36
37
38
# File 'lib/oci/data_safe/models/security_assessment_template_baseline_comparison.rb', line 36

def lifecycle_state
  @lifecycle_state
end

#privileges_and_rolesArray<OCI::DataSafe::Models::TemplateBaselineDiffs>

Comparison between findings belonging to Privileges and Roles category.



64
65
66
# File 'lib/oci/data_safe/models/security_assessment_template_baseline_comparison.rb', line 64

def privileges_and_roles
  @privileges_and_roles
end

#template_baseline_idString

[Required] The OCID of the security assessment that is set as a template baseline.

Returns:

  • (String)


28
29
30
# File 'lib/oci/data_safe/models/security_assessment_template_baseline_comparison.rb', line 28

def template_baseline_id
  @template_baseline_id
end

#template_baseline_nameString

The display name of the security assessment that is set as a template baseline.

Returns:

  • (String)


32
33
34
# File 'lib/oci/data_safe/models/security_assessment_template_baseline_comparison.rb', line 32

def template_baseline_name
  @template_baseline_name
end

#time_createdDateTime

[Required] The date and time when the security assessment comparison was created. Conforms to the format defined by RFC3339.

Returns:

  • (DateTime)


40
41
42
# File 'lib/oci/data_safe/models/security_assessment_template_baseline_comparison.rb', line 40

def time_created
  @time_created
end

#user_accountsArray<OCI::DataSafe::Models::TemplateBaselineDiffs>

Comparison between findings belonging to User Accounts category.



68
69
70
# File 'lib/oci/data_safe/models/security_assessment_template_baseline_comparison.rb', line 68

def user_accounts
  @user_accounts
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# File 'lib/oci/data_safe/models/security_assessment_template_baseline_comparison.rb', line 71

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'id',
    'template_baseline_id': :'templateBaselineId',
    'template_baseline_name': :'templateBaselineName',
    'lifecycle_state': :'lifecycleState',
    'time_created': :'timeCreated',
    '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_typesObject

Attribute type mapping.



91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# File 'lib/oci/data_safe/models/security_assessment_template_baseline_comparison.rb', line 91

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'String',
    'template_baseline_id': :'String',
    'template_baseline_name': :'String',
    'lifecycle_state': :'String',
    'time_created': :'DateTime',
    'auditing': :'Array<OCI::DataSafe::Models::TemplateBaselineDiffs>',
    'authorization_control': :'Array<OCI::DataSafe::Models::TemplateBaselineDiffs>',
    'data_encryption': :'Array<OCI::DataSafe::Models::TemplateBaselineDiffs>',
    'db_configuration': :'Array<OCI::DataSafe::Models::TemplateBaselineDiffs>',
    'fine_grained_access_control': :'Array<OCI::DataSafe::Models::TemplateBaselineDiffs>',
    'privileges_and_roles': :'Array<OCI::DataSafe::Models::TemplateBaselineDiffs>',
    'user_accounts': :'Array<OCI::DataSafe::Models::TemplateBaselineDiffs>'
    # rubocop:enable Style/SymbolLiteral
  }
end

Instance Method Details

#==(other) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • other (Object)

    the other object to be compared



219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
# File 'lib/oci/data_safe/models/security_assessment_template_baseline_comparison.rb', line 219

def ==(other)
  return true if equal?(other)

  self.class == other.class &&
    id == other.id &&
    template_baseline_id == other.template_baseline_id &&
    template_baseline_name == other.template_baseline_name &&
    lifecycle_state == other.lifecycle_state &&
    time_created == other.time_created &&
    auditing == other.auditing &&
    authorization_control == other.authorization_control &&
    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

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
# File 'lib/oci/data_safe/models/security_assessment_template_baseline_comparison.rb', line 260

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

Parameters:

  • other (Object)

    the other object to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


240
241
242
# File 'lib/oci/data_safe/models/security_assessment_template_baseline_comparison.rb', line 240

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



249
250
251
# File 'lib/oci/data_safe/models/security_assessment_template_baseline_comparison.rb', line 249

def hash
  [id, template_baseline_id, template_baseline_name, lifecycle_state, time_created, auditing, authorization_control, data_encryption, db_configuration, fine_grained_access_control, privileges_and_roles, user_accounts].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



293
294
295
296
297
298
299
300
301
302
# File 'lib/oci/data_safe/models/security_assessment_template_baseline_comparison.rb', line 293

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_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



287
288
289
# File 'lib/oci/data_safe/models/security_assessment_template_baseline_comparison.rb', line 287

def to_s
  to_hash.to_s
end