Class: MicrosoftGraph::Models::DeviceComplianceScheduledActionForRule

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

Overview

Scheduled Action for Rule

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



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

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

Raises:

  • (StandardError)


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

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

Instance Method Details

#get_field_deserializersObject

The deserialization information for the current model



37
38
39
40
41
42
# File 'lib/models/device_compliance_scheduled_action_for_rule.rb', line 37

def get_field_deserializers()
    return super.merge({
        "ruleName" => lambda {|n| @rule_name = n.get_string_value() },
        "scheduledActionConfigurations" => lambda {|n| @scheduled_action_configurations = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::DeviceComplianceActionItem.create_from_discriminator_value(pn) }) },
    })
end

#rule_nameObject

Gets the ruleName property value. Name of the rule which this scheduled action applies to. Currently scheduled actions are created per policy instead of per rule, thus RuleName is always set to default value PasswordRequired.



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

def rule_name
    return @rule_name
end

#rule_name=(value) ⇒ Object

Sets the ruleName property value. Name of the rule which this scheduled action applies to. Currently scheduled actions are created per policy instead of per rule, thus RuleName is always set to default value PasswordRequired.



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

def rule_name=(value)
    @rule_name = value
end

#scheduled_action_configurationsObject

Gets the scheduledActionConfigurations property value. The list of scheduled action configurations for this compliance policy. Compliance policy must have one and only one block scheduled action.



62
63
64
# File 'lib/models/device_compliance_scheduled_action_for_rule.rb', line 62

def scheduled_action_configurations
    return @scheduled_action_configurations
end

#scheduled_action_configurations=(value) ⇒ Object

Sets the scheduledActionConfigurations property value. The list of scheduled action configurations for this compliance policy. Compliance policy must have one and only one block scheduled action.



70
71
72
# File 'lib/models/device_compliance_scheduled_action_for_rule.rb', line 70

def scheduled_action_configurations=(value)
    @scheduled_action_configurations = value
end

#serialize(writer) ⇒ Object

Serializes information the current object

Raises:

  • (StandardError)


78
79
80
81
82
83
# File 'lib/models/device_compliance_scheduled_action_for_rule.rb', line 78

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_string_value("ruleName", @rule_name)
    writer.write_collection_of_object_values("scheduledActionConfigurations", @scheduled_action_configurations)
end