-
Notifications
You must be signed in to change notification settings - Fork 0
/
workbook_named_item.go
235 lines (233 loc) · 8.71 KB
/
workbook_named_item.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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
package models
import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
)
// WorkbookNamedItem
type WorkbookNamedItem struct {
Entity
// Represents the comment associated with this name.
comment *string
// The name of the object. Read-only.
name *string
// Indicates whether the name is scoped to the workbook or to a specific worksheet. Read-only.
scope *string
// Indicates what type of reference is associated with the name. The possible values are: String, Integer, Double, Boolean, Range. Read-only.
typeEscaped *string
// Represents the formula that the name is defined to refer to. for example, =Sheet14!$B$2:$H$12, =4.75, etc. Read-only.
value Jsonable
// Specifies whether the object is visible or not.
visible *bool
// Returns the worksheet on which the named item is scoped to. Available only if the item is scoped to the worksheet. Read-only.
worksheet WorkbookWorksheetable
}
// NewWorkbookNamedItem instantiates a new workbookNamedItem and sets the default values.
func NewWorkbookNamedItem()(*WorkbookNamedItem) {
m := &WorkbookNamedItem{
Entity: *NewEntity(),
}
return m
}
// CreateWorkbookNamedItemFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
func CreateWorkbookNamedItemFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
return NewWorkbookNamedItem(), nil
}
// GetComment gets the comment property value. Represents the comment associated with this name.
func (m *WorkbookNamedItem) GetComment()(*string) {
return m.comment
}
// GetFieldDeserializers the deserialization information for the current model
func (m *WorkbookNamedItem) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
res := m.Entity.GetFieldDeserializers()
res["comment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetComment(val)
}
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["scope"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetScope(val)
}
return nil
}
res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetTypeEscaped(val)
}
return nil
}
res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetObjectValue(CreateJsonFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
m.SetValue(val.(Jsonable))
}
return nil
}
res["visible"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetBoolValue()
if err != nil {
return err
}
if val != nil {
m.SetVisible(val)
}
return nil
}
res["worksheet"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetObjectValue(CreateWorkbookWorksheetFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
m.SetWorksheet(val.(WorkbookWorksheetable))
}
return nil
}
return res
}
// GetName gets the name property value. The name of the object. Read-only.
func (m *WorkbookNamedItem) GetName()(*string) {
return m.name
}
// GetScope gets the scope property value. Indicates whether the name is scoped to the workbook or to a specific worksheet. Read-only.
func (m *WorkbookNamedItem) GetScope()(*string) {
return m.scope
}
// GetTypeEscaped gets the type property value. Indicates what type of reference is associated with the name. The possible values are: String, Integer, Double, Boolean, Range. Read-only.
func (m *WorkbookNamedItem) GetTypeEscaped()(*string) {
return m.typeEscaped
}
// GetValue gets the value property value. Represents the formula that the name is defined to refer to. for example, =Sheet14!$B$2:$H$12, =4.75, etc. Read-only.
func (m *WorkbookNamedItem) GetValue()(Jsonable) {
return m.value
}
// GetVisible gets the visible property value. Specifies whether the object is visible or not.
func (m *WorkbookNamedItem) GetVisible()(*bool) {
return m.visible
}
// GetWorksheet gets the worksheet property value. Returns the worksheet on which the named item is scoped to. Available only if the item is scoped to the worksheet. Read-only.
func (m *WorkbookNamedItem) GetWorksheet()(WorkbookWorksheetable) {
return m.worksheet
}
// Serialize serializes information the current object
func (m *WorkbookNamedItem) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) {
err := m.Entity.Serialize(writer)
if err != nil {
return err
}
{
err = writer.WriteStringValue("comment", m.GetComment())
if err != nil {
return err
}
}
{
err = writer.WriteStringValue("name", m.GetName())
if err != nil {
return err
}
}
{
err = writer.WriteStringValue("scope", m.GetScope())
if err != nil {
return err
}
}
{
err = writer.WriteStringValue("type", m.GetTypeEscaped())
if err != nil {
return err
}
}
{
err = writer.WriteObjectValue("value", m.GetValue())
if err != nil {
return err
}
}
{
err = writer.WriteBoolValue("visible", m.GetVisible())
if err != nil {
return err
}
}
{
err = writer.WriteObjectValue("worksheet", m.GetWorksheet())
if err != nil {
return err
}
}
return nil
}
// SetComment sets the comment property value. Represents the comment associated with this name.
func (m *WorkbookNamedItem) SetComment(value *string)() {
m.comment = value
}
// SetName sets the name property value. The name of the object. Read-only.
func (m *WorkbookNamedItem) SetName(value *string)() {
m.name = value
}
// SetScope sets the scope property value. Indicates whether the name is scoped to the workbook or to a specific worksheet. Read-only.
func (m *WorkbookNamedItem) SetScope(value *string)() {
m.scope = value
}
// SetTypeEscaped sets the type property value. Indicates what type of reference is associated with the name. The possible values are: String, Integer, Double, Boolean, Range. Read-only.
func (m *WorkbookNamedItem) SetTypeEscaped(value *string)() {
m.typeEscaped = value
}
// SetValue sets the value property value. Represents the formula that the name is defined to refer to. for example, =Sheet14!$B$2:$H$12, =4.75, etc. Read-only.
func (m *WorkbookNamedItem) SetValue(value Jsonable)() {
m.value = value
}
// SetVisible sets the visible property value. Specifies whether the object is visible or not.
func (m *WorkbookNamedItem) SetVisible(value *bool)() {
m.visible = value
}
// SetWorksheet sets the worksheet property value. Returns the worksheet on which the named item is scoped to. Available only if the item is scoped to the worksheet. Read-only.
func (m *WorkbookNamedItem) SetWorksheet(value WorkbookWorksheetable)() {
m.worksheet = value
}
// WorkbookNamedItemable
type WorkbookNamedItemable interface {
Entityable
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
GetComment()(*string)
GetName()(*string)
GetScope()(*string)
GetTypeEscaped()(*string)
GetValue()(Jsonable)
GetVisible()(*bool)
GetWorksheet()(WorkbookWorksheetable)
SetComment(value *string)()
SetName(value *string)()
SetScope(value *string)()
SetTypeEscaped(value *string)()
SetValue(value Jsonable)()
SetVisible(value *bool)()
SetWorksheet(value WorkbookWorksheetable)()
}