Class: Appwrite::Models::VideoCodec

Inherits:
Object
  • Object
show all
Defined in:
lib/appwrite/models/video_codec.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id:, name:, outputs:) ⇒ VideoCodec

Returns a new instance of VideoCodec.



10
11
12
13
14
15
16
17
18
# File 'lib/appwrite/models/video_codec.rb', line 10

def initialize(
    id:,
    name:,
    outputs:
)
    @id = id
    @name = name
    @outputs = validate_outputs(outputs)
end

Instance Attribute Details

#id ⇒ Object (readonly)

Returns the value of attribute id.



6
7
8
# File 'lib/appwrite/models/video_codec.rb', line 6

def id
  @id
end

#name ⇒ Object (readonly)

Returns the value of attribute name.



7
8
9
# File 'lib/appwrite/models/video_codec.rb', line 7

def name
  @name
end

#outputs ⇒ Object (readonly)

Returns the value of attribute outputs.



8
9
10
# File 'lib/appwrite/models/video_codec.rb', line 8

def outputs
  @outputs
end

Class Method Details

.from(map:) ⇒ Object



20
21
22
23
24
25
26
27
# File 'lib/appwrite/models/video_codec.rb', line 20

def self.from(map:)
    map = { "$id" => "", "name" => "", "outputs" => [] }.merge(map)
    VideoCodec.new(
        id: map["$id"],
        name: map["name"],
        outputs: map["outputs"]
    )
end

Instance Method Details

#to_map ⇒ Object



29
30
31
32
33
34
35
# File 'lib/appwrite/models/video_codec.rb', line 29

def to_map
    {
        "$id": @id,
        "name": @name,
        "outputs": @outputs
    }
end