Class: MicrosoftGraph::Models::Win32LobAppRule
- Inherits:
-
Object
- Object
- MicrosoftGraph::Models::Win32LobAppRule
- Includes:
- MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable
- Defined in:
- lib/models/win32_lob_app_rule.rb
Overview
A base complex type to store the detection or requirement rule data for a Win32 LOB app.
Direct Known Subclasses
Win32LobAppFileSystemRule, Win32LobAppPowerShellScriptRule, Win32LobAppProductCodeRule, Win32LobAppRegistryRule
Class Method Summary collapse
-
.create_from_discriminator_value(parse_node) ⇒ Object
Creates a new instance of the appropriate class based on discriminator value.
Instance Method Summary collapse
-
#additional_data ⇒ Object
Gets the additionalData property value.
-
#additional_data=(value) ⇒ Object
Sets the additionalData property value.
-
#get_field_deserializers ⇒ Object
The deserialization information for the current model.
-
#initialize ⇒ Object
constructor
Instantiates a new win32LobAppRule and sets the default values.
-
#odata_type ⇒ Object
Gets the @odata.type property value.
-
#odata_type=(value) ⇒ Object
Sets the @odata.type property value.
-
#rule_type ⇒ Object
Gets the ruleType property value.
-
#rule_type=(value) ⇒ Object
Sets the ruleType property value.
-
#serialize(writer) ⇒ Object
Serializes information the current object.
Constructor Details
#initialize ⇒ Object
Instantiates a new win32LobAppRule and sets the default values.
39 40 41 |
# File 'lib/models/win32_lob_app_rule.rb', line 39 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
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/models/win32_lob_app_rule.rb', line 47 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.win32LobAppFileSystemRule" return Win32LobAppFileSystemRule.new when "#microsoft.graph.win32LobAppPowerShellScriptRule" return Win32LobAppPowerShellScriptRule.new when "#microsoft.graph.win32LobAppProductCodeRule" return Win32LobAppProductCodeRule.new when "#microsoft.graph.win32LobAppRegistryRule" return Win32LobAppRegistryRule.new end end return Win32LobAppRule.new end |
Instance Method Details
#additional_data ⇒ Object
Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
24 25 26 |
# File 'lib/models/win32_lob_app_rule.rb', line 24 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.
32 33 34 |
# File 'lib/models/win32_lob_app_rule.rb', line 32 def additional_data=(value) @additional_data = value end |
#get_field_deserializers ⇒ Object
The deserialization information for the current model
69 70 71 72 73 74 |
# File 'lib/models/win32_lob_app_rule.rb', line 69 def get_field_deserializers() return { "@odata.type" => lambda {|n| @odata_type = n.get_string_value() }, "ruleType" => lambda {|n| @rule_type = n.get_enum_value(MicrosoftGraph::Models::Win32LobAppRuleType) }, } end |
#odata_type ⇒ Object
Gets the @odata.type property value. The OdataType property
79 80 81 |
# File 'lib/models/win32_lob_app_rule.rb', line 79 def odata_type return @odata_type end |
#odata_type=(value) ⇒ Object
Sets the @odata.type property value. The OdataType property
87 88 89 |
# File 'lib/models/win32_lob_app_rule.rb', line 87 def odata_type=(value) @odata_type = value end |
#rule_type ⇒ Object
Gets the ruleType property value. Contains rule types for Win32 LOB apps.
94 95 96 |
# File 'lib/models/win32_lob_app_rule.rb', line 94 def rule_type return @rule_type end |
#rule_type=(value) ⇒ Object
Sets the ruleType property value. Contains rule types for Win32 LOB apps.
102 103 104 |
# File 'lib/models/win32_lob_app_rule.rb', line 102 def rule_type=(value) @rule_type = value end |
#serialize(writer) ⇒ Object
Serializes information the current object
110 111 112 113 114 115 |
# File 'lib/models/win32_lob_app_rule.rb', line 110 def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? writer.write_string_value("@odata.type", @odata_type) writer.write_enum_value("ruleType", @rule_type) writer.write_additional_data(@additional_data) end |