Class: OCI::DataSafe::Models::AuditProfileDimensions
- Inherits:
-
Object
- Object
- OCI::DataSafe::Models::AuditProfileDimensions
- Defined in:
- lib/oci/data_safe/models/audit_profile_dimensions.rb
Overview
Details of aggregation dimensions used for summarizing audit profiles.
Instance Attribute Summary collapse
-
#is_paid_usage_enabled ⇒ BOOLEAN
Indicates if you want to continue collecting audit records beyond the free limit of one million audit records per month per target database, potentially incurring additional charges.
-
#offline_months_source ⇒ String
The name or the OCID of the resource from which the offline month retention setting is sourced.
-
#online_months_source ⇒ String
The name or the OCID of the resource from which the online month retention setting is sourced.
-
#paid_usage_source ⇒ String
The name or the OCID of the resource from which the paid usage setting is sourced.
-
#target_type ⇒ String
The resource type that is represented by the audit profile.
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 = {}) ⇒ AuditProfileDimensions
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 = {}) ⇒ AuditProfileDimensions
Initializes the object
71 72 73 74 75 76 77 78 79 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 |
# File 'lib/oci/data_safe/models/audit_profile_dimensions.rb', line 71 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.is_paid_usage_enabled = attributes[:'isPaidUsageEnabled'] unless attributes[:'isPaidUsageEnabled'].nil? raise 'You cannot provide both :isPaidUsageEnabled and :is_paid_usage_enabled' if attributes.key?(:'isPaidUsageEnabled') && attributes.key?(:'is_paid_usage_enabled') self.is_paid_usage_enabled = attributes[:'is_paid_usage_enabled'] unless attributes[:'is_paid_usage_enabled'].nil? self.target_type = attributes[:'targetType'] if attributes[:'targetType'] raise 'You cannot provide both :targetType and :target_type' if attributes.key?(:'targetType') && attributes.key?(:'target_type') self.target_type = attributes[:'target_type'] if attributes[:'target_type'] self.online_months_source = attributes[:'onlineMonthsSource'] if attributes[:'onlineMonthsSource'] raise 'You cannot provide both :onlineMonthsSource and :online_months_source' if attributes.key?(:'onlineMonthsSource') && attributes.key?(:'online_months_source') self.online_months_source = attributes[:'online_months_source'] if attributes[:'online_months_source'] self.offline_months_source = attributes[:'offlineMonthsSource'] if attributes[:'offlineMonthsSource'] raise 'You cannot provide both :offlineMonthsSource and :offline_months_source' if attributes.key?(:'offlineMonthsSource') && attributes.key?(:'offline_months_source') self.offline_months_source = attributes[:'offline_months_source'] if attributes[:'offline_months_source'] self.paid_usage_source = attributes[:'paidUsageSource'] if attributes[:'paidUsageSource'] raise 'You cannot provide both :paidUsageSource and :paid_usage_source' if attributes.key?(:'paidUsageSource') && attributes.key?(:'paid_usage_source') self.paid_usage_source = attributes[:'paid_usage_source'] if attributes[:'paid_usage_source'] end |
Instance Attribute Details
#is_paid_usage_enabled ⇒ BOOLEAN
Indicates if you want to continue collecting audit records beyond the free limit of one million audit records per month per target database, potentially incurring additional charges. The default value is inherited from the global settings. You can change at the global level or at the target level.
16 17 18 |
# File 'lib/oci/data_safe/models/audit_profile_dimensions.rb', line 16 def is_paid_usage_enabled @is_paid_usage_enabled end |
#offline_months_source ⇒ String
The name or the OCID of the resource from which the offline month retention setting is sourced. For example a target database group OCID or global.
28 29 30 |
# File 'lib/oci/data_safe/models/audit_profile_dimensions.rb', line 28 def offline_months_source @offline_months_source end |
#online_months_source ⇒ String
The name or the OCID of the resource from which the online month retention setting is sourced. For example a target database group OCID or global.
24 25 26 |
# File 'lib/oci/data_safe/models/audit_profile_dimensions.rb', line 24 def online_months_source @online_months_source end |
#paid_usage_source ⇒ String
The name or the OCID of the resource from which the paid usage setting is sourced. For example a target database group OCID or global.
32 33 34 |
# File 'lib/oci/data_safe/models/audit_profile_dimensions.rb', line 32 def paid_usage_source @paid_usage_source end |
#target_type ⇒ String
The resource type that is represented by the audit profile.
20 21 22 |
# File 'lib/oci/data_safe/models/audit_profile_dimensions.rb', line 20 def target_type @target_type end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/oci/data_safe/models/audit_profile_dimensions.rb', line 35 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'is_paid_usage_enabled': :'isPaidUsageEnabled', 'target_type': :'targetType', 'online_months_source': :'onlineMonthsSource', 'offline_months_source': :'offlineMonthsSource', 'paid_usage_source': :'paidUsageSource' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/oci/data_safe/models/audit_profile_dimensions.rb', line 48 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'is_paid_usage_enabled': :'BOOLEAN', 'target_type': :'String', 'online_months_source': :'String', 'offline_months_source': :'String', 'paid_usage_source': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
115 116 117 118 119 120 121 122 123 124 |
# File 'lib/oci/data_safe/models/audit_profile_dimensions.rb', line 115 def ==(other) return true if equal?(other) self.class == other.class && is_paid_usage_enabled == other.is_paid_usage_enabled && target_type == other.target_type && online_months_source == other.online_months_source && offline_months_source == other.offline_months_source && paid_usage_source == other.paid_usage_source end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 |
# File 'lib/oci/data_safe/models/audit_profile_dimensions.rb', line 149 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
129 130 131 |
# File 'lib/oci/data_safe/models/audit_profile_dimensions.rb', line 129 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
138 139 140 |
# File 'lib/oci/data_safe/models/audit_profile_dimensions.rb', line 138 def hash [is_paid_usage_enabled, target_type, online_months_source, offline_months_source, paid_usage_source].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
182 183 184 185 186 187 188 189 190 191 |
# File 'lib/oci/data_safe/models/audit_profile_dimensions.rb', line 182 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
176 177 178 |
# File 'lib/oci/data_safe/models/audit_profile_dimensions.rb', line 176 def to_s to_hash.to_s end |