Class: MicrosoftGraph::Models::DetectedApp

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

Overview

A managed or unmanaged app that is installed on a managed device. Unmanaged apps will only appear for devices marked as corporate owned.

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



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

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 detected_app

Raises:

  • (StandardError)


44
45
46
47
# File 'lib/models/detected_app.rb', line 44

def self.create_from_discriminator_value(parse_node)
    raise StandardError, 'parse_node cannot be null' if parse_node.nil?
    return DetectedApp.new
end

Instance Method Details

#device_countObject

Gets the deviceCount property value. The number of devices that have installed this application

Returns:

  • a integer



52
53
54
# File 'lib/models/detected_app.rb', line 52

def device_count
    return @device_count
end

#device_count=(value) ⇒ Object

Sets the deviceCount property value. The number of devices that have installed this application

Parameters:

  • value

    Value to set for the deviceCount property.

Returns:

  • a void



60
61
62
# File 'lib/models/detected_app.rb', line 60

def device_count=(value)
    @device_count = value
end

#display_nameObject

Gets the displayName property value. Name of the discovered application. Read-only

Returns:

  • a string



67
68
69
# File 'lib/models/detected_app.rb', line 67

def display_name
    return @display_name
end

#display_name=(value) ⇒ Object

Sets the displayName property value. Name of the discovered application. Read-only

Parameters:

  • value

    Value to set for the displayName property.

Returns:

  • a void



75
76
77
# File 'lib/models/detected_app.rb', line 75

def display_name=(value)
    @display_name = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



82
83
84
85
86
87
88
89
90
91
92
# File 'lib/models/detected_app.rb', line 82

def get_field_deserializers()
    return super.merge({
        "deviceCount" => lambda {|n| @device_count = n.get_number_value() },
        "displayName" => lambda {|n| @display_name = n.get_string_value() },
        "managedDevices" => lambda {|n| @managed_devices = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ManagedDevice.create_from_discriminator_value(pn) }) },
        "platform" => lambda {|n| @platform = n.get_enum_value(MicrosoftGraph::Models::DetectedAppPlatformType) },
        "publisher" => lambda {|n| @publisher = n.get_string_value() },
        "sizeInByte" => lambda {|n| @size_in_byte = n.get_object_value(lambda {|pn| Int64.create_from_discriminator_value(pn) }) },
        "version" => lambda {|n| @version = n.get_string_value() },
    })
end

#managed_devicesObject

Gets the managedDevices property value. The devices that have the discovered application installed

Returns:

  • a managed_device



97
98
99
# File 'lib/models/detected_app.rb', line 97

def managed_devices
    return @managed_devices
end

#managed_devices=(value) ⇒ Object

Sets the managedDevices property value. The devices that have the discovered application installed

Parameters:

  • value

    Value to set for the managedDevices property.

Returns:

  • a void



105
106
107
# File 'lib/models/detected_app.rb', line 105

def managed_devices=(value)
    @managed_devices = value
end

#platformObject

Gets the platform property value. Indicates the operating system / platform of the discovered application. Some possible values are Windows, iOS, macOS. The default value is unknown (0).

Returns:

  • a detected_app_platform_type



112
113
114
# File 'lib/models/detected_app.rb', line 112

def platform
    return @platform
end

#platform=(value) ⇒ Object

Sets the platform property value. Indicates the operating system / platform of the discovered application. Some possible values are Windows, iOS, macOS. The default value is unknown (0).

Parameters:

  • value

    Value to set for the platform property.

Returns:

  • a void



120
121
122
# File 'lib/models/detected_app.rb', line 120

def platform=(value)
    @platform = value
end

#publisherObject

Gets the publisher property value. Indicates the publisher of the discovered application. For example: ‘Microsoft’. The default value is an empty string.

Returns:

  • a string



127
128
129
# File 'lib/models/detected_app.rb', line 127

def publisher
    return @publisher
end

#publisher=(value) ⇒ Object

Sets the publisher property value. Indicates the publisher of the discovered application. For example: ‘Microsoft’. The default value is an empty string.

Parameters:

  • value

    Value to set for the publisher property.

Returns:

  • a void



135
136
137
# File 'lib/models/detected_app.rb', line 135

def publisher=(value)
    @publisher = 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)


143
144
145
146
147
148
149
150
151
152
153
# File 'lib/models/detected_app.rb', line 143

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_number_value("deviceCount", @device_count)
    writer.write_string_value("displayName", @display_name)
    writer.write_collection_of_object_values("managedDevices", @managed_devices)
    writer.write_enum_value("platform", @platform)
    writer.write_string_value("publisher", @publisher)
    writer.write_object_value("sizeInByte", @size_in_byte)
    writer.write_string_value("version", @version)
end

#size_in_byteObject

Gets the sizeInByte property value. Discovered application size in bytes. Read-only

Returns:

  • a int64



158
159
160
# File 'lib/models/detected_app.rb', line 158

def size_in_byte
    return @size_in_byte
end

#size_in_byte=(value) ⇒ Object

Sets the sizeInByte property value. Discovered application size in bytes. Read-only

Parameters:

  • value

    Value to set for the sizeInByte property.

Returns:

  • a void



166
167
168
# File 'lib/models/detected_app.rb', line 166

def size_in_byte=(value)
    @size_in_byte = value
end

#versionObject

Gets the version property value. Version of the discovered application. Read-only

Returns:

  • a string



173
174
175
# File 'lib/models/detected_app.rb', line 173

def version
    return @version
end

#version=(value) ⇒ Object

Sets the version property value. Version of the discovered application. Read-only

Parameters:

  • value

    Value to set for the version property.

Returns:

  • a void



181
182
183
# File 'lib/models/detected_app.rb', line 181

def version=(value)
    @version = value
end