-
Notifications
You must be signed in to change notification settings - Fork 38
/
Copy pathchat.go
705 lines (703 loc) · 25.8 KB
/
chat.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
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
package models
import (
i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time"
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
)
type Chat struct {
Entity
}
// NewChat instantiates a new Chat and sets the default values.
func NewChat()(*Chat) {
m := &Chat{
Entity: *NewEntity(),
}
return m
}
// CreateChatFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
// returns a Parsable when successful
func CreateChatFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
return NewChat(), nil
}
// GetChatType gets the chatType property value. The chatType property
// returns a *ChatType when successful
func (m *Chat) GetChatType()(*ChatType) {
val, err := m.GetBackingStore().Get("chatType")
if err != nil {
panic(err)
}
if val != nil {
return val.(*ChatType)
}
return nil
}
// GetCreatedDateTime gets the createdDateTime property value. Date and time at which the chat was created. Read-only.
// returns a *Time when successful
func (m *Chat) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) {
val, err := m.GetBackingStore().Get("createdDateTime")
if err != nil {
panic(err)
}
if val != nil {
return val.(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)
}
return nil
}
// GetFieldDeserializers the deserialization information for the current model
// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful
func (m *Chat) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
res := m.Entity.GetFieldDeserializers()
res["chatType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetEnumValue(ParseChatType)
if err != nil {
return err
}
if val != nil {
m.SetChatType(val.(*ChatType))
}
return nil
}
res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetTimeValue()
if err != nil {
return err
}
if val != nil {
m.SetCreatedDateTime(val)
}
return nil
}
res["installedApps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetCollectionOfObjectValues(CreateTeamsAppInstallationFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
res := make([]TeamsAppInstallationable, len(val))
for i, v := range val {
if v != nil {
res[i] = v.(TeamsAppInstallationable)
}
}
m.SetInstalledApps(res)
}
return nil
}
res["isHiddenForAllMembers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetBoolValue()
if err != nil {
return err
}
if val != nil {
m.SetIsHiddenForAllMembers(val)
}
return nil
}
res["lastMessagePreview"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetObjectValue(CreateChatMessageInfoFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
m.SetLastMessagePreview(val.(ChatMessageInfoable))
}
return nil
}
res["lastUpdatedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetTimeValue()
if err != nil {
return err
}
if val != nil {
m.SetLastUpdatedDateTime(val)
}
return nil
}
res["members"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetCollectionOfObjectValues(CreateConversationMemberFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
res := make([]ConversationMemberable, len(val))
for i, v := range val {
if v != nil {
res[i] = v.(ConversationMemberable)
}
}
m.SetMembers(res)
}
return nil
}
res["messages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetCollectionOfObjectValues(CreateChatMessageFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
res := make([]ChatMessageable, len(val))
for i, v := range val {
if v != nil {
res[i] = v.(ChatMessageable)
}
}
m.SetMessages(res)
}
return nil
}
res["onlineMeetingInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetObjectValue(CreateTeamworkOnlineMeetingInfoFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
m.SetOnlineMeetingInfo(val.(TeamworkOnlineMeetingInfoable))
}
return nil
}
res["permissionGrants"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetCollectionOfObjectValues(CreateResourceSpecificPermissionGrantFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
res := make([]ResourceSpecificPermissionGrantable, len(val))
for i, v := range val {
if v != nil {
res[i] = v.(ResourceSpecificPermissionGrantable)
}
}
m.SetPermissionGrants(res)
}
return nil
}
res["pinnedMessages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetCollectionOfObjectValues(CreatePinnedChatMessageInfoFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
res := make([]PinnedChatMessageInfoable, len(val))
for i, v := range val {
if v != nil {
res[i] = v.(PinnedChatMessageInfoable)
}
}
m.SetPinnedMessages(res)
}
return nil
}
res["tabs"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetCollectionOfObjectValues(CreateTeamsTabFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
res := make([]TeamsTabable, len(val))
for i, v := range val {
if v != nil {
res[i] = v.(TeamsTabable)
}
}
m.SetTabs(res)
}
return nil
}
res["tenantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetTenantId(val)
}
return nil
}
res["topic"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetTopic(val)
}
return nil
}
res["viewpoint"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetObjectValue(CreateChatViewpointFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
m.SetViewpoint(val.(ChatViewpointable))
}
return nil
}
res["webUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetWebUrl(val)
}
return nil
}
return res
}
// GetInstalledApps gets the installedApps property value. A collection of all the apps in the chat. Nullable.
// returns a []TeamsAppInstallationable when successful
func (m *Chat) GetInstalledApps()([]TeamsAppInstallationable) {
val, err := m.GetBackingStore().Get("installedApps")
if err != nil {
panic(err)
}
if val != nil {
return val.([]TeamsAppInstallationable)
}
return nil
}
// GetIsHiddenForAllMembers gets the isHiddenForAllMembers property value. Indicates whether the chat is hidden for all its members. Read-only.
// returns a *bool when successful
func (m *Chat) GetIsHiddenForAllMembers()(*bool) {
val, err := m.GetBackingStore().Get("isHiddenForAllMembers")
if err != nil {
panic(err)
}
if val != nil {
return val.(*bool)
}
return nil
}
// GetLastMessagePreview gets the lastMessagePreview property value. Preview of the last message sent in the chat. Null if no messages were sent in the chat. Currently, only the list chats operation supports this property.
// returns a ChatMessageInfoable when successful
func (m *Chat) GetLastMessagePreview()(ChatMessageInfoable) {
val, err := m.GetBackingStore().Get("lastMessagePreview")
if err != nil {
panic(err)
}
if val != nil {
return val.(ChatMessageInfoable)
}
return nil
}
// GetLastUpdatedDateTime gets the lastUpdatedDateTime property value. Date and time at which the chat was renamed or the list of members was last changed. Read-only.
// returns a *Time when successful
func (m *Chat) GetLastUpdatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) {
val, err := m.GetBackingStore().Get("lastUpdatedDateTime")
if err != nil {
panic(err)
}
if val != nil {
return val.(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)
}
return nil
}
// GetMembers gets the members property value. A collection of all the members in the chat. Nullable.
// returns a []ConversationMemberable when successful
func (m *Chat) GetMembers()([]ConversationMemberable) {
val, err := m.GetBackingStore().Get("members")
if err != nil {
panic(err)
}
if val != nil {
return val.([]ConversationMemberable)
}
return nil
}
// GetMessages gets the messages property value. A collection of all the messages in the chat. Nullable.
// returns a []ChatMessageable when successful
func (m *Chat) GetMessages()([]ChatMessageable) {
val, err := m.GetBackingStore().Get("messages")
if err != nil {
panic(err)
}
if val != nil {
return val.([]ChatMessageable)
}
return nil
}
// GetOnlineMeetingInfo gets the onlineMeetingInfo property value. Represents details about an online meeting. If the chat isn't associated with an online meeting, the property is empty. Read-only.
// returns a TeamworkOnlineMeetingInfoable when successful
func (m *Chat) GetOnlineMeetingInfo()(TeamworkOnlineMeetingInfoable) {
val, err := m.GetBackingStore().Get("onlineMeetingInfo")
if err != nil {
panic(err)
}
if val != nil {
return val.(TeamworkOnlineMeetingInfoable)
}
return nil
}
// GetPermissionGrants gets the permissionGrants property value. A collection of permissions granted to apps for the chat.
// returns a []ResourceSpecificPermissionGrantable when successful
func (m *Chat) GetPermissionGrants()([]ResourceSpecificPermissionGrantable) {
val, err := m.GetBackingStore().Get("permissionGrants")
if err != nil {
panic(err)
}
if val != nil {
return val.([]ResourceSpecificPermissionGrantable)
}
return nil
}
// GetPinnedMessages gets the pinnedMessages property value. A collection of all the pinned messages in the chat. Nullable.
// returns a []PinnedChatMessageInfoable when successful
func (m *Chat) GetPinnedMessages()([]PinnedChatMessageInfoable) {
val, err := m.GetBackingStore().Get("pinnedMessages")
if err != nil {
panic(err)
}
if val != nil {
return val.([]PinnedChatMessageInfoable)
}
return nil
}
// GetTabs gets the tabs property value. A collection of all the tabs in the chat. Nullable.
// returns a []TeamsTabable when successful
func (m *Chat) GetTabs()([]TeamsTabable) {
val, err := m.GetBackingStore().Get("tabs")
if err != nil {
panic(err)
}
if val != nil {
return val.([]TeamsTabable)
}
return nil
}
// GetTenantId gets the tenantId property value. The identifier of the tenant in which the chat was created. Read-only.
// returns a *string when successful
func (m *Chat) GetTenantId()(*string) {
val, err := m.GetBackingStore().Get("tenantId")
if err != nil {
panic(err)
}
if val != nil {
return val.(*string)
}
return nil
}
// GetTopic gets the topic property value. (Optional) Subject or topic for the chat. Only available for group chats.
// returns a *string when successful
func (m *Chat) GetTopic()(*string) {
val, err := m.GetBackingStore().Get("topic")
if err != nil {
panic(err)
}
if val != nil {
return val.(*string)
}
return nil
}
// GetViewpoint gets the viewpoint property value. Represents caller-specific information about the chat, such as the last message read date and time. This property is populated only when the request is made in a delegated context.
// returns a ChatViewpointable when successful
func (m *Chat) GetViewpoint()(ChatViewpointable) {
val, err := m.GetBackingStore().Get("viewpoint")
if err != nil {
panic(err)
}
if val != nil {
return val.(ChatViewpointable)
}
return nil
}
// GetWebUrl gets the webUrl property value. The URL for the chat in Microsoft Teams. The URL should be treated as an opaque blob, and not parsed. Read-only.
// returns a *string when successful
func (m *Chat) GetWebUrl()(*string) {
val, err := m.GetBackingStore().Get("webUrl")
if err != nil {
panic(err)
}
if val != nil {
return val.(*string)
}
return nil
}
// Serialize serializes information the current object
func (m *Chat) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) {
err := m.Entity.Serialize(writer)
if err != nil {
return err
}
if m.GetChatType() != nil {
cast := (*m.GetChatType()).String()
err = writer.WriteStringValue("chatType", &cast)
if err != nil {
return err
}
}
{
err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime())
if err != nil {
return err
}
}
if m.GetInstalledApps() != nil {
cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetInstalledApps()))
for i, v := range m.GetInstalledApps() {
if v != nil {
cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable)
}
}
err = writer.WriteCollectionOfObjectValues("installedApps", cast)
if err != nil {
return err
}
}
{
err = writer.WriteBoolValue("isHiddenForAllMembers", m.GetIsHiddenForAllMembers())
if err != nil {
return err
}
}
{
err = writer.WriteObjectValue("lastMessagePreview", m.GetLastMessagePreview())
if err != nil {
return err
}
}
{
err = writer.WriteTimeValue("lastUpdatedDateTime", m.GetLastUpdatedDateTime())
if err != nil {
return err
}
}
if m.GetMembers() != nil {
cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMembers()))
for i, v := range m.GetMembers() {
if v != nil {
cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable)
}
}
err = writer.WriteCollectionOfObjectValues("members", cast)
if err != nil {
return err
}
}
if m.GetMessages() != nil {
cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMessages()))
for i, v := range m.GetMessages() {
if v != nil {
cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable)
}
}
err = writer.WriteCollectionOfObjectValues("messages", cast)
if err != nil {
return err
}
}
{
err = writer.WriteObjectValue("onlineMeetingInfo", m.GetOnlineMeetingInfo())
if err != nil {
return err
}
}
if m.GetPermissionGrants() != nil {
cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPermissionGrants()))
for i, v := range m.GetPermissionGrants() {
if v != nil {
cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable)
}
}
err = writer.WriteCollectionOfObjectValues("permissionGrants", cast)
if err != nil {
return err
}
}
if m.GetPinnedMessages() != nil {
cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPinnedMessages()))
for i, v := range m.GetPinnedMessages() {
if v != nil {
cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable)
}
}
err = writer.WriteCollectionOfObjectValues("pinnedMessages", cast)
if err != nil {
return err
}
}
if m.GetTabs() != nil {
cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTabs()))
for i, v := range m.GetTabs() {
if v != nil {
cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable)
}
}
err = writer.WriteCollectionOfObjectValues("tabs", cast)
if err != nil {
return err
}
}
{
err = writer.WriteStringValue("tenantId", m.GetTenantId())
if err != nil {
return err
}
}
{
err = writer.WriteStringValue("topic", m.GetTopic())
if err != nil {
return err
}
}
{
err = writer.WriteObjectValue("viewpoint", m.GetViewpoint())
if err != nil {
return err
}
}
{
err = writer.WriteStringValue("webUrl", m.GetWebUrl())
if err != nil {
return err
}
}
return nil
}
// SetChatType sets the chatType property value. The chatType property
func (m *Chat) SetChatType(value *ChatType)() {
err := m.GetBackingStore().Set("chatType", value)
if err != nil {
panic(err)
}
}
// SetCreatedDateTime sets the createdDateTime property value. Date and time at which the chat was created. Read-only.
func (m *Chat) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() {
err := m.GetBackingStore().Set("createdDateTime", value)
if err != nil {
panic(err)
}
}
// SetInstalledApps sets the installedApps property value. A collection of all the apps in the chat. Nullable.
func (m *Chat) SetInstalledApps(value []TeamsAppInstallationable)() {
err := m.GetBackingStore().Set("installedApps", value)
if err != nil {
panic(err)
}
}
// SetIsHiddenForAllMembers sets the isHiddenForAllMembers property value. Indicates whether the chat is hidden for all its members. Read-only.
func (m *Chat) SetIsHiddenForAllMembers(value *bool)() {
err := m.GetBackingStore().Set("isHiddenForAllMembers", value)
if err != nil {
panic(err)
}
}
// SetLastMessagePreview sets the lastMessagePreview property value. Preview of the last message sent in the chat. Null if no messages were sent in the chat. Currently, only the list chats operation supports this property.
func (m *Chat) SetLastMessagePreview(value ChatMessageInfoable)() {
err := m.GetBackingStore().Set("lastMessagePreview", value)
if err != nil {
panic(err)
}
}
// SetLastUpdatedDateTime sets the lastUpdatedDateTime property value. Date and time at which the chat was renamed or the list of members was last changed. Read-only.
func (m *Chat) SetLastUpdatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() {
err := m.GetBackingStore().Set("lastUpdatedDateTime", value)
if err != nil {
panic(err)
}
}
// SetMembers sets the members property value. A collection of all the members in the chat. Nullable.
func (m *Chat) SetMembers(value []ConversationMemberable)() {
err := m.GetBackingStore().Set("members", value)
if err != nil {
panic(err)
}
}
// SetMessages sets the messages property value. A collection of all the messages in the chat. Nullable.
func (m *Chat) SetMessages(value []ChatMessageable)() {
err := m.GetBackingStore().Set("messages", value)
if err != nil {
panic(err)
}
}
// SetOnlineMeetingInfo sets the onlineMeetingInfo property value. Represents details about an online meeting. If the chat isn't associated with an online meeting, the property is empty. Read-only.
func (m *Chat) SetOnlineMeetingInfo(value TeamworkOnlineMeetingInfoable)() {
err := m.GetBackingStore().Set("onlineMeetingInfo", value)
if err != nil {
panic(err)
}
}
// SetPermissionGrants sets the permissionGrants property value. A collection of permissions granted to apps for the chat.
func (m *Chat) SetPermissionGrants(value []ResourceSpecificPermissionGrantable)() {
err := m.GetBackingStore().Set("permissionGrants", value)
if err != nil {
panic(err)
}
}
// SetPinnedMessages sets the pinnedMessages property value. A collection of all the pinned messages in the chat. Nullable.
func (m *Chat) SetPinnedMessages(value []PinnedChatMessageInfoable)() {
err := m.GetBackingStore().Set("pinnedMessages", value)
if err != nil {
panic(err)
}
}
// SetTabs sets the tabs property value. A collection of all the tabs in the chat. Nullable.
func (m *Chat) SetTabs(value []TeamsTabable)() {
err := m.GetBackingStore().Set("tabs", value)
if err != nil {
panic(err)
}
}
// SetTenantId sets the tenantId property value. The identifier of the tenant in which the chat was created. Read-only.
func (m *Chat) SetTenantId(value *string)() {
err := m.GetBackingStore().Set("tenantId", value)
if err != nil {
panic(err)
}
}
// SetTopic sets the topic property value. (Optional) Subject or topic for the chat. Only available for group chats.
func (m *Chat) SetTopic(value *string)() {
err := m.GetBackingStore().Set("topic", value)
if err != nil {
panic(err)
}
}
// SetViewpoint sets the viewpoint property value. Represents caller-specific information about the chat, such as the last message read date and time. This property is populated only when the request is made in a delegated context.
func (m *Chat) SetViewpoint(value ChatViewpointable)() {
err := m.GetBackingStore().Set("viewpoint", value)
if err != nil {
panic(err)
}
}
// SetWebUrl sets the webUrl property value. The URL for the chat in Microsoft Teams. The URL should be treated as an opaque blob, and not parsed. Read-only.
func (m *Chat) SetWebUrl(value *string)() {
err := m.GetBackingStore().Set("webUrl", value)
if err != nil {
panic(err)
}
}
type Chatable interface {
Entityable
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
GetChatType()(*ChatType)
GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)
GetInstalledApps()([]TeamsAppInstallationable)
GetIsHiddenForAllMembers()(*bool)
GetLastMessagePreview()(ChatMessageInfoable)
GetLastUpdatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)
GetMembers()([]ConversationMemberable)
GetMessages()([]ChatMessageable)
GetOnlineMeetingInfo()(TeamworkOnlineMeetingInfoable)
GetPermissionGrants()([]ResourceSpecificPermissionGrantable)
GetPinnedMessages()([]PinnedChatMessageInfoable)
GetTabs()([]TeamsTabable)
GetTenantId()(*string)
GetTopic()(*string)
GetViewpoint()(ChatViewpointable)
GetWebUrl()(*string)
SetChatType(value *ChatType)()
SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)()
SetInstalledApps(value []TeamsAppInstallationable)()
SetIsHiddenForAllMembers(value *bool)()
SetLastMessagePreview(value ChatMessageInfoable)()
SetLastUpdatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)()
SetMembers(value []ConversationMemberable)()
SetMessages(value []ChatMessageable)()
SetOnlineMeetingInfo(value TeamworkOnlineMeetingInfoable)()
SetPermissionGrants(value []ResourceSpecificPermissionGrantable)()
SetPinnedMessages(value []PinnedChatMessageInfoable)()
SetTabs(value []TeamsTabable)()
SetTenantId(value *string)()
SetTopic(value *string)()
SetViewpoint(value ChatViewpointable)()
SetWebUrl(value *string)()
}