Class: Appwrite::Models::VideoRendition
- Inherits:
-
Object
- Object
- Appwrite::Models::VideoRendition
- Defined in:
- lib/appwrite/models/video_rendition.rb
Instance Attribute Summary collapse
-
#audio_bit_rate ⇒ Object
readonly
Returns the value of attribute audio_bit_rate.
-
#codec ⇒ Object
readonly
Returns the value of attribute codec.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#ended_at ⇒ Object
readonly
Returns the value of attribute ended_at.
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#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.
-
#output ⇒ Object
readonly
Returns the value of attribute output.
-
#profile_id ⇒ Object
readonly
Returns the value of attribute profile_id.
-
#progress ⇒ Object
readonly
Returns the value of attribute progress.
-
#size ⇒ Object
readonly
Returns the value of attribute size.
-
#started_at ⇒ Object
readonly
Returns the value of attribute started_at.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#target_duration ⇒ Object
readonly
Returns the value of attribute target_duration.
-
#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_id ⇒ Object
readonly
Returns the value of attribute video_id.
-
#width ⇒ Object
readonly
Returns the value of attribute width.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(id:, created_at:, updated_at:, video_id:, profile_id:, name:, started_at:, ended_at:, width:, height:, video_bit_rate:, audio_bit_rate:, target_duration:, status:, error:, progress:, output:, codec:, size:) ⇒ VideoRendition
constructor
A new instance of VideoRendition.
- #to_map ⇒ Object
Constructor Details
#initialize(id:, created_at:, updated_at:, video_id:, profile_id:, name:, started_at:, ended_at:, width:, height:, video_bit_rate:, audio_bit_rate:, target_duration:, status:, error:, progress:, output:, codec:, size:) ⇒ VideoRendition
Returns a new instance of VideoRendition.
26 27 28 29 30 31 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 |
# File 'lib/appwrite/models/video_rendition.rb', line 26 def initialize( id:, created_at:, updated_at:, video_id:, profile_id:, name:, started_at:, ended_at:, width:, height:, video_bit_rate:, audio_bit_rate:, target_duration:, status:, error:, progress:, output:, codec:, size: ) @id = id @created_at = created_at @updated_at = updated_at @video_id = video_id @profile_id = profile_id @name = name @started_at = started_at @ended_at = ended_at @width = width @height = height @video_bit_rate = video_bit_rate @audio_bit_rate = audio_bit_rate @target_duration = target_duration @status = validate_status(status) @error = error @progress = progress @output = validate_output(output) @codec = validate_codec(codec) @size = size end |
Instance Attribute Details
#audio_bit_rate ⇒ Object (readonly)
Returns the value of attribute audio_bit_rate.
17 18 19 |
# File 'lib/appwrite/models/video_rendition.rb', line 17 def audio_bit_rate @audio_bit_rate end |
#codec ⇒ Object (readonly)
Returns the value of attribute codec.
23 24 25 |
# File 'lib/appwrite/models/video_rendition.rb', line 23 def codec @codec end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
7 8 9 |
# File 'lib/appwrite/models/video_rendition.rb', line 7 def created_at @created_at end |
#ended_at ⇒ Object (readonly)
Returns the value of attribute ended_at.
13 14 15 |
# File 'lib/appwrite/models/video_rendition.rb', line 13 def ended_at @ended_at end |
#error ⇒ Object (readonly)
Returns the value of attribute error.
20 21 22 |
# File 'lib/appwrite/models/video_rendition.rb', line 20 def error @error end |
#height ⇒ Object (readonly)
Returns the value of attribute height.
15 16 17 |
# File 'lib/appwrite/models/video_rendition.rb', line 15 def height @height end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
6 7 8 |
# File 'lib/appwrite/models/video_rendition.rb', line 6 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
11 12 13 |
# File 'lib/appwrite/models/video_rendition.rb', line 11 def name @name end |
#output ⇒ Object (readonly)
Returns the value of attribute output.
22 23 24 |
# File 'lib/appwrite/models/video_rendition.rb', line 22 def output @output end |
#profile_id ⇒ Object (readonly)
Returns the value of attribute profile_id.
10 11 12 |
# File 'lib/appwrite/models/video_rendition.rb', line 10 def profile_id @profile_id end |
#progress ⇒ Object (readonly)
Returns the value of attribute progress.
21 22 23 |
# File 'lib/appwrite/models/video_rendition.rb', line 21 def progress @progress end |
#size ⇒ Object (readonly)
Returns the value of attribute size.
24 25 26 |
# File 'lib/appwrite/models/video_rendition.rb', line 24 def size @size end |
#started_at ⇒ Object (readonly)
Returns the value of attribute started_at.
12 13 14 |
# File 'lib/appwrite/models/video_rendition.rb', line 12 def started_at @started_at end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
19 20 21 |
# File 'lib/appwrite/models/video_rendition.rb', line 19 def status @status end |
#target_duration ⇒ Object (readonly)
Returns the value of attribute target_duration.
18 19 20 |
# File 'lib/appwrite/models/video_rendition.rb', line 18 def target_duration @target_duration end |
#updated_at ⇒ Object (readonly)
Returns the value of attribute updated_at.
8 9 10 |
# File 'lib/appwrite/models/video_rendition.rb', line 8 def updated_at @updated_at end |
#video_bit_rate ⇒ Object (readonly)
Returns the value of attribute video_bit_rate.
16 17 18 |
# File 'lib/appwrite/models/video_rendition.rb', line 16 def video_bit_rate @video_bit_rate end |
#video_id ⇒ Object (readonly)
Returns the value of attribute video_id.
9 10 11 |
# File 'lib/appwrite/models/video_rendition.rb', line 9 def video_id @video_id end |
#width ⇒ Object (readonly)
Returns the value of attribute width.
14 15 16 |
# File 'lib/appwrite/models/video_rendition.rb', line 14 def width @width end |
Class Method Details
.from(map:) ⇒ Object
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/appwrite/models/video_rendition.rb', line 68 def self.from(map:) map = { "$id" => "", "$createdAt" => "", "$updatedAt" => "", "videoId" => "", "profileId" => "", "name" => "", "startedAt" => "", "endedAt" => "", "width" => 0, "height" => 0, "videoBitRate" => 0, "audioBitRate" => 0, "targetDuration" => 0, "status" => "pending", "error" => "", "progress" => 0, "output" => "hls", "codec" => "h264", "size" => 0 }.merge(map) VideoRendition.new( id: map["$id"], created_at: map["$createdAt"], updated_at: map["$updatedAt"], video_id: map["videoId"], profile_id: map["profileId"], name: map["name"], started_at: map["startedAt"], ended_at: map["endedAt"], width: map["width"], height: map["height"], video_bit_rate: map["videoBitRate"], audio_bit_rate: map["audioBitRate"], target_duration: map["targetDuration"], status: map["status"], error: map["error"], progress: map["progress"], output: map["output"], codec: map["codec"], size: map["size"] ) end |
Instance Method Details
#to_map ⇒ Object
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_rendition.rb', line 93 def to_map { "$id": @id, "$createdAt": @created_at, "$updatedAt": @updated_at, "videoId": @video_id, "profileId": @profile_id, "name": @name, "startedAt": @started_at, "endedAt": @ended_at, "width": @width, "height": @height, "videoBitRate": @video_bit_rate, "audioBitRate": @audio_bit_rate, "targetDuration": @target_duration, "status": @status, "error": @error, "progress": @progress, "output": @output, "codec": @codec, "size": @size } end |