Class: OCI::DataSafe::Models::AvailableAuditVolumeSummary
- Inherits:
-
Object
- Object
- OCI::DataSafe::Models::AvailableAuditVolumeSummary
- 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
-
#audit_profile_id ⇒ String
[Required] The OCID of the audit profile resource.
-
#month_in_consideration ⇒ DateTime
[Required] Represents the month under consideration for which aggregated audit data volume available at the target is computed.
-
#trail_location ⇒ String
[Required] Audit trail location on the target database from where the audit data is being collected by Data Safe.
-
#volume ⇒ Integer
[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.
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 = {}) ⇒ AvailableAuditVolumeSummary
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 = {}) ⇒ AvailableAuditVolumeSummary
Initializes the object
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/oci/data_safe/models/available_audit_volume_summary.rb', line 66 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.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_id ⇒ String
[Required] The OCID of the audit profile resource.
14 15 16 |
# File 'lib/oci/data_safe/models/available_audit_volume_summary.rb', line 14 def audit_profile_id @audit_profile_id end |
#month_in_consideration ⇒ DateTime
[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.
25 26 27 |
# File 'lib/oci/data_safe/models/available_audit_volume_summary.rb', line 25 def month_in_consideration @month_in_consideration end |
#trail_location ⇒ String
[Required] Audit trail location on the target database from where the audit data is being collected by Data Safe.
18 19 20 |
# File 'lib/oci/data_safe/models/available_audit_volume_summary.rb', line 18 def trail_location @trail_location end |
#volume ⇒ Integer
[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.
30 31 32 |
# File 'lib/oci/data_safe/models/available_audit_volume_summary.rb', line 30 def volume @volume end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
33 34 35 36 37 38 39 40 41 42 |
# File 'lib/oci/data_safe/models/available_audit_volume_summary.rb', line 33 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'audit_profile_id': :'auditProfileId', 'trail_location': :'trailLocation', 'month_in_consideration': :'monthInConsideration', 'volume': :'volume' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
45 46 47 48 49 50 51 52 53 54 |
# File 'lib/oci/data_safe/models/available_audit_volume_summary.rb', line 45 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'audit_profile_id': :'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.
100 101 102 103 104 105 106 107 108 |
# File 'lib/oci/data_safe/models/available_audit_volume_summary.rb', line 100 def ==(other) return true if equal?(other) self.class == other.class && audit_profile_id == other.audit_profile_id && 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
133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 |
# File 'lib/oci/data_safe/models/available_audit_volume_summary.rb', line 133 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
113 114 115 |
# File 'lib/oci/data_safe/models/available_audit_volume_summary.rb', line 113 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
122 123 124 |
# File 'lib/oci/data_safe/models/available_audit_volume_summary.rb', line 122 def hash [audit_profile_id, trail_location, month_in_consideration, volume].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
166 167 168 169 170 171 172 173 174 175 |
# File 'lib/oci/data_safe/models/available_audit_volume_summary.rb', line 166 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
160 161 162 |
# File 'lib/oci/data_safe/models/available_audit_volume_summary.rb', line 160 def to_s to_hash.to_s end |