Class: Twilio::REST::Video::V1::CompositionHookInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Video::V1::CompositionHookInstance
- Defined in:
- lib/twilio-ruby/rest/video/v1/composition_hook.rb
Overview
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 [email protected].
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the Account that created the resource.
-
#audio_sources ⇒ String
The array of track names to include in the compositions created by the composition hook.
-
#audio_sources_excluded ⇒ String
The array of track names to exclude from the compositions created by the composition hook.
-
#context ⇒ CompositionHookContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#date_created ⇒ Time
The ISO 8601 date and time in GMT when the resource was created.
-
#date_updated ⇒ Time
The ISO 8601 date and time in GMT when the resource was last updated.
-
#delete ⇒ Boolean
Deletes the CompositionHookInstance.
-
#enabled ⇒ Boolean
Whether the CompositionHook is active.
-
#fetch ⇒ CompositionHookInstance
Fetch a CompositionHookInstance.
-
#format ⇒ composition_hook.Format
The container format of the media files used by the compositions created by the composition hook.
-
#friendly_name ⇒ String
The string that you assigned to describe the resource.
-
#initialize(version, payload, sid: nil) ⇒ CompositionHookInstance
constructor
Initialize the CompositionHookInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#resolution ⇒ String
The dimensions of the video image in pixels expressed as columns (width) and rows (height).
-
#sid ⇒ String
The unique string that identifies the resource.
-
#status_callback ⇒ String
The URL to send status information to your application.
-
#status_callback_method ⇒ String
The HTTP method we should use to call status_callback.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#trim ⇒ Boolean
Whether intervals with no media are clipped.
-
#update(friendly_name: nil, enabled: :unset, video_layout: :unset, audio_sources: :unset, audio_sources_excluded: :unset, trim: :unset, format: :unset, resolution: :unset, status_callback: :unset, status_callback_method: :unset) ⇒ CompositionHookInstance
Update the CompositionHookInstance.
-
#url ⇒ String
The absolute URL of the resource.
-
#video_layout ⇒ Hash
A JSON object that describes the video layout of the Composition.
Constructor Details
#initialize(version, payload, sid: nil) ⇒ CompositionHookInstance
Initialize the CompositionHookInstance
435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 |
# File 'lib/twilio-ruby/rest/video/v1/composition_hook.rb', line 435 def initialize(version, payload, sid: nil) super(version) # Marshaled Properties @properties = { 'account_sid' => payload['account_sid'], 'friendly_name' => payload['friendly_name'], 'enabled' => payload['enabled'], 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), 'sid' => payload['sid'], 'audio_sources' => payload['audio_sources'], 'audio_sources_excluded' => payload['audio_sources_excluded'], 'video_layout' => payload['video_layout'], 'resolution' => payload['resolution'], 'trim' => payload['trim'], 'format' => payload['format'], 'status_callback' => payload['status_callback'], 'status_callback_method' => payload['status_callback_method'], 'url' => payload['url'], } # Context @instance_context = nil @params = {'sid' => sid || @properties['sid'], } end |
Instance Method Details
#account_sid ⇒ String
Returns The SID of the Account that created the resource.
475 476 477 |
# File 'lib/twilio-ruby/rest/video/v1/composition_hook.rb', line 475 def account_sid @properties['account_sid'] end |
#audio_sources ⇒ String
Returns The array of track names to include in the compositions created by the composition hook.
511 512 513 |
# File 'lib/twilio-ruby/rest/video/v1/composition_hook.rb', line 511 def audio_sources @properties['audio_sources'] end |
#audio_sources_excluded ⇒ String
Returns The array of track names to exclude from the compositions created by the composition hook.
517 518 519 |
# File 'lib/twilio-ruby/rest/video/v1/composition_hook.rb', line 517 def audio_sources_excluded @properties['audio_sources_excluded'] end |
#context ⇒ CompositionHookContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
466 467 468 469 470 471 |
# File 'lib/twilio-ruby/rest/video/v1/composition_hook.rb', line 466 def context unless @instance_context @instance_context = CompositionHookContext.new(@version, @params['sid'], ) end @instance_context end |
#date_created ⇒ Time
Returns The ISO 8601 date and time in GMT when the resource was created.
493 494 495 |
# File 'lib/twilio-ruby/rest/video/v1/composition_hook.rb', line 493 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The ISO 8601 date and time in GMT when the resource was last updated.
499 500 501 |
# File 'lib/twilio-ruby/rest/video/v1/composition_hook.rb', line 499 def date_updated @properties['date_updated'] end |
#delete ⇒ Boolean
Deletes the CompositionHookInstance
573 574 575 |
# File 'lib/twilio-ruby/rest/video/v1/composition_hook.rb', line 573 def delete context.delete end |
#enabled ⇒ Boolean
Returns Whether the CompositionHook is active.
487 488 489 |
# File 'lib/twilio-ruby/rest/video/v1/composition_hook.rb', line 487 def enabled @properties['enabled'] end |
#fetch ⇒ CompositionHookInstance
Fetch a CompositionHookInstance
566 567 568 |
# File 'lib/twilio-ruby/rest/video/v1/composition_hook.rb', line 566 def fetch context.fetch end |
#format ⇒ composition_hook.Format
Returns The container format of the media files used by the compositions created by the composition hook.
541 542 543 |
# File 'lib/twilio-ruby/rest/video/v1/composition_hook.rb', line 541 def format @properties['format'] end |
#friendly_name ⇒ String
Returns The string that you assigned to describe the resource.
481 482 483 |
# File 'lib/twilio-ruby/rest/video/v1/composition_hook.rb', line 481 def friendly_name @properties['friendly_name'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
665 666 667 668 |
# File 'lib/twilio-ruby/rest/video/v1/composition_hook.rb', line 665 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Video.V1.CompositionHookInstance #{values}>" end |
#resolution ⇒ String
Returns The dimensions of the video image in pixels expressed as columns (width) and rows (height).
529 530 531 |
# File 'lib/twilio-ruby/rest/video/v1/composition_hook.rb', line 529 def resolution @properties['resolution'] end |
#sid ⇒ String
Returns The unique string that identifies the resource.
505 506 507 |
# File 'lib/twilio-ruby/rest/video/v1/composition_hook.rb', line 505 def sid @properties['sid'] end |
#status_callback ⇒ String
Returns The URL to send status information to your application.
547 548 549 |
# File 'lib/twilio-ruby/rest/video/v1/composition_hook.rb', line 547 def status_callback @properties['status_callback'] end |
#status_callback_method ⇒ String
Returns The HTTP method we should use to call status_callback.
553 554 555 |
# File 'lib/twilio-ruby/rest/video/v1/composition_hook.rb', line 553 def status_callback_method @properties['status_callback_method'] end |
#to_s ⇒ Object
Provide a user friendly representation
658 659 660 661 |
# File 'lib/twilio-ruby/rest/video/v1/composition_hook.rb', line 658 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Video.V1.CompositionHookInstance #{values}>" end |
#trim ⇒ Boolean
Returns Whether intervals with no media are clipped.
535 536 537 |
# File 'lib/twilio-ruby/rest/video/v1/composition_hook.rb', line 535 def trim @properties['trim'] end |
#update(friendly_name: nil, enabled: :unset, video_layout: :unset, audio_sources: :unset, audio_sources_excluded: :unset, trim: :unset, format: :unset, resolution: :unset, status_callback: :unset, status_callback_method: :unset) ⇒ CompositionHookInstance
Update the CompositionHookInstance
641 642 643 644 645 646 647 648 649 650 651 652 653 654 |
# File 'lib/twilio-ruby/rest/video/v1/composition_hook.rb', line 641 def update(friendly_name: nil, enabled: :unset, video_layout: :unset, audio_sources: :unset, audio_sources_excluded: :unset, trim: :unset, format: :unset, resolution: :unset, status_callback: :unset, status_callback_method: :unset) context.update( friendly_name: friendly_name, enabled: enabled, video_layout: video_layout, audio_sources: audio_sources, audio_sources_excluded: audio_sources_excluded, trim: trim, format: format, resolution: resolution, status_callback: status_callback, status_callback_method: status_callback_method, ) end |
#url ⇒ String
Returns The absolute URL of the resource.
559 560 561 |
# File 'lib/twilio-ruby/rest/video/v1/composition_hook.rb', line 559 def url @properties['url'] end |
#video_layout ⇒ Hash
Returns A JSON object that describes the video layout of the Composition.
523 524 525 |
# File 'lib/twilio-ruby/rest/video/v1/composition_hook.rb', line 523 def video_layout @properties['video_layout'] end |