Class: MicrosoftGraph::Models::EducationResource

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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

Instantiates a new educationResource and sets the default values.



50
51
52
# File 'lib/models/education_resource.rb', line 50

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_resource

Raises:

  • (StandardError)


88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# File 'lib/models/education_resource.rb', line 88

def self.create_from_discriminator_value(parse_node)
    raise StandardError, 'parse_node cannot be null' if parse_node.nil?
    mapping_value_node = parse_node.get_child_node("@odata.type")
    unless mapping_value_node.nil? then
        mapping_value = mapping_value_node.get_string_value
        case mapping_value
            when "#microsoft.graph.educationExcelResource"
                return EducationExcelResource.new
            when "#microsoft.graph.educationExternalResource"
                return EducationExternalResource.new
            when "#microsoft.graph.educationFileResource"
                return EducationFileResource.new
            when "#microsoft.graph.educationLinkResource"
                return EducationLinkResource.new
            when "#microsoft.graph.educationMediaResource"
                return EducationMediaResource.new
            when "#microsoft.graph.educationPowerPointResource"
                return EducationPowerPointResource.new
            when "#microsoft.graph.educationTeamsAppResource"
                return EducationTeamsAppResource.new
            when "#microsoft.graph.educationWordResource"
                return EducationWordResource.new
        end
    end
    return EducationResource.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



35
36
37
# File 'lib/models/education_resource.rb', line 35

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



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

def additional_data=(value)
    @additional_data = value
end

#created_byObject

Gets the createdBy property value. The individual who created the resource.

Returns:

  • a identity_set



57
58
59
# File 'lib/models/education_resource.rb', line 57

def created_by
    return @created_by
end

#created_by=(value) ⇒ Object

Sets the createdBy property value. The individual who created the resource.

Parameters:

  • value

    Value to set for the createdBy property.

Returns:

  • a void



65
66
67
# File 'lib/models/education_resource.rb', line 65

def created_by=(value)
    @created_by = value
end

#created_date_timeObject

Gets the createdDateTime property value. Moment in time when the resource was created. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z

Returns:

  • a date_time



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

def created_date_time
    return @created_date_time
end

#created_date_time=(value) ⇒ Object

Sets the createdDateTime property value. Moment in time when the resource was created. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z

Parameters:

  • value

    Value to set for the createdDateTime property.

Returns:

  • a void



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

def created_date_time=(value)
    @created_date_time = value
end

#display_nameObject

Gets the displayName property value. Display name of resource.

Returns:

  • a string



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

def display_name
    return @display_name
end

#display_name=(value) ⇒ Object

Sets the displayName property value. Display name of resource.

Parameters:

  • value

    Value to set for the displayName property.

Returns:

  • a void



126
127
128
# File 'lib/models/education_resource.rb', line 126

def display_name=(value)
    @display_name = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



133
134
135
136
137
138
139
140
141
142
# File 'lib/models/education_resource.rb', line 133

def get_field_deserializers()
    return {
        "createdBy" => lambda {|n| @created_by = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::IdentitySet.create_from_discriminator_value(pn) }) },
        "createdDateTime" => lambda {|n| @created_date_time = n.get_date_time_value() },
        "displayName" => lambda {|n| @display_name = n.get_string_value() },
        "lastModifiedBy" => lambda {|n| @last_modified_by = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::IdentitySet.create_from_discriminator_value(pn) }) },
        "lastModifiedDateTime" => lambda {|n| @last_modified_date_time = n.get_date_time_value() },
        "@odata.type" => lambda {|n| @odata_type = n.get_string_value() },
    }
end

#last_modified_byObject

Gets the lastModifiedBy property value. The last user to modify the resource.

Returns:

  • a identity_set



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

def last_modified_by
    return @last_modified_by
end

#last_modified_by=(value) ⇒ Object

Sets the lastModifiedBy property value. The last user to modify the resource.

Parameters:

  • value

    Value to set for the lastModifiedBy property.

Returns:

  • a void



155
156
157
# File 'lib/models/education_resource.rb', line 155

def last_modified_by=(value)
    @last_modified_by = value
end

#last_modified_date_timeObject

Gets the lastModifiedDateTime property value. Moment in time when the resource was last modified. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z.

Returns:

  • a date_time



162
163
164
# File 'lib/models/education_resource.rb', line 162

def last_modified_date_time
    return @last_modified_date_time
end

#last_modified_date_time=(value) ⇒ Object

Sets the lastModifiedDateTime property value. Moment in time when the resource was last modified. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z.

Parameters:

  • value

    Value to set for the lastModifiedDateTime property.

Returns:

  • a void



170
171
172
# File 'lib/models/education_resource.rb', line 170

def last_modified_date_time=(value)
    @last_modified_date_time = value
end

#odata_typeObject

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

Returns:

  • a string



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

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



185
186
187
# File 'lib/models/education_resource.rb', line 185

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)


193
194
195
196
197
198
# File 'lib/models/education_resource.rb', line 193

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