Class: Appwrite::Models::VideoProfile
- Inherits:
-
Object
- Object
- Appwrite::Models::VideoProfile
- Defined in:
- lib/appwrite/models/video_profile.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.
-
#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.
-
#updated_at ⇒ Object
readonly
Returns the value of attribute updated_at.
-
#video_bit_rate ⇒ Object
readonly
Returns the value of attribute video_bit_rate.
-
#width ⇒ Object
readonly
Returns the value of attribute width.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(id:, created_at:, updated_at:, name:, codec:, video_bit_rate:, audio_bit_rate:, width:, height:) ⇒ VideoProfile
constructor
A new instance of VideoProfile.
- #to_map ⇒ Object
Constructor Details
#initialize(id:, created_at:, updated_at:, name:, codec:, video_bit_rate:, audio_bit_rate:, width:, height:) ⇒ VideoProfile
Returns a new instance of VideoProfile.
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/appwrite/models/video_profile.rb', line 16 def initialize( id:, created_at:, updated_at:, name:, codec:, video_bit_rate:, audio_bit_rate:, width:, height: ) @id = id @created_at = created_at @updated_at = updated_at @name = name @codec = validate_codec(codec) @video_bit_rate = video_bit_rate @audio_bit_rate = audio_bit_rate @width = width @height = height end |
Instance Attribute Details
#audio_bit_rate ⇒ Object (readonly)
Returns the value of attribute audio_bit_rate.
12 13 14 |
# File 'lib/appwrite/models/video_profile.rb', line 12 def audio_bit_rate @audio_bit_rate end |
#codec ⇒ Object (readonly)
Returns the value of attribute codec.
10 11 12 |
# File 'lib/appwrite/models/video_profile.rb', line 10 def codec @codec end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
7 8 9 |
# File 'lib/appwrite/models/video_profile.rb', line 7 def created_at @created_at end |
#height ⇒ Object (readonly)
Returns the value of attribute height.
14 15 16 |
# File 'lib/appwrite/models/video_profile.rb', line 14 def height @height end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
6 7 8 |
# File 'lib/appwrite/models/video_profile.rb', line 6 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
9 10 11 |
# File 'lib/appwrite/models/video_profile.rb', line 9 def name @name end |
#updated_at ⇒ Object (readonly)
Returns the value of attribute updated_at.
8 9 10 |
# File 'lib/appwrite/models/video_profile.rb', line 8 def updated_at @updated_at end |
#video_bit_rate ⇒ Object (readonly)
Returns the value of attribute video_bit_rate.
11 12 13 |
# File 'lib/appwrite/models/video_profile.rb', line 11 def video_bit_rate @video_bit_rate end |
#width ⇒ Object (readonly)
Returns the value of attribute width.
13 14 15 |
# File 'lib/appwrite/models/video_profile.rb', line 13 def width @width end |
Class Method Details
.from(map:) ⇒ Object
38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/appwrite/models/video_profile.rb', line 38 def self.from(map:) map = { "$id" => "", "$createdAt" => "", "$updatedAt" => "", "name" => "", "codec" => "h264", "videoBitRate" => 0, "audioBitRate" => 0, "width" => 0, "height" => 0 }.merge(map) VideoProfile.new( id: map["$id"], created_at: map["$createdAt"], updated_at: map["$updatedAt"], name: map["name"], codec: map["codec"], video_bit_rate: map["videoBitRate"], audio_bit_rate: map["audioBitRate"], width: map["width"], height: map["height"] ) end |
Instance Method Details
#to_map ⇒ Object
53 54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/appwrite/models/video_profile.rb', line 53 def to_map { "$id": @id, "$createdAt": @created_at, "$updatedAt": @updated_at, "name": @name, "codec": @codec, "videoBitRate": @video_bit_rate, "audioBitRate": @audio_bit_rate, "width": @width, "height": @height } end |