Class: MicrosoftGraph::Models::SecurityPassiveDnsRecord

Inherits:
SecurityArtifact show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/security_passive_dns_record.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 securityPassiveDnsRecord and sets the default values.



62
63
64
65
# File 'lib/models/security_passive_dns_record.rb', line 62

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

Raises:

  • (StandardError)


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

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

Instance Method Details

#artifactObject

Gets the artifact property value. The artifact property

Returns:

  • a security_artifact



32
33
34
# File 'lib/models/security_passive_dns_record.rb', line 32

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



40
41
42
# File 'lib/models/security_passive_dns_record.rb', line 40

def artifact=(value)
    @artifact = value
end

#collected_date_timeObject

Gets the collectedDateTime property value. The date and time that this passiveDnsRecord entry was collected by Microsoft. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z.

Returns:

  • a date_time



47
48
49
# File 'lib/models/security_passive_dns_record.rb', line 47

def collected_date_time
    return @collected_date_time
end

#collected_date_time=(value) ⇒ Object

Sets the collectedDateTime property value. The date and time that this passiveDnsRecord entry was collected by Microsoft. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z.

Parameters:

  • value

    Value to set for the collectedDateTime property.

Returns:

  • a void



55
56
57
# File 'lib/models/security_passive_dns_record.rb', line 55

def collected_date_time=(value)
    @collected_date_time = value
end

#first_seen_date_timeObject

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

Returns:

  • a date_time



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

def first_seen_date_time
    return @first_seen_date_time
end

#first_seen_date_time=(value) ⇒ Object

Sets the firstSeenDateTime property value. The date and time when this passiveDnsRecord entry was first seen. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. 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



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

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



94
95
96
97
98
99
100
101
102
103
# File 'lib/models/security_passive_dns_record.rb', line 94

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) }) },
        "collectedDateTime" => lambda {|n| @collected_date_time = n.get_date_time_value() },
        "firstSeenDateTime" => lambda {|n| @first_seen_date_time = n.get_date_time_value() },
        "lastSeenDateTime" => lambda {|n| @last_seen_date_time = n.get_date_time_value() },
        "parentHost" => lambda {|n| @parent_host = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::SecurityHost.create_from_discriminator_value(pn) }) },
        "recordType" => lambda {|n| @record_type = n.get_string_value() },
    })
end

#last_seen_date_timeObject

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

Returns:

  • a date_time



108
109
110
# File 'lib/models/security_passive_dns_record.rb', line 108

def last_seen_date_time
    return @last_seen_date_time
end

#last_seen_date_time=(value) ⇒ Object

Sets the lastSeenDateTime property value. The date and time when this passiveDnsRecord entry was most recently seen. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. 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



116
117
118
# File 'lib/models/security_passive_dns_record.rb', line 116

def last_seen_date_time=(value)
    @last_seen_date_time = value
end

#parent_hostObject

Gets the parentHost property value. The parentHost property

Returns:

  • a security_host



123
124
125
# File 'lib/models/security_passive_dns_record.rb', line 123

def parent_host
    return @parent_host
end

#parent_host=(value) ⇒ Object

Sets the parentHost property value. The parentHost property

Parameters:

  • value

    Value to set for the parentHost property.

Returns:

  • a void



131
132
133
# File 'lib/models/security_passive_dns_record.rb', line 131

def parent_host=(value)
    @parent_host = value
end

#record_typeObject

Gets the recordType property value. The DNS record type for this passiveDnsRecord entry.

Returns:

  • a string



138
139
140
# File 'lib/models/security_passive_dns_record.rb', line 138

def record_type
    return @record_type
end

#record_type=(value) ⇒ Object

Sets the recordType property value. The DNS record type for this passiveDnsRecord entry.

Parameters:

  • value

    Value to set for the recordType property.

Returns:

  • a void



146
147
148
# File 'lib/models/security_passive_dns_record.rb', line 146

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


154
155
156
157
158
159
160
161
162
163
# File 'lib/models/security_passive_dns_record.rb', line 154

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_object_value("artifact", @artifact)
    writer.write_date_time_value("collectedDateTime", @collected_date_time)
    writer.write_date_time_value("firstSeenDateTime", @first_seen_date_time)
    writer.write_date_time_value("lastSeenDateTime", @last_seen_date_time)
    writer.write_object_value("parentHost", @parent_host)
    writer.write_string_value("recordType", @record_type)
end