Class: MicrosoftGraph::Models::DeviceEnrollmentPlatformRestrictionsConfiguration

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

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.



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

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)


52
53
54
55
# File 'lib/models/device_enrollment_platform_restrictions_configuration.rb', line 52

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



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

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 android_restriction property.

Returns:

  • a void



36
37
38
# File 'lib/models/device_enrollment_platform_restrictions_configuration.rb', line 36

def android_restriction=(value)
    @android_restriction = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



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

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



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

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 ios_restriction property.

Returns:

  • a void



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

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



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

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 mac_o_s_restriction property.

Returns:

  • a void



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

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)


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

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



117
118
119
# File 'lib/models/device_enrollment_platform_restrictions_configuration.rb', line 117

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 windows_mobile_restriction property.

Returns:

  • a void



125
126
127
# File 'lib/models/device_enrollment_platform_restrictions_configuration.rb', line 125

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



132
133
134
# File 'lib/models/device_enrollment_platform_restrictions_configuration.rb', line 132

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 windows_restriction property.

Returns:

  • a void



140
141
142
# File 'lib/models/device_enrollment_platform_restrictions_configuration.rb', line 140

def windows_restriction=(value)
    @windows_restriction = value
end