Class: OCI::DataSafe::Models::AuditPolicyDimensions
- Inherits:
-
Object
- Object
- OCI::DataSafe::Models::AuditPolicyDimensions
- Defined in:
- lib/oci/data_safe/models/audit_policy_dimensions.rb
Overview
Details of aggregation dimensions used for summarizing audit policies.
Constant Summary collapse
- AUDIT_POLICY_CATEGORY_ENUM =
[ AUDIT_POLICY_CATEGORY_BASIC_ACTIVITY = 'BASIC_ACTIVITY'.freeze, AUDIT_POLICY_CATEGORY_ADMIN_USER_ACTIVITY = 'ADMIN_USER_ACTIVITY'.freeze, AUDIT_POLICY_CATEGORY_USER_ACTIVITY = 'USER_ACTIVITY'.freeze, AUDIT_POLICY_CATEGORY_ORACLE_PREDEFINED = 'ORACLE_PREDEFINED'.freeze, AUDIT_POLICY_CATEGORY_COMPLIANCE_STANDARD = 'COMPLIANCE_STANDARD'.freeze, AUDIT_POLICY_CATEGORY_CUSTOM = 'CUSTOM'.freeze, AUDIT_POLICY_CATEGORY_SQL_FIREWALL_AUDITING = 'SQL_FIREWALL_AUDITING'.freeze, AUDIT_POLICY_CATEGORY_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#audit_policy_category ⇒ String
The category to which the audit policy belongs.
-
#audit_policy_name ⇒ String
The name of the audit policy.
-
#target_id ⇒ String
The OCID of the target database for which the audit policy will be created.
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 = {}) ⇒ AuditPolicyDimensions
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 = {}) ⇒ AuditPolicyDimensions
Initializes the object
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
# File 'lib/oci/data_safe/models/audit_policy_dimensions.rb', line 67 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_policy_category = attributes[:'auditPolicyCategory'] if attributes[:'auditPolicyCategory'] raise 'You cannot provide both :auditPolicyCategory and :audit_policy_category' if attributes.key?(:'auditPolicyCategory') && attributes.key?(:'audit_policy_category') self.audit_policy_category = attributes[:'audit_policy_category'] if attributes[:'audit_policy_category'] self.audit_policy_name = attributes[:'auditPolicyName'] if attributes[:'auditPolicyName'] raise 'You cannot provide both :auditPolicyName and :audit_policy_name' if attributes.key?(:'auditPolicyName') && attributes.key?(:'audit_policy_name') self.audit_policy_name = attributes[:'audit_policy_name'] if attributes[:'audit_policy_name'] 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'] end |
Instance Attribute Details
#audit_policy_category ⇒ String
The category to which the audit policy belongs.
25 26 27 |
# File 'lib/oci/data_safe/models/audit_policy_dimensions.rb', line 25 def audit_policy_category @audit_policy_category end |
#audit_policy_name ⇒ String
The name of the audit policy. Refer to the documentation for seeded audit policy names. For custom policies, refer to the user-defined policy name created in the target database.
30 31 32 |
# File 'lib/oci/data_safe/models/audit_policy_dimensions.rb', line 30 def audit_policy_name @audit_policy_name end |
#target_id ⇒ String
The OCID of the target database for which the audit policy will be created.
34 35 36 |
# File 'lib/oci/data_safe/models/audit_policy_dimensions.rb', line 34 def target_id @target_id end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
37 38 39 40 41 42 43 44 45 |
# File 'lib/oci/data_safe/models/audit_policy_dimensions.rb', line 37 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'audit_policy_category': :'auditPolicyCategory', 'audit_policy_name': :'auditPolicyName', 'target_id': :'targetId' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
48 49 50 51 52 53 54 55 56 |
# File 'lib/oci/data_safe/models/audit_policy_dimensions.rb', line 48 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'audit_policy_category': :'String', 'audit_policy_name': :'String', 'target_id': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
112 113 114 115 116 117 118 119 |
# File 'lib/oci/data_safe/models/audit_policy_dimensions.rb', line 112 def ==(other) return true if equal?(other) self.class == other.class && audit_policy_category == other.audit_policy_category && audit_policy_name == other.audit_policy_name && target_id == other.target_id end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 |
# File 'lib/oci/data_safe/models/audit_policy_dimensions.rb', line 144 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
124 125 126 |
# File 'lib/oci/data_safe/models/audit_policy_dimensions.rb', line 124 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
133 134 135 |
# File 'lib/oci/data_safe/models/audit_policy_dimensions.rb', line 133 def hash [audit_policy_category, audit_policy_name, target_id].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
177 178 179 180 181 182 183 184 185 186 |
# File 'lib/oci/data_safe/models/audit_policy_dimensions.rb', line 177 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
171 172 173 |
# File 'lib/oci/data_safe/models/audit_policy_dimensions.rb', line 171 def to_s to_hash.to_s end |