-
Notifications
You must be signed in to change notification settings - Fork 13
/
check_alert_source_usage.go
28 lines (25 loc) · 1.1 KB
/
check_alert_source_usage.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
package opslevel
type AlertSourceUsageCheckFragment struct {
AlertSourceNamePredicate *Predicate `graphql:"alertSourceNamePredicate"` // The condition that the alert source name should satisfy to be evaluated.
AlertSourceType AlertSourceTypeEnum `graphql:"alertSourceType"` // The type of the alert source.
}
func (client *Client) CreateCheckAlertSourceUsage(input CheckAlertSourceUsageCreateInput) (*Check, error) {
var m struct {
Payload CheckResponsePayload `graphql:"checkAlertSourceUsageCreate(input: $input)"`
}
v := PayloadVariables{
"input": input,
}
err := client.Mutate(&m, v, WithName("CheckAlertSourceUsageCreate"))
return &m.Payload.Check, HandleErrors(err, m.Payload.Errors)
}
func (client *Client) UpdateCheckAlertSourceUsage(input CheckAlertSourceUsageUpdateInput) (*Check, error) {
var m struct {
Payload CheckResponsePayload `graphql:"checkAlertSourceUsageUpdate(input: $input)"`
}
v := PayloadVariables{
"input": input,
}
err := client.Mutate(&m, v, WithName("CheckAlertSourceUsageUpdate"))
return &m.Payload.Check, HandleErrors(err, m.Payload.Errors)
}