-
Notifications
You must be signed in to change notification settings - Fork 0
/
teams_app_definition.go
321 lines (319 loc) · 13 KB
/
teams_app_definition.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
package models
import (
i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time"
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
)
// TeamsAppDefinition
type TeamsAppDefinition struct {
Entity
// Authorization requirements specified in the Teams app manifest.
authorization TeamsAppAuthorizationable
// The details of the bot specified in the Teams app manifest.
bot TeamworkBotable
// The createdBy property
createdBy IdentitySetable
// Verbose description of the application.
description *string
// The name of the app provided by the app developer.
displayName *string
// The lastModifiedDateTime property
lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time
// The published status of a specific version of a Teams app. Possible values are:submitted—The specific version of the Teams app has been submitted and is under review. published—The request to publish the specific version of the Teams app has been approved by the admin and the app is published. rejected—The admin rejected the request to publish the specific version of the Teams app.
publishingState *TeamsAppPublishingState
// Short description of the application.
shortDescription *string
// The ID from the Teams app manifest.
teamsAppId *string
// The version number of the application.
version *string
}
// NewTeamsAppDefinition instantiates a new teamsAppDefinition and sets the default values.
func NewTeamsAppDefinition()(*TeamsAppDefinition) {
m := &TeamsAppDefinition{
Entity: *NewEntity(),
}
return m
}
// CreateTeamsAppDefinitionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
func CreateTeamsAppDefinitionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
return NewTeamsAppDefinition(), nil
}
// GetAuthorization gets the authorization property value. Authorization requirements specified in the Teams app manifest.
func (m *TeamsAppDefinition) GetAuthorization()(TeamsAppAuthorizationable) {
return m.authorization
}
// GetBot gets the bot property value. The details of the bot specified in the Teams app manifest.
func (m *TeamsAppDefinition) GetBot()(TeamworkBotable) {
return m.bot
}
// GetCreatedBy gets the createdBy property value. The createdBy property
func (m *TeamsAppDefinition) GetCreatedBy()(IdentitySetable) {
return m.createdBy
}
// GetDescription gets the description property value. Verbose description of the application.
func (m *TeamsAppDefinition) GetDescription()(*string) {
return m.description
}
// GetDisplayName gets the displayName property value. The name of the app provided by the app developer.
func (m *TeamsAppDefinition) GetDisplayName()(*string) {
return m.displayName
}
// GetFieldDeserializers the deserialization information for the current model
func (m *TeamsAppDefinition) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
res := m.Entity.GetFieldDeserializers()
res["authorization"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetObjectValue(CreateTeamsAppAuthorizationFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
m.SetAuthorization(val.(TeamsAppAuthorizationable))
}
return nil
}
res["bot"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetObjectValue(CreateTeamworkBotFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
m.SetBot(val.(TeamworkBotable))
}
return nil
}
res["createdBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
m.SetCreatedBy(val.(IdentitySetable))
}
return nil
}
res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetDescription(val)
}
return nil
}
res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetDisplayName(val)
}
return nil
}
res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetTimeValue()
if err != nil {
return err
}
if val != nil {
m.SetLastModifiedDateTime(val)
}
return nil
}
res["publishingState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetEnumValue(ParseTeamsAppPublishingState)
if err != nil {
return err
}
if val != nil {
m.SetPublishingState(val.(*TeamsAppPublishingState))
}
return nil
}
res["shortDescription"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetShortDescription(val)
}
return nil
}
res["teamsAppId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetTeamsAppId(val)
}
return nil
}
res["version"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetVersion(val)
}
return nil
}
return res
}
// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The lastModifiedDateTime property
func (m *TeamsAppDefinition) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) {
return m.lastModifiedDateTime
}
// GetPublishingState gets the publishingState property value. The published status of a specific version of a Teams app. Possible values are:submitted—The specific version of the Teams app has been submitted and is under review. published—The request to publish the specific version of the Teams app has been approved by the admin and the app is published. rejected—The admin rejected the request to publish the specific version of the Teams app.
func (m *TeamsAppDefinition) GetPublishingState()(*TeamsAppPublishingState) {
return m.publishingState
}
// GetShortDescription gets the shortDescription property value. Short description of the application.
func (m *TeamsAppDefinition) GetShortDescription()(*string) {
return m.shortDescription
}
// GetTeamsAppId gets the teamsAppId property value. The ID from the Teams app manifest.
func (m *TeamsAppDefinition) GetTeamsAppId()(*string) {
return m.teamsAppId
}
// GetVersion gets the version property value. The version number of the application.
func (m *TeamsAppDefinition) GetVersion()(*string) {
return m.version
}
// Serialize serializes information the current object
func (m *TeamsAppDefinition) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) {
err := m.Entity.Serialize(writer)
if err != nil {
return err
}
{
err = writer.WriteObjectValue("authorization", m.GetAuthorization())
if err != nil {
return err
}
}
{
err = writer.WriteObjectValue("bot", m.GetBot())
if err != nil {
return err
}
}
{
err = writer.WriteObjectValue("createdBy", m.GetCreatedBy())
if err != nil {
return err
}
}
{
err = writer.WriteStringValue("description", m.GetDescription())
if err != nil {
return err
}
}
{
err = writer.WriteStringValue("displayName", m.GetDisplayName())
if err != nil {
return err
}
}
{
err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime())
if err != nil {
return err
}
}
if m.GetPublishingState() != nil {
cast := (*m.GetPublishingState()).String()
err = writer.WriteStringValue("publishingState", &cast)
if err != nil {
return err
}
}
{
err = writer.WriteStringValue("shortDescription", m.GetShortDescription())
if err != nil {
return err
}
}
{
err = writer.WriteStringValue("teamsAppId", m.GetTeamsAppId())
if err != nil {
return err
}
}
{
err = writer.WriteStringValue("version", m.GetVersion())
if err != nil {
return err
}
}
return nil
}
// SetAuthorization sets the authorization property value. Authorization requirements specified in the Teams app manifest.
func (m *TeamsAppDefinition) SetAuthorization(value TeamsAppAuthorizationable)() {
m.authorization = value
}
// SetBot sets the bot property value. The details of the bot specified in the Teams app manifest.
func (m *TeamsAppDefinition) SetBot(value TeamworkBotable)() {
m.bot = value
}
// SetCreatedBy sets the createdBy property value. The createdBy property
func (m *TeamsAppDefinition) SetCreatedBy(value IdentitySetable)() {
m.createdBy = value
}
// SetDescription sets the description property value. Verbose description of the application.
func (m *TeamsAppDefinition) SetDescription(value *string)() {
m.description = value
}
// SetDisplayName sets the displayName property value. The name of the app provided by the app developer.
func (m *TeamsAppDefinition) SetDisplayName(value *string)() {
m.displayName = value
}
// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The lastModifiedDateTime property
func (m *TeamsAppDefinition) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() {
m.lastModifiedDateTime = value
}
// SetPublishingState sets the publishingState property value. The published status of a specific version of a Teams app. Possible values are:submitted—The specific version of the Teams app has been submitted and is under review. published—The request to publish the specific version of the Teams app has been approved by the admin and the app is published. rejected—The admin rejected the request to publish the specific version of the Teams app.
func (m *TeamsAppDefinition) SetPublishingState(value *TeamsAppPublishingState)() {
m.publishingState = value
}
// SetShortDescription sets the shortDescription property value. Short description of the application.
func (m *TeamsAppDefinition) SetShortDescription(value *string)() {
m.shortDescription = value
}
// SetTeamsAppId sets the teamsAppId property value. The ID from the Teams app manifest.
func (m *TeamsAppDefinition) SetTeamsAppId(value *string)() {
m.teamsAppId = value
}
// SetVersion sets the version property value. The version number of the application.
func (m *TeamsAppDefinition) SetVersion(value *string)() {
m.version = value
}
// TeamsAppDefinitionable
type TeamsAppDefinitionable interface {
Entityable
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
GetAuthorization()(TeamsAppAuthorizationable)
GetBot()(TeamworkBotable)
GetCreatedBy()(IdentitySetable)
GetDescription()(*string)
GetDisplayName()(*string)
GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)
GetPublishingState()(*TeamsAppPublishingState)
GetShortDescription()(*string)
GetTeamsAppId()(*string)
GetVersion()(*string)
SetAuthorization(value TeamsAppAuthorizationable)()
SetBot(value TeamworkBotable)()
SetCreatedBy(value IdentitySetable)()
SetDescription(value *string)()
SetDisplayName(value *string)()
SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)()
SetPublishingState(value *TeamsAppPublishingState)()
SetShortDescription(value *string)()
SetTeamsAppId(value *string)()
SetVersion(value *string)()
}