Class: MicrosoftGraph::Models::ManagedApp

Inherits:
MobileApp show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/managed_app.rb

Overview

Abstract class that contains properties and inherited properties for apps that you can manage with an Intune app protection policy.

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from MobileApp

#assignments, #assignments=, #categories, #categories=, #created_date_time, #created_date_time=, #description, #description=, #developer, #developer=, #display_name, #display_name=, #information_url, #information_url=, #is_featured, #is_featured=, #large_icon, #large_icon=, #last_modified_date_time, #last_modified_date_time=, #notes, #notes=, #owner, #owner=, #privacy_information_url, #privacy_information_url=, #publisher, #publisher=, #publishing_state, #publishing_state=

Methods inherited from Entity

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

Constructor Details

#initializeObject

Instantiates a new managedApp and sets the default values.



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

def initialize()
    super
    @odata_type = "#microsoft.graph.managedApp"
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 managed_app

Raises:

  • (StandardError)


45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/models/managed_app.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.managedAndroidLobApp"
                return ManagedAndroidLobApp.new
            when "#microsoft.graph.managedAndroidStoreApp"
                return ManagedAndroidStoreApp.new
            when "#microsoft.graph.managedIOSLobApp"
                return ManagedIOSLobApp.new
            when "#microsoft.graph.managedIOSStoreApp"
                return ManagedIOSStoreApp.new
            when "#microsoft.graph.managedMobileLobApp"
                return ManagedMobileLobApp.new
        end
    end
    return ManagedApp.new
end

Instance Method Details

#app_availabilityObject

Gets the appAvailability property value. A managed (MAM) application’s availability.

Returns:

  • a managed_app_availability



21
22
23
# File 'lib/models/managed_app.rb', line 21

def app_availability
    return @app_availability
end

#app_availability=(value) ⇒ Object

Sets the appAvailability property value. A managed (MAM) application’s availability.

Parameters:

  • value

    Value to set for the appAvailability property.

Returns:

  • a void



29
30
31
# File 'lib/models/managed_app.rb', line 29

def app_availability=(value)
    @app_availability = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



69
70
71
72
73
74
# File 'lib/models/managed_app.rb', line 69

def get_field_deserializers()
    return super.merge({
        "appAvailability" => lambda {|n| @app_availability = n.get_enum_value(MicrosoftGraph::Models::ManagedAppAvailability) },
        "version" => lambda {|n| @version = 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)


80
81
82
83
84
85
# File 'lib/models/managed_app.rb', line 80

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_enum_value("appAvailability", @app_availability)
    writer.write_string_value("version", @version)
end

#versionObject

Gets the version property value. The Application’s version.

Returns:

  • a string



90
91
92
# File 'lib/models/managed_app.rb', line 90

def version
    return @version
end

#version=(value) ⇒ Object

Sets the version property value. The Application’s version.

Parameters:

  • value

    Value to set for the version property.

Returns:

  • a void



98
99
100
# File 'lib/models/managed_app.rb', line 98

def version=(value)
    @version = value
end