/
api_op_client.go
48 lines (40 loc) · 1.38 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
46
47
48
// This is an autogenerated file. DO NOT MODIFY
package field_type
import (
"github.com/RJPearson94/twilio-sdk-go/client"
"github.com/RJPearson94/twilio-sdk-go/service/autopilot/v1/assistant/field_type/field_value"
"github.com/RJPearson94/twilio-sdk-go/service/autopilot/v1/assistant/field_type/field_values"
)
// Client for managing a specific field type resource
// See https://www.twilio.com/docs/autopilot/api/field-type for more details
type Client struct {
client *client.Client
assistantSid string
sid string
FieldValue func(string) *field_value.Client
FieldValues *field_values.Client
}
// ClientProperties are the properties required to manage the field type resources
type ClientProperties struct {
AssistantSid string
Sid string
}
// New creates a new instance of the field type client
func New(client *client.Client, properties ClientProperties) *Client {
return &Client{
client: client,
assistantSid: properties.AssistantSid,
sid: properties.Sid,
FieldValue: func(fieldValueSid string) *field_value.Client {
return field_value.New(client, field_value.ClientProperties{
AssistantSid: properties.AssistantSid,
FieldTypeSid: properties.Sid,
Sid: fieldValueSid,
})
},
FieldValues: field_values.New(client, field_values.ClientProperties{
AssistantSid: properties.AssistantSid,
FieldTypeSid: properties.Sid,
}),
}
}