/
api_op_client.go
45 lines (37 loc) · 1.17 KB
/
api_op_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
// Package version contains auto-generated files. DO NOT MODIFY
package version
import (
"github.com/RJPearson94/twilio-sdk-go/client"
"github.com/RJPearson94/twilio-sdk-go/service/serverless/v1/service/function/version/content"
)
// Client for managing a specific function version resource
// See https://www.twilio.com/docs/runtime/functions-assets-api/api/function-version for more details
type Client struct {
client *client.Client
functionSid string
serviceSid string
sid string
Content func() *content.Client
}
// ClientProperties are the properties required to manage the version resources
type ClientProperties struct {
FunctionSid string
ServiceSid string
Sid string
}
// New creates a new instance of the version client
func New(client *client.Client, properties ClientProperties) *Client {
return &Client{
client: client,
functionSid: properties.FunctionSid,
serviceSid: properties.ServiceSid,
sid: properties.Sid,
Content: func() *content.Client {
return content.New(client, content.ClientProperties{
FunctionSid: properties.FunctionSid,
ServiceSid: properties.ServiceSid,
VersionSid: properties.Sid,
})
},
}
}