Class: MicrosoftGraph::Models::SecurityIndicator

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

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 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

Parameters:

  • parse_node

    The parse node to use to read the discriminator value and create the object

Returns:

  • a security_indicator

Raises:

  • (StandardError)


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

#artifactObject

Gets the artifact property value. The artifact property

Returns:

  • a security_artifact



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

Parameters:

  • value

    Value to set for the artifact property.

Returns:

  • a void



27
28
29
# File 'lib/models/security_indicator.rb', line 27

def artifact=(value)
    @artifact = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



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

Parameters:

  • writer

    Serialization writer to use to serialize this model

Returns:

  • a void

Raises:

  • (StandardError)


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

#sourceObject

Gets the source property value. The source property

Returns:

  • a security_indicator_source



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

Parameters:

  • value

    Value to set for the source property.

Returns:

  • a void



89
90
91
# File 'lib/models/security_indicator.rb', line 89

def source=(value)
    @source = value
end