Class: Appwrite::Models::VideoCaption
- Inherits:
-
Object
- Object
- Appwrite::Models::VideoCaption
- Defined in:
- lib/appwrite/models/video_caption.rb
Instance Attribute Summary collapse
-
#bucket_id ⇒ Object
readonly
Returns the value of attribute bucket_id.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#default ⇒ Object
readonly
Returns the value of attribute default.
-
#embedded ⇒ Object
readonly
Returns the value of attribute embedded.
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#file_id ⇒ Object
readonly
Returns the value of attribute file_id.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#language ⇒ Object
readonly
Returns the value of attribute language.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#size ⇒ Object
readonly
Returns the value of attribute size.
-
#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_id ⇒ Object
readonly
Returns the value of attribute video_id.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(id:, created_at:, updated_at:, video_id:, bucket_id:, file_id:, name:, language:, default:, embedded:, target_duration:, status:, error:, size:) ⇒ VideoCaption
constructor
A new instance of VideoCaption.
- #to_map ⇒ Object
Constructor Details
#initialize(id:, created_at:, updated_at:, video_id:, bucket_id:, file_id:, name:, language:, default:, embedded:, target_duration:, status:, error:, size:) ⇒ VideoCaption
Returns a new instance of VideoCaption.
21 22 23 24 25 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 |
# File 'lib/appwrite/models/video_caption.rb', line 21 def initialize( id:, created_at:, updated_at:, video_id:, bucket_id:, file_id:, name:, language:, default:, embedded:, target_duration:, status:, error:, size: ) @id = id @created_at = created_at @updated_at = updated_at @video_id = video_id @bucket_id = bucket_id @file_id = file_id @name = name @language = language @default = default @embedded = @target_duration = target_duration @status = validate_status(status) @error = error @size = size end |
Instance Attribute Details
#bucket_id ⇒ Object (readonly)
Returns the value of attribute bucket_id.
10 11 12 |
# File 'lib/appwrite/models/video_caption.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_caption.rb', line 7 def created_at @created_at end |
#default ⇒ Object (readonly)
Returns the value of attribute default.
14 15 16 |
# File 'lib/appwrite/models/video_caption.rb', line 14 def default @default end |
#embedded ⇒ Object (readonly)
Returns the value of attribute embedded.
15 16 17 |
# File 'lib/appwrite/models/video_caption.rb', line 15 def @embedded end |
#error ⇒ Object (readonly)
Returns the value of attribute error.
18 19 20 |
# File 'lib/appwrite/models/video_caption.rb', line 18 def error @error end |
#file_id ⇒ Object (readonly)
Returns the value of attribute file_id.
11 12 13 |
# File 'lib/appwrite/models/video_caption.rb', line 11 def file_id @file_id end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
6 7 8 |
# File 'lib/appwrite/models/video_caption.rb', line 6 def id @id end |
#language ⇒ Object (readonly)
Returns the value of attribute language.
13 14 15 |
# File 'lib/appwrite/models/video_caption.rb', line 13 def language @language end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
12 13 14 |
# File 'lib/appwrite/models/video_caption.rb', line 12 def name @name end |
#size ⇒ Object (readonly)
Returns the value of attribute size.
19 20 21 |
# File 'lib/appwrite/models/video_caption.rb', line 19 def size @size end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
17 18 19 |
# File 'lib/appwrite/models/video_caption.rb', line 17 def status @status end |
#target_duration ⇒ Object (readonly)
Returns the value of attribute target_duration.
16 17 18 |
# File 'lib/appwrite/models/video_caption.rb', line 16 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_caption.rb', line 8 def updated_at @updated_at end |
#video_id ⇒ Object (readonly)
Returns the value of attribute video_id.
9 10 11 |
# File 'lib/appwrite/models/video_caption.rb', line 9 def video_id @video_id end |
Class Method Details
.from(map:) ⇒ Object
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/appwrite/models/video_caption.rb', line 53 def self.from(map:) map = { "$id" => "", "$createdAt" => "", "$updatedAt" => "", "videoId" => "", "bucketId" => "", "fileId" => "", "name" => "", "language" => "", "default" => false, "embedded" => false, "targetDuration" => 0, "status" => "pending", "error" => "", "size" => 0 }.merge(map) VideoCaption.new( id: map["$id"], created_at: map["$createdAt"], updated_at: map["$updatedAt"], video_id: map["videoId"], bucket_id: map["bucketId"], file_id: map["fileId"], name: map["name"], language: map["language"], default: map["default"], embedded: map["embedded"], target_duration: map["targetDuration"], status: map["status"], error: map["error"], size: map["size"] ) end |
Instance Method Details
#to_map ⇒ Object
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
# File 'lib/appwrite/models/video_caption.rb', line 73 def to_map { "$id": @id, "$createdAt": @created_at, "$updatedAt": @updated_at, "videoId": @video_id, "bucketId": @bucket_id, "fileId": @file_id, "name": @name, "language": @language, "default": @default, "embedded": @embedded, "targetDuration": @target_duration, "status": @status, "error": @error, "size": @size } end |