Class: MicrosoftGraph::Models::EducationCourse

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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

Instantiates a new educationCourse and sets the default values.



49
50
51
# File 'lib/models/education_course.rb', line 49

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 education_course

Raises:

  • (StandardError)


72
73
74
75
# File 'lib/models/education_course.rb', line 72

def self.create_from_discriminator_value(parse_node)
    raise StandardError, 'parse_node cannot be null' if parse_node.nil?
    return EducationCourse.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



34
35
36
# File 'lib/models/education_course.rb', line 34

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



42
43
44
# File 'lib/models/education_course.rb', line 42

def additional_data=(value)
    @additional_data = value
end

#course_numberObject

Gets the courseNumber property value. Unique identifier for the course.

Returns:

  • a string



56
57
58
# File 'lib/models/education_course.rb', line 56

def course_number
    return @course_number
end

#course_number=(value) ⇒ Object

Sets the courseNumber property value. Unique identifier for the course.

Parameters:

  • value

    Value to set for the courseNumber property.

Returns:

  • a void



64
65
66
# File 'lib/models/education_course.rb', line 64

def course_number=(value)
    @course_number = value
end

#descriptionObject

Gets the description property value. Description of the course.

Returns:

  • a string



80
81
82
# File 'lib/models/education_course.rb', line 80

def description
    return @description
end

#description=(value) ⇒ Object

Sets the description property value. Description of the course.

Parameters:

  • value

    Value to set for the description property.

Returns:

  • a void



88
89
90
# File 'lib/models/education_course.rb', line 88

def description=(value)
    @description = value
end

#display_nameObject

Gets the displayName property value. Name of the course.

Returns:

  • a string



95
96
97
# File 'lib/models/education_course.rb', line 95

def display_name
    return @display_name
end

#display_name=(value) ⇒ Object

Sets the displayName property value. Name of the course.

Parameters:

  • value

    Value to set for the displayName property.

Returns:

  • a void



103
104
105
# File 'lib/models/education_course.rb', line 103

def display_name=(value)
    @display_name = value
end

#external_idObject

Gets the externalId property value. ID of the course from the syncing system.

Returns:

  • a string



110
111
112
# File 'lib/models/education_course.rb', line 110

def external_id
    return @external_id
end

#external_id=(value) ⇒ Object

Sets the externalId property value. ID of the course from the syncing system.

Parameters:

  • value

    Value to set for the externalId property.

Returns:

  • a void



118
119
120
# File 'lib/models/education_course.rb', line 118

def external_id=(value)
    @external_id = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



125
126
127
128
129
130
131
132
133
134
# File 'lib/models/education_course.rb', line 125

def get_field_deserializers()
    return {
        "courseNumber" => lambda {|n| @course_number = n.get_string_value() },
        "description" => lambda {|n| @description = n.get_string_value() },
        "displayName" => lambda {|n| @display_name = n.get_string_value() },
        "externalId" => lambda {|n| @external_id = n.get_string_value() },
        "@odata.type" => lambda {|n| @odata_type = n.get_string_value() },
        "subject" => lambda {|n| @subject = n.get_string_value() },
    }
end

#odata_typeObject

Gets the @odata.type property value. The OdataType property

Returns:

  • a string



139
140
141
# File 'lib/models/education_course.rb', line 139

def odata_type
    return @odata_type
end

#odata_type=(value) ⇒ Object

Sets the @odata.type property value. The OdataType property

Parameters:

  • value

    Value to set for the @odata.type property.

Returns:

  • a void



147
148
149
# File 'lib/models/education_course.rb', line 147

def odata_type=(value)
    @odata_type = 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)


155
156
157
158
159
160
161
162
163
164
# File 'lib/models/education_course.rb', line 155

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_string_value("courseNumber", @course_number)
    writer.write_string_value("description", @description)
    writer.write_string_value("displayName", @display_name)
    writer.write_string_value("externalId", @external_id)
    writer.write_string_value("@odata.type", @odata_type)
    writer.write_string_value("subject", @subject)
    writer.write_additional_data(@additional_data)
end

#subjectObject

Gets the subject property value. Subject of the course.

Returns:

  • a string



169
170
171
# File 'lib/models/education_course.rb', line 169

def subject
    return @subject
end

#subject=(value) ⇒ Object

Sets the subject property value. Subject of the course.

Parameters:

  • value

    Value to set for the subject property.

Returns:

  • a void



177
178
179
# File 'lib/models/education_course.rb', line 177

def subject=(value)
    @subject = value
end