Class: MicrosoftGraph::Models::UnifiedRoleManagementPolicyAuthenticationContextRule

Inherits:
UnifiedRoleManagementPolicyRule show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/unified_role_management_policy_authentication_context_rule.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from UnifiedRoleManagementPolicyRule

#target, #target=

Methods inherited from Entity

#additional_data, #additional_data=, #id, #id=, #odata_type, #odata_type=

Constructor Details

#initializeObject

Instantiates a new unifiedRoleManagementPolicyAuthenticationContextRule and sets the default values.



34
35
36
37
# File 'lib/models/unified_role_management_policy_authentication_context_rule.rb', line 34

def initialize()
    super
    @odata_type = "#microsoft.graph.unifiedRoleManagementPolicyAuthenticationContextRule"
end

Class Method Details

.create_from_discriminator_value(parse_node) ⇒ Object

Creates a new instance of the appropriate class based on discriminator value

Parameters:

  • parse_node

    The parse node to use to read the discriminator value and create the object

Returns:

  • a unified_role_management_policy_authentication_context_rule

Raises:

  • (StandardError)


43
44
45
46
# File 'lib/models/unified_role_management_policy_authentication_context_rule.rb', line 43

def self.create_from_discriminator_value(parse_node)
    raise StandardError, 'parse_node cannot be null' if parse_node.nil?
    return UnifiedRoleManagementPolicyAuthenticationContextRule.new
end

Instance Method Details

#claim_valueObject

Gets the claimValue property value. The value of the authentication context claim.

Returns:

  • a string



19
20
21
# File 'lib/models/unified_role_management_policy_authentication_context_rule.rb', line 19

def claim_value
    return @claim_value
end

#claim_value=(value) ⇒ Object

Sets the claimValue property value. The value of the authentication context claim.

Parameters:

  • value

    Value to set for the claimValue property.

Returns:

  • a void



27
28
29
# File 'lib/models/unified_role_management_policy_authentication_context_rule.rb', line 27

def claim_value=(value)
    @claim_value = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



51
52
53
54
55
56
# File 'lib/models/unified_role_management_policy_authentication_context_rule.rb', line 51

def get_field_deserializers()
    return super.merge({
        "claimValue" => lambda {|n| @claim_value = n.get_string_value() },
        "isEnabled" => lambda {|n| @is_enabled = n.get_boolean_value() },
    })
end

#is_enabledObject

Gets the isEnabled property value. Whether this rule is enabled.

Returns:

  • a boolean



61
62
63
# File 'lib/models/unified_role_management_policy_authentication_context_rule.rb', line 61

def is_enabled
    return @is_enabled
end

#is_enabled=(value) ⇒ Object

Sets the isEnabled property value. Whether this rule is enabled.

Parameters:

  • value

    Value to set for the isEnabled property.

Returns:

  • a void



69
70
71
# File 'lib/models/unified_role_management_policy_authentication_context_rule.rb', line 69

def is_enabled=(value)
    @is_enabled = value
end

#serialize(writer) ⇒ Object

Serializes information the current object

Parameters:

  • writer

    Serialization writer to use to serialize this model

Returns:

  • a void

Raises:

  • (StandardError)


77
78
79
80
81
82
# File 'lib/models/unified_role_management_policy_authentication_context_rule.rb', line 77

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_string_value("claimValue", @claim_value)
    writer.write_boolean_value("isEnabled", @is_enabled)
end