Class: MicrosoftGraph::Models::EducationAssignmentDefaults

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

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



56
57
58
# File 'lib/models/education_assignment_defaults.rb', line 56

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 education_assignment_defaults

Raises:

  • (StandardError)


64
65
66
67
# File 'lib/models/education_assignment_defaults.rb', line 64

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

Instance Method Details

#add_to_calendar_actionObject

Gets the addToCalendarAction property value. Optional field to control adding assignments to students’ and teachers’ calendars when the assignment is published. The possible values are: none, studentsAndPublisher, studentsAndTeamOwners, unknownFutureValue, and studentsOnly. Note that you must use the Prefer: include-unknown-enum-members request header to get the following value(s) in this evolvable enum: studentsOnly. The default value is none.

Returns:

  • a education_add_to_calendar_options



26
27
28
# File 'lib/models/education_assignment_defaults.rb', line 26

def add_to_calendar_action
    return @add_to_calendar_action
end

#add_to_calendar_action=(value) ⇒ Object

Sets the addToCalendarAction property value. Optional field to control adding assignments to students’ and teachers’ calendars when the assignment is published. The possible values are: none, studentsAndPublisher, studentsAndTeamOwners, unknownFutureValue, and studentsOnly. Note that you must use the Prefer: include-unknown-enum-members request header to get the following value(s) in this evolvable enum: studentsOnly. The default value is none.

Parameters:

  • value

    Value to set for the addToCalendarAction property.

Returns:

  • a void



34
35
36
# File 'lib/models/education_assignment_defaults.rb', line 34

def add_to_calendar_action=(value)
    @add_to_calendar_action = value
end

#added_student_actionObject

Gets the addedStudentAction property value. Class-level default behavior for handling students who are added after the assignment is published. Possible values are: none, assignIfOpen.

Returns:

  • a education_added_student_action



41
42
43
# File 'lib/models/education_assignment_defaults.rb', line 41

def added_student_action
    return @added_student_action
end

#added_student_action=(value) ⇒ Object

Sets the addedStudentAction property value. Class-level default behavior for handling students who are added after the assignment is published. Possible values are: none, assignIfOpen.

Parameters:

  • value

    Value to set for the addedStudentAction property.

Returns:

  • a void



49
50
51
# File 'lib/models/education_assignment_defaults.rb', line 49

def added_student_action=(value)
    @added_student_action = value
end

#due_timeObject

Gets the dueTime property value. Class-level default value for due time field. Default value is 23:59:00.

Returns:

  • a time



72
73
74
# File 'lib/models/education_assignment_defaults.rb', line 72

def due_time
    return @due_time
end

#due_time=(value) ⇒ Object

Sets the dueTime property value. Class-level default value for due time field. Default value is 23:59:00.

Parameters:

  • value

    Value to set for the dueTime property.

Returns:

  • a void



80
81
82
# File 'lib/models/education_assignment_defaults.rb', line 80

def due_time=(value)
    @due_time = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



87
88
89
90
91
92
93
94
# File 'lib/models/education_assignment_defaults.rb', line 87

def get_field_deserializers()
    return super.merge({
        "addToCalendarAction" => lambda {|n| @add_to_calendar_action = n.get_enum_value(MicrosoftGraph::Models::EducationAddToCalendarOptions) },
        "addedStudentAction" => lambda {|n| @added_student_action = n.get_enum_value(MicrosoftGraph::Models::EducationAddedStudentAction) },
        "dueTime" => lambda {|n| @due_time = n.get_time_value() },
        "notificationChannelUrl" => lambda {|n| @notification_channel_url = n.get_string_value() },
    })
end

#notification_channel_urlObject

Gets the notificationChannelUrl property value. Default Teams channel to which notifications will be sent. Default value is null.

Returns:

  • a string



99
100
101
# File 'lib/models/education_assignment_defaults.rb', line 99

def notification_channel_url
    return @notification_channel_url
end

#notification_channel_url=(value) ⇒ Object

Sets the notificationChannelUrl property value. Default Teams channel to which notifications will be sent. Default value is null.

Parameters:

  • value

    Value to set for the notificationChannelUrl property.

Returns:

  • a void



107
108
109
# File 'lib/models/education_assignment_defaults.rb', line 107

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


115
116
117
118
119
120
121
122
# File 'lib/models/education_assignment_defaults.rb', line 115

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_enum_value("addToCalendarAction", @add_to_calendar_action)
    writer.write_enum_value("addedStudentAction", @added_student_action)
    writer.write_time_value("dueTime", @due_time)
    writer.write_string_value("notificationChannelUrl", @notification_channel_url)
end