Class: MicrosoftGraph::Models::DeviceEnrollmentPlatformRestrictionsConfiguration

Inherits:
DeviceEnrollmentConfiguration show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/device_enrollment_platform_restrictions_configuration.rb

Overview

Device Enrollment Configuration that restricts the types of devices a user can enroll

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from DeviceEnrollmentConfiguration

#assignments, #assignments=, #created_date_time, #created_date_time=, #description, #description=, #display_name, #display_name=, #last_modified_date_time, #last_modified_date_time=, #priority, #priority=, #version, #version=

Methods inherited from Entity

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

Constructor Details

#initializeObject

Instantiates a new deviceEnrollmentPlatformRestrictionsConfiguration and sets the default values.



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

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

Raises:

  • (StandardError)


54
55
56
57
# File 'lib/models/device_enrollment_platform_restrictions_configuration.rb', line 54

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

Instance Method Details

#android_restrictionObject

Gets the androidRestriction property value. Android restrictions based on platform, platform operating system version, and device ownership

Returns:

  • a device_enrollment_platform_restriction



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

def android_restriction
    return @android_restriction
end

#android_restriction=(value) ⇒ Object

Sets the androidRestriction property value. Android restrictions based on platform, platform operating system version, and device ownership

Parameters:

  • value

    Value to set for the androidRestriction property.

Returns:

  • a void



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

def android_restriction=(value)
    @android_restriction = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



62
63
64
65
66
67
68
69
70
# File 'lib/models/device_enrollment_platform_restrictions_configuration.rb', line 62

def get_field_deserializers()
    return super.merge({
        "androidRestriction" => lambda {|n| @android_restriction = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::DeviceEnrollmentPlatformRestriction.create_from_discriminator_value(pn) }) },
        "iosRestriction" => lambda {|n| @ios_restriction = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::DeviceEnrollmentPlatformRestriction.create_from_discriminator_value(pn) }) },
        "macOSRestriction" => lambda {|n| @mac_o_s_restriction = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::DeviceEnrollmentPlatformRestriction.create_from_discriminator_value(pn) }) },
        "windowsMobileRestriction" => lambda {|n| @windows_mobile_restriction = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::DeviceEnrollmentPlatformRestriction.create_from_discriminator_value(pn) }) },
        "windowsRestriction" => lambda {|n| @windows_restriction = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::DeviceEnrollmentPlatformRestriction.create_from_discriminator_value(pn) }) },
    })
end

#ios_restrictionObject

Gets the iosRestriction property value. Ios restrictions based on platform, platform operating system version, and device ownership

Returns:

  • a device_enrollment_platform_restriction



75
76
77
# File 'lib/models/device_enrollment_platform_restrictions_configuration.rb', line 75

def ios_restriction
    return @ios_restriction
end

#ios_restriction=(value) ⇒ Object

Sets the iosRestriction property value. Ios restrictions based on platform, platform operating system version, and device ownership

Parameters:

  • value

    Value to set for the iosRestriction property.

Returns:

  • a void



83
84
85
# File 'lib/models/device_enrollment_platform_restrictions_configuration.rb', line 83

def ios_restriction=(value)
    @ios_restriction = value
end

#mac_o_s_restrictionObject

Gets the macOSRestriction property value. Mac restrictions based on platform, platform operating system version, and device ownership

Returns:

  • a device_enrollment_platform_restriction



90
91
92
# File 'lib/models/device_enrollment_platform_restrictions_configuration.rb', line 90

def mac_o_s_restriction
    return @mac_o_s_restriction
end

#mac_o_s_restriction=(value) ⇒ Object

Sets the macOSRestriction property value. Mac restrictions based on platform, platform operating system version, and device ownership

Parameters:

  • value

    Value to set for the macOSRestriction property.

Returns:

  • a void



98
99
100
# File 'lib/models/device_enrollment_platform_restrictions_configuration.rb', line 98

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


106
107
108
109
110
111
112
113
114
# File 'lib/models/device_enrollment_platform_restrictions_configuration.rb', line 106

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_object_value("androidRestriction", @android_restriction)
    writer.write_object_value("iosRestriction", @ios_restriction)
    writer.write_object_value("macOSRestriction", @mac_o_s_restriction)
    writer.write_object_value("windowsMobileRestriction", @windows_mobile_restriction)
    writer.write_object_value("windowsRestriction", @windows_restriction)
end

#windows_mobile_restrictionObject

Gets the windowsMobileRestriction property value. Windows mobile restrictions based on platform, platform operating system version, and device ownership

Returns:

  • a device_enrollment_platform_restriction



119
120
121
# File 'lib/models/device_enrollment_platform_restrictions_configuration.rb', line 119

def windows_mobile_restriction
    return @windows_mobile_restriction
end

#windows_mobile_restriction=(value) ⇒ Object

Sets the windowsMobileRestriction property value. Windows mobile restrictions based on platform, platform operating system version, and device ownership

Parameters:

  • value

    Value to set for the windowsMobileRestriction property.

Returns:

  • a void



127
128
129
# File 'lib/models/device_enrollment_platform_restrictions_configuration.rb', line 127

def windows_mobile_restriction=(value)
    @windows_mobile_restriction = value
end

#windows_restrictionObject

Gets the windowsRestriction property value. Windows restrictions based on platform, platform operating system version, and device ownership

Returns:

  • a device_enrollment_platform_restriction



134
135
136
# File 'lib/models/device_enrollment_platform_restrictions_configuration.rb', line 134

def windows_restriction
    return @windows_restriction
end

#windows_restriction=(value) ⇒ Object

Sets the windowsRestriction property value. Windows restrictions based on platform, platform operating system version, and device ownership

Parameters:

  • value

    Value to set for the windowsRestriction property.

Returns:

  • a void



142
143
144
# File 'lib/models/device_enrollment_platform_restrictions_configuration.rb', line 142

def windows_restriction=(value)
    @windows_restriction = value
end