Class: MicrosoftGraph::Models::SecurityHostCookie

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



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

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

Raises:

  • (StandardError)


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

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

Instance Method Details

#domainObject

Gets the domain property value. The URI for which the cookie is valid.

Returns:

  • a string



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

def domain
    return @domain
end

#domain=(value) ⇒ Object

Sets the domain property value. The URI for which the cookie is valid.

Parameters:

  • value

    Value to set for the domain property.

Returns:

  • a void



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

def domain=(value)
    @domain = value
end

#first_seen_date_timeObject

Gets the firstSeenDateTime property value. The first date and time when this hostCookie was observed by Microsoft Defender Threat Intelligence. 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



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

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 when this hostCookie was observed by Microsoft Defender Threat Intelligence. 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



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

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



76
77
78
79
80
81
82
83
84
# File 'lib/models/security_host_cookie.rb', line 76

def get_field_deserializers()
    return super.merge({
        "domain" => lambda {|n| @domain = n.get_string_value() },
        "firstSeenDateTime" => lambda {|n| @first_seen_date_time = n.get_date_time_value() },
        "host" => lambda {|n| @host = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::SecurityHost.create_from_discriminator_value(pn) }) },
        "lastSeenDateTime" => lambda {|n| @last_seen_date_time = n.get_date_time_value() },
        "name" => lambda {|n| @name = n.get_string_value() },
    })
end

#hostObject

Gets the host property value. The host property

Returns:

  • a security_host



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

def host
    return @host
end

#host=(value) ⇒ Object

Sets the host property value. The host property

Parameters:

  • value

    Value to set for the host property.

Returns:

  • a void



97
98
99
# File 'lib/models/security_host_cookie.rb', line 97

def host=(value)
    @host = value
end

#last_seen_date_timeObject

Gets the lastSeenDateTime property value. The most recent date and time when this hostCookie was observed by Microsoft Defender Threat Intelligence. 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



104
105
106
# File 'lib/models/security_host_cookie.rb', line 104

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 hostCookie was observed by Microsoft Defender Threat Intelligence. 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



112
113
114
# File 'lib/models/security_host_cookie.rb', line 112

def last_seen_date_time=(value)
    @last_seen_date_time = value
end

#nameObject

Gets the name property value. The name of the cookie, for example, JSESSIONID or SEARCH_NAMESITE.

Returns:

  • a string



119
120
121
# File 'lib/models/security_host_cookie.rb', line 119

def name
    return @name
end

#name=(value) ⇒ Object

Sets the name property value. The name of the cookie, for example, JSESSIONID or SEARCH_NAMESITE.

Parameters:

  • value

    Value to set for the name property.

Returns:

  • a void



127
128
129
# File 'lib/models/security_host_cookie.rb', line 127

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


135
136
137
138
139
140
141
142
143
# File 'lib/models/security_host_cookie.rb', line 135

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_string_value("domain", @domain)
    writer.write_date_time_value("firstSeenDateTime", @first_seen_date_time)
    writer.write_object_value("host", @host)
    writer.write_date_time_value("lastSeenDateTime", @last_seen_date_time)
    writer.write_string_value("name", @name)
end