Class: MicrosoftGraph::Models::Win32LobAppPowerShellScriptRule

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

Overview

A complex type to store the PowerShell script rule data for a Win32 LOB app.

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Win32LobAppRule

#additional_data, #additional_data=, #odata_type, #odata_type=, #rule_type, #rule_type=

Constructor Details

#initializeObject

Instantiates a new win32LobAppPowerShellScriptRule and sets the default values.



54
55
56
57
# File 'lib/models/win32_lob_app_power_shell_script_rule.rb', line 54

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

Raises:

  • (StandardError)


63
64
65
66
# File 'lib/models/win32_lob_app_power_shell_script_rule.rb', line 63

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

Instance Method Details

#comparison_valueObject

Gets the comparisonValue property value. The script output comparison value. Do not specify a value if the rule is used for detection.

Returns:

  • a string



39
40
41
# File 'lib/models/win32_lob_app_power_shell_script_rule.rb', line 39

def comparison_value
    return @comparison_value
end

#comparison_value=(value) ⇒ Object

Sets the comparisonValue property value. The script output comparison value. Do not specify a value if the rule is used for detection.

Parameters:

  • value

    Value to set for the comparisonValue property.

Returns:

  • a void



47
48
49
# File 'lib/models/win32_lob_app_power_shell_script_rule.rb', line 47

def comparison_value=(value)
    @comparison_value = value
end

#display_nameObject

Gets the displayName property value. The display name for the rule. Do not specify this value if the rule is used for detection.

Returns:

  • a string



71
72
73
# File 'lib/models/win32_lob_app_power_shell_script_rule.rb', line 71

def display_name
    return @display_name
end

#display_name=(value) ⇒ Object

Sets the displayName property value. The display name for the rule. Do not specify this value if the rule is used for detection.

Parameters:

  • value

    Value to set for the displayName property.

Returns:

  • a void



79
80
81
# File 'lib/models/win32_lob_app_power_shell_script_rule.rb', line 79

def display_name=(value)
    @display_name = value
end

#enforce_signature_checkObject

Gets the enforceSignatureCheck property value. A value indicating whether a signature check is enforced.

Returns:

  • a boolean



86
87
88
# File 'lib/models/win32_lob_app_power_shell_script_rule.rb', line 86

def enforce_signature_check
    return @enforce_signature_check
end

#enforce_signature_check=(value) ⇒ Object

Sets the enforceSignatureCheck property value. A value indicating whether a signature check is enforced.

Parameters:

  • value

    Value to set for the enforceSignatureCheck property.

Returns:

  • a void



94
95
96
# File 'lib/models/win32_lob_app_power_shell_script_rule.rb', line 94

def enforce_signature_check=(value)
    @enforce_signature_check = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



101
102
103
104
105
106
107
108
109
110
111
112
# File 'lib/models/win32_lob_app_power_shell_script_rule.rb', line 101

def get_field_deserializers()
    return super.merge({
        "comparisonValue" => lambda {|n| @comparison_value = n.get_string_value() },
        "displayName" => lambda {|n| @display_name = n.get_string_value() },
        "enforceSignatureCheck" => lambda {|n| @enforce_signature_check = n.get_boolean_value() },
        "operationType" => lambda {|n| @operation_type = n.get_enum_value(MicrosoftGraph::Models::Win32LobAppPowerShellScriptRuleOperationType) },
        "operator" => lambda {|n| @operator = n.get_enum_value(MicrosoftGraph::Models::Win32LobAppRuleOperator) },
        "runAsAccount" => lambda {|n|  = n.get_enum_value(MicrosoftGraph::Models::RunAsAccountType) },
        "runAs32Bit" => lambda {|n| @run_as32_bit = n.get_boolean_value() },
        "scriptContent" => lambda {|n| @script_content = n.get_string_value() },
    })
end

#operation_typeObject

Gets the operationType property value. Contains all supported Powershell Script output detection type.

Returns:

  • a win32_lob_app_power_shell_script_rule_operation_type



117
118
119
# File 'lib/models/win32_lob_app_power_shell_script_rule.rb', line 117

def operation_type
    return @operation_type
end

#operation_type=(value) ⇒ Object

Sets the operationType property value. Contains all supported Powershell Script output detection type.

Parameters:

  • value

    Value to set for the operationType property.

Returns:

  • a void



125
126
127
# File 'lib/models/win32_lob_app_power_shell_script_rule.rb', line 125

def operation_type=(value)
    @operation_type = value
end

#operatorObject

Gets the operator property value. Contains properties for detection operator.

Returns:

  • a win32_lob_app_rule_operator



132
133
134
# File 'lib/models/win32_lob_app_power_shell_script_rule.rb', line 132

def operator
    return @operator
end

#operator=(value) ⇒ Object

Sets the operator property value. Contains properties for detection operator.

Parameters:

  • value

    Value to set for the operator property.

Returns:

  • a void



140
141
142
# File 'lib/models/win32_lob_app_power_shell_script_rule.rb', line 140

def operator=(value)
    @operator = value
end

#run_as32_bitObject

Gets the runAs32Bit property value. A value indicating whether the script should run as 32-bit.

Returns:

  • a boolean



162
163
164
# File 'lib/models/win32_lob_app_power_shell_script_rule.rb', line 162

def run_as32_bit
    return @run_as32_bit
end

#run_as32_bit=(value) ⇒ Object

Sets the runAs32Bit property value. A value indicating whether the script should run as 32-bit.

Parameters:

  • value

    Value to set for the runAs32Bit property.

Returns:

  • a void



170
171
172
# File 'lib/models/win32_lob_app_power_shell_script_rule.rb', line 170

def run_as32_bit=(value)
    @run_as32_bit = value
end

#run_as_accountObject

Gets the runAsAccount property value. The execution context of the script. Do not specify this value if the rule is used for detection. Script detection rules will run in the same context as the associated app install context. Possible values are: system, user.

Returns:

  • a run_as_account_type



147
148
149
# File 'lib/models/win32_lob_app_power_shell_script_rule.rb', line 147

def 
    return 
end

#run_as_account=(value) ⇒ Object

Sets the runAsAccount property value. The execution context of the script. Do not specify this value if the rule is used for detection. Script detection rules will run in the same context as the associated app install context. Possible values are: system, user.

Parameters:

  • value

    Value to set for the runAsAccount property.

Returns:

  • a void



155
156
157
# File 'lib/models/win32_lob_app_power_shell_script_rule.rb', line 155

def run_as_account=(value)
     = value
end

#script_contentObject

Gets the scriptContent property value. The base64-encoded script content.

Returns:

  • a string



177
178
179
# File 'lib/models/win32_lob_app_power_shell_script_rule.rb', line 177

def script_content
    return @script_content
end

#script_content=(value) ⇒ Object

Sets the scriptContent property value. The base64-encoded script content.

Parameters:

  • value

    Value to set for the scriptContent property.

Returns:

  • a void



185
186
187
# File 'lib/models/win32_lob_app_power_shell_script_rule.rb', line 185

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


193
194
195
196
197
198
199
200
201
202
203
204
# File 'lib/models/win32_lob_app_power_shell_script_rule.rb', line 193

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_string_value("comparisonValue", @comparison_value)
    writer.write_string_value("displayName", @display_name)
    writer.write_boolean_value("enforceSignatureCheck", @enforce_signature_check)
    writer.write_enum_value("operationType", @operation_type)
    writer.write_enum_value("operator", @operator)
    writer.write_enum_value("runAsAccount", )
    writer.write_boolean_value("runAs32Bit", @run_as32_bit)
    writer.write_string_value("scriptContent", @script_content)
end