Class: MicrosoftGraph::Models::SecurityIndicator
- Includes:
- MicrosoftKiotaAbstractions::Parsable
- Defined in:
- lib/models/security_indicator.rb
Direct Known Subclasses
SecurityArticleIndicator, SecurityIntelligenceProfileIndicator
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
-
#artifact ⇒ Object
Gets the artifact property value.
-
#artifact=(value) ⇒ Object
Sets the artifact property value.
-
#get_field_deserializers ⇒ Object
The deserialization information for the current model.
-
#initialize ⇒ Object
constructor
Instantiates a new securityIndicator and sets the default values.
-
#serialize(writer) ⇒ Object
Serializes information the current object.
-
#source ⇒ Object
Gets the source property value.
-
#source=(value) ⇒ Object
Sets the source property value.
Methods inherited from Entity
#additional_data, #additional_data=, #id, #id=, #odata_type, #odata_type=
Constructor Details
#initialize ⇒ Object
Instantiates a new securityIndicator and sets the default values.
34 35 36 |
# File 'lib/models/security_indicator.rb', line 34 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
42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/models/security_indicator.rb', line 42 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.security.articleIndicator" return SecurityArticleIndicator.new when "#microsoft.graph.security.intelligenceProfileIndicator" return SecurityIntelligenceProfileIndicator.new end end return SecurityIndicator.new end |
Instance Method Details
#artifact ⇒ Object
Gets the artifact property value. The artifact property
19 20 21 |
# File 'lib/models/security_indicator.rb', line 19 def artifact return @artifact end |
#artifact=(value) ⇒ Object
Sets the artifact property value. The artifact property
27 28 29 |
# File 'lib/models/security_indicator.rb', line 27 def artifact=(value) @artifact = value end |
#get_field_deserializers ⇒ Object
The deserialization information for the current model
60 61 62 63 64 65 |
# File 'lib/models/security_indicator.rb', line 60 def get_field_deserializers() return super.merge({ "artifact" => lambda {|n| @artifact = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::SecurityArtifact.create_from_discriminator_value(pn) }) }, "source" => lambda {|n| @source = n.get_enum_value(MicrosoftGraph::Models::SecurityIndicatorSource) }, }) end |
#serialize(writer) ⇒ Object
Serializes information the current object
71 72 73 74 75 76 |
# File 'lib/models/security_indicator.rb', line 71 def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? super writer.write_object_value("artifact", @artifact) writer.write_enum_value("source", @source) end |
#source ⇒ Object
Gets the source property value. The source property
81 82 83 |
# File 'lib/models/security_indicator.rb', line 81 def source return @source end |
#source=(value) ⇒ Object
Sets the source property value. The source property
89 90 91 |
# File 'lib/models/security_indicator.rb', line 89 def source=(value) @source = value end |