Class: MicrosoftGraph::Models::UnifiedRoleManagementPolicyNotificationRule

Inherits:
UnifiedRoleManagementPolicyRule show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/unified_role_management_policy_notification_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 unifiedRoleManagementPolicyNotificationRule and sets the default values.



28
29
30
31
# File 'lib/models/unified_role_management_policy_notification_rule.rb', line 28

def initialize()
    super
    @odata_type = "#microsoft.graph.unifiedRoleManagementPolicyNotificationRule"
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_notification_rule

Raises:

  • (StandardError)


37
38
39
40
# File 'lib/models/unified_role_management_policy_notification_rule.rb', line 37

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

Instance Method Details

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



45
46
47
48
49
50
51
52
53
# File 'lib/models/unified_role_management_policy_notification_rule.rb', line 45

def get_field_deserializers()
    return super.merge({
        "isDefaultRecipientsEnabled" => lambda {|n| @is_default_recipients_enabled = n.get_boolean_value() },
        "notificationLevel" => lambda {|n| @notification_level = n.get_string_value() },
        "notificationRecipients" => lambda {|n| @notification_recipients = n.get_collection_of_primitive_values(String) },
        "notificationType" => lambda {|n| @notification_type = n.get_string_value() },
        "recipientType" => lambda {|n| @recipient_type = n.get_string_value() },
    })
end

#is_default_recipients_enabledObject

Gets the isDefaultRecipientsEnabled property value. Indicates whether a default recipient will receive the notification email.

Returns:

  • a boolean



58
59
60
# File 'lib/models/unified_role_management_policy_notification_rule.rb', line 58

def is_default_recipients_enabled
    return @is_default_recipients_enabled
end

#is_default_recipients_enabled=(value) ⇒ Object

Sets the isDefaultRecipientsEnabled property value. Indicates whether a default recipient will receive the notification email.

Parameters:

  • value

    Value to set for the isDefaultRecipientsEnabled property.

Returns:

  • a void



66
67
68
# File 'lib/models/unified_role_management_policy_notification_rule.rb', line 66

def is_default_recipients_enabled=(value)
    @is_default_recipients_enabled = value
end

#notification_levelObject

Gets the notificationLevel property value. The level of notification. The possible values are None, Critical, All.

Returns:

  • a string



73
74
75
# File 'lib/models/unified_role_management_policy_notification_rule.rb', line 73

def notification_level
    return @notification_level
end

#notification_level=(value) ⇒ Object

Sets the notificationLevel property value. The level of notification. The possible values are None, Critical, All.

Parameters:

  • value

    Value to set for the notificationLevel property.

Returns:

  • a void



81
82
83
# File 'lib/models/unified_role_management_policy_notification_rule.rb', line 81

def notification_level=(value)
    @notification_level = value
end

#notification_recipientsObject

Gets the notificationRecipients property value. The list of recipients of the email notifications.

Returns:

  • a string



88
89
90
# File 'lib/models/unified_role_management_policy_notification_rule.rb', line 88

def notification_recipients
    return @notification_recipients
end

#notification_recipients=(value) ⇒ Object

Sets the notificationRecipients property value. The list of recipients of the email notifications.

Parameters:

  • value

    Value to set for the notificationRecipients property.

Returns:

  • a void



96
97
98
# File 'lib/models/unified_role_management_policy_notification_rule.rb', line 96

def notification_recipients=(value)
    @notification_recipients = value
end

#notification_typeObject

Gets the notificationType property value. The type of notification. Only Email is supported.

Returns:

  • a string



103
104
105
# File 'lib/models/unified_role_management_policy_notification_rule.rb', line 103

def notification_type
    return @notification_type
end

#notification_type=(value) ⇒ Object

Sets the notificationType property value. The type of notification. Only Email is supported.

Parameters:

  • value

    Value to set for the notificationType property.

Returns:

  • a void



111
112
113
# File 'lib/models/unified_role_management_policy_notification_rule.rb', line 111

def notification_type=(value)
    @notification_type = value
end

#recipient_typeObject

Gets the recipientType property value. The type of recipient of the notification. The possible values are Requestor, Approver, Admin.

Returns:

  • a string



118
119
120
# File 'lib/models/unified_role_management_policy_notification_rule.rb', line 118

def recipient_type
    return @recipient_type
end

#recipient_type=(value) ⇒ Object

Sets the recipientType property value. The type of recipient of the notification. The possible values are Requestor, Approver, Admin.

Parameters:

  • value

    Value to set for the recipientType property.

Returns:

  • a void



126
127
128
# File 'lib/models/unified_role_management_policy_notification_rule.rb', line 126

def recipient_type=(value)
    @recipient_type = 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)


134
135
136
137
138
139
140
141
142
# File 'lib/models/unified_role_management_policy_notification_rule.rb', line 134

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_boolean_value("isDefaultRecipientsEnabled", @is_default_recipients_enabled)
    writer.write_string_value("notificationLevel", @notification_level)
    writer.write_collection_of_primitive_values("notificationRecipients", @notification_recipients)
    writer.write_string_value("notificationType", @notification_type)
    writer.write_string_value("recipientType", @recipient_type)
end