Class: MicrosoftGraph::Models::MessageRule
- Includes:
- MicrosoftKiotaAbstractions::Parsable
- Defined in:
- lib/models/message_rule.rb
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
-
#actions ⇒ Object
Gets the actions property value.
-
#actions=(value) ⇒ Object
Sets the actions property value.
-
#conditions ⇒ Object
Gets the conditions property value.
-
#conditions=(value) ⇒ Object
Sets the conditions property value.
-
#display_name ⇒ Object
Gets the displayName property value.
-
#display_name=(value) ⇒ Object
Sets the displayName property value.
-
#exceptions ⇒ Object
Gets the exceptions property value.
-
#exceptions=(value) ⇒ Object
Sets the exceptions property value.
-
#get_field_deserializers ⇒ Object
The deserialization information for the current model.
-
#has_error ⇒ Object
Gets the hasError property value.
-
#has_error=(value) ⇒ Object
Sets the hasError property value.
-
#initialize ⇒ Object
constructor
Instantiates a new messageRule and sets the default values.
-
#is_enabled ⇒ Object
Gets the isEnabled property value.
-
#is_enabled=(value) ⇒ Object
Sets the isEnabled property value.
-
#is_read_only ⇒ Object
Gets the isReadOnly property value.
-
#is_read_only=(value) ⇒ Object
Sets the isReadOnly property value.
-
#sequence ⇒ Object
Gets the sequence property value.
-
#sequence=(value) ⇒ Object
Sets the sequence property value.
-
#serialize(writer) ⇒ Object
Serializes information the current object.
Methods inherited from Entity
#additional_data, #additional_data=, #id, #id=, #odata_type, #odata_type=
Constructor Details
#initialize ⇒ Object
Instantiates a new messageRule and sets the default values.
67 68 69 |
# File 'lib/models/message_rule.rb', line 67 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
75 76 77 78 |
# File 'lib/models/message_rule.rb', line 75 def self.create_from_discriminator_value(parse_node) raise StandardError, 'parse_node cannot be null' if parse_node.nil? return MessageRule.new end |
Instance Method Details
#actions ⇒ Object
Gets the actions property value. Actions to be taken on a message when the corresponding conditions are fulfilled.
37 38 39 |
# File 'lib/models/message_rule.rb', line 37 def actions return @actions end |
#actions=(value) ⇒ Object
Sets the actions property value. Actions to be taken on a message when the corresponding conditions are fulfilled.
45 46 47 |
# File 'lib/models/message_rule.rb', line 45 def actions=(value) @actions = value end |
#conditions ⇒ Object
Gets the conditions property value. Conditions that when fulfilled, will trigger the corresponding actions for that rule.
52 53 54 |
# File 'lib/models/message_rule.rb', line 52 def conditions return @conditions end |
#conditions=(value) ⇒ Object
Sets the conditions property value. Conditions that when fulfilled, will trigger the corresponding actions for that rule.
60 61 62 |
# File 'lib/models/message_rule.rb', line 60 def conditions=(value) @conditions = value end |
#display_name ⇒ Object
Gets the displayName property value. The display name of the rule.
83 84 85 |
# File 'lib/models/message_rule.rb', line 83 def display_name return @display_name end |
#display_name=(value) ⇒ Object
Sets the displayName property value. The display name of the rule.
91 92 93 |
# File 'lib/models/message_rule.rb', line 91 def display_name=(value) @display_name = value end |
#exceptions ⇒ Object
Gets the exceptions property value. Exception conditions for the rule.
98 99 100 |
# File 'lib/models/message_rule.rb', line 98 def exceptions return @exceptions end |
#exceptions=(value) ⇒ Object
Sets the exceptions property value. Exception conditions for the rule.
106 107 108 |
# File 'lib/models/message_rule.rb', line 106 def exceptions=(value) @exceptions = value end |
#get_field_deserializers ⇒ Object
The deserialization information for the current model
113 114 115 116 117 118 119 120 121 122 123 124 |
# File 'lib/models/message_rule.rb', line 113 def get_field_deserializers() return super.merge({ "actions" => lambda {|n| @actions = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::MessageRuleActions.create_from_discriminator_value(pn) }) }, "conditions" => lambda {|n| @conditions = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::MessageRulePredicates.create_from_discriminator_value(pn) }) }, "displayName" => lambda {|n| @display_name = n.get_string_value() }, "exceptions" => lambda {|n| @exceptions = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::MessageRulePredicates.create_from_discriminator_value(pn) }) }, "hasError" => lambda {|n| @has_error = n.get_boolean_value() }, "isEnabled" => lambda {|n| @is_enabled = n.get_boolean_value() }, "isReadOnly" => lambda {|n| @is_read_only = n.get_boolean_value() }, "sequence" => lambda {|n| @sequence = n.get_number_value() }, }) end |
#has_error ⇒ Object
Gets the hasError property value. Indicates whether the rule is in an error condition. Read-only.
129 130 131 |
# File 'lib/models/message_rule.rb', line 129 def has_error return @has_error end |
#has_error=(value) ⇒ Object
Sets the hasError property value. Indicates whether the rule is in an error condition. Read-only.
137 138 139 |
# File 'lib/models/message_rule.rb', line 137 def has_error=(value) @has_error = value end |
#is_enabled ⇒ Object
Gets the isEnabled property value. Indicates whether the rule is enabled to be applied to messages.
144 145 146 |
# File 'lib/models/message_rule.rb', line 144 def is_enabled return @is_enabled end |
#is_enabled=(value) ⇒ Object
Sets the isEnabled property value. Indicates whether the rule is enabled to be applied to messages.
152 153 154 |
# File 'lib/models/message_rule.rb', line 152 def is_enabled=(value) @is_enabled = value end |
#is_read_only ⇒ Object
Gets the isReadOnly property value. Indicates if the rule is read-only and cannot be modified or deleted by the rules REST API.
159 160 161 |
# File 'lib/models/message_rule.rb', line 159 def is_read_only return @is_read_only end |
#is_read_only=(value) ⇒ Object
Sets the isReadOnly property value. Indicates if the rule is read-only and cannot be modified or deleted by the rules REST API.
167 168 169 |
# File 'lib/models/message_rule.rb', line 167 def is_read_only=(value) @is_read_only = value end |
#sequence ⇒ Object
Gets the sequence property value. Indicates the order in which the rule is executed, among other rules.
174 175 176 |
# File 'lib/models/message_rule.rb', line 174 def sequence return @sequence end |
#sequence=(value) ⇒ Object
Sets the sequence property value. Indicates the order in which the rule is executed, among other rules.
182 183 184 |
# File 'lib/models/message_rule.rb', line 182 def sequence=(value) @sequence = value end |
#serialize(writer) ⇒ Object
Serializes information the current object
190 191 192 193 194 195 196 197 198 199 200 201 |
# File 'lib/models/message_rule.rb', line 190 def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? super writer.write_object_value("actions", @actions) writer.write_object_value("conditions", @conditions) writer.write_string_value("displayName", @display_name) writer.write_object_value("exceptions", @exceptions) writer.write_boolean_value("hasError", @has_error) writer.write_boolean_value("isEnabled", @is_enabled) writer.write_boolean_value("isReadOnly", @is_read_only) writer.write_number_value("sequence", @sequence) end |