Class: MicrosoftGraph::Models::TeamsAppInstallation

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

Direct Known Subclasses

UserScopeTeamsAppInstallation

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



37
38
39
# File 'lib/models/teams_app_installation.rb', line 37

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 teams_app_installation

Raises:

  • (StandardError)


45
46
47
48
49
50
51
52
53
54
55
56
# File 'lib/models/teams_app_installation.rb', line 45

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.userScopeTeamsAppInstallation"
                return UserScopeTeamsAppInstallation.new
        end
    end
    return TeamsAppInstallation.new
end

Instance Method Details

#consented_permission_setObject

Gets the consentedPermissionSet property value. The set of resource-specific permissions consented to while installing or upgrading the teamsApp.

Returns:

  • a teams_app_permission_set



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

def consented_permission_set
    return @consented_permission_set
end

#consented_permission_set=(value) ⇒ Object

Sets the consentedPermissionSet property value. The set of resource-specific permissions consented to while installing or upgrading the teamsApp.

Parameters:

  • value

    Value to set for the consentedPermissionSet property.

Returns:

  • a void



30
31
32
# File 'lib/models/teams_app_installation.rb', line 30

def consented_permission_set=(value)
    @consented_permission_set = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



61
62
63
64
65
66
67
# File 'lib/models/teams_app_installation.rb', line 61

def get_field_deserializers()
    return super.merge({
        "consentedPermissionSet" => lambda {|n| @consented_permission_set = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::TeamsAppPermissionSet.create_from_discriminator_value(pn) }) },
        "teamsApp" => lambda {|n| @teams_app = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::TeamsApp.create_from_discriminator_value(pn) }) },
        "teamsAppDefinition" => lambda {|n| @teams_app_definition = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::TeamsAppDefinition.create_from_discriminator_value(pn) }) },
    })
end

#serialize(writer) ⇒ Object

Serializes information the current object

Parameters:

  • writer

    Serialization writer to use to serialize this model

Returns:

  • a void

Raises:

  • (StandardError)


73
74
75
76
77
78
79
# File 'lib/models/teams_app_installation.rb', line 73

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_object_value("consentedPermissionSet", @consented_permission_set)
    writer.write_object_value("teamsApp", @teams_app)
    writer.write_object_value("teamsAppDefinition", @teams_app_definition)
end

#teams_appObject

Gets the teamsApp property value. The app that is installed.

Returns:

  • a teams_app



84
85
86
# File 'lib/models/teams_app_installation.rb', line 84

def teams_app
    return @teams_app
end

#teams_app=(value) ⇒ Object

Sets the teamsApp property value. The app that is installed.

Parameters:

  • value

    Value to set for the teamsApp property.

Returns:

  • a void



92
93
94
# File 'lib/models/teams_app_installation.rb', line 92

def teams_app=(value)
    @teams_app = value
end

#teams_app_definitionObject

Gets the teamsAppDefinition property value. The details of this version of the app.

Returns:

  • a teams_app_definition



99
100
101
# File 'lib/models/teams_app_installation.rb', line 99

def teams_app_definition
    return @teams_app_definition
end

#teams_app_definition=(value) ⇒ Object

Sets the teamsAppDefinition property value. The details of this version of the app.

Parameters:

  • value

    Value to set for the teamsAppDefinition property.

Returns:

  • a void



107
108
109
# File 'lib/models/teams_app_installation.rb', line 107

def teams_app_definition=(value)
    @teams_app_definition = value
end