Class: MicrosoftGraph::Models::SecurityHostReputation

Inherits:
Entity
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/security_host_reputation.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 securityHostReputation and sets the default values.



37
38
39
# File 'lib/models/security_host_reputation.rb', line 37

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_host_reputation

Raises:

  • (StandardError)


45
46
47
48
# File 'lib/models/security_host_reputation.rb', line 45

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

Instance Method Details

#classificationObject

Gets the classification property value. The classification property

Returns:

  • a security_host_reputation_classification



22
23
24
# File 'lib/models/security_host_reputation.rb', line 22

def classification
    return @classification
end

#classification=(value) ⇒ Object

Sets the classification property value. The classification property

Parameters:

  • value

    Value to set for the classification property.

Returns:

  • a void



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

def classification=(value)
    @classification = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



53
54
55
56
57
58
59
# File 'lib/models/security_host_reputation.rb', line 53

def get_field_deserializers()
    return super.merge({
        "classification" => lambda {|n| @classification = n.get_enum_value(MicrosoftGraph::Models::SecurityHostReputationClassification) },
        "rules" => lambda {|n| @rules = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::SecurityHostReputationRule.create_from_discriminator_value(pn) }) },
        "score" => lambda {|n| @score = n.get_number_value() },
    })
end

#rulesObject

Gets the rules property value. A collection of rules that have been used to calculate the classification and score.

Returns:

  • a security_host_reputation_rule



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

def rules
    return @rules
end

#rules=(value) ⇒ Object

Sets the rules property value. A collection of rules that have been used to calculate the classification and score.

Parameters:

  • value

    Value to set for the rules property.

Returns:

  • a void



72
73
74
# File 'lib/models/security_host_reputation.rb', line 72

def rules=(value)
    @rules = value
end

#scoreObject

Gets the score property value. The calculated score (0-100) of the requested host. A higher value indicates that this host is more likely to be suspicious or malicious.

Returns:

  • a integer



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

def score
    return @score
end

#score=(value) ⇒ Object

Sets the score property value. The calculated score (0-100) of the requested host. A higher value indicates that this host is more likely to be suspicious or malicious.

Parameters:

  • value

    Value to set for the score property.

Returns:

  • a void



87
88
89
# File 'lib/models/security_host_reputation.rb', line 87

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


95
96
97
98
99
100
101
# File 'lib/models/security_host_reputation.rb', line 95

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_enum_value("classification", @classification)
    writer.write_collection_of_object_values("rules", @rules)
    writer.write_number_value("score", @score)
end