-
Notifications
You must be signed in to change notification settings - Fork 32
/
windows81_compliance_policy.go
450 lines (448 loc) · 16.5 KB
/
windows81_compliance_policy.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
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
package models
import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
)
// Windows81CompliancePolicy this class contains compliance settings for Windows 8.1.
type Windows81CompliancePolicy struct {
DeviceCompliancePolicy
}
// NewWindows81CompliancePolicy instantiates a new Windows81CompliancePolicy and sets the default values.
func NewWindows81CompliancePolicy()(*Windows81CompliancePolicy) {
m := &Windows81CompliancePolicy{
DeviceCompliancePolicy: *NewDeviceCompliancePolicy(),
}
odataTypeValue := "#microsoft.graph.windows81CompliancePolicy"
m.SetOdataType(&odataTypeValue)
return m
}
// CreateWindows81CompliancePolicyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
// returns a Parsable when successful
func CreateWindows81CompliancePolicyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
return NewWindows81CompliancePolicy(), nil
}
// GetFieldDeserializers the deserialization information for the current model
// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful
func (m *Windows81CompliancePolicy) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
res := m.DeviceCompliancePolicy.GetFieldDeserializers()
res["osMaximumVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetOsMaximumVersion(val)
}
return nil
}
res["osMinimumVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetOsMinimumVersion(val)
}
return nil
}
res["passwordBlockSimple"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetBoolValue()
if err != nil {
return err
}
if val != nil {
m.SetPasswordBlockSimple(val)
}
return nil
}
res["passwordExpirationDays"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetInt32Value()
if err != nil {
return err
}
if val != nil {
m.SetPasswordExpirationDays(val)
}
return nil
}
res["passwordMinimumCharacterSetCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetInt32Value()
if err != nil {
return err
}
if val != nil {
m.SetPasswordMinimumCharacterSetCount(val)
}
return nil
}
res["passwordMinimumLength"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetInt32Value()
if err != nil {
return err
}
if val != nil {
m.SetPasswordMinimumLength(val)
}
return nil
}
res["passwordMinutesOfInactivityBeforeLock"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetInt32Value()
if err != nil {
return err
}
if val != nil {
m.SetPasswordMinutesOfInactivityBeforeLock(val)
}
return nil
}
res["passwordPreviousPasswordBlockCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetInt32Value()
if err != nil {
return err
}
if val != nil {
m.SetPasswordPreviousPasswordBlockCount(val)
}
return nil
}
res["passwordRequired"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetBoolValue()
if err != nil {
return err
}
if val != nil {
m.SetPasswordRequired(val)
}
return nil
}
res["passwordRequiredType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetEnumValue(ParseRequiredPasswordType)
if err != nil {
return err
}
if val != nil {
m.SetPasswordRequiredType(val.(*RequiredPasswordType))
}
return nil
}
res["storageRequireEncryption"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetBoolValue()
if err != nil {
return err
}
if val != nil {
m.SetStorageRequireEncryption(val)
}
return nil
}
return res
}
// GetOsMaximumVersion gets the osMaximumVersion property value. Maximum Windows 8.1 version.
// returns a *string when successful
func (m *Windows81CompliancePolicy) GetOsMaximumVersion()(*string) {
val, err := m.GetBackingStore().Get("osMaximumVersion")
if err != nil {
panic(err)
}
if val != nil {
return val.(*string)
}
return nil
}
// GetOsMinimumVersion gets the osMinimumVersion property value. Minimum Windows 8.1 version.
// returns a *string when successful
func (m *Windows81CompliancePolicy) GetOsMinimumVersion()(*string) {
val, err := m.GetBackingStore().Get("osMinimumVersion")
if err != nil {
panic(err)
}
if val != nil {
return val.(*string)
}
return nil
}
// GetPasswordBlockSimple gets the passwordBlockSimple property value. Indicates whether or not to block simple password.
// returns a *bool when successful
func (m *Windows81CompliancePolicy) GetPasswordBlockSimple()(*bool) {
val, err := m.GetBackingStore().Get("passwordBlockSimple")
if err != nil {
panic(err)
}
if val != nil {
return val.(*bool)
}
return nil
}
// GetPasswordExpirationDays gets the passwordExpirationDays property value. Password expiration in days.
// returns a *int32 when successful
func (m *Windows81CompliancePolicy) GetPasswordExpirationDays()(*int32) {
val, err := m.GetBackingStore().Get("passwordExpirationDays")
if err != nil {
panic(err)
}
if val != nil {
return val.(*int32)
}
return nil
}
// GetPasswordMinimumCharacterSetCount gets the passwordMinimumCharacterSetCount property value. The number of character sets required in the password.
// returns a *int32 when successful
func (m *Windows81CompliancePolicy) GetPasswordMinimumCharacterSetCount()(*int32) {
val, err := m.GetBackingStore().Get("passwordMinimumCharacterSetCount")
if err != nil {
panic(err)
}
if val != nil {
return val.(*int32)
}
return nil
}
// GetPasswordMinimumLength gets the passwordMinimumLength property value. The minimum password length.
// returns a *int32 when successful
func (m *Windows81CompliancePolicy) GetPasswordMinimumLength()(*int32) {
val, err := m.GetBackingStore().Get("passwordMinimumLength")
if err != nil {
panic(err)
}
if val != nil {
return val.(*int32)
}
return nil
}
// GetPasswordMinutesOfInactivityBeforeLock gets the passwordMinutesOfInactivityBeforeLock property value. Minutes of inactivity before a password is required.
// returns a *int32 when successful
func (m *Windows81CompliancePolicy) GetPasswordMinutesOfInactivityBeforeLock()(*int32) {
val, err := m.GetBackingStore().Get("passwordMinutesOfInactivityBeforeLock")
if err != nil {
panic(err)
}
if val != nil {
return val.(*int32)
}
return nil
}
// GetPasswordPreviousPasswordBlockCount gets the passwordPreviousPasswordBlockCount property value. The number of previous passwords to prevent re-use of. Valid values 0 to 24
// returns a *int32 when successful
func (m *Windows81CompliancePolicy) GetPasswordPreviousPasswordBlockCount()(*int32) {
val, err := m.GetBackingStore().Get("passwordPreviousPasswordBlockCount")
if err != nil {
panic(err)
}
if val != nil {
return val.(*int32)
}
return nil
}
// GetPasswordRequired gets the passwordRequired property value. Require a password to unlock Windows device.
// returns a *bool when successful
func (m *Windows81CompliancePolicy) GetPasswordRequired()(*bool) {
val, err := m.GetBackingStore().Get("passwordRequired")
if err != nil {
panic(err)
}
if val != nil {
return val.(*bool)
}
return nil
}
// GetPasswordRequiredType gets the passwordRequiredType property value. Possible values of required passwords.
// returns a *RequiredPasswordType when successful
func (m *Windows81CompliancePolicy) GetPasswordRequiredType()(*RequiredPasswordType) {
val, err := m.GetBackingStore().Get("passwordRequiredType")
if err != nil {
panic(err)
}
if val != nil {
return val.(*RequiredPasswordType)
}
return nil
}
// GetStorageRequireEncryption gets the storageRequireEncryption property value. Indicates whether or not to require encryption on a windows 8.1 device.
// returns a *bool when successful
func (m *Windows81CompliancePolicy) GetStorageRequireEncryption()(*bool) {
val, err := m.GetBackingStore().Get("storageRequireEncryption")
if err != nil {
panic(err)
}
if val != nil {
return val.(*bool)
}
return nil
}
// Serialize serializes information the current object
func (m *Windows81CompliancePolicy) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) {
err := m.DeviceCompliancePolicy.Serialize(writer)
if err != nil {
return err
}
{
err = writer.WriteStringValue("osMaximumVersion", m.GetOsMaximumVersion())
if err != nil {
return err
}
}
{
err = writer.WriteStringValue("osMinimumVersion", m.GetOsMinimumVersion())
if err != nil {
return err
}
}
{
err = writer.WriteBoolValue("passwordBlockSimple", m.GetPasswordBlockSimple())
if err != nil {
return err
}
}
{
err = writer.WriteInt32Value("passwordExpirationDays", m.GetPasswordExpirationDays())
if err != nil {
return err
}
}
{
err = writer.WriteInt32Value("passwordMinimumCharacterSetCount", m.GetPasswordMinimumCharacterSetCount())
if err != nil {
return err
}
}
{
err = writer.WriteInt32Value("passwordMinimumLength", m.GetPasswordMinimumLength())
if err != nil {
return err
}
}
{
err = writer.WriteInt32Value("passwordMinutesOfInactivityBeforeLock", m.GetPasswordMinutesOfInactivityBeforeLock())
if err != nil {
return err
}
}
{
err = writer.WriteInt32Value("passwordPreviousPasswordBlockCount", m.GetPasswordPreviousPasswordBlockCount())
if err != nil {
return err
}
}
{
err = writer.WriteBoolValue("passwordRequired", m.GetPasswordRequired())
if err != nil {
return err
}
}
if m.GetPasswordRequiredType() != nil {
cast := (*m.GetPasswordRequiredType()).String()
err = writer.WriteStringValue("passwordRequiredType", &cast)
if err != nil {
return err
}
}
{
err = writer.WriteBoolValue("storageRequireEncryption", m.GetStorageRequireEncryption())
if err != nil {
return err
}
}
return nil
}
// SetOsMaximumVersion sets the osMaximumVersion property value. Maximum Windows 8.1 version.
func (m *Windows81CompliancePolicy) SetOsMaximumVersion(value *string)() {
err := m.GetBackingStore().Set("osMaximumVersion", value)
if err != nil {
panic(err)
}
}
// SetOsMinimumVersion sets the osMinimumVersion property value. Minimum Windows 8.1 version.
func (m *Windows81CompliancePolicy) SetOsMinimumVersion(value *string)() {
err := m.GetBackingStore().Set("osMinimumVersion", value)
if err != nil {
panic(err)
}
}
// SetPasswordBlockSimple sets the passwordBlockSimple property value. Indicates whether or not to block simple password.
func (m *Windows81CompliancePolicy) SetPasswordBlockSimple(value *bool)() {
err := m.GetBackingStore().Set("passwordBlockSimple", value)
if err != nil {
panic(err)
}
}
// SetPasswordExpirationDays sets the passwordExpirationDays property value. Password expiration in days.
func (m *Windows81CompliancePolicy) SetPasswordExpirationDays(value *int32)() {
err := m.GetBackingStore().Set("passwordExpirationDays", value)
if err != nil {
panic(err)
}
}
// SetPasswordMinimumCharacterSetCount sets the passwordMinimumCharacterSetCount property value. The number of character sets required in the password.
func (m *Windows81CompliancePolicy) SetPasswordMinimumCharacterSetCount(value *int32)() {
err := m.GetBackingStore().Set("passwordMinimumCharacterSetCount", value)
if err != nil {
panic(err)
}
}
// SetPasswordMinimumLength sets the passwordMinimumLength property value. The minimum password length.
func (m *Windows81CompliancePolicy) SetPasswordMinimumLength(value *int32)() {
err := m.GetBackingStore().Set("passwordMinimumLength", value)
if err != nil {
panic(err)
}
}
// SetPasswordMinutesOfInactivityBeforeLock sets the passwordMinutesOfInactivityBeforeLock property value. Minutes of inactivity before a password is required.
func (m *Windows81CompliancePolicy) SetPasswordMinutesOfInactivityBeforeLock(value *int32)() {
err := m.GetBackingStore().Set("passwordMinutesOfInactivityBeforeLock", value)
if err != nil {
panic(err)
}
}
// SetPasswordPreviousPasswordBlockCount sets the passwordPreviousPasswordBlockCount property value. The number of previous passwords to prevent re-use of. Valid values 0 to 24
func (m *Windows81CompliancePolicy) SetPasswordPreviousPasswordBlockCount(value *int32)() {
err := m.GetBackingStore().Set("passwordPreviousPasswordBlockCount", value)
if err != nil {
panic(err)
}
}
// SetPasswordRequired sets the passwordRequired property value. Require a password to unlock Windows device.
func (m *Windows81CompliancePolicy) SetPasswordRequired(value *bool)() {
err := m.GetBackingStore().Set("passwordRequired", value)
if err != nil {
panic(err)
}
}
// SetPasswordRequiredType sets the passwordRequiredType property value. Possible values of required passwords.
func (m *Windows81CompliancePolicy) SetPasswordRequiredType(value *RequiredPasswordType)() {
err := m.GetBackingStore().Set("passwordRequiredType", value)
if err != nil {
panic(err)
}
}
// SetStorageRequireEncryption sets the storageRequireEncryption property value. Indicates whether or not to require encryption on a windows 8.1 device.
func (m *Windows81CompliancePolicy) SetStorageRequireEncryption(value *bool)() {
err := m.GetBackingStore().Set("storageRequireEncryption", value)
if err != nil {
panic(err)
}
}
type Windows81CompliancePolicyable interface {
DeviceCompliancePolicyable
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
GetOsMaximumVersion()(*string)
GetOsMinimumVersion()(*string)
GetPasswordBlockSimple()(*bool)
GetPasswordExpirationDays()(*int32)
GetPasswordMinimumCharacterSetCount()(*int32)
GetPasswordMinimumLength()(*int32)
GetPasswordMinutesOfInactivityBeforeLock()(*int32)
GetPasswordPreviousPasswordBlockCount()(*int32)
GetPasswordRequired()(*bool)
GetPasswordRequiredType()(*RequiredPasswordType)
GetStorageRequireEncryption()(*bool)
SetOsMaximumVersion(value *string)()
SetOsMinimumVersion(value *string)()
SetPasswordBlockSimple(value *bool)()
SetPasswordExpirationDays(value *int32)()
SetPasswordMinimumCharacterSetCount(value *int32)()
SetPasswordMinimumLength(value *int32)()
SetPasswordMinutesOfInactivityBeforeLock(value *int32)()
SetPasswordPreviousPasswordBlockCount(value *int32)()
SetPasswordRequired(value *bool)()
SetPasswordRequiredType(value *RequiredPasswordType)()
SetStorageRequireEncryption(value *bool)()
}