Class: MicrosoftGraph::Models::GroupLifecyclePolicy

Inherits:
Entity
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/group_lifecycle_policy.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Entity

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

Constructor Details

#initializeObject

Instantiates a new groupLifecyclePolicy and sets the default values.



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

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

Parameters:

  • parse_node

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

Returns:

  • a group_lifecycle_policy

Raises:

  • (StandardError)


45
46
47
48
# File 'lib/models/group_lifecycle_policy.rb', line 45

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

Instance Method Details

#alternate_notification_emailsObject

Gets the alternateNotificationEmails property value. List of email address to send notifications for groups without owners. Multiple email address can be defined by separating email address with a semicolon.

Returns:

  • a string



22
23
24
# File 'lib/models/group_lifecycle_policy.rb', line 22

def alternate_notification_emails
    return @alternate_notification_emails
end

#alternate_notification_emails=(value) ⇒ Object

Sets the alternateNotificationEmails property value. List of email address to send notifications for groups without owners. Multiple email address can be defined by separating email address with a semicolon.

Parameters:

  • value

    Value to set for the alternateNotificationEmails property.

Returns:

  • a void



30
31
32
# File 'lib/models/group_lifecycle_policy.rb', line 30

def alternate_notification_emails=(value)
    @alternate_notification_emails = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



53
54
55
56
57
58
59
# File 'lib/models/group_lifecycle_policy.rb', line 53

def get_field_deserializers()
    return super.merge({
        "alternateNotificationEmails" => lambda {|n| @alternate_notification_emails = n.get_string_value() },
        "groupLifetimeInDays" => lambda {|n| @group_lifetime_in_days = n.get_number_value() },
        "managedGroupTypes" => lambda {|n| @managed_group_types = n.get_string_value() },
    })
end

#group_lifetime_in_daysObject

Gets the groupLifetimeInDays property value. Number of days before a group expires and needs to be renewed. Once renewed, the group expiration is extended by the number of days defined.

Returns:

  • a integer



64
65
66
# File 'lib/models/group_lifecycle_policy.rb', line 64

def group_lifetime_in_days
    return @group_lifetime_in_days
end

#group_lifetime_in_days=(value) ⇒ Object

Sets the groupLifetimeInDays property value. Number of days before a group expires and needs to be renewed. Once renewed, the group expiration is extended by the number of days defined.

Parameters:

  • value

    Value to set for the groupLifetimeInDays property.

Returns:

  • a void



72
73
74
# File 'lib/models/group_lifecycle_policy.rb', line 72

def group_lifetime_in_days=(value)
    @group_lifetime_in_days = value
end

#managed_group_typesObject

Gets the managedGroupTypes property value. The group type for which the expiration policy applies. Possible values are All, Selected or None.

Returns:

  • a string



79
80
81
# File 'lib/models/group_lifecycle_policy.rb', line 79

def managed_group_types
    return @managed_group_types
end

#managed_group_types=(value) ⇒ Object

Sets the managedGroupTypes property value. The group type for which the expiration policy applies. Possible values are All, Selected or None.

Parameters:

  • value

    Value to set for the managedGroupTypes property.

Returns:

  • a void



87
88
89
# File 'lib/models/group_lifecycle_policy.rb', line 87

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


95
96
97
98
99
100
101
# File 'lib/models/group_lifecycle_policy.rb', line 95

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_string_value("alternateNotificationEmails", @alternate_notification_emails)
    writer.write_number_value("groupLifetimeInDays", @group_lifetime_in_days)
    writer.write_string_value("managedGroupTypes", @managed_group_types)
end