-
Notifications
You must be signed in to change notification settings - Fork 2
/
recording_client.go
54 lines (46 loc) · 1.74 KB
/
recording_client.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
// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING;
// Autogenerated by clientgenerator -r Recording -m R DO NOT EDIT
package api
import (
"github.com/exotel/goapi/assets/types"
"github.com/exotel/goapi/resources"
)
//RecordingService is the struct that defines the recording information and has fubnctions to perform recording level
type RecordingService struct {
Client
}
//Get sets the action as types.READ
func (__receiver_RService *RecordingService) Get() *RecordingService {
if len(__receiver_RService.ResourceID) == 0 {
__receiver_RService.action = types.BULKREAD
__receiver_RService.data = resources.RecordingFilter{}
__receiver_RService.url = resources.RecordingURLS[types.BULKREAD]
} else {
__receiver_RService.data = struct{}{}
__receiver_RService.url = resources.RecordingURLS[types.READ]
__receiver_RService.action = types.READ
}
return __receiver_RService
}
//ID sets the id for the resource request
func (__receiver_RService *RecordingService) ID(id string) *RecordingService {
__receiver_RService.ResourceID = id
switch __receiver_RService.action {
case types.BULKREAD:
__receiver_RService.data = struct{}{}
__receiver_RService.url = resources.RecordingURLS[types.READ]
__receiver_RService.action = types.READ
}
return __receiver_RService
}
//Filter set the filter for read operation for read
func (__receiver_RService *RecordingService) Filter(filter resources.RecordingFilter) *RecordingService {
__receiver_RService.data = filter
return __receiver_RService
}
//Recording returns an instance of RecordingService
func (c *Client) Recording() *RecordingService {
recordingService := RecordingService{Client: *c}
recordingService.validActions = types.READ | types.BULKREAD | 0x00
return &recordingService
}