Class: MicrosoftGraph::Models::UnifiedRoleManagementPolicyRule
- Includes:
- MicrosoftKiotaAbstractions::Parsable
- Defined in:
- lib/models/unified_role_management_policy_rule.rb
Direct Known Subclasses
UnifiedRoleManagementPolicyApprovalRule, UnifiedRoleManagementPolicyAuthenticationContextRule, UnifiedRoleManagementPolicyEnablementRule, UnifiedRoleManagementPolicyExpirationRule, UnifiedRoleManagementPolicyNotificationRule
Class Method Summary collapse
-
.create_from_discriminator_value(parse_node) ⇒ Object
Creates a new instance of the appropriate class based on discriminator value.
Instance Method Summary collapse
-
#get_field_deserializers ⇒ Object
The deserialization information for the current model.
-
#initialize ⇒ Object
constructor
Instantiates a new unifiedRoleManagementPolicyRule and sets the default values.
-
#serialize(writer) ⇒ Object
Serializes information the current object.
-
#target ⇒ Object
Gets the target property value.
-
#target=(value) ⇒ Object
Sets the target property value.
Methods inherited from Entity
#additional_data, #additional_data=, #id, #id=, #odata_type, #odata_type=
Constructor Details
#initialize ⇒ Object
Instantiates a new unifiedRoleManagementPolicyRule and sets the default values.
16 17 18 |
# File 'lib/models/unified_role_management_policy_rule.rb', line 16 def initialize() super end |
Class Method Details
.create_from_discriminator_value(parse_node) ⇒ Object
Creates a new instance of the appropriate class based on discriminator value
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/models/unified_role_management_policy_rule.rb', line 24 def self.create_from_discriminator_value(parse_node) raise StandardError, 'parse_node cannot be null' if parse_node.nil? mapping_value_node = parse_node.get_child_node("@odata.type") unless mapping_value_node.nil? then mapping_value = mapping_value_node.get_string_value case mapping_value when "#microsoft.graph.unifiedRoleManagementPolicyApprovalRule" return UnifiedRoleManagementPolicyApprovalRule.new when "#microsoft.graph.unifiedRoleManagementPolicyAuthenticationContextRule" return UnifiedRoleManagementPolicyAuthenticationContextRule.new when "#microsoft.graph.unifiedRoleManagementPolicyEnablementRule" return UnifiedRoleManagementPolicyEnablementRule.new when "#microsoft.graph.unifiedRoleManagementPolicyExpirationRule" return UnifiedRoleManagementPolicyExpirationRule.new when "#microsoft.graph.unifiedRoleManagementPolicyNotificationRule" return UnifiedRoleManagementPolicyNotificationRule.new end end return UnifiedRoleManagementPolicyRule.new end |
Instance Method Details
#get_field_deserializers ⇒ Object
The deserialization information for the current model
48 49 50 51 52 |
# File 'lib/models/unified_role_management_policy_rule.rb', line 48 def get_field_deserializers() return super.merge({ "target" => lambda {|n| @target = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::UnifiedRoleManagementPolicyRuleTarget.create_from_discriminator_value(pn) }) }, }) end |
#serialize(writer) ⇒ Object
Serializes information the current object
58 59 60 61 62 |
# File 'lib/models/unified_role_management_policy_rule.rb', line 58 def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? super writer.write_object_value("target", @target) end |
#target ⇒ Object
Gets the target property value. Defines details of scope that’s targeted by role management policy rule. The details can include the principal type, the role assignment type, and actions affecting a role. Supports $filter (eq, ne).
67 68 69 |
# File 'lib/models/unified_role_management_policy_rule.rb', line 67 def target return @target end |
#target=(value) ⇒ Object
Sets the target property value. Defines details of scope that’s targeted by role management policy rule. The details can include the principal type, the role assignment type, and actions affecting a role. Supports $filter (eq, ne).
75 76 77 |
# File 'lib/models/unified_role_management_policy_rule.rb', line 75 def target=(value) @target = value end |