Class: MicrosoftGraph::Models::SecurityHost

Inherits:
SecurityArtifact show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/security_host.rb

Direct Known Subclasses

SecurityHostname, SecurityIpAddress

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 securityHost and sets the default values.



53
54
55
56
# File 'lib/models/security_host.rb', line 53

def initialize()
    super
    @odata_type = "#microsoft.graph.security.host"
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

Raises:

  • (StandardError)


77
78
79
80
81
82
83
84
85
86
87
88
89
90
# File 'lib/models/security_host.rb', line 77

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.hostname"
                return SecurityHostname.new
            when "#microsoft.graph.security.ipAddress"
                return SecurityIpAddress.new
        end
    end
    return SecurityHost.new
end

Instance Method Details

#componentsObject

Gets the components property value. The hostComponents that are associated with this host.

Returns:

  • a security_host_component



38
39
40
# File 'lib/models/security_host.rb', line 38

def components
    return @components
end

#components=(value) ⇒ Object

Sets the components property value. The hostComponents that are associated with this host.

Parameters:

  • value

    Value to set for the components property.

Returns:

  • a void



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

def components=(value)
    @components = value
end

#cookiesObject

Gets the cookies property value. The hostCookies that are associated with this host.

Returns:

  • a security_host_cookie



61
62
63
# File 'lib/models/security_host.rb', line 61

def cookies
    return @cookies
end

#cookies=(value) ⇒ Object

Sets the cookies property value. The hostCookies that are associated with this host.

Parameters:

  • value

    Value to set for the cookies property.

Returns:

  • a void



69
70
71
# File 'lib/models/security_host.rb', line 69

def cookies=(value)
    @cookies = value
end

#first_seen_date_timeObject

Gets the firstSeenDateTime property value. The first date and time this host was observed. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014, is 2014-01-01T00:00:00Z.

Returns:

  • a date_time



95
96
97
# File 'lib/models/security_host.rb', line 95

def first_seen_date_time
    return @first_seen_date_time
end

#first_seen_date_time=(value) ⇒ Object

Sets the firstSeenDateTime property value. The first date and time this host was observed. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014, is 2014-01-01T00:00:00Z.

Parameters:

  • value

    Value to set for the firstSeenDateTime property.

Returns:

  • a void



103
104
105
# File 'lib/models/security_host.rb', line 103

def first_seen_date_time=(value)
    @first_seen_date_time = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



110
111
112
113
114
115
116
117
118
119
120
121
# File 'lib/models/security_host.rb', line 110

def get_field_deserializers()
    return super.merge({
        "components" => lambda {|n| @components = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::SecurityHostComponent.create_from_discriminator_value(pn) }) },
        "cookies" => lambda {|n| @cookies = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::SecurityHostCookie.create_from_discriminator_value(pn) }) },
        "firstSeenDateTime" => lambda {|n| @first_seen_date_time = n.get_date_time_value() },
        "lastSeenDateTime" => lambda {|n| @last_seen_date_time = n.get_date_time_value() },
        "passiveDns" => lambda {|n| @passive_dns = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::SecurityPassiveDnsRecord.create_from_discriminator_value(pn) }) },
        "passiveDnsReverse" => lambda {|n| @passive_dns_reverse = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::SecurityPassiveDnsRecord.create_from_discriminator_value(pn) }) },
        "reputation" => lambda {|n| @reputation = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::SecurityHostReputation.create_from_discriminator_value(pn) }) },
        "trackers" => lambda {|n| @trackers = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::SecurityHostTracker.create_from_discriminator_value(pn) }) },
    })
end

#last_seen_date_timeObject

Gets the lastSeenDateTime property value. The most recent date and time when this host was observed. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014, is 2014-01-01T00:00:00Z.

Returns:

  • a date_time



126
127
128
# File 'lib/models/security_host.rb', line 126

def last_seen_date_time
    return @last_seen_date_time
end

#last_seen_date_time=(value) ⇒ Object

Sets the lastSeenDateTime property value. The most recent date and time when this host was observed. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014, is 2014-01-01T00:00:00Z.

Parameters:

  • value

    Value to set for the lastSeenDateTime property.

Returns:

  • a void



134
135
136
# File 'lib/models/security_host.rb', line 134

def last_seen_date_time=(value)
    @last_seen_date_time = value
end

#passive_dnsObject

Gets the passiveDns property value. Passive DNS retrieval about this host.

Returns:

  • a security_passive_dns_record



141
142
143
# File 'lib/models/security_host.rb', line 141

def passive_dns
    return @passive_dns
end

#passive_dns=(value) ⇒ Object

Sets the passiveDns property value. Passive DNS retrieval about this host.

Parameters:

  • value

    Value to set for the passiveDns property.

Returns:

  • a void



149
150
151
# File 'lib/models/security_host.rb', line 149

def passive_dns=(value)
    @passive_dns = value
end

#passive_dns_reverseObject

Gets the passiveDnsReverse property value. Reverse passive DNS retrieval about this host.

Returns:

  • a security_passive_dns_record



156
157
158
# File 'lib/models/security_host.rb', line 156

def passive_dns_reverse
    return @passive_dns_reverse
end

#passive_dns_reverse=(value) ⇒ Object

Sets the passiveDnsReverse property value. Reverse passive DNS retrieval about this host.

Parameters:

  • value

    Value to set for the passiveDnsReverse property.

Returns:

  • a void



164
165
166
# File 'lib/models/security_host.rb', line 164

def passive_dns_reverse=(value)
    @passive_dns_reverse = value
end

#reputationObject

Gets the reputation property value. Represents a calculated reputation of this host.

Returns:

  • a security_host_reputation



171
172
173
# File 'lib/models/security_host.rb', line 171

def reputation
    return @reputation
end

#reputation=(value) ⇒ Object

Sets the reputation property value. Represents a calculated reputation of this host.

Parameters:

  • value

    Value to set for the reputation property.

Returns:

  • a void



179
180
181
# File 'lib/models/security_host.rb', line 179

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


187
188
189
190
191
192
193
194
195
196
197
198
# File 'lib/models/security_host.rb', line 187

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_collection_of_object_values("components", @components)
    writer.write_collection_of_object_values("cookies", @cookies)
    writer.write_date_time_value("firstSeenDateTime", @first_seen_date_time)
    writer.write_date_time_value("lastSeenDateTime", @last_seen_date_time)
    writer.write_collection_of_object_values("passiveDns", @passive_dns)
    writer.write_collection_of_object_values("passiveDnsReverse", @passive_dns_reverse)
    writer.write_object_value("reputation", @reputation)
    writer.write_collection_of_object_values("trackers", @trackers)
end

#trackersObject

Gets the trackers property value. The hostTrackers that are associated with this host.

Returns:

  • a security_host_tracker



203
204
205
# File 'lib/models/security_host.rb', line 203

def trackers
    return @trackers
end

#trackers=(value) ⇒ Object

Sets the trackers property value. The hostTrackers that are associated with this host.

Parameters:

  • value

    Value to set for the trackers property.

Returns:

  • a void



211
212
213
# File 'lib/models/security_host.rb', line 211

def trackers=(value)
    @trackers = value
end