Class: OCI::DataSafe::Models::BulkCreateUnifiedAuditPolicyDetails
- Inherits:
-
Object
- Object
- OCI::DataSafe::Models::BulkCreateUnifiedAuditPolicyDetails
- Defined in:
- lib/oci/data_safe/models/bulk_create_unified_audit_policy_details.rb
Overview
The details required to bulk create unified audit policies.
Instance Attribute Summary collapse
-
#compartment_id ⇒ String
[Required] The OCID of the compartment in which to create the unified audit policy.
-
#policy_names ⇒ Array<String>
The list of unified audit policy names to be imported.
-
#security_policy_id ⇒ String
[Required] The OCID of the security policy corresponding to the unified audit policy.
-
#should_preserve_casing ⇒ BOOLEAN
Indicates whether the casing of the policy names provided in the request payload should be preserved during creation.
-
#target_id ⇒ String
[Required] The OCID of the target database.
-
#unified_audit_policy_definition_ids ⇒ Array<String>
The list of unified audit policy definition ocids.
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 = {}) ⇒ BulkCreateUnifiedAuditPolicyDetails
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 = {}) ⇒ BulkCreateUnifiedAuditPolicyDetails
Initializes the object
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 118 119 120 121 122 123 124 125 126 127 |
# File 'lib/oci/data_safe/models/bulk_create_unified_audit_policy_details.rb', line 84 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.security_policy_id = attributes[:'securityPolicyId'] if attributes[:'securityPolicyId'] raise 'You cannot provide both :securityPolicyId and :security_policy_id' if attributes.key?(:'securityPolicyId') && attributes.key?(:'security_policy_id') self.security_policy_id = attributes[:'security_policy_id'] if attributes[:'security_policy_id'] 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'] self.unified_audit_policy_definition_ids = attributes[:'unifiedAuditPolicyDefinitionIds'] if attributes[:'unifiedAuditPolicyDefinitionIds'] raise 'You cannot provide both :unifiedAuditPolicyDefinitionIds and :unified_audit_policy_definition_ids' if attributes.key?(:'unifiedAuditPolicyDefinitionIds') && attributes.key?(:'unified_audit_policy_definition_ids') self.unified_audit_policy_definition_ids = attributes[:'unified_audit_policy_definition_ids'] if attributes[:'unified_audit_policy_definition_ids'] self.policy_names = attributes[:'policyNames'] if attributes[:'policyNames'] raise 'You cannot provide both :policyNames and :policy_names' if attributes.key?(:'policyNames') && attributes.key?(:'policy_names') self.policy_names = attributes[:'policy_names'] if attributes[:'policy_names'] self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId'] raise 'You cannot provide both :compartmentId and :compartment_id' if attributes.key?(:'compartmentId') && attributes.key?(:'compartment_id') self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id'] self.should_preserve_casing = attributes[:'shouldPreserveCasing'] unless attributes[:'shouldPreserveCasing'].nil? self.should_preserve_casing = false if should_preserve_casing.nil? && !attributes.key?(:'shouldPreserveCasing') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :shouldPreserveCasing and :should_preserve_casing' if attributes.key?(:'shouldPreserveCasing') && attributes.key?(:'should_preserve_casing') self.should_preserve_casing = attributes[:'should_preserve_casing'] unless attributes[:'should_preserve_casing'].nil? self.should_preserve_casing = false if should_preserve_casing.nil? && !attributes.key?(:'shouldPreserveCasing') && !attributes.key?(:'should_preserve_casing') # rubocop:disable Style/StringLiterals end |
Instance Attribute Details
#compartment_id ⇒ String
[Required] The OCID of the compartment in which to create the unified audit policy.
36 37 38 |
# File 'lib/oci/data_safe/models/bulk_create_unified_audit_policy_details.rb', line 36 def compartment_id @compartment_id end |
#policy_names ⇒ Array<String>
The list of unified audit policy names to be imported.
32 33 34 |
# File 'lib/oci/data_safe/models/bulk_create_unified_audit_policy_details.rb', line 32 def policy_names @policy_names end |
#security_policy_id ⇒ String
[Required] The OCID of the security policy corresponding to the unified audit policy.
13 14 15 |
# File 'lib/oci/data_safe/models/bulk_create_unified_audit_policy_details.rb', line 13 def security_policy_id @security_policy_id end |
#should_preserve_casing ⇒ BOOLEAN
Indicates whether the casing of the policy names provided in the request payload should be preserved during creation. By default all policy names will be converted to upper case.
42 43 44 |
# File 'lib/oci/data_safe/models/bulk_create_unified_audit_policy_details.rb', line 42 def should_preserve_casing @should_preserve_casing end |
#target_id ⇒ String
[Required] The OCID of the target database.
17 18 19 |
# File 'lib/oci/data_safe/models/bulk_create_unified_audit_policy_details.rb', line 17 def target_id @target_id end |
#unified_audit_policy_definition_ids ⇒ Array<String>
The list of unified audit policy definition ocids. If unified audit policy definition ids are provided, the imported audit policy will be associated to the specified unified audit policy definition based on the policy name. Else, for every audit policy that gets imported, a new unified audit policy definition will be created.
27 28 29 |
# File 'lib/oci/data_safe/models/bulk_create_unified_audit_policy_details.rb', line 27 def unified_audit_policy_definition_ids @unified_audit_policy_definition_ids end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/oci/data_safe/models/bulk_create_unified_audit_policy_details.rb', line 45 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'security_policy_id': :'securityPolicyId', 'target_id': :'targetId', 'unified_audit_policy_definition_ids': :'unifiedAuditPolicyDefinitionIds', 'policy_names': :'policyNames', 'compartment_id': :'compartmentId', 'should_preserve_casing': :'shouldPreserveCasing' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/oci/data_safe/models/bulk_create_unified_audit_policy_details.rb', line 59 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'security_policy_id': :'String', 'target_id': :'String', 'unified_audit_policy_definition_ids': :'Array<String>', 'policy_names': :'Array<String>', 'compartment_id': :'String', 'should_preserve_casing': :'BOOLEAN' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
136 137 138 139 140 141 142 143 144 145 146 |
# File 'lib/oci/data_safe/models/bulk_create_unified_audit_policy_details.rb', line 136 def ==(other) return true if equal?(other) self.class == other.class && security_policy_id == other.security_policy_id && target_id == other.target_id && unified_audit_policy_definition_ids == other.unified_audit_policy_definition_ids && policy_names == other.policy_names && compartment_id == other.compartment_id && should_preserve_casing == other.should_preserve_casing end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 |
# File 'lib/oci/data_safe/models/bulk_create_unified_audit_policy_details.rb', line 171 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
151 152 153 |
# File 'lib/oci/data_safe/models/bulk_create_unified_audit_policy_details.rb', line 151 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
160 161 162 |
# File 'lib/oci/data_safe/models/bulk_create_unified_audit_policy_details.rb', line 160 def hash [security_policy_id, target_id, unified_audit_policy_definition_ids, policy_names, compartment_id, should_preserve_casing].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
204 205 206 207 208 209 210 211 212 213 |
# File 'lib/oci/data_safe/models/bulk_create_unified_audit_policy_details.rb', line 204 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
198 199 200 |
# File 'lib/oci/data_safe/models/bulk_create_unified_audit_policy_details.rb', line 198 def to_s to_hash.to_s end |