Class: MicrosoftGraph::Models::ManagedEBookAssignment

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

Overview

Contains properties used to assign a eBook to a group.

Direct Known Subclasses

IosVppEBookAssignment

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



21
22
23
# File 'lib/models/managed_e_book_assignment.rb', line 21

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 managed_e_book_assignment

Raises:

  • (StandardError)


29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/models/managed_e_book_assignment.rb', line 29

def self.create_from_discriminator_value(parse_node)
    raise StandardError, 'parse_node cannot be null' if parse_node.nil?
    mapping_value_node = parse_node.get_child_node("@odata.type")
    unless mapping_value_node.nil? then
        mapping_value = mapping_value_node.get_string_value
        case mapping_value
            when "#microsoft.graph.iosVppEBookAssignment"
                return IosVppEBookAssignment.new
        end
    end
    return ManagedEBookAssignment.new
end

Instance Method Details

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



45
46
47
48
49
50
# File 'lib/models/managed_e_book_assignment.rb', line 45

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

#install_intentObject

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

Returns:

  • a install_intent



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

def install_intent
    return @install_intent
end

#install_intent=(value) ⇒ Object

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

Parameters:

  • value

    Value to set for the installIntent property.

Returns:

  • a void



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

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


71
72
73
74
75
76
# File 'lib/models/managed_e_book_assignment.rb', line 71

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

#targetObject

Gets the target property value. The assignment target for eBook.

Returns:

  • a device_and_app_management_assignment_target



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

def target
    return @target
end

#target=(value) ⇒ Object

Sets the target property value. The assignment target for eBook.

Parameters:

  • value

    Value to set for the target property.

Returns:

  • a void



89
90
91
# File 'lib/models/managed_e_book_assignment.rb', line 89

def target=(value)
    @target = value
end