Class: MicrosoftGraph::Models::SecurityHostReputation
- Includes:
- MicrosoftKiotaAbstractions::Parsable
- Defined in:
- lib/models/security_host_reputation.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
-
#classification ⇒ Object
Gets the classification property value.
-
#classification=(value) ⇒ Object
Sets the classification property value.
-
#get_field_deserializers ⇒ Object
The deserialization information for the current model.
-
#initialize ⇒ Object
constructor
Instantiates a new securityHostReputation and sets the default values.
-
#rules ⇒ Object
Gets the rules property value.
-
#rules=(value) ⇒ Object
Sets the rules property value.
-
#score ⇒ Object
Gets the score property value.
-
#score=(value) ⇒ Object
Sets the score 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 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
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
#classification ⇒ Object
Gets the classification property value. The classification property
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
30 31 32 |
# File 'lib/models/security_host_reputation.rb', line 30 def classification=(value) @classification = value end |
#get_field_deserializers ⇒ Object
The deserialization information for the current model
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 |
#rules ⇒ Object
Gets the rules property value. A collection of rules that have been used to calculate the classification and score.
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.
72 73 74 |
# File 'lib/models/security_host_reputation.rb', line 72 def rules=(value) @rules = value end |
#score ⇒ Object
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.
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.
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
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 |