This repository is currently being migrated. It's locked while the migration is in progress.
forked from opsgenie/opsgenie-go-sdk-v2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
user_result.go
181 lines (154 loc) · 4.62 KB
/
user_result.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
package user
import (
"time"
"github.com/BillHeroInc/opsgenie-go-sdk-v2/client"
"github.com/BillHeroInc/opsgenie-go-sdk-v2/og"
)
type User struct {
Id string `json:"id"`
Username string `json:"username"`
FullName string `json:"fullName"`
Role *UserRole `json:"role"`
Blocked bool `json:"blocked"`
Verified bool `json:"verified"`
UserAddress *UserAddress `json:"userAddress"`
Tags []string `json:"tags"`
Details map[string][]string `json:"details"`
TimeZone string `json:"timeZone"`
Locale string `json:"locale"`
CreatedAt time.Time `json:"createdAt"`
}
type UserRole struct {
RoleName string `json:"name"`
}
type UserAddress struct {
Country string `json:"country"`
State string `json:"state"`
City string `json:"city"`
Line string `json:"line"`
ZipCode string `json:"zipCode"`
}
type UserContact struct {
To string `json:"to"`
Id string `json:"id"`
ContactMethod string `json:"contactMethod"`
Enabled bool `json:"enabled"`
}
type CreateResult struct {
client.ResultMetadata
Message string `json:"message"`
Errors map[string]string `json:"errors"`
Id string `json:"id"`
Name string `json:"name"`
}
type GetResult struct {
client.ResultMetadata
Id string `json:"id"`
Username string `json:"username"`
FullName string `json:"fullName"`
Role *UserRole `json:"role"`
Blocked bool `json:"blocked"`
Verified bool `json:"verified"`
UserAddress *UserAddress `json:"userAddress"`
SkypeUsername string `json:"skypeUsername"`
Tags []string `json:"tags"`
Details map[string][]string `json:"details"`
TimeZone string `json:"timeZone"`
Locale string `json:"locale"`
CreatedAt time.Time `json:"createdAt"`
UserContacts []UserContact `json:"userContacts"`
}
type UpdateResult struct {
client.ResultMetadata
Result string `json:"result"`
}
type DeleteResult struct {
client.ResultMetadata
Result string `json:"result"`
}
type ListResult struct {
client.ResultMetadata
Users []User `json:"data"`
Paging Paging `json:"paging"`
TotalCount int `json:"totalCount"`
}
type Paging struct {
Next string `json:"next"`
Prev string `json:"prev"`
First string `json:"first"`
Last string `json:"last"`
}
type ListUserEscalationsResult struct {
client.ResultMetadata
Escalations []UserEscalation `json:"data"`
}
type UserEscalation struct {
Id string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Rules []Rule `json:"rules"`
OwnerTeam Team `json:"ownerTeam"`
}
type Rule struct {
Condition og.EscalationCondition `json:"condition"`
NotifyType og.NotifyType `json:"notifyType"`
Recipient og.Participant `json:"recipient"`
Delay EscalationDelay `json:"delay"`
}
type EscalationDelay struct {
TimeUnit og.TimeUnit `json:"timeUnit"`
TimeAmount int `json:"timeAmount"`
}
type ListUserTeamsResult struct {
client.ResultMetadata
Teams []Team `json:"data"`
}
type Team struct {
Id string `json:"id"`
Name string `json:"name"`
}
type ListUserForwardingRulesResult struct {
client.ResultMetadata
ForwardingRules []ForwardingRule `json:"data"`
}
type ForwardingRule struct {
FromUser ForwardedUser `json:"fromUser"`
ToUser ForwardedUser `json:"toUser"`
StartDate time.Time `json:"startDate"`
EndDate time.Time `json:"endDate"`
Alias string `json:"alias"`
Id string `json:"id"`
}
type ForwardedUser struct {
Id string `json:"id"`
Username string `json:"username"`
}
type ListUserSchedulesResult struct {
client.ResultMetadata
Schedules []Schedule `json:"data"`
}
type Schedule struct {
Id string `json:"id"`
Name string `json:"name"`
Enabled bool `json:"enabled"`
}
type GetSavedSearchResult struct {
client.ResultMetadata
Id string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
OwnerId string `json:"ownerId"`
Query string `json:"query"`
}
type ListSavedSearchesResult struct {
client.ResultMetadata
UsersSavedSearches []UsersSavedSearch `json:"data"`
}
type UsersSavedSearch struct {
Id string `json:"id"`
Name string `json:"name"`
}
type DeleteSavedSearchResult struct {
client.ResultMetadata
Result string `json:"result"`
}