Class: OCI::IdentityDomains::Models::Rule
- Inherits:
-
Object
- Object
- OCI::IdentityDomains::Models::Rule
- Defined in:
- lib/oci/identity_domains/models/rule.rb
Overview
Rule resource. A unit that has a condition which on evaluation with input returns defined values.
Constant Summary collapse
- IDCS_PREVENTED_OPERATIONS_ENUM =
[ IDCS_PREVENTED_OPERATIONS_REPLACE = 'replace'.freeze, IDCS_PREVENTED_OPERATIONS_UPDATE = 'update'.freeze, IDCS_PREVENTED_OPERATIONS_DELETE = 'delete'.freeze, IDCS_PREVENTED_OPERATIONS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#_return ⇒ Array<OCI::IdentityDomains::Models::RuleReturn>
[Required] The return values are the then portion of a Rule.
-
#active ⇒ BOOLEAN
If true, rule is active.
-
#compartment_ocid ⇒ String
OCI Compartment Id (ocid) in which the resource lives.
-
#condition ⇒ String
[Required] SCIM filters.
- #condition_group ⇒ OCI::IdentityDomains::Models::RuleConditionGroup
-
#delete_in_progress ⇒ BOOLEAN
A boolean flag indicating this resource in the process of being deleted.
-
#description ⇒ String
Rule Description.
-
#domain_ocid ⇒ String
OCI Domain Id (ocid) in which the resource lives.
-
#external_id ⇒ String
An identifier for the Resource as defined by the Service Consumer.
-
#id ⇒ String
Unique identifier for the SCIM Resource as defined by the Service Provider.
- #idcs_created_by ⇒ OCI::IdentityDomains::Models::IdcsCreatedBy
- #idcs_last_modified_by ⇒ OCI::IdentityDomains::Models::IdcsLastModifiedBy
-
#idcs_last_upgraded_in_release ⇒ String
The release number when the resource was upgraded.
-
#idcs_prevented_operations ⇒ Array<String>
Each value of this attribute specifies an operation that only an internal client may perform on this particular resource.
-
#locked ⇒ BOOLEAN
Shows if the rule is locked.
- #meta ⇒ OCI::IdentityDomains::Models::Meta
-
#name ⇒ String
[Required] Rule name.
-
#ocid ⇒ String
Unique OCI identifier for the SCIM Resource.
-
#policy_type ⇒ OCI::IdentityDomains::Models::RulePolicyType
This attribute is required.
-
#rule_groovy ⇒ String
The Groovy script that is run instead of the rule, if policy type allows the rule to be a Groovy script.
-
#schemas ⇒ Array<String>
[Required] REQUIRED.
-
#tags ⇒ Array<OCI::IdentityDomains::Models::Tags>
A list of tags on this resource.
-
#tenancy_ocid ⇒ String
OCI Tenant Id (ocid) in which the resource lives.
- #urn_ietf_params_scim_schemas_oracle_idcs_extension_ociconsolesignonpolicyconsent_policy ⇒ OCI::IdentityDomains::Models::RuleExtensionOciconsolesignonpolicyconsentPolicy
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 = {}) ⇒ Rule
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 = {}) ⇒ Rule
Initializes the object
383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 |
# File 'lib/oci/identity_domains/models/rule.rb', line 383 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.id = attributes[:'id'] if attributes[:'id'] self.ocid = attributes[:'ocid'] if attributes[:'ocid'] self.schemas = attributes[:'schemas'] if attributes[:'schemas'] self. = attributes[:'meta'] if attributes[:'meta'] self.idcs_created_by = attributes[:'idcsCreatedBy'] if attributes[:'idcsCreatedBy'] raise 'You cannot provide both :idcsCreatedBy and :idcs_created_by' if attributes.key?(:'idcsCreatedBy') && attributes.key?(:'idcs_created_by') self.idcs_created_by = attributes[:'idcs_created_by'] if attributes[:'idcs_created_by'] self.idcs_last_modified_by = attributes[:'idcsLastModifiedBy'] if attributes[:'idcsLastModifiedBy'] raise 'You cannot provide both :idcsLastModifiedBy and :idcs_last_modified_by' if attributes.key?(:'idcsLastModifiedBy') && attributes.key?(:'idcs_last_modified_by') self.idcs_last_modified_by = attributes[:'idcs_last_modified_by'] if attributes[:'idcs_last_modified_by'] self.idcs_prevented_operations = attributes[:'idcsPreventedOperations'] if attributes[:'idcsPreventedOperations'] raise 'You cannot provide both :idcsPreventedOperations and :idcs_prevented_operations' if attributes.key?(:'idcsPreventedOperations') && attributes.key?(:'idcs_prevented_operations') self.idcs_prevented_operations = attributes[:'idcs_prevented_operations'] if attributes[:'idcs_prevented_operations'] self. = attributes[:'tags'] if attributes[:'tags'] self.delete_in_progress = attributes[:'deleteInProgress'] unless attributes[:'deleteInProgress'].nil? raise 'You cannot provide both :deleteInProgress and :delete_in_progress' if attributes.key?(:'deleteInProgress') && attributes.key?(:'delete_in_progress') self.delete_in_progress = attributes[:'delete_in_progress'] unless attributes[:'delete_in_progress'].nil? self.idcs_last_upgraded_in_release = attributes[:'idcsLastUpgradedInRelease'] if attributes[:'idcsLastUpgradedInRelease'] raise 'You cannot provide both :idcsLastUpgradedInRelease and :idcs_last_upgraded_in_release' if attributes.key?(:'idcsLastUpgradedInRelease') && attributes.key?(:'idcs_last_upgraded_in_release') self.idcs_last_upgraded_in_release = attributes[:'idcs_last_upgraded_in_release'] if attributes[:'idcs_last_upgraded_in_release'] self.domain_ocid = attributes[:'domainOcid'] if attributes[:'domainOcid'] raise 'You cannot provide both :domainOcid and :domain_ocid' if attributes.key?(:'domainOcid') && attributes.key?(:'domain_ocid') self.domain_ocid = attributes[:'domain_ocid'] if attributes[:'domain_ocid'] self.compartment_ocid = attributes[:'compartmentOcid'] if attributes[:'compartmentOcid'] raise 'You cannot provide both :compartmentOcid and :compartment_ocid' if attributes.key?(:'compartmentOcid') && attributes.key?(:'compartment_ocid') self.compartment_ocid = attributes[:'compartment_ocid'] if attributes[:'compartment_ocid'] self.tenancy_ocid = attributes[:'tenancyOcid'] if attributes[:'tenancyOcid'] raise 'You cannot provide both :tenancyOcid and :tenancy_ocid' if attributes.key?(:'tenancyOcid') && attributes.key?(:'tenancy_ocid') self.tenancy_ocid = attributes[:'tenancy_ocid'] if attributes[:'tenancy_ocid'] self.external_id = attributes[:'externalId'] if attributes[:'externalId'] raise 'You cannot provide both :externalId and :external_id' if attributes.key?(:'externalId') && attributes.key?(:'external_id') self.external_id = attributes[:'external_id'] if attributes[:'external_id'] self.name = attributes[:'name'] if attributes[:'name'] self.description = attributes[:'description'] if attributes[:'description'] self.active = attributes[:'active'] unless attributes[:'active'].nil? self.locked = attributes[:'locked'] unless attributes[:'locked'].nil? self.rule_groovy = attributes[:'ruleGroovy'] if attributes[:'ruleGroovy'] raise 'You cannot provide both :ruleGroovy and :rule_groovy' if attributes.key?(:'ruleGroovy') && attributes.key?(:'rule_groovy') self.rule_groovy = attributes[:'rule_groovy'] if attributes[:'rule_groovy'] self.condition = attributes[:'condition'] if attributes[:'condition'] self.condition_group = attributes[:'conditionGroup'] if attributes[:'conditionGroup'] raise 'You cannot provide both :conditionGroup and :condition_group' if attributes.key?(:'conditionGroup') && attributes.key?(:'condition_group') self.condition_group = attributes[:'condition_group'] if attributes[:'condition_group'] self.policy_type = attributes[:'policyType'] if attributes[:'policyType'] raise 'You cannot provide both :policyType and :policy_type' if attributes.key?(:'policyType') && attributes.key?(:'policy_type') self.policy_type = attributes[:'policy_type'] if attributes[:'policy_type'] self._return = attributes[:'return'] if attributes[:'return'] raise 'You cannot provide both :return and :_return' if attributes.key?(:'return') && attributes.key?(:'_return') self._return = attributes[:'_return'] if attributes[:'_return'] self. = attributes[:'urn:ietf:params:scim:schemas:oracle:idcs:extension:ociconsolesignonpolicyconsent:Policy'] if attributes[:'urn:ietf:params:scim:schemas:oracle:idcs:extension:ociconsolesignonpolicyconsent:Policy'] raise 'You cannot provide both :urn:ietf:params:scim:schemas:oracle:idcs:extension:ociconsolesignonpolicyconsent:Policy and :urn_ietf_params_scim_schemas_oracle_idcs_extension_ociconsolesignonpolicyconsent_policy' if attributes.key?(:'urn:ietf:params:scim:schemas:oracle:idcs:extension:ociconsolesignonpolicyconsent:Policy') && attributes.key?(:'urn_ietf_params_scim_schemas_oracle_idcs_extension_ociconsolesignonpolicyconsent_policy') self. = attributes[:'urn_ietf_params_scim_schemas_oracle_idcs_extension_ociconsolesignonpolicyconsent_policy'] if attributes[:'urn_ietf_params_scim_schemas_oracle_idcs_extension_ociconsolesignonpolicyconsent_policy'] end |
Instance Attribute Details
#_return ⇒ Array<OCI::IdentityDomains::Models::RuleReturn>
[Required] The return values are the then portion of a Rule
SCIM++ Properties: - idcsCompositeKey: [name] - idcsSearchable: false - multiValued: true - mutability: readWrite - required: true - returned: default - type: complex - uniqueness: none
284 285 286 |
# File 'lib/oci/identity_domains/models/rule.rb', line 284 def _return @_return end |
#active ⇒ BOOLEAN
If true, rule is active
SCIM++ Properties: - idcsSearchable: true - multiValued: false - mutability: readWrite - required: false - returned: default - type: boolean - uniqueness: none
220 221 222 |
# File 'lib/oci/identity_domains/models/rule.rb', line 220 def active @active end |
#compartment_ocid ⇒ String
OCI Compartment Id (ocid) in which the resource lives.
SCIM++ Properties: - caseExact: false - idcsSearchable: false - multiValued: false - mutability: readOnly - required: false - returned: default - type: string - uniqueness: none
152 153 154 |
# File 'lib/oci/identity_domains/models/rule.rb', line 152 def compartment_ocid @compartment_ocid end |
#condition ⇒ String
[Required] SCIM filters
Deprecated Since: 17.3.4
SCIM++ Properties: - caseExact: true - idcsSearchable: false - multiValued: false - mutability: readWrite - required: true - returned: default - type: string - uniqueness: none
263 264 265 |
# File 'lib/oci/identity_domains/models/rule.rb', line 263 def condition @condition end |
#condition_group ⇒ OCI::IdentityDomains::Models::RuleConditionGroup
266 267 268 |
# File 'lib/oci/identity_domains/models/rule.rb', line 266 def condition_group @condition_group end |
#delete_in_progress ⇒ BOOLEAN
A boolean flag indicating this resource in the process of being deleted. Usually set to true when synchronous deletion of the resource would take too long.
SCIM++ Properties: - caseExact: false - idcsSearchable: true - multiValued: false - mutability: readOnly - required: false - returned: default - type: boolean - uniqueness: none
110 111 112 |
# File 'lib/oci/identity_domains/models/rule.rb', line 110 def delete_in_progress @delete_in_progress end |
#description ⇒ String
Rule Description
SCIM++ Properties: - idcsSearchable: false - multiValued: false - mutability: readWrite - required: false - returned: default - type: string - uniqueness: none
207 208 209 |
# File 'lib/oci/identity_domains/models/rule.rb', line 207 def description @description end |
#domain_ocid ⇒ String
OCI Domain Id (ocid) in which the resource lives.
SCIM++ Properties: - caseExact: false - idcsSearchable: false - multiValued: false - mutability: readOnly - required: false - returned: default - type: string - uniqueness: none
138 139 140 |
# File 'lib/oci/identity_domains/models/rule.rb', line 138 def domain_ocid @domain_ocid end |
#external_id ⇒ String
An identifier for the Resource as defined by the Service Consumer. The externalId may simplify identification of the Resource between Service Consumer and Service provider by allowing the Consumer to refer to the Resource with its own identifier, obviating the need to store a local mapping between the local identifier of the Resource and the identifier used by the Service Provider. Each Resource MAY include a non-empty externalId value. The value of the externalId attribute is always issued be the Service Consumer and can never be specified by the Service Provider. The Service Provider MUST always interpret the externalId as scoped to the Service Consumer's tenant.
SCIM++ Properties: - caseExact: false - idcsSearchable: true - multiValued: false - mutability: readWrite - required: false - returned: default - type: string - uniqueness: none
180 181 182 |
# File 'lib/oci/identity_domains/models/rule.rb', line 180 def external_id @external_id end |
#id ⇒ String
Unique identifier for the SCIM Resource as defined by the Service Provider. Each representation of the Resource MUST include a non-empty id value. This identifier MUST be unique across the Service Provider's entire set of Resources. It MUST be a stable, non-reassignable identifier that does not change when the same Resource is returned in subsequent requests. The value of the id attribute is always issued by the Service Provider and MUST never be specified by the Service Consumer. bulkId: is a reserved keyword and MUST NOT be used in the unique identifier.
SCIM++ Properties: - caseExact: false - idcsSearchable: true - multiValued: false - mutability: readOnly - required: false - returned: always - type: string - uniqueness: global
31 32 33 |
# File 'lib/oci/identity_domains/models/rule.rb', line 31 def id @id end |
#idcs_created_by ⇒ OCI::IdentityDomains::Models::IdcsCreatedBy
65 66 67 |
# File 'lib/oci/identity_domains/models/rule.rb', line 65 def idcs_created_by @idcs_created_by end |
#idcs_last_modified_by ⇒ OCI::IdentityDomains::Models::IdcsLastModifiedBy
68 69 70 |
# File 'lib/oci/identity_domains/models/rule.rb', line 68 def idcs_last_modified_by @idcs_last_modified_by end |
#idcs_last_upgraded_in_release ⇒ String
The release number when the resource was upgraded.
SCIM++ Properties: - caseExact: false - idcsSearchable: false - multiValued: false - mutability: readOnly - required: false - returned: request - type: string - uniqueness: none
124 125 126 |
# File 'lib/oci/identity_domains/models/rule.rb', line 124 def idcs_last_upgraded_in_release @idcs_last_upgraded_in_release end |
#idcs_prevented_operations ⇒ Array<String>
Each value of this attribute specifies an operation that only an internal client may perform on this particular resource.
SCIM++ Properties: - idcsSearchable: false - multiValued: true - mutability: readOnly - required: false - returned: request - type: string - uniqueness: none
81 82 83 |
# File 'lib/oci/identity_domains/models/rule.rb', line 81 def idcs_prevented_operations @idcs_prevented_operations end |
#locked ⇒ BOOLEAN
Shows if the rule is locked
SCIM++ Properties: - idcsSearchable: true - multiValued: false - mutability: readWrite - required: false - returned: default - type: boolean - uniqueness: none
233 234 235 |
# File 'lib/oci/identity_domains/models/rule.rb', line 233 def locked @locked end |
#meta ⇒ OCI::IdentityDomains::Models::Meta
62 63 64 |
# File 'lib/oci/identity_domains/models/rule.rb', line 62 def @meta end |
#name ⇒ String
[Required] Rule name
SCIM++ Properties: - caseExact: true - idcsSearchable: true - multiValued: false - mutability: readWrite - required: true - returned: always - type: string - uniqueness: none
194 195 196 |
# File 'lib/oci/identity_domains/models/rule.rb', line 194 def name @name end |
#ocid ⇒ String
Unique OCI identifier for the SCIM Resource.
SCIM++ Properties: - caseExact: true - idcsSearchable: true - multiValued: false - mutability: immutable - required: false - returned: default - type: string - uniqueness: global
45 46 47 |
# File 'lib/oci/identity_domains/models/rule.rb', line 45 def ocid @ocid end |
#policy_type ⇒ OCI::IdentityDomains::Models::RulePolicyType
This attribute is required.
270 271 272 |
# File 'lib/oci/identity_domains/models/rule.rb', line 270 def policy_type @policy_type end |
#rule_groovy ⇒ String
The Groovy script that is run instead of the rule, if policy type allows the rule to be a Groovy script.
SCIM++ Properties: - caseExact: true - idcsSearchable: false - multiValued: false - mutability: readWrite - required: false - returned: default - type: string - uniqueness: none
247 248 249 |
# File 'lib/oci/identity_domains/models/rule.rb', line 247 def rule_groovy @rule_groovy end |
#schemas ⇒ Array<String>
[Required] REQUIRED. The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. This specification defines URIs for User, Group, and a standard \“enterprise\” extension. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior.
SCIM++ Properties: - caseExact: false - idcsSearchable: false - multiValued: true - mutability: readWrite - required: true - returned: default - type: string - uniqueness: none
59 60 61 |
# File 'lib/oci/identity_domains/models/rule.rb', line 59 def schemas @schemas end |
#tags ⇒ Array<OCI::IdentityDomains::Models::Tags>
A list of tags on this resource.
SCIM++ Properties: - idcsCompositeKey: [key, value] - idcsCsvAttributeNameMappings: [[columnHeaderName:Tag Key, mapsTo:tags.key], [columnHeaderName:Tag Value, mapsTo:tags.value]] - idcsSearchable: true - multiValued: true - mutability: readWrite - required: false - returned: request - type: complex - uniqueness: none
96 97 98 |
# File 'lib/oci/identity_domains/models/rule.rb', line 96 def @tags end |
#tenancy_ocid ⇒ String
OCI Tenant Id (ocid) in which the resource lives.
SCIM++ Properties: - caseExact: false - idcsSearchable: false - multiValued: false - mutability: readOnly - required: false - returned: default - type: string - uniqueness: none
166 167 168 |
# File 'lib/oci/identity_domains/models/rule.rb', line 166 def tenancy_ocid @tenancy_ocid end |
#urn_ietf_params_scim_schemas_oracle_idcs_extension_ociconsolesignonpolicyconsent_policy ⇒ OCI::IdentityDomains::Models::RuleExtensionOciconsolesignonpolicyconsentPolicy
287 288 289 |
# File 'lib/oci/identity_domains/models/rule.rb', line 287 def @urn_ietf_params_scim_schemas_oracle_idcs_extension_ociconsolesignonpolicyconsent_policy end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 |
# File 'lib/oci/identity_domains/models/rule.rb', line 290 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'id': :'id', 'ocid': :'ocid', 'schemas': :'schemas', 'meta': :'meta', 'idcs_created_by': :'idcsCreatedBy', 'idcs_last_modified_by': :'idcsLastModifiedBy', 'idcs_prevented_operations': :'idcsPreventedOperations', 'tags': :'tags', 'delete_in_progress': :'deleteInProgress', 'idcs_last_upgraded_in_release': :'idcsLastUpgradedInRelease', 'domain_ocid': :'domainOcid', 'compartment_ocid': :'compartmentOcid', 'tenancy_ocid': :'tenancyOcid', 'external_id': :'externalId', 'name': :'name', 'description': :'description', 'active': :'active', 'locked': :'locked', 'rule_groovy': :'ruleGroovy', 'condition': :'condition', 'condition_group': :'conditionGroup', 'policy_type': :'policyType', '_return': :'return', 'urn_ietf_params_scim_schemas_oracle_idcs_extension_ociconsolesignonpolicyconsent_policy': :'urn:ietf:params:scim:schemas:oracle:idcs:extension:ociconsolesignonpolicyconsent:Policy' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 |
# File 'lib/oci/identity_domains/models/rule.rb', line 322 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'id': :'String', 'ocid': :'String', 'schemas': :'Array<String>', 'meta': :'OCI::IdentityDomains::Models::Meta', 'idcs_created_by': :'OCI::IdentityDomains::Models::IdcsCreatedBy', 'idcs_last_modified_by': :'OCI::IdentityDomains::Models::IdcsLastModifiedBy', 'idcs_prevented_operations': :'Array<String>', 'tags': :'Array<OCI::IdentityDomains::Models::Tags>', 'delete_in_progress': :'BOOLEAN', 'idcs_last_upgraded_in_release': :'String', 'domain_ocid': :'String', 'compartment_ocid': :'String', 'tenancy_ocid': :'String', 'external_id': :'String', 'name': :'String', 'description': :'String', 'active': :'BOOLEAN', 'locked': :'BOOLEAN', 'rule_groovy': :'String', 'condition': :'String', 'condition_group': :'OCI::IdentityDomains::Models::RuleConditionGroup', 'policy_type': :'OCI::IdentityDomains::Models::RulePolicyType', '_return': :'Array<OCI::IdentityDomains::Models::RuleReturn>', 'urn_ietf_params_scim_schemas_oracle_idcs_extension_ociconsolesignonpolicyconsent_policy': :'OCI::IdentityDomains::Models::RuleExtensionOciconsolesignonpolicyconsentPolicy' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 |
# File 'lib/oci/identity_domains/models/rule.rb', line 521 def ==(other) return true if equal?(other) self.class == other.class && id == other.id && ocid == other.ocid && schemas == other.schemas && == other. && idcs_created_by == other.idcs_created_by && idcs_last_modified_by == other.idcs_last_modified_by && idcs_prevented_operations == other.idcs_prevented_operations && == other. && delete_in_progress == other.delete_in_progress && idcs_last_upgraded_in_release == other.idcs_last_upgraded_in_release && domain_ocid == other.domain_ocid && compartment_ocid == other.compartment_ocid && tenancy_ocid == other.tenancy_ocid && external_id == other.external_id && name == other.name && description == other.description && active == other.active && locked == other.locked && rule_groovy == other.rule_groovy && condition == other.condition && condition_group == other.condition_group && policy_type == other.policy_type && _return == other._return && == other. end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 |
# File 'lib/oci/identity_domains/models/rule.rb', line 574 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
554 555 556 |
# File 'lib/oci/identity_domains/models/rule.rb', line 554 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
563 564 565 |
# File 'lib/oci/identity_domains/models/rule.rb', line 563 def hash [id, ocid, schemas, , idcs_created_by, idcs_last_modified_by, idcs_prevented_operations, , delete_in_progress, idcs_last_upgraded_in_release, domain_ocid, compartment_ocid, tenancy_ocid, external_id, name, description, active, locked, rule_groovy, condition, condition_group, policy_type, _return, ].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
607 608 609 610 611 612 613 614 615 616 |
# File 'lib/oci/identity_domains/models/rule.rb', line 607 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
601 602 603 |
# File 'lib/oci/identity_domains/models/rule.rb', line 601 def to_s to_hash.to_s end |