-
Notifications
You must be signed in to change notification settings - Fork 32
/
teamwork_application_identity_type.go
45 lines (43 loc) · 1.66 KB
/
teamwork_application_identity_type.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
package models
type TeamworkApplicationIdentityType int
const (
AADAPPLICATION_TEAMWORKAPPLICATIONIDENTITYTYPE TeamworkApplicationIdentityType = iota
BOT_TEAMWORKAPPLICATIONIDENTITYTYPE
TENANTBOT_TEAMWORKAPPLICATIONIDENTITYTYPE
OFFICE365CONNECTOR_TEAMWORKAPPLICATIONIDENTITYTYPE
OUTGOINGWEBHOOK_TEAMWORKAPPLICATIONIDENTITYTYPE
UNKNOWNFUTUREVALUE_TEAMWORKAPPLICATIONIDENTITYTYPE
)
func (i TeamworkApplicationIdentityType) String() string {
return []string{"aadApplication", "bot", "tenantBot", "office365Connector", "outgoingWebhook", "unknownFutureValue"}[i]
}
func ParseTeamworkApplicationIdentityType(v string) (any, error) {
result := AADAPPLICATION_TEAMWORKAPPLICATIONIDENTITYTYPE
switch v {
case "aadApplication":
result = AADAPPLICATION_TEAMWORKAPPLICATIONIDENTITYTYPE
case "bot":
result = BOT_TEAMWORKAPPLICATIONIDENTITYTYPE
case "tenantBot":
result = TENANTBOT_TEAMWORKAPPLICATIONIDENTITYTYPE
case "office365Connector":
result = OFFICE365CONNECTOR_TEAMWORKAPPLICATIONIDENTITYTYPE
case "outgoingWebhook":
result = OUTGOINGWEBHOOK_TEAMWORKAPPLICATIONIDENTITYTYPE
case "unknownFutureValue":
result = UNKNOWNFUTUREVALUE_TEAMWORKAPPLICATIONIDENTITYTYPE
default:
return nil, nil
}
return &result, nil
}
func SerializeTeamworkApplicationIdentityType(values []TeamworkApplicationIdentityType) []string {
result := make([]string, len(values))
for i, v := range values {
result[i] = v.String()
}
return result
}
func (i TeamworkApplicationIdentityType) isMultiValue() bool {
return false
}