Class: MicrosoftGraph::Models::WindowsInformationProtectionApp

Inherits:
Object
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/windows_information_protection_app.rb

Overview

App for Windows information protection

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

Instantiates a new windowsInformationProtectionApp and sets the default values.



51
52
53
# File 'lib/models/windows_information_protection_app.rb', line 51

def initialize()
    @additional_data = Hash.new
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 windows_information_protection_app

Raises:

  • (StandardError)


59
60
61
62
63
64
65
66
67
68
69
70
71
72
# File 'lib/models/windows_information_protection_app.rb', line 59

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.windowsInformationProtectionDesktopApp"
                return WindowsInformationProtectionDesktopApp.new
            when "#microsoft.graph.windowsInformationProtectionStoreApp"
                return WindowsInformationProtectionStoreApp.new
        end
    end
    return WindowsInformationProtectionApp.new
end

Instance Method Details

#additional_dataObject

Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.

Returns:

  • a i_dictionary



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

def additional_data
    return @additional_data
end

#additional_data=(value) ⇒ Object

Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.

Parameters:

  • value

    Value to set for the additionalData property.

Returns:

  • a void



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

def additional_data=(value)
    @additional_data = value
end

#deniedObject

Gets the denied property value. If true, app is denied protection or exemption.

Returns:

  • a boolean



77
78
79
# File 'lib/models/windows_information_protection_app.rb', line 77

def denied
    return @denied
end

#denied=(value) ⇒ Object

Sets the denied property value. If true, app is denied protection or exemption.

Parameters:

  • value

    Value to set for the denied property.

Returns:

  • a void



85
86
87
# File 'lib/models/windows_information_protection_app.rb', line 85

def denied=(value)
    @denied = value
end

#descriptionObject

Gets the description property value. The app’s description.

Returns:

  • a string



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

def description
    return @description
end

#description=(value) ⇒ Object

Sets the description property value. The app’s description.

Parameters:

  • value

    Value to set for the description property.

Returns:

  • a void



100
101
102
# File 'lib/models/windows_information_protection_app.rb', line 100

def description=(value)
    @description = value
end

#display_nameObject

Gets the displayName property value. App display name.

Returns:

  • a string



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

def display_name
    return @display_name
end

#display_name=(value) ⇒ Object

Sets the displayName property value. App display name.

Parameters:

  • value

    Value to set for the displayName property.

Returns:

  • a void



115
116
117
# File 'lib/models/windows_information_protection_app.rb', line 115

def display_name=(value)
    @display_name = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



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

def get_field_deserializers()
    return {
        "denied" => lambda {|n| @denied = n.get_boolean_value() },
        "description" => lambda {|n| @description = n.get_string_value() },
        "displayName" => lambda {|n| @display_name = n.get_string_value() },
        "@odata.type" => lambda {|n| @odata_type = n.get_string_value() },
        "productName" => lambda {|n| @product_name = n.get_string_value() },
        "publisherName" => lambda {|n| @publisher_name = n.get_string_value() },
    }
end

#odata_typeObject

Gets the @odata.type property value. The OdataType property

Returns:

  • a string



136
137
138
# File 'lib/models/windows_information_protection_app.rb', line 136

def odata_type
    return @odata_type
end

#odata_type=(value) ⇒ Object

Sets the @odata.type property value. The OdataType property

Parameters:

  • value

    Value to set for the @odata.type property.

Returns:

  • a void



144
145
146
# File 'lib/models/windows_information_protection_app.rb', line 144

def odata_type=(value)
    @odata_type = value
end

#product_nameObject

Gets the productName property value. The product name.

Returns:

  • a string



151
152
153
# File 'lib/models/windows_information_protection_app.rb', line 151

def product_name
    return @product_name
end

#product_name=(value) ⇒ Object

Sets the productName property value. The product name.

Parameters:

  • value

    Value to set for the productName property.

Returns:

  • a void



159
160
161
# File 'lib/models/windows_information_protection_app.rb', line 159

def product_name=(value)
    @product_name = value
end

#publisher_nameObject

Gets the publisherName property value. The publisher name

Returns:

  • a string



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

def publisher_name
    return @publisher_name
end

#publisher_name=(value) ⇒ Object

Sets the publisherName property value. The publisher name

Parameters:

  • value

    Value to set for the publisherName property.

Returns:

  • a void



174
175
176
# File 'lib/models/windows_information_protection_app.rb', line 174

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


182
183
184
185
186
187
188
189
190
191
# File 'lib/models/windows_information_protection_app.rb', line 182

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_boolean_value("denied", @denied)
    writer.write_string_value("description", @description)
    writer.write_string_value("displayName", @display_name)
    writer.write_string_value("@odata.type", @odata_type)
    writer.write_string_value("productName", @product_name)
    writer.write_string_value("publisherName", @publisher_name)
    writer.write_additional_data(@additional_data)
end