Class: Rixl::Models::Chapter

Inherits:
Object
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/chapter.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

Instantiates a new Chapter and sets the default values.



43
44
45
# File 'lib/models/chapter.rb', line 43

def initialize()
    @additional_data = Hash.new
end

Class Method Details

.create_from_discriminator_value(parse_node) ⇒ Object

Creates a new instance of the appropriate class based on discriminator value

Parameters:

  • parse_node

    The parse node to use to read the discriminator value and create the object

Returns:

  • a chapter

Raises:

  • (StandardError)


51
52
53
54
# File 'lib/models/chapter.rb', line 51

def self.create_from_discriminator_value(parse_node)
    raise StandardError, 'parse_node cannot be null' if parse_node.nil?
    return Chapter.new
end

Instance Method Details

#additional_dataObject

Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.

Returns:

  • a i_dictionary



28
29
30
# File 'lib/models/chapter.rb', line 28

def additional_data
    return @additional_data
end

#additional_data=(value) ⇒ Object

Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.

Parameters:

  • value

    Value to set for the AdditionalData property.

Returns:

  • a void



36
37
38
# File 'lib/models/chapter.rb', line 36

def additional_data=(value)
    @additional_data = value
end

#duration_labelObject

Gets the duration_label property value. The duration_label property

Returns:

  • a string



59
60
61
# File 'lib/models/chapter.rb', line 59

def duration_label
    return @duration_label
end

#duration_label=(value) ⇒ Object

Sets the duration_label property value. The duration_label property

Parameters:

  • value

    Value to set for the duration_label property.

Returns:

  • a void



67
68
69
# File 'lib/models/chapter.rb', line 67

def duration_label=(value)
    @duration_label = value
end

#end_time_secObject

Gets the end_time_sec property value. The end_time_sec property

Returns:

  • a double



74
75
76
# File 'lib/models/chapter.rb', line 74

def end_time_sec
    return @end_time_sec
end

#end_time_sec=(value) ⇒ Object

Sets the end_time_sec property value. The end_time_sec property

Parameters:

  • value

    Value to set for the end_time_sec property.

Returns:

  • a void



82
83
84
# File 'lib/models/chapter.rb', line 82

def end_time_sec=(value)
    @end_time_sec = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



89
90
91
92
93
94
95
96
# File 'lib/models/chapter.rb', line 89

def get_field_deserializers()
    return {
        "duration_label" => lambda {|n| @duration_label = n.get_string_value() },
        "end_time_sec" => lambda {|n| @end_time_sec = n.get_object_value(lambda {|pn| Double.create_from_discriminator_value(pn) }) },
        "start_time_sec" => lambda {|n| @start_time_sec = n.get_object_value(lambda {|pn| Double.create_from_discriminator_value(pn) }) },
        "title" => lambda {|n| @title = n.get_string_value() },
    }
end

#serialize(writer) ⇒ Object

Serializes information the current object

Parameters:

  • writer

    Serialization writer to use to serialize this model

Returns:

  • a void

Raises:

  • (StandardError)


102
103
104
105
106
107
108
109
# File 'lib/models/chapter.rb', line 102

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_string_value("duration_label", @duration_label)
    writer.write_object_value("end_time_sec", @end_time_sec)
    writer.write_object_value("start_time_sec", @start_time_sec)
    writer.write_string_value("title", @title)
    writer.write_additional_data(@additional_data)
end

#start_time_secObject

Gets the start_time_sec property value. The start_time_sec property

Returns:

  • a double



114
115
116
# File 'lib/models/chapter.rb', line 114

def start_time_sec
    return @start_time_sec
end

#start_time_sec=(value) ⇒ Object

Sets the start_time_sec property value. The start_time_sec property

Parameters:

  • value

    Value to set for the start_time_sec property.

Returns:

  • a void



122
123
124
# File 'lib/models/chapter.rb', line 122

def start_time_sec=(value)
    @start_time_sec = value
end

#titleObject

Gets the title property value. The title property

Returns:

  • a string



129
130
131
# File 'lib/models/chapter.rb', line 129

def title
    return @title
end

#title=(value) ⇒ Object

Sets the title property value. The title property

Parameters:

  • value

    Value to set for the title property.

Returns:

  • a void



137
138
139
# File 'lib/models/chapter.rb', line 137

def title=(value)
    @title = value
end