-
Notifications
You must be signed in to change notification settings - Fork 0
/
inference_classification.go
79 lines (77 loc) · 3.62 KB
/
inference_classification.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
package models
import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
)
// InferenceClassification
type InferenceClassification struct {
Entity
// A set of overrides for a user to always classify messages from specific senders in certain ways: focused, or other. Read-only. Nullable.
overrides []InferenceClassificationOverrideable
}
// NewInferenceClassification instantiates a new inferenceClassification and sets the default values.
func NewInferenceClassification()(*InferenceClassification) {
m := &InferenceClassification{
Entity: *NewEntity(),
}
return m
}
// CreateInferenceClassificationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
func CreateInferenceClassificationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
return NewInferenceClassification(), nil
}
// GetFieldDeserializers the deserialization information for the current model
func (m *InferenceClassification) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
res := m.Entity.GetFieldDeserializers()
res["overrides"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetCollectionOfObjectValues(CreateInferenceClassificationOverrideFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
res := make([]InferenceClassificationOverrideable, len(val))
for i, v := range val {
if v != nil {
res[i] = v.(InferenceClassificationOverrideable)
}
}
m.SetOverrides(res)
}
return nil
}
return res
}
// GetOverrides gets the overrides property value. A set of overrides for a user to always classify messages from specific senders in certain ways: focused, or other. Read-only. Nullable.
func (m *InferenceClassification) GetOverrides()([]InferenceClassificationOverrideable) {
return m.overrides
}
// Serialize serializes information the current object
func (m *InferenceClassification) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) {
err := m.Entity.Serialize(writer)
if err != nil {
return err
}
if m.GetOverrides() != nil {
cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetOverrides()))
for i, v := range m.GetOverrides() {
if v != nil {
cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable)
}
}
err = writer.WriteCollectionOfObjectValues("overrides", cast)
if err != nil {
return err
}
}
return nil
}
// SetOverrides sets the overrides property value. A set of overrides for a user to always classify messages from specific senders in certain ways: focused, or other. Read-only. Nullable.
func (m *InferenceClassification) SetOverrides(value []InferenceClassificationOverrideable)() {
m.overrides = value
}
// InferenceClassificationable
type InferenceClassificationable interface {
Entityable
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
GetOverrides()([]InferenceClassificationOverrideable)
SetOverrides(value []InferenceClassificationOverrideable)()
}