-
Notifications
You must be signed in to change notification settings - Fork 0
/
workbook_chart_series.go
135 lines (133 loc) · 5.24 KB
/
workbook_chart_series.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
package models
import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
)
// WorkbookChartSeries
type WorkbookChartSeries struct {
Entity
// Represents the formatting of a chart series, which includes fill and line formatting. Read-only.
format WorkbookChartSeriesFormatable
// Represents the name of a series in a chart.
name *string
// Represents a collection of all points in the series. Read-only.
points []WorkbookChartPointable
}
// NewWorkbookChartSeries instantiates a new workbookChartSeries and sets the default values.
func NewWorkbookChartSeries()(*WorkbookChartSeries) {
m := &WorkbookChartSeries{
Entity: *NewEntity(),
}
return m
}
// CreateWorkbookChartSeriesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
func CreateWorkbookChartSeriesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
return NewWorkbookChartSeries(), nil
}
// GetFieldDeserializers the deserialization information for the current model
func (m *WorkbookChartSeries) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
res := m.Entity.GetFieldDeserializers()
res["format"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetObjectValue(CreateWorkbookChartSeriesFormatFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
m.SetFormat(val.(WorkbookChartSeriesFormatable))
}
return nil
}
res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetName(val)
}
return nil
}
res["points"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetCollectionOfObjectValues(CreateWorkbookChartPointFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
res := make([]WorkbookChartPointable, len(val))
for i, v := range val {
if v != nil {
res[i] = v.(WorkbookChartPointable)
}
}
m.SetPoints(res)
}
return nil
}
return res
}
// GetFormat gets the format property value. Represents the formatting of a chart series, which includes fill and line formatting. Read-only.
func (m *WorkbookChartSeries) GetFormat()(WorkbookChartSeriesFormatable) {
return m.format
}
// GetName gets the name property value. Represents the name of a series in a chart.
func (m *WorkbookChartSeries) GetName()(*string) {
return m.name
}
// GetPoints gets the points property value. Represents a collection of all points in the series. Read-only.
func (m *WorkbookChartSeries) GetPoints()([]WorkbookChartPointable) {
return m.points
}
// Serialize serializes information the current object
func (m *WorkbookChartSeries) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) {
err := m.Entity.Serialize(writer)
if err != nil {
return err
}
{
err = writer.WriteObjectValue("format", m.GetFormat())
if err != nil {
return err
}
}
{
err = writer.WriteStringValue("name", m.GetName())
if err != nil {
return err
}
}
if m.GetPoints() != nil {
cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPoints()))
for i, v := range m.GetPoints() {
if v != nil {
cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable)
}
}
err = writer.WriteCollectionOfObjectValues("points", cast)
if err != nil {
return err
}
}
return nil
}
// SetFormat sets the format property value. Represents the formatting of a chart series, which includes fill and line formatting. Read-only.
func (m *WorkbookChartSeries) SetFormat(value WorkbookChartSeriesFormatable)() {
m.format = value
}
// SetName sets the name property value. Represents the name of a series in a chart.
func (m *WorkbookChartSeries) SetName(value *string)() {
m.name = value
}
// SetPoints sets the points property value. Represents a collection of all points in the series. Read-only.
func (m *WorkbookChartSeries) SetPoints(value []WorkbookChartPointable)() {
m.points = value
}
// WorkbookChartSeriesable
type WorkbookChartSeriesable interface {
Entityable
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
GetFormat()(WorkbookChartSeriesFormatable)
GetName()(*string)
GetPoints()([]WorkbookChartPointable)
SetFormat(value WorkbookChartSeriesFormatable)()
SetName(value *string)()
SetPoints(value []WorkbookChartPointable)()
}