mirror of
https://github.com/openshift/installer.git
synced 2026-02-05 15:47:14 +01:00
186 lines
8.2 KiB
Go
186 lines
8.2 KiB
Go
package models
|
|
|
|
import (
|
|
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
|
|
)
|
|
|
|
// EducationAssignmentDefaults
|
|
type EducationAssignmentDefaults struct {
|
|
Entity
|
|
}
|
|
// NewEducationAssignmentDefaults instantiates a new educationAssignmentDefaults and sets the default values.
|
|
func NewEducationAssignmentDefaults()(*EducationAssignmentDefaults) {
|
|
m := &EducationAssignmentDefaults{
|
|
Entity: *NewEntity(),
|
|
}
|
|
return m
|
|
}
|
|
// CreateEducationAssignmentDefaultsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
|
|
func CreateEducationAssignmentDefaultsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
|
|
return NewEducationAssignmentDefaults(), nil
|
|
}
|
|
// GetAddedStudentAction 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.
|
|
func (m *EducationAssignmentDefaults) GetAddedStudentAction()(*EducationAddedStudentAction) {
|
|
val, err := m.GetBackingStore().Get("addedStudentAction")
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
if val != nil {
|
|
return val.(*EducationAddedStudentAction)
|
|
}
|
|
return nil
|
|
}
|
|
// GetAddToCalendarAction 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.
|
|
func (m *EducationAssignmentDefaults) GetAddToCalendarAction()(*EducationAddToCalendarOptions) {
|
|
val, err := m.GetBackingStore().Get("addToCalendarAction")
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
if val != nil {
|
|
return val.(*EducationAddToCalendarOptions)
|
|
}
|
|
return nil
|
|
}
|
|
// GetDueTime gets the dueTime property value. Class-level default value for due time field. Default value is 23:59:00.
|
|
func (m *EducationAssignmentDefaults) GetDueTime()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.TimeOnly) {
|
|
val, err := m.GetBackingStore().Get("dueTime")
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
if val != nil {
|
|
return val.(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.TimeOnly)
|
|
}
|
|
return nil
|
|
}
|
|
// GetFieldDeserializers the deserialization information for the current model
|
|
func (m *EducationAssignmentDefaults) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
|
|
res := m.Entity.GetFieldDeserializers()
|
|
res["addedStudentAction"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
|
|
val, err := n.GetEnumValue(ParseEducationAddedStudentAction)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if val != nil {
|
|
m.SetAddedStudentAction(val.(*EducationAddedStudentAction))
|
|
}
|
|
return nil
|
|
}
|
|
res["addToCalendarAction"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
|
|
val, err := n.GetEnumValue(ParseEducationAddToCalendarOptions)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if val != nil {
|
|
m.SetAddToCalendarAction(val.(*EducationAddToCalendarOptions))
|
|
}
|
|
return nil
|
|
}
|
|
res["dueTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
|
|
val, err := n.GetTimeOnlyValue()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if val != nil {
|
|
m.SetDueTime(val)
|
|
}
|
|
return nil
|
|
}
|
|
res["notificationChannelUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
|
|
val, err := n.GetStringValue()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if val != nil {
|
|
m.SetNotificationChannelUrl(val)
|
|
}
|
|
return nil
|
|
}
|
|
return res
|
|
}
|
|
// GetNotificationChannelUrl gets the notificationChannelUrl property value. Default Teams channel to which notifications will be sent. Default value is null.
|
|
func (m *EducationAssignmentDefaults) GetNotificationChannelUrl()(*string) {
|
|
val, err := m.GetBackingStore().Get("notificationChannelUrl")
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
if val != nil {
|
|
return val.(*string)
|
|
}
|
|
return nil
|
|
}
|
|
// Serialize serializes information the current object
|
|
func (m *EducationAssignmentDefaults) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) {
|
|
err := m.Entity.Serialize(writer)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if m.GetAddedStudentAction() != nil {
|
|
cast := (*m.GetAddedStudentAction()).String()
|
|
err = writer.WriteStringValue("addedStudentAction", &cast)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if m.GetAddToCalendarAction() != nil {
|
|
cast := (*m.GetAddToCalendarAction()).String()
|
|
err = writer.WriteStringValue("addToCalendarAction", &cast)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
}
|
|
{
|
|
err = writer.WriteTimeOnlyValue("dueTime", m.GetDueTime())
|
|
if err != nil {
|
|
return err
|
|
}
|
|
}
|
|
{
|
|
err = writer.WriteStringValue("notificationChannelUrl", m.GetNotificationChannelUrl())
|
|
if err != nil {
|
|
return err
|
|
}
|
|
}
|
|
return nil
|
|
}
|
|
// SetAddedStudentAction 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.
|
|
func (m *EducationAssignmentDefaults) SetAddedStudentAction(value *EducationAddedStudentAction)() {
|
|
err := m.GetBackingStore().Set("addedStudentAction", value)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
}
|
|
// SetAddToCalendarAction 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.
|
|
func (m *EducationAssignmentDefaults) SetAddToCalendarAction(value *EducationAddToCalendarOptions)() {
|
|
err := m.GetBackingStore().Set("addToCalendarAction", value)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
}
|
|
// SetDueTime sets the dueTime property value. Class-level default value for due time field. Default value is 23:59:00.
|
|
func (m *EducationAssignmentDefaults) SetDueTime(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.TimeOnly)() {
|
|
err := m.GetBackingStore().Set("dueTime", value)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
}
|
|
// SetNotificationChannelUrl sets the notificationChannelUrl property value. Default Teams channel to which notifications will be sent. Default value is null.
|
|
func (m *EducationAssignmentDefaults) SetNotificationChannelUrl(value *string)() {
|
|
err := m.GetBackingStore().Set("notificationChannelUrl", value)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
}
|
|
// EducationAssignmentDefaultsable
|
|
type EducationAssignmentDefaultsable interface {
|
|
Entityable
|
|
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
|
|
GetAddedStudentAction()(*EducationAddedStudentAction)
|
|
GetAddToCalendarAction()(*EducationAddToCalendarOptions)
|
|
GetDueTime()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.TimeOnly)
|
|
GetNotificationChannelUrl()(*string)
|
|
SetAddedStudentAction(value *EducationAddedStudentAction)()
|
|
SetAddToCalendarAction(value *EducationAddToCalendarOptions)()
|
|
SetDueTime(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.TimeOnly)()
|
|
SetNotificationChannelUrl(value *string)()
|
|
}
|