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
/
result.go
114 lines (96 loc) · 3.06 KB
/
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
package notification
import (
"github.com/BillHeroInc/opsgenie-go-sdk-v2/client"
"github.com/BillHeroInc/opsgenie-go-sdk-v2/og"
)
type Parent struct {
Id string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
}
type RuleStep struct {
Parent Parent `json:"_parent,omitempty"`
Id string `json:"id,omitempty"`
SendAfter og.SendAfter `json:"sendAfter,omitempty"`
Contact og.Contact `json:"contact,omitempty"`
Enabled bool `json:"enabled,omitempty"`
}
type CreateRuleStepResult struct {
client.ResultMetadata
Id string `json:"id,omitempty"`
}
type GetRuleStepResult struct {
client.ResultMetadata
RuleStep RuleStep `json:"data,omitempty"`
}
type UpdateRuleStepResult struct {
client.ResultMetadata
Id string `json:"id,omitempty"`
}
type DeleteRuleStepResult struct {
client.ResultMetadata
Result string `json:"result,omitempty"`
}
type ListRuleStepResult struct {
client.ResultMetadata
RuleSteps []RuleStep `json:"data,omitempty"`
}
type EnableRuleStepResult struct {
client.ResultMetadata
Id string `json:"id,omitempty"`
}
type DisableRuleStepResult struct {
client.ResultMetadata
Id string `json:"id,omitempty"`
}
type SimpleNotificationRuleResult struct {
Id string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
ActionType ActionType `json:"actionType,omitempty"`
Order uint32 `json:"order,omitempty"`
Enabled bool `json:"bool,omitempty"`
}
type CreateRuleResult struct {
client.ResultMetadata
SimpleNotificationRule SimpleNotificationRuleResult `json:"data,omitempty"`
}
type GetRuleResult struct {
client.ResultMetadata
Id string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
ActionType ActionType `json:"actionType,omitempty"`
Order uint32 `json:"order,omitempty"`
Enabled bool `json:"enabled,omitempty"`
NotificationTime []NotificationTimeType `json:"notificationTime,omitempty"`
TimeRestriction *og.TimeRestriction `json:"timeRestriction,omitempty"`
Steps []*StepResult `json:"steps,omitempty"`
Schedules []*Schedule `json:"schedules,omitempty"`
}
type StepResult struct {
Contact og.Contact `json:"contact,omitempty"`
SendAfter *og.SendAfter `json:"sendAfter,omitempty"`
Enabled bool `json:"enabled,omitempty"`
}
type UpdateRuleResult struct {
client.ResultMetadata
SimpleNotificationRule SimpleNotificationRuleResult `json:"data,omitempty"`
}
type DeleteRuleResult struct {
client.ResultMetadata
Result string `json:"result,omitempty"`
}
type ListRuleResult struct {
client.ResultMetadata
SimpleNotificationRules []SimpleNotificationRuleResult `json:"data,omitempty"`
}
type EnableRuleResult struct {
client.ResultMetadata
Id string `json:"id,omitempty"`
}
type DisableRuleResult struct {
client.ResultMetadata
Id string `json:"id,omitempty"`
}
type CopyNotificationRulesResult struct {
client.ResultMetadata
Result string `json:"result,omitempty"`
}