Class: Appwrite::Models::Video
- Inherits:
-
Object
- Object
- Appwrite::Models::Video
- Defined in:
- lib/appwrite/models/video.rb
Instance Attribute Summary collapse
-
#aspect_ratio ⇒ Object
readonly
Returns the value of attribute aspect_ratio.
-
#audio_bit_rate ⇒ Object
readonly
Returns the value of attribute audio_bit_rate.
-
#audio_codec ⇒ Object
readonly
Returns the value of attribute audio_codec.
-
#audio_format ⇒ Object
readonly
Returns the value of attribute audio_format.
-
#audio_sample_rate ⇒ Object
readonly
Returns the value of attribute audio_sample_rate.
-
#bucket_id ⇒ Object
readonly
Returns the value of attribute bucket_id.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#duration ⇒ Object
readonly
Returns the value of attribute duration.
-
#file_id ⇒ Object
readonly
Returns the value of attribute file_id.
-
#format ⇒ Object
readonly
Returns the value of attribute format.
-
#height ⇒ Object
readonly
Returns the value of attribute height.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#permissions ⇒ Object
readonly
Returns the value of attribute permissions.
-
#size ⇒ Object
readonly
Returns the value of attribute size.
-
#timeline_error ⇒ Object
readonly
Returns the value of attribute timeline_error.
-
#timeline_status ⇒ Object
readonly
Returns the value of attribute timeline_status.
-
#updated_at ⇒ Object
readonly
Returns the value of attribute updated_at.
-
#video_bit_rate ⇒ Object
readonly
Returns the value of attribute video_bit_rate.
-
#video_codec ⇒ Object
readonly
Returns the value of attribute video_codec.
-
#video_format ⇒ Object
readonly
Returns the value of attribute video_format.
-
#video_format_profile ⇒ Object
readonly
Returns the value of attribute video_format_profile.
-
#video_frame_rate ⇒ Object
readonly
Returns the value of attribute video_frame_rate.
-
#video_frame_rate_mode ⇒ Object
readonly
Returns the value of attribute video_frame_rate_mode.
-
#width ⇒ Object
readonly
Returns the value of attribute width.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(id:, created_at:, updated_at:, permissions:, bucket_id:, file_id:, name:, size:, format:, duration:, width:, height:, aspect_ratio:, video_codec:, video_format:, video_format_profile:, video_bit_rate:, video_frame_rate:, video_frame_rate_mode:, audio_codec:, audio_format:, audio_bit_rate:, audio_sample_rate:, timeline_status:, timeline_error:) ⇒ Video
constructor
A new instance of Video.
- #to_map ⇒ Object
Constructor Details
#initialize(id:, created_at:, updated_at:, permissions:, bucket_id:, file_id:, name:, size:, format:, duration:, width:, height:, aspect_ratio:, video_codec:, video_format:, video_format_profile:, video_bit_rate:, video_frame_rate:, video_frame_rate_mode:, audio_codec:, audio_format:, audio_bit_rate:, audio_sample_rate:, timeline_status:, timeline_error:) ⇒ Video
Returns a new instance of Video.
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/appwrite/models/video.rb', line 32 def initialize( id:, created_at:, updated_at:, permissions:, bucket_id:, file_id:, name:, size:, format:, duration:, width:, height:, aspect_ratio:, video_codec:, video_format:, video_format_profile:, video_bit_rate:, video_frame_rate:, video_frame_rate_mode:, audio_codec:, audio_format:, audio_bit_rate:, audio_sample_rate:, timeline_status:, timeline_error: ) @id = id @created_at = created_at @updated_at = updated_at @permissions = @bucket_id = bucket_id @file_id = file_id @name = name @size = size @format = format @duration = duration @width = width @height = height @aspect_ratio = aspect_ratio @video_codec = video_codec @video_format = video_format @video_format_profile = video_format_profile @video_bit_rate = video_bit_rate @video_frame_rate = video_frame_rate @video_frame_rate_mode = video_frame_rate_mode @audio_codec = audio_codec @audio_format = audio_format @audio_bit_rate = audio_bit_rate @audio_sample_rate = audio_sample_rate @timeline_status = validate_timeline_status(timeline_status) @timeline_error = timeline_error end |
Instance Attribute Details
#aspect_ratio ⇒ Object (readonly)
Returns the value of attribute aspect_ratio.
18 19 20 |
# File 'lib/appwrite/models/video.rb', line 18 def aspect_ratio @aspect_ratio end |
#audio_bit_rate ⇒ Object (readonly)
Returns the value of attribute audio_bit_rate.
27 28 29 |
# File 'lib/appwrite/models/video.rb', line 27 def audio_bit_rate @audio_bit_rate end |
#audio_codec ⇒ Object (readonly)
Returns the value of attribute audio_codec.
25 26 27 |
# File 'lib/appwrite/models/video.rb', line 25 def audio_codec @audio_codec end |
#audio_format ⇒ Object (readonly)
Returns the value of attribute audio_format.
26 27 28 |
# File 'lib/appwrite/models/video.rb', line 26 def audio_format @audio_format end |
#audio_sample_rate ⇒ Object (readonly)
Returns the value of attribute audio_sample_rate.
28 29 30 |
# File 'lib/appwrite/models/video.rb', line 28 def audio_sample_rate @audio_sample_rate end |
#bucket_id ⇒ Object (readonly)
Returns the value of attribute bucket_id.
10 11 12 |
# File 'lib/appwrite/models/video.rb', line 10 def bucket_id @bucket_id end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
7 8 9 |
# File 'lib/appwrite/models/video.rb', line 7 def created_at @created_at end |
#duration ⇒ Object (readonly)
Returns the value of attribute duration.
15 16 17 |
# File 'lib/appwrite/models/video.rb', line 15 def duration @duration end |
#file_id ⇒ Object (readonly)
Returns the value of attribute file_id.
11 12 13 |
# File 'lib/appwrite/models/video.rb', line 11 def file_id @file_id end |
#format ⇒ Object (readonly)
Returns the value of attribute format.
14 15 16 |
# File 'lib/appwrite/models/video.rb', line 14 def format @format end |
#height ⇒ Object (readonly)
Returns the value of attribute height.
17 18 19 |
# File 'lib/appwrite/models/video.rb', line 17 def height @height end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
6 7 8 |
# File 'lib/appwrite/models/video.rb', line 6 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
12 13 14 |
# File 'lib/appwrite/models/video.rb', line 12 def name @name end |
#permissions ⇒ Object (readonly)
Returns the value of attribute permissions.
9 10 11 |
# File 'lib/appwrite/models/video.rb', line 9 def @permissions end |
#size ⇒ Object (readonly)
Returns the value of attribute size.
13 14 15 |
# File 'lib/appwrite/models/video.rb', line 13 def size @size end |
#timeline_error ⇒ Object (readonly)
Returns the value of attribute timeline_error.
30 31 32 |
# File 'lib/appwrite/models/video.rb', line 30 def timeline_error @timeline_error end |
#timeline_status ⇒ Object (readonly)
Returns the value of attribute timeline_status.
29 30 31 |
# File 'lib/appwrite/models/video.rb', line 29 def timeline_status @timeline_status end |
#updated_at ⇒ Object (readonly)
Returns the value of attribute updated_at.
8 9 10 |
# File 'lib/appwrite/models/video.rb', line 8 def updated_at @updated_at end |
#video_bit_rate ⇒ Object (readonly)
Returns the value of attribute video_bit_rate.
22 23 24 |
# File 'lib/appwrite/models/video.rb', line 22 def video_bit_rate @video_bit_rate end |
#video_codec ⇒ Object (readonly)
Returns the value of attribute video_codec.
19 20 21 |
# File 'lib/appwrite/models/video.rb', line 19 def video_codec @video_codec end |
#video_format ⇒ Object (readonly)
Returns the value of attribute video_format.
20 21 22 |
# File 'lib/appwrite/models/video.rb', line 20 def video_format @video_format end |
#video_format_profile ⇒ Object (readonly)
Returns the value of attribute video_format_profile.
21 22 23 |
# File 'lib/appwrite/models/video.rb', line 21 def video_format_profile @video_format_profile end |
#video_frame_rate ⇒ Object (readonly)
Returns the value of attribute video_frame_rate.
23 24 25 |
# File 'lib/appwrite/models/video.rb', line 23 def video_frame_rate @video_frame_rate end |
#video_frame_rate_mode ⇒ Object (readonly)
Returns the value of attribute video_frame_rate_mode.
24 25 26 |
# File 'lib/appwrite/models/video.rb', line 24 def video_frame_rate_mode @video_frame_rate_mode end |
#width ⇒ Object (readonly)
Returns the value of attribute width.
16 17 18 |
# File 'lib/appwrite/models/video.rb', line 16 def width @width end |
Class Method Details
.from(map:) ⇒ Object
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
# File 'lib/appwrite/models/video.rb', line 86 def self.from(map:) map = { "$id" => "", "$createdAt" => "", "$updatedAt" => "", "$permissions" => [], "bucketId" => "", "fileId" => "", "name" => "", "size" => 0, "format" => "", "duration" => 0, "width" => 0, "height" => 0, "aspectRatio" => "", "videoCodec" => "", "videoFormat" => "", "videoFormatProfile" => "", "videoBitRate" => 0, "videoFrameRate" => 0, "videoFrameRateMode" => "", "audioCodec" => "", "audioFormat" => "", "audioBitRate" => 0, "audioSampleRate" => 0, "timelineStatus" => "pending", "timelineError" => "" }.merge(map) Video.new( id: map["$id"], created_at: map["$createdAt"], updated_at: map["$updatedAt"], permissions: map["$permissions"], bucket_id: map["bucketId"], file_id: map["fileId"], name: map["name"], size: map["size"], format: map["format"], duration: map["duration"], width: map["width"], height: map["height"], aspect_ratio: map["aspectRatio"], video_codec: map["videoCodec"], video_format: map["videoFormat"], video_format_profile: map["videoFormatProfile"], video_bit_rate: map["videoBitRate"], video_frame_rate: map["videoFrameRate"], video_frame_rate_mode: map["videoFrameRateMode"], audio_codec: map["audioCodec"], audio_format: map["audioFormat"], audio_bit_rate: map["audioBitRate"], audio_sample_rate: map["audioSampleRate"], timeline_status: map["timelineStatus"], timeline_error: map["timelineError"] ) end |
Instance Method Details
#to_map ⇒ Object
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 |
# File 'lib/appwrite/models/video.rb', line 117 def to_map { "$id": @id, "$createdAt": @created_at, "$updatedAt": @updated_at, "$permissions": @permissions, "bucketId": @bucket_id, "fileId": @file_id, "name": @name, "size": @size, "format": @format, "duration": @duration, "width": @width, "height": @height, "aspectRatio": @aspect_ratio, "videoCodec": @video_codec, "videoFormat": @video_format, "videoFormatProfile": @video_format_profile, "videoBitRate": @video_bit_rate, "videoFrameRate": @video_frame_rate, "videoFrameRateMode": @video_frame_rate_mode, "audioCodec": @audio_codec, "audioFormat": @audio_format, "audioBitRate": @audio_bit_rate, "audioSampleRate": @audio_sample_rate, "timelineStatus": @timeline_status, "timelineError": @timeline_error } end |