Skip to content

Commit eb61b49

Browse files
committed
Merge branch 'main' of github.com:grafana/amixr-api-go-client
2 parents 8ca93e5 + a0f8b48 commit eb61b49

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

escalation_policy.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ type Escalation struct {
4242
Important *bool `json:"important"`
4343
NotifyIfTimeFrom *string `json:"notify_if_time_from"`
4444
NotifyIfTimeTo *string `json:"notify_if_time_to"`
45+
Severity *string `json:"severity"`
4546
}
4647

4748
// Empty struct is here in case we want to add request params to ListEscalations.
@@ -107,6 +108,7 @@ type CreateEscalationOptions struct {
107108
Important *bool `json:"important,omitempty"`
108109
NotifyIfTimeFrom string `json:"notify_if_time_from,omitempty"`
109110
NotifyIfTimeTo string `json:"notify_if_time_to,omitempty"`
111+
Severity string `json:"severity,omitempty"`
110112
}
111113

112114
// CreateEscalation creates an escalation
@@ -145,6 +147,7 @@ type UpdateEscalationOptions struct {
145147
Important *bool `json:"important,omitempty"`
146148
NotifyIfTimeFrom string `json:"notify_if_time_from,omitempty"`
147149
NotifyIfTimeTo string `json:"notify_if_time_to,omitempty"`
150+
Severity string `json:"severity,omitempty"`
148151
}
149152

150153
// UpdateEscalation updates an escalation with new templates and/or name. At least one field in template is required

on_call_shift.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ type OnCallShift struct {
3434
Level int `json:"level"`
3535
Start string `json:"start"`
3636
Duration int `json:"duration"`
37+
Until *string `json:"until"`
3738
Frequency *string `json:"frequency"`
3839
Users *[]string `json:"users"`
3940
Interval *int `json:"interval"`
@@ -102,6 +103,7 @@ type CreateOnCallShiftOptions struct {
102103
Level *int `json:"level,omitempty"`
103104
Start string `json:"start"`
104105
Duration int `json:"duration"`
106+
Until *string `json:"until"`
105107
Frequency *string `json:"frequency"`
106108
Users *[]string `json:"users"`
107109
Interval *int `json:"interval"`
@@ -143,6 +145,7 @@ type UpdateOnCallShiftOptions struct {
143145
Level *int `json:"level,omitempty"`
144146
Start string `json:"start"`
145147
Duration int `json:"duration"`
148+
Until *string `json:"until"`
146149
Frequency *string `json:"frequency"`
147150
Users *[]string `json:"users"`
148151
Interval *int `json:"interval"`

on_call_shift_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ var testOnCallShift = &OnCallShift{
1919
Name: "Test On-Call Shift",
2020
Type: "recurrent_event",
2121
Start: "2020-09-04T13:00:00",
22+
Until: "2020-09-05T13:00:00",
2223
Level: 0,
2324
Duration: 7200,
2425
Frequency: &frequency,
@@ -35,6 +36,7 @@ var testOnCallShiftBody = `{
3536
"schedule_id" : "SBM7DV7BKFUYU",
3637
"type" : "recurrent_event",
3738
"start" : "2020-09-04T13:00:00",
39+
"until" : "2020-09-05T13:00:00",
3840
"level" : 0,
3941
"duration" : 7200,
4042
"frequency" : "weekly",

0 commit comments

Comments
 (0)