-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathalert_service.go
More file actions
71 lines (56 loc) · 2.07 KB
/
Copy pathalert_service.go
File metadata and controls
71 lines (56 loc) · 2.07 KB
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
// Code generated by sdk-generator. DO NOT EDIT.
package chargebee
import (
"fmt"
"net/url"
)
type AlertService struct {
config *ClientConfig
}
func (s *AlertService) Create(req *AlertCreateRequest) (*AlertCreateResponse, error) {
req.method = "POST"
req.path = "/alerts"
req.isIdempotent = true
req.telemetryResource = "alert"
req.telemetryOperation = "create"
return send[*AlertCreateResponse](req, s.config)
}
func (s *AlertService) Retrieve(req *AlertRetrieveRequest) (*AlertRetrieveResponse, error) {
req.method = "GET"
req.path = fmt.Sprintf("/alerts/%v", url.PathEscape(req.Id))
req.telemetryResource = "alert"
req.telemetryOperation = "retrieve"
return send[*AlertRetrieveResponse](req, s.config)
}
func (s *AlertService) List(req *AlertListRequest) (*AlertListResponse, error) {
req.method = "GET"
req.path = "/alerts"
req.isListRequest = true
req.telemetryResource = "alert"
req.telemetryOperation = "list"
return send[*AlertListResponse](req, s.config)
}
func (s *AlertService) Update(id string, req *AlertUpdateRequest) (*AlertUpdateResponse, error) {
req.method = "POST"
req.path = fmt.Sprintf("/alerts/%v", url.PathEscape(id))
req.isIdempotent = true
req.telemetryResource = "alert"
req.telemetryOperation = "update"
return send[*AlertUpdateResponse](req, s.config)
}
func (s *AlertService) Delete(req *AlertDeleteRequest) (*AlertDeleteResponse, error) {
req.method = "POST"
req.path = fmt.Sprintf("/alerts/%v/delete", url.PathEscape(req.Id))
req.isIdempotent = true
req.telemetryResource = "alert"
req.telemetryOperation = "delete"
return send[*AlertDeleteResponse](req, s.config)
}
func (s *AlertService) ApplicationAlertsForSubscription(id string, req *AlertApplicationAlertsForSubscriptionRequest) (*AlertApplicationAlertsForSubscriptionResponse, error) {
req.method = "GET"
req.path = fmt.Sprintf("/subscriptions/%v/applicable_alerts", url.PathEscape(id))
req.isListRequest = true
req.telemetryResource = "alert"
req.telemetryOperation = "applicationAlertsForSubscription"
return send[*AlertApplicationAlertsForSubscriptionResponse](req, s.config)
}