Class: OCI::DataSafe::Models::UpdateSqlFirewallPolicyDetails
- Inherits:
-
Object
- Object
- OCI::DataSafe::Models::UpdateSqlFirewallPolicyDetails
- Defined in:
- lib/oci/data_safe/models/update_sql_firewall_policy_details.rb
Overview
Details to update the SQL Firewall policy.
Constant Summary collapse
- STATUS_ENUM =
[ STATUS_ENABLED = 'ENABLED'.freeze, STATUS_DISABLED = 'DISABLED'.freeze ].freeze
- ENFORCEMENT_SCOPE_ENUM =
[ ENFORCEMENT_SCOPE_ENFORCE_CONTEXT = 'ENFORCE_CONTEXT'.freeze, ENFORCEMENT_SCOPE_ENFORCE_SQL = 'ENFORCE_SQL'.freeze, ENFORCEMENT_SCOPE_ENFORCE_ALL = 'ENFORCE_ALL'.freeze ].freeze
- VIOLATION_ACTION_ENUM =
[ VIOLATION_ACTION_BLOCK = 'BLOCK'.freeze, VIOLATION_ACTION_OBSERVE = 'OBSERVE'.freeze ].freeze
- VIOLATION_AUDIT_ENUM =
[ VIOLATION_AUDIT_ENABLED = 'ENABLED'.freeze, VIOLATION_AUDIT_DISABLED = 'DISABLED'.freeze ].freeze
Instance Attribute Summary collapse
-
#allowed_client_ips ⇒ Array<String>
List of allowed ip addresses for the SQL Firewall policy.
-
#allowed_client_os_usernames ⇒ Array<String>
List of allowed operating system user names for the SQL Firewall policy.
-
#allowed_client_programs ⇒ Array<String>
List of allowed client programs for the SQL Firewall policy.
-
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource.
-
#description ⇒ String
The description of the SQL Firewall policy.
-
#display_name ⇒ String
The display name of the SQL Firewall policy.
-
#enforcement_scope ⇒ String
Specifies the SQL Firewall policy enforcement option.
-
#freeform_tags ⇒ Hash<String, String>
Free-form tags for this resource.
-
#status ⇒ String
Specifies whether the SQL Firewall policy is enabled or disabled.
-
#violation_action ⇒ String
Specifies the SQL Firewall action based on detection of SQL Firewall violations.
-
#violation_audit ⇒ String
Specifies whether a unified audit policy should be enabled for auditing the SQL Firewall policy violations.
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 = {}) ⇒ UpdateSqlFirewallPolicyDetails
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 = {}) ⇒ UpdateSqlFirewallPolicyDetails
Initializes the object
137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 |
# File 'lib/oci/data_safe/models/update_sql_firewall_policy_details.rb', line 137 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.display_name = attributes[:'displayName'] if attributes[:'displayName'] raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name') self.display_name = attributes[:'display_name'] if attributes[:'display_name'] self.description = attributes[:'description'] if attributes[:'description'] self.status = attributes[:'status'] if attributes[:'status'] self.enforcement_scope = attributes[:'enforcementScope'] if attributes[:'enforcementScope'] raise 'You cannot provide both :enforcementScope and :enforcement_scope' if attributes.key?(:'enforcementScope') && attributes.key?(:'enforcement_scope') self.enforcement_scope = attributes[:'enforcement_scope'] if attributes[:'enforcement_scope'] self.violation_action = attributes[:'violationAction'] if attributes[:'violationAction'] raise 'You cannot provide both :violationAction and :violation_action' if attributes.key?(:'violationAction') && attributes.key?(:'violation_action') self.violation_action = attributes[:'violation_action'] if attributes[:'violation_action'] self.violation_audit = attributes[:'violationAudit'] if attributes[:'violationAudit'] raise 'You cannot provide both :violationAudit and :violation_audit' if attributes.key?(:'violationAudit') && attributes.key?(:'violation_audit') self.violation_audit = attributes[:'violation_audit'] if attributes[:'violation_audit'] self.allowed_client_ips = attributes[:'allowedClientIps'] if attributes[:'allowedClientIps'] raise 'You cannot provide both :allowedClientIps and :allowed_client_ips' if attributes.key?(:'allowedClientIps') && attributes.key?(:'allowed_client_ips') self.allowed_client_ips = attributes[:'allowed_client_ips'] if attributes[:'allowed_client_ips'] self.allowed_client_os_usernames = attributes[:'allowedClientOsUsernames'] if attributes[:'allowedClientOsUsernames'] raise 'You cannot provide both :allowedClientOsUsernames and :allowed_client_os_usernames' if attributes.key?(:'allowedClientOsUsernames') && attributes.key?(:'allowed_client_os_usernames') self.allowed_client_os_usernames = attributes[:'allowed_client_os_usernames'] if attributes[:'allowed_client_os_usernames'] self.allowed_client_programs = attributes[:'allowedClientPrograms'] if attributes[:'allowedClientPrograms'] raise 'You cannot provide both :allowedClientPrograms and :allowed_client_programs' if attributes.key?(:'allowedClientPrograms') && attributes.key?(:'allowed_client_programs') self.allowed_client_programs = attributes[:'allowed_client_programs'] if attributes[:'allowed_client_programs'] self. = attributes[:'freeformTags'] if attributes[:'freeformTags'] raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags') self. = attributes[:'freeform_tags'] if attributes[:'freeform_tags'] self. = attributes[:'definedTags'] if attributes[:'definedTags'] raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags') self. = attributes[:'defined_tags'] if attributes[:'defined_tags'] end |
Instance Attribute Details
#allowed_client_ips ⇒ Array<String>
List of allowed ip addresses for the SQL Firewall policy.
58 59 60 |
# File 'lib/oci/data_safe/models/update_sql_firewall_policy_details.rb', line 58 def allowed_client_ips @allowed_client_ips end |
#allowed_client_os_usernames ⇒ Array<String>
List of allowed operating system user names for the SQL Firewall policy.
62 63 64 |
# File 'lib/oci/data_safe/models/update_sql_firewall_policy_details.rb', line 62 def allowed_client_os_usernames @allowed_client_os_usernames end |
#allowed_client_programs ⇒ Array<String>
List of allowed client programs for the SQL Firewall policy.
66 67 68 |
# File 'lib/oci/data_safe/models/update_sql_firewall_policy_details.rb', line 66 def allowed_client_programs @allowed_client_programs end |
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags
Example: {\"Operations\": {\"CostCenter\": \"42\"}}
80 81 82 |
# File 'lib/oci/data_safe/models/update_sql_firewall_policy_details.rb', line 80 def @defined_tags end |
#description ⇒ String
The description of the SQL Firewall policy.
38 39 40 |
# File 'lib/oci/data_safe/models/update_sql_firewall_policy_details.rb', line 38 def description @description end |
#display_name ⇒ String
The display name of the SQL Firewall policy. The name does not have to be unique, and it is changeable.
34 35 36 |
# File 'lib/oci/data_safe/models/update_sql_firewall_policy_details.rb', line 34 def display_name @display_name end |
#enforcement_scope ⇒ String
Specifies the SQL Firewall policy enforcement option.
46 47 48 |
# File 'lib/oci/data_safe/models/update_sql_firewall_policy_details.rb', line 46 def enforcement_scope @enforcement_scope end |
#freeform_tags ⇒ Hash<String, String>
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags
Example: {\"Department\": \"Finance\"}
73 74 75 |
# File 'lib/oci/data_safe/models/update_sql_firewall_policy_details.rb', line 73 def @freeform_tags end |
#status ⇒ String
Specifies whether the SQL Firewall policy is enabled or disabled.
42 43 44 |
# File 'lib/oci/data_safe/models/update_sql_firewall_policy_details.rb', line 42 def status @status end |
#violation_action ⇒ String
Specifies the SQL Firewall action based on detection of SQL Firewall violations.
50 51 52 |
# File 'lib/oci/data_safe/models/update_sql_firewall_policy_details.rb', line 50 def violation_action @violation_action end |
#violation_audit ⇒ String
Specifies whether a unified audit policy should be enabled for auditing the SQL Firewall policy violations.
54 55 56 |
# File 'lib/oci/data_safe/models/update_sql_firewall_policy_details.rb', line 54 def violation_audit @violation_audit end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/oci/data_safe/models/update_sql_firewall_policy_details.rb', line 83 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'display_name': :'displayName', 'description': :'description', 'status': :'status', 'enforcement_scope': :'enforcementScope', 'violation_action': :'violationAction', 'violation_audit': :'violationAudit', 'allowed_client_ips': :'allowedClientIps', 'allowed_client_os_usernames': :'allowedClientOsUsernames', 'allowed_client_programs': :'allowedClientPrograms', 'freeform_tags': :'freeformTags', 'defined_tags': :'definedTags' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 |
# File 'lib/oci/data_safe/models/update_sql_firewall_policy_details.rb', line 102 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'display_name': :'String', 'description': :'String', 'status': :'String', 'enforcement_scope': :'String', 'violation_action': :'String', 'violation_audit': :'String', 'allowed_client_ips': :'Array<String>', 'allowed_client_os_usernames': :'Array<String>', 'allowed_client_programs': :'Array<String>', 'freeform_tags': :'Hash<String, String>', 'defined_tags': :'Hash<String, Hash<String, Object>>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 |
# File 'lib/oci/data_safe/models/update_sql_firewall_policy_details.rb', line 241 def ==(other) return true if equal?(other) self.class == other.class && display_name == other.display_name && description == other.description && status == other.status && enforcement_scope == other.enforcement_scope && violation_action == other.violation_action && violation_audit == other.violation_audit && allowed_client_ips == other.allowed_client_ips && allowed_client_os_usernames == other.allowed_client_os_usernames && allowed_client_programs == other.allowed_client_programs && == other. && == other. end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 |
# File 'lib/oci/data_safe/models/update_sql_firewall_policy_details.rb', line 281 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
261 262 263 |
# File 'lib/oci/data_safe/models/update_sql_firewall_policy_details.rb', line 261 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
270 271 272 |
# File 'lib/oci/data_safe/models/update_sql_firewall_policy_details.rb', line 270 def hash [display_name, description, status, enforcement_scope, violation_action, violation_audit, allowed_client_ips, allowed_client_os_usernames, allowed_client_programs, , ].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
314 315 316 317 318 319 320 321 322 323 |
# File 'lib/oci/data_safe/models/update_sql_firewall_policy_details.rb', line 314 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
308 309 310 |
# File 'lib/oci/data_safe/models/update_sql_firewall_policy_details.rb', line 308 def to_s to_hash.to_s end |