twilio-ruby 5.10.5 → 5.10.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +10 -0
  3. data/CHANGES.md +10 -0
  4. data/Dockerfile +9 -0
  5. data/Makefile +11 -0
  6. data/README.md +5 -2
  7. data/lib/twilio-ruby/rest/api.rb +1 -2
  8. data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +117 -32
  9. data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +30 -0
  10. data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +112 -56
  11. data/lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb +460 -0
  12. data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +7 -0
  13. data/lib/twilio-ruby/rest/api/v2010/account/transcription.rb +4 -4
  14. data/lib/twilio-ruby/rest/client.rb +1 -2
  15. data/lib/twilio-ruby/rest/preview.rb +8 -8
  16. data/lib/twilio-ruby/rest/preview/marketplace.rb +13 -13
  17. data/lib/twilio-ruby/rest/preview/understand/assistant/intent/field.rb +5 -2
  18. data/lib/twilio-ruby/rest/preview/understand/assistant/query.rb +8 -8
  19. data/lib/twilio-ruby/rest/proxy/v1/service.rb +9 -9
  20. data/lib/twilio-ruby/rest/proxy/v1/service/phone_number.rb +10 -8
  21. data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +3 -7
  22. data/lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb +3 -49
  23. data/lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb +1 -1
  24. data/lib/twilio-ruby/rest/video.rb +18 -6
  25. data/lib/twilio-ruby/rest/video/v1.rb +27 -13
  26. data/lib/twilio-ruby/rest/video/v1/composition_settings.rb +278 -0
  27. data/lib/twilio-ruby/rest/video/v1/recording_settings.rb +278 -0
  28. data/lib/twilio-ruby/version.rb +1 -1
  29. data/spec/integration/api/v2010/account/call/recording_spec.rb +103 -0
  30. data/spec/integration/api/v2010/account/conference/recording_spec.rb +240 -0
  31. data/spec/integration/api/v2010/account/message_spec.rb +0 -5
  32. data/spec/integration/proxy/v1/service/session/participant_spec.rb +0 -48
  33. data/spec/integration/video/v1/composition_settings_spec.rb +86 -0
  34. data/spec/integration/video/v1/recording_settings_spec.rb +86 -0
  35. metadata +13 -3
@@ -38,7 +38,7 @@ module Twilio
38
38
  # Retrieve a single page of MessageInteractionInstance records from the API.
39
39
  # Request is executed immediately.
40
40
  # @param [String] body The message to send to the participant
41
- # @param [String] media_url The media_url
41
+ # @param [String] media_url Not currently supported during beta.
42
42
  # @return [MessageInteractionInstance] Newly created MessageInteractionInstance
43
43
  def create(body: :unset, media_url: :unset)
44
44
  data = Twilio::Values.of({'Body' => body, 'MediaUrl' => Twilio.serialize_list(media_url) { |e| e }, })
@@ -29,12 +29,9 @@ module Twilio
29
29
  end
30
30
 
31
31
  ##
32
- # @param [String] sid `CJxx…xx` A system-generated 34-character string that
33
- # uniquely identifies this Composition.
34
- # @return [Twilio::REST::Video::V1::CompositionInstance] if sid was passed.
35
- # @return [Twilio::REST::Video::V1::CompositionList]
36
- def compositions(sid=:unset)
37
- self.v1.compositions(sid)
32
+ # @return [Twilio::REST::Video::V1::CompositionSettingsInstance]
33
+ def composition_settings
34
+ self.v1.composition_settings()
38
35
  end
39
36
 
40
37
  ##
@@ -46,6 +43,21 @@ module Twilio
46
43
  self.v1.recordings(sid)
47
44
  end
48
45
 
46
+ ##
47
+ # @return [Twilio::REST::Video::V1::RecordingSettingsInstance]
48
+ def recording_settings
49
+ self.v1.recording_settings()
50
+ end
51
+
52
+ ##
53
+ # @param [String] sid `CJxx…xx` A system-generated 34-character string that
54
+ # uniquely identifies this Composition.
55
+ # @return [Twilio::REST::Video::V1::CompositionInstance] if sid was passed.
56
+ # @return [Twilio::REST::Video::V1::CompositionList]
57
+ def compositions(sid=:unset)
58
+ self.v1.compositions(sid)
59
+ end
60
+
49
61
  ##
50
62
  # @param [String] sid A system-generated 34-character string that uniquely
51
63
  # identifies this resource.
@@ -15,24 +15,17 @@ module Twilio
15
15
  def initialize(domain)
16
16
  super
17
17
  @version = 'v1'
18
- @compositions = nil
18
+ @composition_settings = nil
19
19
  @recordings = nil
20
+ @recording_settings = nil
21
+ @compositions = nil
20
22
  @rooms = nil
21
23
  end
22
24
 
23
25
  ##
24
- # @param [String] sid The Composition Sid that uniquely identifies the Composition
25
- # to fetch.
26
- # @return [Twilio::REST::Video::V1::CompositionContext] if sid was passed.
27
- # @return [Twilio::REST::Video::V1::CompositionList]
28
- def compositions(sid=:unset)
29
- if sid.nil?
30
- raise ArgumentError, 'sid cannot be nil'
31
- elsif sid == :unset
32
- @compositions ||= CompositionList.new self
33
- else
34
- CompositionContext.new(self, sid)
35
- end
26
+ # @return [Twilio::REST::Video::V1::CompositionSettingsContext]
27
+ def composition_settings
28
+ @composition_settings ||= CompositionSettingsContext.new self
36
29
  end
37
30
 
38
31
  ##
@@ -50,6 +43,27 @@ module Twilio
50
43
  end
51
44
  end
52
45
 
46
+ ##
47
+ # @return [Twilio::REST::Video::V1::RecordingSettingsContext]
48
+ def recording_settings
49
+ @recording_settings ||= RecordingSettingsContext.new self
50
+ end
51
+
52
+ ##
53
+ # @param [String] sid The Composition Sid that uniquely identifies the Composition
54
+ # to fetch.
55
+ # @return [Twilio::REST::Video::V1::CompositionContext] if sid was passed.
56
+ # @return [Twilio::REST::Video::V1::CompositionList]
57
+ def compositions(sid=:unset)
58
+ if sid.nil?
59
+ raise ArgumentError, 'sid cannot be nil'
60
+ elsif sid == :unset
61
+ @compositions ||= CompositionList.new self
62
+ else
63
+ CompositionContext.new(self, sid)
64
+ end
65
+ end
66
+
53
67
  ##
54
68
  # @param [String] sid The sid
55
69
  # @return [Twilio::REST::Video::V1::RoomContext] if sid was passed.
@@ -0,0 +1,278 @@
1
+ ##
2
+ # This code was generated by
3
+ # \ / _ _ _| _ _
4
+ # | (_)\/(_)(_|\/| |(/_ v1.0.0
5
+ # / /
6
+ #
7
+ # frozen_string_literal: true
8
+
9
+ module Twilio
10
+ module REST
11
+ class Video < Domain
12
+ class V1 < Version
13
+ ##
14
+ # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
15
+ class CompositionSettingsList < ListResource
16
+ ##
17
+ # Initialize the CompositionSettingsList
18
+ # @param [Version] version Version that contains the resource
19
+ # @return [CompositionSettingsList] CompositionSettingsList
20
+ def initialize(version)
21
+ super(version)
22
+
23
+ # Path Solution
24
+ @solution = {}
25
+ end
26
+
27
+ ##
28
+ # Provide a user friendly representation
29
+ def to_s
30
+ '#<Twilio.Video.V1.CompositionSettingsList>'
31
+ end
32
+ end
33
+
34
+ ##
35
+ # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
36
+ class CompositionSettingsPage < Page
37
+ ##
38
+ # Initialize the CompositionSettingsPage
39
+ # @param [Version] version Version that contains the resource
40
+ # @param [Response] response Response from the API
41
+ # @param [Hash] solution Path solution for the resource
42
+ # @return [CompositionSettingsPage] CompositionSettingsPage
43
+ def initialize(version, response, solution)
44
+ super(version, response)
45
+
46
+ # Path Solution
47
+ @solution = solution
48
+ end
49
+
50
+ ##
51
+ # Build an instance of CompositionSettingsInstance
52
+ # @param [Hash] payload Payload response from the API
53
+ # @return [CompositionSettingsInstance] CompositionSettingsInstance
54
+ def get_instance(payload)
55
+ CompositionSettingsInstance.new(@version, payload, )
56
+ end
57
+
58
+ ##
59
+ # Provide a user friendly representation
60
+ def to_s
61
+ '<Twilio.Video.V1.CompositionSettingsPage>'
62
+ end
63
+ end
64
+
65
+ ##
66
+ # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
67
+ class CompositionSettingsContext < InstanceContext
68
+ ##
69
+ # Initialize the CompositionSettingsContext
70
+ # @param [Version] version Version that contains the resource
71
+ # @return [CompositionSettingsContext] CompositionSettingsContext
72
+ def initialize(version)
73
+ super(version)
74
+
75
+ # Path Solution
76
+ @solution = {}
77
+ @uri = "/CompositionSettings/Default"
78
+ end
79
+
80
+ ##
81
+ # Fetch a CompositionSettingsInstance
82
+ # @return [CompositionSettingsInstance] Fetched CompositionSettingsInstance
83
+ def fetch
84
+ params = Twilio::Values.of({})
85
+
86
+ payload = @version.fetch(
87
+ 'GET',
88
+ @uri,
89
+ params,
90
+ )
91
+
92
+ CompositionSettingsInstance.new(@version, payload, )
93
+ end
94
+
95
+ ##
96
+ # Retrieve a single page of CompositionSettingsInstance records from the API.
97
+ # Request is executed immediately.
98
+ # @param [String] friendly_name Friendly name of the configuration to be shown in
99
+ # the console
100
+ # @param [String] aws_credentials_sid SID of the Stored Credential resource `CRxx`
101
+ # @param [String] encryption_key_sid SID of the Public Key resource `CRxx`
102
+ # @param [String] aws_s3_url Identity of the external location where the
103
+ # compositions should be stored. We only support DNS-compliant URLs like
104
+ # `http://<my-bucket>.s3-<aws-region>.amazonaws.com/compositions`, where
105
+ # `compositions` is the path where you want compositions to be stored.
106
+ # @param [Boolean] aws_storage_enabled `true|false` When set to `true`, all
107
+ # Compositions will be written to the `AwsS3Url` specified above. When set to
108
+ # `false`, all Compositions will be stored in Twilio's cloud.
109
+ # @param [Boolean] encryption_enabled `true|false` When set to `true`, all
110
+ # Compositions will be stored encrypted. Dafault value is `false`
111
+ # @return [CompositionSettingsInstance] Newly created CompositionSettingsInstance
112
+ def create(friendly_name: nil, aws_credentials_sid: :unset, encryption_key_sid: :unset, aws_s3_url: :unset, aws_storage_enabled: :unset, encryption_enabled: :unset)
113
+ data = Twilio::Values.of({
114
+ 'FriendlyName' => friendly_name,
115
+ 'AwsCredentialsSid' => aws_credentials_sid,
116
+ 'EncryptionKeySid' => encryption_key_sid,
117
+ 'AwsS3Url' => aws_s3_url,
118
+ 'AwsStorageEnabled' => aws_storage_enabled,
119
+ 'EncryptionEnabled' => encryption_enabled,
120
+ })
121
+
122
+ payload = @version.create(
123
+ 'POST',
124
+ @uri,
125
+ data: data
126
+ )
127
+
128
+ CompositionSettingsInstance.new(@version, payload, )
129
+ end
130
+
131
+ ##
132
+ # Provide a user friendly representation
133
+ def to_s
134
+ context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
135
+ "#<Twilio.Video.V1.CompositionSettingsContext #{context}>"
136
+ end
137
+ end
138
+
139
+ ##
140
+ # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
141
+ class CompositionSettingsInstance < InstanceResource
142
+ ##
143
+ # Initialize the CompositionSettingsInstance
144
+ # @param [Version] version Version that contains the resource
145
+ # @param [Hash] payload payload that contains response from Twilio
146
+ # @return [CompositionSettingsInstance] CompositionSettingsInstance
147
+ def initialize(version, payload)
148
+ super(version)
149
+
150
+ # Marshaled Properties
151
+ @properties = {
152
+ 'account_sid' => payload['account_sid'],
153
+ 'friendly_name' => payload['friendly_name'],
154
+ 'aws_credentials_sid' => payload['aws_credentials_sid'],
155
+ 'aws_s3_url' => payload['aws_s3_url'],
156
+ 'aws_storage_enabled' => payload['aws_storage_enabled'],
157
+ 'encryption_key_sid' => payload['encryption_key_sid'],
158
+ 'encryption_enabled' => payload['encryption_enabled'],
159
+ 'url' => payload['url'],
160
+ }
161
+
162
+ # Context
163
+ @instance_context = nil
164
+ @params = {}
165
+ end
166
+
167
+ ##
168
+ # Generate an instance context for the instance, the context is capable of
169
+ # performing various actions. All instance actions are proxied to the context
170
+ # @return [CompositionSettingsContext] CompositionSettingsContext for this CompositionSettingsInstance
171
+ def context
172
+ unless @instance_context
173
+ @instance_context = CompositionSettingsContext.new(@version, )
174
+ end
175
+ @instance_context
176
+ end
177
+
178
+ ##
179
+ # @return [String] The Twilio Account SID associated with this item
180
+ def account_sid
181
+ @properties['account_sid']
182
+ end
183
+
184
+ ##
185
+ # @return [String] Friendly name of the configuration to be shown in the console
186
+ def friendly_name
187
+ @properties['friendly_name']
188
+ end
189
+
190
+ ##
191
+ # @return [String] SID of the Stored Credential resource CRxx
192
+ def aws_credentials_sid
193
+ @properties['aws_credentials_sid']
194
+ end
195
+
196
+ ##
197
+ # @return [String] URL of the S3 bucket where the compositions should be stored. We only support DNS-compliant URLs like http://<my-bucket>.s3-<aws-region>.amazonaws.com/compositions, where compositions is the path where you want compositions to be stored.
198
+ def aws_s3_url
199
+ @properties['aws_s3_url']
200
+ end
201
+
202
+ ##
203
+ # @return [Boolean] true|false When set to true, all Compositions will be written to the AwsS3Url specified above. When set to false, all Compositions will be stored in Twilio's cloud.
204
+ def aws_storage_enabled
205
+ @properties['aws_storage_enabled']
206
+ end
207
+
208
+ ##
209
+ # @return [String] SID of the Public Key resource CRxx
210
+ def encryption_key_sid
211
+ @properties['encryption_key_sid']
212
+ end
213
+
214
+ ##
215
+ # @return [Boolean] true|false When set to true, all Compositions will be stored encrypted.
216
+ def encryption_enabled
217
+ @properties['encryption_enabled']
218
+ end
219
+
220
+ ##
221
+ # @return [String] The url
222
+ def url
223
+ @properties['url']
224
+ end
225
+
226
+ ##
227
+ # Fetch a CompositionSettingsInstance
228
+ # @return [CompositionSettingsInstance] Fetched CompositionSettingsInstance
229
+ def fetch
230
+ context.fetch
231
+ end
232
+
233
+ ##
234
+ # Retrieve a single page of CompositionSettingsInstance records from the API.
235
+ # Request is executed immediately.
236
+ # @param [String] friendly_name Friendly name of the configuration to be shown in
237
+ # the console
238
+ # @param [String] aws_credentials_sid SID of the Stored Credential resource `CRxx`
239
+ # @param [String] encryption_key_sid SID of the Public Key resource `CRxx`
240
+ # @param [String] aws_s3_url Identity of the external location where the
241
+ # compositions should be stored. We only support DNS-compliant URLs like
242
+ # `http://<my-bucket>.s3-<aws-region>.amazonaws.com/compositions`, where
243
+ # `compositions` is the path where you want compositions to be stored.
244
+ # @param [Boolean] aws_storage_enabled `true|false` When set to `true`, all
245
+ # Compositions will be written to the `AwsS3Url` specified above. When set to
246
+ # `false`, all Compositions will be stored in Twilio's cloud.
247
+ # @param [Boolean] encryption_enabled `true|false` When set to `true`, all
248
+ # Compositions will be stored encrypted. Dafault value is `false`
249
+ # @return [CompositionSettingsInstance] Newly created CompositionSettingsInstance
250
+ def create(friendly_name: nil, aws_credentials_sid: :unset, encryption_key_sid: :unset, aws_s3_url: :unset, aws_storage_enabled: :unset, encryption_enabled: :unset)
251
+ context.create(
252
+ friendly_name: friendly_name,
253
+ aws_credentials_sid: aws_credentials_sid,
254
+ encryption_key_sid: encryption_key_sid,
255
+ aws_s3_url: aws_s3_url,
256
+ aws_storage_enabled: aws_storage_enabled,
257
+ encryption_enabled: encryption_enabled,
258
+ )
259
+ end
260
+
261
+ ##
262
+ # Provide a user friendly representation
263
+ def to_s
264
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
265
+ "<Twilio.Video.V1.CompositionSettingsInstance #{values}>"
266
+ end
267
+
268
+ ##
269
+ # Provide a detailed, user friendly representation
270
+ def inspect
271
+ values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
272
+ "<Twilio.Video.V1.CompositionSettingsInstance #{values}>"
273
+ end
274
+ end
275
+ end
276
+ end
277
+ end
278
+ end
@@ -0,0 +1,278 @@
1
+ ##
2
+ # This code was generated by
3
+ # \ / _ _ _| _ _
4
+ # | (_)\/(_)(_|\/| |(/_ v1.0.0
5
+ # / /
6
+ #
7
+ # frozen_string_literal: true
8
+
9
+ module Twilio
10
+ module REST
11
+ class Video < Domain
12
+ class V1 < Version
13
+ ##
14
+ # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
15
+ class RecordingSettingsList < ListResource
16
+ ##
17
+ # Initialize the RecordingSettingsList
18
+ # @param [Version] version Version that contains the resource
19
+ # @return [RecordingSettingsList] RecordingSettingsList
20
+ def initialize(version)
21
+ super(version)
22
+
23
+ # Path Solution
24
+ @solution = {}
25
+ end
26
+
27
+ ##
28
+ # Provide a user friendly representation
29
+ def to_s
30
+ '#<Twilio.Video.V1.RecordingSettingsList>'
31
+ end
32
+ end
33
+
34
+ ##
35
+ # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
36
+ class RecordingSettingsPage < Page
37
+ ##
38
+ # Initialize the RecordingSettingsPage
39
+ # @param [Version] version Version that contains the resource
40
+ # @param [Response] response Response from the API
41
+ # @param [Hash] solution Path solution for the resource
42
+ # @return [RecordingSettingsPage] RecordingSettingsPage
43
+ def initialize(version, response, solution)
44
+ super(version, response)
45
+
46
+ # Path Solution
47
+ @solution = solution
48
+ end
49
+
50
+ ##
51
+ # Build an instance of RecordingSettingsInstance
52
+ # @param [Hash] payload Payload response from the API
53
+ # @return [RecordingSettingsInstance] RecordingSettingsInstance
54
+ def get_instance(payload)
55
+ RecordingSettingsInstance.new(@version, payload, )
56
+ end
57
+
58
+ ##
59
+ # Provide a user friendly representation
60
+ def to_s
61
+ '<Twilio.Video.V1.RecordingSettingsPage>'
62
+ end
63
+ end
64
+
65
+ ##
66
+ # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
67
+ class RecordingSettingsContext < InstanceContext
68
+ ##
69
+ # Initialize the RecordingSettingsContext
70
+ # @param [Version] version Version that contains the resource
71
+ # @return [RecordingSettingsContext] RecordingSettingsContext
72
+ def initialize(version)
73
+ super(version)
74
+
75
+ # Path Solution
76
+ @solution = {}
77
+ @uri = "/RecordingSettings/Default"
78
+ end
79
+
80
+ ##
81
+ # Fetch a RecordingSettingsInstance
82
+ # @return [RecordingSettingsInstance] Fetched RecordingSettingsInstance
83
+ def fetch
84
+ params = Twilio::Values.of({})
85
+
86
+ payload = @version.fetch(
87
+ 'GET',
88
+ @uri,
89
+ params,
90
+ )
91
+
92
+ RecordingSettingsInstance.new(@version, payload, )
93
+ end
94
+
95
+ ##
96
+ # Retrieve a single page of RecordingSettingsInstance records from the API.
97
+ # Request is executed immediately.
98
+ # @param [String] friendly_name Friendly name of the configuration to be shown in
99
+ # the console
100
+ # @param [String] aws_credentials_sid SID of the Stored Credential resource `CRxx`
101
+ # @param [String] encryption_key_sid SID of the Public Key resource `CRxx`
102
+ # @param [String] aws_s3_url Identity of the external location where the
103
+ # recordings should be stored. We only support DNS-compliant URLs like
104
+ # `http://<my-bucket>.s3-<aws-region>.amazonaws.com/recordings`, where
105
+ # `recordings` is the path where you want recordings to be stored.
106
+ # @param [Boolean] aws_storage_enabled `true|false` When set to `true`, all
107
+ # Recordings will be written to the `AwsS3Url` specified above. When set to
108
+ # `false`, all Recordings will be stored in Twilio's cloud.
109
+ # @param [Boolean] encryption_enabled `true|false` When set to `true`, all
110
+ # Recordings will be stored encrypted. Dafault value is `false`
111
+ # @return [RecordingSettingsInstance] Newly created RecordingSettingsInstance
112
+ def create(friendly_name: nil, aws_credentials_sid: :unset, encryption_key_sid: :unset, aws_s3_url: :unset, aws_storage_enabled: :unset, encryption_enabled: :unset)
113
+ data = Twilio::Values.of({
114
+ 'FriendlyName' => friendly_name,
115
+ 'AwsCredentialsSid' => aws_credentials_sid,
116
+ 'EncryptionKeySid' => encryption_key_sid,
117
+ 'AwsS3Url' => aws_s3_url,
118
+ 'AwsStorageEnabled' => aws_storage_enabled,
119
+ 'EncryptionEnabled' => encryption_enabled,
120
+ })
121
+
122
+ payload = @version.create(
123
+ 'POST',
124
+ @uri,
125
+ data: data
126
+ )
127
+
128
+ RecordingSettingsInstance.new(@version, payload, )
129
+ end
130
+
131
+ ##
132
+ # Provide a user friendly representation
133
+ def to_s
134
+ context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
135
+ "#<Twilio.Video.V1.RecordingSettingsContext #{context}>"
136
+ end
137
+ end
138
+
139
+ ##
140
+ # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
141
+ class RecordingSettingsInstance < InstanceResource
142
+ ##
143
+ # Initialize the RecordingSettingsInstance
144
+ # @param [Version] version Version that contains the resource
145
+ # @param [Hash] payload payload that contains response from Twilio
146
+ # @return [RecordingSettingsInstance] RecordingSettingsInstance
147
+ def initialize(version, payload)
148
+ super(version)
149
+
150
+ # Marshaled Properties
151
+ @properties = {
152
+ 'account_sid' => payload['account_sid'],
153
+ 'friendly_name' => payload['friendly_name'],
154
+ 'aws_credentials_sid' => payload['aws_credentials_sid'],
155
+ 'aws_s3_url' => payload['aws_s3_url'],
156
+ 'aws_storage_enabled' => payload['aws_storage_enabled'],
157
+ 'encryption_key_sid' => payload['encryption_key_sid'],
158
+ 'encryption_enabled' => payload['encryption_enabled'],
159
+ 'url' => payload['url'],
160
+ }
161
+
162
+ # Context
163
+ @instance_context = nil
164
+ @params = {}
165
+ end
166
+
167
+ ##
168
+ # Generate an instance context for the instance, the context is capable of
169
+ # performing various actions. All instance actions are proxied to the context
170
+ # @return [RecordingSettingsContext] RecordingSettingsContext for this RecordingSettingsInstance
171
+ def context
172
+ unless @instance_context
173
+ @instance_context = RecordingSettingsContext.new(@version, )
174
+ end
175
+ @instance_context
176
+ end
177
+
178
+ ##
179
+ # @return [String] The Twilio Account SID associated with this item
180
+ def account_sid
181
+ @properties['account_sid']
182
+ end
183
+
184
+ ##
185
+ # @return [String] Friendly name of the configuration to be shown in the console
186
+ def friendly_name
187
+ @properties['friendly_name']
188
+ end
189
+
190
+ ##
191
+ # @return [String] SID of the Stored Credential resource CRxx
192
+ def aws_credentials_sid
193
+ @properties['aws_credentials_sid']
194
+ end
195
+
196
+ ##
197
+ # @return [String] URL of the S3 bucket where the recordings should be stored. We only support DNS-compliant URLs like http://<my-bucket>.s3-<aws-region>.amazonaws.com/recordings, where recordings is the path where you want recordings to be stored.
198
+ def aws_s3_url
199
+ @properties['aws_s3_url']
200
+ end
201
+
202
+ ##
203
+ # @return [Boolean] true|false When set to true, all Recordings will be written to the AwsS3Url specified above. When set to false, all Recordings will be stored in Twilio's cloud.
204
+ def aws_storage_enabled
205
+ @properties['aws_storage_enabled']
206
+ end
207
+
208
+ ##
209
+ # @return [String] SID of the Public Key resource CRxx
210
+ def encryption_key_sid
211
+ @properties['encryption_key_sid']
212
+ end
213
+
214
+ ##
215
+ # @return [Boolean] true|false When set to true, all Recordings will be stored encrypted.
216
+ def encryption_enabled
217
+ @properties['encryption_enabled']
218
+ end
219
+
220
+ ##
221
+ # @return [String] The url
222
+ def url
223
+ @properties['url']
224
+ end
225
+
226
+ ##
227
+ # Fetch a RecordingSettingsInstance
228
+ # @return [RecordingSettingsInstance] Fetched RecordingSettingsInstance
229
+ def fetch
230
+ context.fetch
231
+ end
232
+
233
+ ##
234
+ # Retrieve a single page of RecordingSettingsInstance records from the API.
235
+ # Request is executed immediately.
236
+ # @param [String] friendly_name Friendly name of the configuration to be shown in
237
+ # the console
238
+ # @param [String] aws_credentials_sid SID of the Stored Credential resource `CRxx`
239
+ # @param [String] encryption_key_sid SID of the Public Key resource `CRxx`
240
+ # @param [String] aws_s3_url Identity of the external location where the
241
+ # recordings should be stored. We only support DNS-compliant URLs like
242
+ # `http://<my-bucket>.s3-<aws-region>.amazonaws.com/recordings`, where
243
+ # `recordings` is the path where you want recordings to be stored.
244
+ # @param [Boolean] aws_storage_enabled `true|false` When set to `true`, all
245
+ # Recordings will be written to the `AwsS3Url` specified above. When set to
246
+ # `false`, all Recordings will be stored in Twilio's cloud.
247
+ # @param [Boolean] encryption_enabled `true|false` When set to `true`, all
248
+ # Recordings will be stored encrypted. Dafault value is `false`
249
+ # @return [RecordingSettingsInstance] Newly created RecordingSettingsInstance
250
+ def create(friendly_name: nil, aws_credentials_sid: :unset, encryption_key_sid: :unset, aws_s3_url: :unset, aws_storage_enabled: :unset, encryption_enabled: :unset)
251
+ context.create(
252
+ friendly_name: friendly_name,
253
+ aws_credentials_sid: aws_credentials_sid,
254
+ encryption_key_sid: encryption_key_sid,
255
+ aws_s3_url: aws_s3_url,
256
+ aws_storage_enabled: aws_storage_enabled,
257
+ encryption_enabled: encryption_enabled,
258
+ )
259
+ end
260
+
261
+ ##
262
+ # Provide a user friendly representation
263
+ def to_s
264
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
265
+ "<Twilio.Video.V1.RecordingSettingsInstance #{values}>"
266
+ end
267
+
268
+ ##
269
+ # Provide a detailed, user friendly representation
270
+ def inspect
271
+ values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
272
+ "<Twilio.Video.V1.RecordingSettingsInstance #{values}>"
273
+ end
274
+ end
275
+ end
276
+ end
277
+ end
278
+ end