Class: MicrosoftGraph::Models::LearningAssignment

Inherits:
LearningCourseActivity show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/learning_assignment.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from LearningCourseActivity

#completed_date_time, #completed_date_time=, #completion_percentage, #completion_percentage=, #externalcourse_activity_id, #externalcourse_activity_id=, #learner_user_id, #learner_user_id=, #learning_content_id, #learning_content_id=, #learning_provider_id, #learning_provider_id=, #status, #status=

Methods inherited from Entity

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

Constructor Details

#initializeObject

Instantiates a new learningAssignment and sets the default values.



74
75
76
# File 'lib/models/learning_assignment.rb', line 74

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 learning_assignment

Raises:

  • (StandardError)


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

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

Instance Method Details

#assigned_date_timeObject

Gets the assignedDateTime property value. Assigned date for the course activity. Optional.

Returns:

  • a date_time



29
30
31
# File 'lib/models/learning_assignment.rb', line 29

def assigned_date_time
    return @assigned_date_time
end

#assigned_date_time=(value) ⇒ Object

Sets the assignedDateTime property value. Assigned date for the course activity. Optional.

Parameters:

  • value

    Value to set for the assignedDateTime property.

Returns:

  • a void



37
38
39
# File 'lib/models/learning_assignment.rb', line 37

def assigned_date_time=(value)
    @assigned_date_time = value
end

#assigner_user_idObject

Gets the assignerUserId property value. The user ID of the assigner. Optional.

Returns:

  • a string



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

def assigner_user_id
    return @assigner_user_id
end

#assigner_user_id=(value) ⇒ Object

Sets the assignerUserId property value. The user ID of the assigner. Optional.

Parameters:

  • value

    Value to set for the assignerUserId property.

Returns:

  • a void



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

def assigner_user_id=(value)
    @assigner_user_id = value
end

#assignment_typeObject

Gets the assignmentType property value. The assignmentType property

Returns:

  • a assignment_type



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

def assignment_type
    return @assignment_type
end

#assignment_type=(value) ⇒ Object

Sets the assignmentType property value. The assignmentType property

Parameters:

  • value

    Value to set for the assignmentType property.

Returns:

  • a void



67
68
69
# File 'lib/models/learning_assignment.rb', line 67

def assignment_type=(value)
    @assignment_type = value
end

#due_date_timeObject

Gets the dueDateTime property value. Due date for the course activity. Optional.

Returns:

  • a date_time_time_zone



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

def due_date_time
    return @due_date_time
end

#due_date_time=(value) ⇒ Object

Sets the dueDateTime property value. Due date for the course activity. Optional.

Parameters:

  • value

    Value to set for the dueDateTime property.

Returns:

  • a void



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

def due_date_time=(value)
    @due_date_time = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



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

def get_field_deserializers()
    return super.merge({
        "assignedDateTime" => lambda {|n| @assigned_date_time = n.get_date_time_value() },
        "assignerUserId" => lambda {|n| @assigner_user_id = n.get_string_value() },
        "assignmentType" => lambda {|n| @assignment_type = n.get_enum_value(MicrosoftGraph::Models::AssignmentType) },
        "dueDateTime" => lambda {|n| @due_date_time = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::DateTimeTimeZone.create_from_discriminator_value(pn) }) },
        "notes" => lambda {|n| @notes = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::ItemBody.create_from_discriminator_value(pn) }) },
    })
end

#notesObject

Gets the notes property value. Notes for the course activity. Optional.

Returns:

  • a item_body



118
119
120
# File 'lib/models/learning_assignment.rb', line 118

def notes
    return @notes
end

#notes=(value) ⇒ Object

Sets the notes property value. Notes for the course activity. Optional.

Parameters:

  • value

    Value to set for the notes property.

Returns:

  • a void



126
127
128
# File 'lib/models/learning_assignment.rb', line 126

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


134
135
136
137
138
139
140
141
142
# File 'lib/models/learning_assignment.rb', line 134

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_date_time_value("assignedDateTime", @assigned_date_time)
    writer.write_string_value("assignerUserId", @assigner_user_id)
    writer.write_enum_value("assignmentType", @assignment_type)
    writer.write_object_value("dueDateTime", @due_date_time)
    writer.write_object_value("notes", @notes)
end