Class: MicrosoftGraph::Models::EducationOrganization

Inherits:
Entity
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/education_organization.rb

Direct Known Subclasses

EducationSchool

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Entity

#additional_data, #additional_data=, #id, #id=, #odata_type, #odata_type=

Constructor Details

#initializeObject

Instantiates a new educationOrganization and sets the default values.



25
26
27
# File 'lib/models/education_organization.rb', line 25

def initialize()
    super
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_organization

Raises:

  • (StandardError)


33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/models/education_organization.rb', line 33

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.educationSchool"
                return EducationSchool.new
        end
    end
    return EducationOrganization.new
end

Instance Method Details

#descriptionObject

Gets the description property value. Organization description.

Returns:

  • a string



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

def description
    return @description
end

#description=(value) ⇒ Object

Sets the description property value. Organization description.

Parameters:

  • value

    Value to set for the description property.

Returns:

  • a void



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

def description=(value)
    @description = value
end

#display_nameObject

Gets the displayName property value. Organization display name.

Returns:

  • a string



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

def display_name
    return @display_name
end

#display_name=(value) ⇒ Object

Sets the displayName property value. Organization display name.

Parameters:

  • value

    Value to set for the displayName property.

Returns:

  • a void



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

def display_name=(value)
    @display_name = value
end

#external_sourceObject

Gets the externalSource property value. Source where this organization was created from. Possible values are: sis, manual.

Returns:

  • a education_external_source



79
80
81
# File 'lib/models/education_organization.rb', line 79

def external_source
    return @external_source
end

#external_source=(value) ⇒ Object

Sets the externalSource property value. Source where this organization was created from. Possible values are: sis, manual.

Parameters:

  • value

    Value to set for the externalSource property.

Returns:

  • a void



87
88
89
# File 'lib/models/education_organization.rb', line 87

def external_source=(value)
    @external_source = value
end

#external_source_detailObject

Gets the externalSourceDetail property value. The name of the external source this resources was generated from.

Returns:

  • a string



94
95
96
# File 'lib/models/education_organization.rb', line 94

def external_source_detail
    return @external_source_detail
end

#external_source_detail=(value) ⇒ Object

Sets the externalSourceDetail property value. The name of the external source this resources was generated from.

Parameters:

  • value

    Value to set for the externalSourceDetail property.

Returns:

  • a void



102
103
104
# File 'lib/models/education_organization.rb', line 102

def external_source_detail=(value)
    @external_source_detail = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



109
110
111
112
113
114
115
116
# File 'lib/models/education_organization.rb', line 109

def get_field_deserializers()
    return super.merge({
        "description" => lambda {|n| @description = n.get_string_value() },
        "displayName" => lambda {|n| @display_name = n.get_string_value() },
        "externalSource" => lambda {|n| @external_source = n.get_enum_value(MicrosoftGraph::Models::EducationExternalSource) },
        "externalSourceDetail" => lambda {|n| @external_source_detail = 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)


122
123
124
125
126
127
128
129
# File 'lib/models/education_organization.rb', line 122

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_string_value("description", @description)
    writer.write_string_value("displayName", @display_name)
    writer.write_enum_value("externalSource", @external_source)
    writer.write_string_value("externalSourceDetail", @external_source_detail)
end