Class: MicrosoftGraph::Models::TeamInfo

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

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 teamInfo and sets the default values.



22
23
24
# File 'lib/models/team_info.rb', line 22

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 team_info

Raises:

  • (StandardError)


30
31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/models/team_info.rb', line 30

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.associatedTeamInfo"
                return AssociatedTeamInfo.new
            when "#microsoft.graph.sharedWithChannelTeamInfo"
                return SharedWithChannelTeamInfo.new
        end
    end
    return TeamInfo.new
end

Instance Method Details

#display_nameObject

Gets the displayName property value. The name of the team.

Returns:

  • a string



48
49
50
# File 'lib/models/team_info.rb', line 48

def display_name
    return @display_name
end

#display_name=(value) ⇒ Object

Sets the displayName property value. The name of the team.

Parameters:

  • value

    Value to set for the displayName property.

Returns:

  • a void



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

def display_name=(value)
    @display_name = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



63
64
65
66
67
68
69
# File 'lib/models/team_info.rb', line 63

def get_field_deserializers()
    return super.merge({
        "displayName" => lambda {|n| @display_name = n.get_string_value() },
        "team" => lambda {|n| @team = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Team.create_from_discriminator_value(pn) }) },
        "tenantId" => lambda {|n| @tenant_id = 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)


75
76
77
78
79
80
81
# File 'lib/models/team_info.rb', line 75

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_string_value("displayName", @display_name)
    writer.write_object_value("team", @team)
    writer.write_string_value("tenantId", @tenant_id)
end

#teamObject

Gets the team property value. The team property

Returns:

  • a team



86
87
88
# File 'lib/models/team_info.rb', line 86

def team
    return @team
end

#team=(value) ⇒ Object

Sets the team property value. The team property

Parameters:

  • value

    Value to set for the team property.

Returns:

  • a void



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

def team=(value)
    @team = value
end

#tenant_idObject

Gets the tenantId property value. The ID of the Azure Active Directory tenant.

Returns:

  • a string



101
102
103
# File 'lib/models/team_info.rb', line 101

def tenant_id
    return @tenant_id
end

#tenant_id=(value) ⇒ Object

Sets the tenantId property value. The ID of the Azure Active Directory tenant.

Parameters:

  • value

    Value to set for the tenantId property.

Returns:

  • a void



109
110
111
# File 'lib/models/team_info.rb', line 109

def tenant_id=(value)
    @tenant_id = value
end