Class: MicrosoftGraph::Models::SharedPCAccountManagerPolicy

Inherits:
Object
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/shared_p_c_account_manager_policy.rb

Overview

SharedPC Account Manager Policy. Only applies when the account manager is enabled.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

Instantiates a new sharedPCAccountManagerPolicy and sets the default values.



78
79
80
# File 'lib/models/shared_p_c_account_manager_policy.rb', line 78

def initialize()
    @additional_data = Hash.new
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 shared_p_c_account_manager_policy

Raises:

  • (StandardError)


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

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

Instance Method Details

#account_deletion_policyObject

Gets the accountDeletionPolicy property value. Possible values for when accounts are deleted on a shared PC.

Returns:

  • a shared_p_c_account_deletion_policy_type



33
34
35
# File 'lib/models/shared_p_c_account_manager_policy.rb', line 33

def 
    return @account_deletion_policy
end

#account_deletion_policy=(value) ⇒ Object

Sets the accountDeletionPolicy property value. Possible values for when accounts are deleted on a shared PC.

Parameters:

  • value

    Value to set for the accountDeletionPolicy property.

Returns:

  • a void



41
42
43
# File 'lib/models/shared_p_c_account_manager_policy.rb', line 41

def (value)
    @account_deletion_policy = value
end

#additional_dataObject

Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.

Returns:

  • a i_dictionary



48
49
50
# File 'lib/models/shared_p_c_account_manager_policy.rb', line 48

def additional_data
    return @additional_data
end

#additional_data=(value) ⇒ Object

Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.

Parameters:

  • value

    Value to set for the additionalData property.

Returns:

  • a void



56
57
58
# File 'lib/models/shared_p_c_account_manager_policy.rb', line 56

def additional_data=(value)
    @additional_data = value
end

#cache_accounts_above_disk_free_percentageObject

Gets the cacheAccountsAboveDiskFreePercentage property value. Sets the percentage of available disk space a PC should have before it stops deleting cached shared PC accounts. Only applies when AccountDeletionPolicy is DiskSpaceThreshold or DiskSpaceThresholdOrInactiveThreshold. Valid values 0 to 100

Returns:

  • a integer



63
64
65
# File 'lib/models/shared_p_c_account_manager_policy.rb', line 63

def cache_accounts_above_disk_free_percentage
    return @cache_accounts_above_disk_free_percentage
end

#cache_accounts_above_disk_free_percentage=(value) ⇒ Object

Sets the cacheAccountsAboveDiskFreePercentage property value. Sets the percentage of available disk space a PC should have before it stops deleting cached shared PC accounts. Only applies when AccountDeletionPolicy is DiskSpaceThreshold or DiskSpaceThresholdOrInactiveThreshold. Valid values 0 to 100

Parameters:

  • value

    Value to set for the cacheAccountsAboveDiskFreePercentage property.

Returns:

  • a void



71
72
73
# File 'lib/models/shared_p_c_account_manager_policy.rb', line 71

def cache_accounts_above_disk_free_percentage=(value)
    @cache_accounts_above_disk_free_percentage = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



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

def get_field_deserializers()
    return {
        "accountDeletionPolicy" => lambda {|n| @account_deletion_policy = n.get_enum_value(MicrosoftGraph::Models::SharedPCAccountDeletionPolicyType) },
        "cacheAccountsAboveDiskFreePercentage" => lambda {|n| @cache_accounts_above_disk_free_percentage = n.get_number_value() },
        "inactiveThresholdDays" => lambda {|n| @inactive_threshold_days = n.get_number_value() },
        "@odata.type" => lambda {|n| @odata_type = n.get_string_value() },
        "removeAccountsBelowDiskFreePercentage" => lambda {|n| @remove_accounts_below_disk_free_percentage = n.get_number_value() },
    }
end

#inactive_threshold_daysObject

Gets the inactiveThresholdDays property value. Specifies when the accounts will start being deleted when they have not been logged on during the specified period, given as number of days. Only applies when AccountDeletionPolicy is DiskSpaceThreshold or DiskSpaceThresholdOrInactiveThreshold.

Returns:

  • a integer



107
108
109
# File 'lib/models/shared_p_c_account_manager_policy.rb', line 107

def inactive_threshold_days
    return @inactive_threshold_days
end

#inactive_threshold_days=(value) ⇒ Object

Sets the inactiveThresholdDays property value. Specifies when the accounts will start being deleted when they have not been logged on during the specified period, given as number of days. Only applies when AccountDeletionPolicy is DiskSpaceThreshold or DiskSpaceThresholdOrInactiveThreshold.

Parameters:

  • value

    Value to set for the inactiveThresholdDays property.

Returns:

  • a void



115
116
117
# File 'lib/models/shared_p_c_account_manager_policy.rb', line 115

def inactive_threshold_days=(value)
    @inactive_threshold_days = value
end

#odata_typeObject

Gets the @odata.type property value. The OdataType property

Returns:

  • a string



122
123
124
# File 'lib/models/shared_p_c_account_manager_policy.rb', line 122

def odata_type
    return @odata_type
end

#odata_type=(value) ⇒ Object

Sets the @odata.type property value. The OdataType property

Parameters:

  • value

    Value to set for the @odata.type property.

Returns:

  • a void



130
131
132
# File 'lib/models/shared_p_c_account_manager_policy.rb', line 130

def odata_type=(value)
    @odata_type = value
end

#remove_accounts_below_disk_free_percentageObject

Gets the removeAccountsBelowDiskFreePercentage property value. Sets the percentage of disk space remaining on a PC before cached accounts will be deleted to free disk space. Accounts that have been inactive the longest will be deleted first. Only applies when AccountDeletionPolicy is DiskSpaceThresholdOrInactiveThreshold. Valid values 0 to 100

Returns:

  • a integer



137
138
139
# File 'lib/models/shared_p_c_account_manager_policy.rb', line 137

def remove_accounts_below_disk_free_percentage
    return @remove_accounts_below_disk_free_percentage
end

#remove_accounts_below_disk_free_percentage=(value) ⇒ Object

Sets the removeAccountsBelowDiskFreePercentage property value. Sets the percentage of disk space remaining on a PC before cached accounts will be deleted to free disk space. Accounts that have been inactive the longest will be deleted first. Only applies when AccountDeletionPolicy is DiskSpaceThresholdOrInactiveThreshold. Valid values 0 to 100

Parameters:

  • value

    Value to set for the removeAccountsBelowDiskFreePercentage property.

Returns:

  • a void



145
146
147
# File 'lib/models/shared_p_c_account_manager_policy.rb', line 145

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


153
154
155
156
157
158
159
160
161
# File 'lib/models/shared_p_c_account_manager_policy.rb', line 153

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_enum_value("accountDeletionPolicy", @account_deletion_policy)
    writer.write_number_value("cacheAccountsAboveDiskFreePercentage", @cache_accounts_above_disk_free_percentage)
    writer.write_number_value("inactiveThresholdDays", @inactive_threshold_days)
    writer.write_string_value("@odata.type", @odata_type)
    writer.write_number_value("removeAccountsBelowDiskFreePercentage", @remove_accounts_below_disk_free_percentage)
    writer.write_additional_data(@additional_data)
end