Class: OCI::DataSafe::Models::AvailableAuditVolumeSummary

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

Overview

Represents the audit data volume collected by Data Safe from the target database for the specified audit profile.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ AvailableAuditVolumeSummary

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):

  • :audit_profile_id (String)

    The value to assign to the #audit_profile_id property

  • :audit_trail_id (String)

    The value to assign to the #audit_trail_id property

  • :database_unique_name (String)

    The value to assign to the #database_unique_name property

  • :trail_location (String)

    The value to assign to the #trail_location property

  • :month_in_consideration (DateTime)

    The value to assign to the #month_in_consideration property

  • :volume (Integer)

    The value to assign to the #volume property



80
81
82
83
84
85
86
87
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
# File 'lib/oci/data_safe/models/available_audit_volume_summary.rb', line 80

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

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

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

  self.audit_trail_id = attributes[:'auditTrailId'] if attributes[:'auditTrailId']

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

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

  self.database_unique_name = attributes[:'databaseUniqueName'] if attributes[:'databaseUniqueName']

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

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

  self.trail_location = attributes[:'trailLocation'] if attributes[:'trailLocation']

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

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

  self.month_in_consideration = attributes[:'monthInConsideration'] if attributes[:'monthInConsideration']

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

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

  self.volume = attributes[:'volume'] if attributes[:'volume']
end

Instance Attribute Details

#audit_profile_idString

[Required] The OCID of the audit profile resource.

Returns:

  • (String)


14
15
16
# File 'lib/oci/data_safe/models/available_audit_volume_summary.rb', line 14

def audit_profile_id
  @audit_profile_id
end

#audit_trail_idString

The OCID of the audit trail.

Returns:

  • (String)


18
19
20
# File 'lib/oci/data_safe/models/available_audit_volume_summary.rb', line 18

def audit_trail_id
  @audit_trail_id
end

#database_unique_nameString

Unique name of the database associated to the peer target database.

Returns:

  • (String)


22
23
24
# File 'lib/oci/data_safe/models/available_audit_volume_summary.rb', line 22

def database_unique_name
  @database_unique_name
end

#month_in_considerationDateTime

[Required] Represents the month under consideration for which aggregated audit data volume available at the target is computed. This field will be the UTC start of the day of the first day of the month for which the aggregate count corresponds to, in the format defined by RFC3339.. For instance, the value of 01-01-2021T00:00:00Z represents Jan 2021.

Returns:

  • (DateTime)


33
34
35
# File 'lib/oci/data_safe/models/available_audit_volume_summary.rb', line 33

def month_in_consideration
  @month_in_consideration
end

#trail_locationString

[Required] Audit trail location on the target database from where the audit data is being collected by Data Safe.

Returns:

  • (String)


26
27
28
# File 'lib/oci/data_safe/models/available_audit_volume_summary.rb', line 26

def trail_location
  @trail_location
end

#volumeInteger

[Required] Represents the aggregated audit data volume available in the audit trails on the target database which is yet to be collected by Data Safe for the specified month.

Returns:

  • (Integer)


38
39
40
# File 'lib/oci/data_safe/models/available_audit_volume_summary.rb', line 38

def volume
  @volume
end

Class Method Details

.attribute_mapObject

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



41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/oci/data_safe/models/available_audit_volume_summary.rb', line 41

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'audit_profile_id': :'auditProfileId',
    'audit_trail_id': :'auditTrailId',
    'database_unique_name': :'databaseUniqueName',
    'trail_location': :'trailLocation',
    'month_in_consideration': :'monthInConsideration',
    'volume': :'volume'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



55
56
57
58
59
60
61
62
63
64
65
66
# File 'lib/oci/data_safe/models/available_audit_volume_summary.rb', line 55

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'audit_profile_id': :'String',
    'audit_trail_id': :'String',
    'database_unique_name': :'String',
    'trail_location': :'String',
    'month_in_consideration': :'DateTime',
    'volume': :'Integer'
    # 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



126
127
128
129
130
131
132
133
134
135
136
# File 'lib/oci/data_safe/models/available_audit_volume_summary.rb', line 126

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

  self.class == other.class &&
    audit_profile_id == other.audit_profile_id &&
    audit_trail_id == other.audit_trail_id &&
    database_unique_name == other.database_unique_name &&
    trail_location == other.trail_location &&
    month_in_consideration == other.month_in_consideration &&
    volume == other.volume
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



161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
# File 'lib/oci/data_safe/models/available_audit_volume_summary.rb', line 161

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


141
142
143
# File 'lib/oci/data_safe/models/available_audit_volume_summary.rb', line 141

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



150
151
152
# File 'lib/oci/data_safe/models/available_audit_volume_summary.rb', line 150

def hash
  [audit_profile_id, audit_trail_id, database_unique_name, trail_location, month_in_consideration, volume].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



194
195
196
197
198
199
200
201
202
203
# File 'lib/oci/data_safe/models/available_audit_volume_summary.rb', line 194

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



188
189
190
# File 'lib/oci/data_safe/models/available_audit_volume_summary.rb', line 188

def to_s
  to_hash.to_s
end