-
Notifications
You must be signed in to change notification settings - Fork 32
/
ios_vpp_e_book.go
345 lines (343 loc) · 10.9 KB
/
ios_vpp_e_book.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
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
package models
import (
i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid"
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
)
// IosVppEBook a class containing the properties for iOS Vpp eBook.
type IosVppEBook struct {
ManagedEBook
}
// NewIosVppEBook instantiates a new IosVppEBook and sets the default values.
func NewIosVppEBook()(*IosVppEBook) {
m := &IosVppEBook{
ManagedEBook: *NewManagedEBook(),
}
odataTypeValue := "#microsoft.graph.iosVppEBook"
m.SetOdataType(&odataTypeValue)
return m
}
// CreateIosVppEBookFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
// returns a Parsable when successful
func CreateIosVppEBookFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
return NewIosVppEBook(), nil
}
// GetAppleId gets the appleId property value. The Apple ID associated with Vpp token.
// returns a *string when successful
func (m *IosVppEBook) GetAppleId()(*string) {
val, err := m.GetBackingStore().Get("appleId")
if err != nil {
panic(err)
}
if val != nil {
return val.(*string)
}
return nil
}
// GetFieldDeserializers the deserialization information for the current model
// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful
func (m *IosVppEBook) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
res := m.ManagedEBook.GetFieldDeserializers()
res["appleId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetAppleId(val)
}
return nil
}
res["genres"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetCollectionOfPrimitiveValues("string")
if err != nil {
return err
}
if val != nil {
res := make([]string, len(val))
for i, v := range val {
if v != nil {
res[i] = *(v.(*string))
}
}
m.SetGenres(res)
}
return nil
}
res["language"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetLanguage(val)
}
return nil
}
res["seller"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetSeller(val)
}
return nil
}
res["totalLicenseCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetInt32Value()
if err != nil {
return err
}
if val != nil {
m.SetTotalLicenseCount(val)
}
return nil
}
res["usedLicenseCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetInt32Value()
if err != nil {
return err
}
if val != nil {
m.SetUsedLicenseCount(val)
}
return nil
}
res["vppOrganizationName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetVppOrganizationName(val)
}
return nil
}
res["vppTokenId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetUUIDValue()
if err != nil {
return err
}
if val != nil {
m.SetVppTokenId(val)
}
return nil
}
return res
}
// GetGenres gets the genres property value. Genres.
// returns a []string when successful
func (m *IosVppEBook) GetGenres()([]string) {
val, err := m.GetBackingStore().Get("genres")
if err != nil {
panic(err)
}
if val != nil {
return val.([]string)
}
return nil
}
// GetLanguage gets the language property value. Language.
// returns a *string when successful
func (m *IosVppEBook) GetLanguage()(*string) {
val, err := m.GetBackingStore().Get("language")
if err != nil {
panic(err)
}
if val != nil {
return val.(*string)
}
return nil
}
// GetSeller gets the seller property value. Seller.
// returns a *string when successful
func (m *IosVppEBook) GetSeller()(*string) {
val, err := m.GetBackingStore().Get("seller")
if err != nil {
panic(err)
}
if val != nil {
return val.(*string)
}
return nil
}
// GetTotalLicenseCount gets the totalLicenseCount property value. Total license count.
// returns a *int32 when successful
func (m *IosVppEBook) GetTotalLicenseCount()(*int32) {
val, err := m.GetBackingStore().Get("totalLicenseCount")
if err != nil {
panic(err)
}
if val != nil {
return val.(*int32)
}
return nil
}
// GetUsedLicenseCount gets the usedLicenseCount property value. Used license count.
// returns a *int32 when successful
func (m *IosVppEBook) GetUsedLicenseCount()(*int32) {
val, err := m.GetBackingStore().Get("usedLicenseCount")
if err != nil {
panic(err)
}
if val != nil {
return val.(*int32)
}
return nil
}
// GetVppOrganizationName gets the vppOrganizationName property value. The Vpp token's organization name.
// returns a *string when successful
func (m *IosVppEBook) GetVppOrganizationName()(*string) {
val, err := m.GetBackingStore().Get("vppOrganizationName")
if err != nil {
panic(err)
}
if val != nil {
return val.(*string)
}
return nil
}
// GetVppTokenId gets the vppTokenId property value. The Vpp token ID.
// returns a *UUID when successful
func (m *IosVppEBook) GetVppTokenId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) {
val, err := m.GetBackingStore().Get("vppTokenId")
if err != nil {
panic(err)
}
if val != nil {
return val.(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)
}
return nil
}
// Serialize serializes information the current object
func (m *IosVppEBook) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) {
err := m.ManagedEBook.Serialize(writer)
if err != nil {
return err
}
{
err = writer.WriteStringValue("appleId", m.GetAppleId())
if err != nil {
return err
}
}
if m.GetGenres() != nil {
err = writer.WriteCollectionOfStringValues("genres", m.GetGenres())
if err != nil {
return err
}
}
{
err = writer.WriteStringValue("language", m.GetLanguage())
if err != nil {
return err
}
}
{
err = writer.WriteStringValue("seller", m.GetSeller())
if err != nil {
return err
}
}
{
err = writer.WriteInt32Value("totalLicenseCount", m.GetTotalLicenseCount())
if err != nil {
return err
}
}
{
err = writer.WriteInt32Value("usedLicenseCount", m.GetUsedLicenseCount())
if err != nil {
return err
}
}
{
err = writer.WriteStringValue("vppOrganizationName", m.GetVppOrganizationName())
if err != nil {
return err
}
}
{
err = writer.WriteUUIDValue("vppTokenId", m.GetVppTokenId())
if err != nil {
return err
}
}
return nil
}
// SetAppleId sets the appleId property value. The Apple ID associated with Vpp token.
func (m *IosVppEBook) SetAppleId(value *string)() {
err := m.GetBackingStore().Set("appleId", value)
if err != nil {
panic(err)
}
}
// SetGenres sets the genres property value. Genres.
func (m *IosVppEBook) SetGenres(value []string)() {
err := m.GetBackingStore().Set("genres", value)
if err != nil {
panic(err)
}
}
// SetLanguage sets the language property value. Language.
func (m *IosVppEBook) SetLanguage(value *string)() {
err := m.GetBackingStore().Set("language", value)
if err != nil {
panic(err)
}
}
// SetSeller sets the seller property value. Seller.
func (m *IosVppEBook) SetSeller(value *string)() {
err := m.GetBackingStore().Set("seller", value)
if err != nil {
panic(err)
}
}
// SetTotalLicenseCount sets the totalLicenseCount property value. Total license count.
func (m *IosVppEBook) SetTotalLicenseCount(value *int32)() {
err := m.GetBackingStore().Set("totalLicenseCount", value)
if err != nil {
panic(err)
}
}
// SetUsedLicenseCount sets the usedLicenseCount property value. Used license count.
func (m *IosVppEBook) SetUsedLicenseCount(value *int32)() {
err := m.GetBackingStore().Set("usedLicenseCount", value)
if err != nil {
panic(err)
}
}
// SetVppOrganizationName sets the vppOrganizationName property value. The Vpp token's organization name.
func (m *IosVppEBook) SetVppOrganizationName(value *string)() {
err := m.GetBackingStore().Set("vppOrganizationName", value)
if err != nil {
panic(err)
}
}
// SetVppTokenId sets the vppTokenId property value. The Vpp token ID.
func (m *IosVppEBook) SetVppTokenId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() {
err := m.GetBackingStore().Set("vppTokenId", value)
if err != nil {
panic(err)
}
}
type IosVppEBookable interface {
ManagedEBookable
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
GetAppleId()(*string)
GetGenres()([]string)
GetLanguage()(*string)
GetSeller()(*string)
GetTotalLicenseCount()(*int32)
GetUsedLicenseCount()(*int32)
GetVppOrganizationName()(*string)
GetVppTokenId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)
SetAppleId(value *string)()
SetGenres(value []string)()
SetLanguage(value *string)()
SetSeller(value *string)()
SetTotalLicenseCount(value *int32)()
SetUsedLicenseCount(value *int32)()
SetVppOrganizationName(value *string)()
SetVppTokenId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)()
}