« Twilio/Rest/Video/V1/CompositionSettings.pm
↑ Summary
Twilio/Rest/FlexApi/V1/InsightsAssessmentsComment.pm »
| 1 | # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file. | ||||||||||||
| 2 | package Twilio::Rest::Video::V1::RecordingSettings; | ||||||||||||
| 3 | |||||||||||||
| 4 | 2 | ▶ | use 5.016; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 5 | 2 | ▶ | use warnings; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 6 | |||||||||||||
| 7 | 2 | our $VERSION = '2.001'; | |||||||||||
| 8 | |||||||||||||
| 9 | package Twilio::Rest::Video::V1::RecordingSettingsContext; | ||||||||||||
| 10 | |||||||||||||
| 11 | 2 | ▶ | use parent 'Twilio::InstanceContext'; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 12 | |||||||||||||
| 13 | 2 | ▶ | use Twilio::Serialize; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 14 | |||||||||||||
| 15 | 2 | ▶ | sub new { | ||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
| |||||||||||||
| 16 | 2 | my ($class, $version) = @_; | |||||||||||
| 17 | 2 | my $self = $class->SUPER::new($version); | |||||||||||
| 18 | 2 | $self->{solution} = {}; | |||||||||||
| 19 | 2 | $self->{uri} = '/RecordingSettings/Default'; | |||||||||||
| 20 | 2 | return $self; | |||||||||||
| 21 | } | ||||||||||||
| 22 | |||||||||||||
| 23 | 1 | ▶ | sub create { | ||||||||||
|
Subroutine
create: called CC=2 SCAR=7.0
| |||||||||||||
| 24 | 1 | my ($self, $friendly_name, $options) = @_; | |||||||||||
| 25 | 1 | ▶ | $options //= {}; | ||||||||||
|
Condition50%1/2
$options //= {}
MC/DC0%0/1
$options //= {}
$options
Truth table50%1/2
A
A= $options
| |||||||||||||
| 26 | |||||||||||||
| 27 | my $data = { | ||||||||||||
| 28 | FriendlyName => $friendly_name, | ||||||||||||
| 29 | AwsCredentialsSid => $options->{aws_credentials_sid}, | ||||||||||||
| 30 | AwsS3Url => $options->{aws_s3_url}, | ||||||||||||
| 31 | AwsStorageEnabled => Twilio::Serialize::boolean_to_string($options->{aws_storage_enabled}), | ||||||||||||
| 32 | EncryptionEnabled => Twilio::Serialize::boolean_to_string($options->{encryption_enabled}), | ||||||||||||
| 33 | EncryptionKeySid => $options->{encryption_key_sid}, | ||||||||||||
| 34 | 1 | }; | |||||||||||
| 35 | |||||||||||||
| 36 | my $response = | ||||||||||||
| 37 | 1 | $self->{version}->handle_request('POST', $self->{uri}, 'create', { data => $data }); | |||||||||||
| 38 | 1 | return $self->_build_instance($response); | |||||||||||
| 39 | } | ||||||||||||
| 40 | |||||||||||||
| 41 | 1 | ▶ | sub fetch { | ||||||||||
|
Subroutine
fetch: called CC=1 SCAR=0.0
| |||||||||||||
| 42 | 1 | my ($self) = @_; | |||||||||||
| 43 | |||||||||||||
| 44 | 1 | my $response = $self->{version}->handle_request('GET', $self->{uri}, 'fetch'); | |||||||||||
| 45 | 1 | return $self->_build_instance($response); | |||||||||||
| 46 | } | ||||||||||||
| 47 | |||||||||||||
| 48 | 2 | ▶ | sub _build_instance { | ||||||||||
|
Subroutine
_build_instance: called CC=1 SCAR=0.0
| |||||||||||||
| 49 | 2 | my ($self, $response) = @_; | |||||||||||
| 50 | return Twilio::Rest::Video::V1::RecordingSettingsInstance->new($self->{version}, | ||||||||||||
| 51 | 2 | $response->get_content); | |||||||||||
| 52 | } | ||||||||||||
| 53 | |||||||||||||
| 54 | package Twilio::Rest::Video::V1::RecordingSettingsInstance; | ||||||||||||
| 55 | |||||||||||||
| 56 | 2 | ▶ | use parent 'Twilio::InstanceResource'; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 57 | |||||||||||||
| 58 | 2 | ▶ | use Twilio::Deserialize; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 59 | |||||||||||||
| 60 | 2 | ▶ | sub new { | ||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
| |||||||||||||
| 61 | 2 | my ($class, $version, $payload) = @_; | |||||||||||
| 62 | 2 | my $self = $class->SUPER::new($version, $payload); | |||||||||||
| 63 | 2 | $self->{solution} = {}; | |||||||||||
| 64 | 2 | return $self; | |||||||||||
| 65 | } | ||||||||||||
| 66 | |||||||||||||
| 67 | 0 | ▶ | sub create { | ||||||||||
|
Subroutine
create: not called CC=1 SCAR=6.9
| |||||||||||||
| 68 | 0 | my ($self, @arguments) = @_; | |||||||||||
| 69 | 0 | return $self->_context->create(@arguments); | |||||||||||
| 70 | } | ||||||||||||
| 71 | |||||||||||||
| 72 | 0 | ▶ | sub fetch { | ||||||||||
|
Subroutine
fetch: not called CC=1 SCAR=6.9
| |||||||||||||
| 73 | 0 | my ($self, @arguments) = @_; | |||||||||||
| 74 | 0 | return $self->_context->fetch(@arguments); | |||||||||||
| 75 | } | ||||||||||||
| 76 | |||||||||||||
| 77 | 0 | ▶ | sub _context { | ||||||||||
|
Subroutine
_context: not called CC=1 SCAR=6.9
| |||||||||||||
| 78 | 0 | my ($self) = @_; | |||||||||||
| 79 | 0 | return Twilio::Rest::Video::V1::RecordingSettingsContext->new($self->{version}); | |||||||||||
| 80 | } | ||||||||||||
| 81 | |||||||||||||
| 82 | 2 | ▶ | sub account_sid { return $_[0]{properties}{account_sid} } | ||||||||||
|
Subroutine
account_sid: called CC=1 SCAR=0.0
| |||||||||||||
| 83 | 2 | ▶ | sub aws_credentials_sid { return $_[0]{properties}{aws_credentials_sid} } | ||||||||||
|
Subroutine
aws_credentials_sid: called CC=1 SCAR=0.0
| |||||||||||||
| 84 | 2 | ▶ | sub aws_s3_url { return $_[0]{properties}{aws_s3_url} } | ||||||||||
|
Subroutine
aws_s3_url: called CC=1 SCAR=0.0
| |||||||||||||
| 85 | 2 | ▶ | sub aws_storage_enabled { return $_[0]{properties}{aws_storage_enabled} } | ||||||||||
|
Subroutine
aws_storage_enabled: called CC=1 SCAR=0.0
| |||||||||||||
| 86 | 2 | ▶ | sub encryption_enabled { return $_[0]{properties}{encryption_enabled} } | ||||||||||
|
Subroutine
encryption_enabled: called CC=1 SCAR=0.0
| |||||||||||||
| 87 | 2 | ▶ | sub encryption_key_sid { return $_[0]{properties}{encryption_key_sid} } | ||||||||||
|
Subroutine
encryption_key_sid: called CC=1 SCAR=0.0
| |||||||||||||
| 88 | 2 | ▶ | sub friendly_name { return $_[0]{properties}{friendly_name} } | ||||||||||
|
Subroutine
friendly_name: called CC=1 SCAR=0.0
| |||||||||||||
| 89 | 2 | ▶ | sub url { return $_[0]{properties}{url} } | ||||||||||
|
Subroutine
url: called CC=1 SCAR=0.0
| |||||||||||||
| 90 | |||||||||||||
| 91 | 2 | 1; | |||||||||||
| 92 | |||||||||||||
| 93 | __END__ | ||||||||||||