Class: MicrosoftGraph::Models::MobileAppAssignment

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

Overview

A class containing the properties used for Group Assignment of a Mobile App.

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 mobileAppAssignment and sets the default values.



24
25
26
# File 'lib/models/mobile_app_assignment.rb', line 24

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 mobile_app_assignment

Raises:

  • (StandardError)


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

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

Instance Method Details

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



40
41
42
43
44
45
46
# File 'lib/models/mobile_app_assignment.rb', line 40

def get_field_deserializers()
    return super.merge({
        "intent" => lambda {|n| @intent = n.get_enum_value(MicrosoftGraph::Models::InstallIntent) },
        "settings" => lambda {|n| @settings = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::MobileAppAssignmentSettings.create_from_discriminator_value(pn) }) },
        "target" => lambda {|n| @target = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::DeviceAndAppManagementAssignmentTarget.create_from_discriminator_value(pn) }) },
    })
end

#intentObject

Gets the intent property value. Possible values for the install intent chosen by the admin.

Returns:

  • a install_intent



51
52
53
# File 'lib/models/mobile_app_assignment.rb', line 51

def intent
    return @intent
end

#intent=(value) ⇒ Object

Sets the intent property value. Possible values for the install intent chosen by the admin.

Parameters:

  • value

    Value to set for the intent property.

Returns:

  • a void



59
60
61
# File 'lib/models/mobile_app_assignment.rb', line 59

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


67
68
69
70
71
72
73
# File 'lib/models/mobile_app_assignment.rb', line 67

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_enum_value("intent", @intent)
    writer.write_object_value("settings", @settings)
    writer.write_object_value("target", @target)
end

#settingsObject

Gets the settings property value. The settings for target assignment defined by the admin.

Returns:

  • a mobile_app_assignment_settings



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

def settings
    return @settings
end

#settings=(value) ⇒ Object

Sets the settings property value. The settings for target assignment defined by the admin.

Parameters:

  • value

    Value to set for the settings property.

Returns:

  • a void



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

def settings=(value)
    @settings = value
end

#targetObject

Gets the target property value. The target group assignment defined by the admin.

Returns:

  • a device_and_app_management_assignment_target



93
94
95
# File 'lib/models/mobile_app_assignment.rb', line 93

def target
    return @target
end

#target=(value) ⇒ Object

Sets the target property value. The target group assignment defined by the admin.

Parameters:

  • value

    Value to set for the target property.

Returns:

  • a void



101
102
103
# File 'lib/models/mobile_app_assignment.rb', line 101

def target=(value)
    @target = value
end