require 'date'
require 'microsoft_kiota_abstractions'
require_relative '../microsoft_graph'
require_relative './models'

module MicrosoftGraph
    module Models
        class SecurityAnalyzedMessageEvidence < MicrosoftGraph::Models::SecurityAlertEvidence
            include MicrosoftKiotaAbstractions::Parsable
            ## 
            # Direction of the email relative to your network. The possible values are: inbound, outbound or intraorg.
            @anti_spam_direction
            ## 
            # Number of attachments in the email.
            @attachments_count
            ## 
            # Delivery action of the email. The possible values are: delivered, deliveredAsSpam, junked, blocked, or replaced.
            @delivery_action
            ## 
            # Location where the email was delivered. The possible values are: inbox, external, junkFolder, quarantine, failed, dropped, deletedFolder or forwarded.
            @delivery_location
            ## 
            # Public-facing identifier for the email that is set by the sending email system.
            @internet_message_id
            ## 
            # Detected language of the email content.
            @language
            ## 
            # Unique identifier for the email, generated by Microsoft 365.
            @network_message_id
            ## 
            # The P1 sender.
            @p1_sender
            ## 
            # The P2 sender.
            @p2_sender
            ## 
            # Date and time when the email was received.
            @received_date_time
            ## 
            # Email address of the recipient, or email address of the recipient after distribution list expansion.
            @recipient_email_address
            ## 
            # IP address of the last detected mail server that relayed the message.
            @sender_ip
            ## 
            # Subject of the email.
            @subject
            ## 
            # Collection of methods used to detect malware, phishing, or other threats found in the email.
            @threat_detection_methods
            ## 
            # Collection of detection names for malware or other threats found.
            @threats
            ## 
            # Number of embedded URLs in the email.
            @url_count
            ## 
            # Collection of the URLs contained in this email.
            @urls
            ## 
            # Uniform resource name (URN) of the automated investigation where the cluster was identified.
            @urn
            ## 
            ## Gets the antiSpamDirection property value. Direction of the email relative to your network. The possible values are: inbound, outbound or intraorg.
            ## @return a string
            ## 
            def anti_spam_direction
                return @anti_spam_direction
            end
            ## 
            ## Sets the antiSpamDirection property value. Direction of the email relative to your network. The possible values are: inbound, outbound or intraorg.
            ## @param value Value to set for the antiSpamDirection property.
            ## @return a void
            ## 
            def anti_spam_direction=(value)
                @anti_spam_direction = value
            end
            ## 
            ## Gets the attachmentsCount property value. Number of attachments in the email.
            ## @return a int64
            ## 
            def attachments_count
                return @attachments_count
            end
            ## 
            ## Sets the attachmentsCount property value. Number of attachments in the email.
            ## @param value Value to set for the attachmentsCount property.
            ## @return a void
            ## 
            def attachments_count=(value)
                @attachments_count = value
            end
            ## 
            ## Instantiates a new securityAnalyzedMessageEvidence and sets the default values.
            ## @return a void
            ## 
            def initialize()
                super
                @odata_type = "#microsoft.graph.security.analyzedMessageEvidence"
            end
            ## 
            ## Creates a new instance of the appropriate class based on discriminator value
            ## @param parse_node The parse node to use to read the discriminator value and create the object
            ## @return a security_analyzed_message_evidence
            ## 
            def self.create_from_discriminator_value(parse_node)
                raise StandardError, 'parse_node cannot be null' if parse_node.nil?
                return SecurityAnalyzedMessageEvidence.new
            end
            ## 
            ## Gets the deliveryAction property value. Delivery action of the email. The possible values are: delivered, deliveredAsSpam, junked, blocked, or replaced.
            ## @return a string
            ## 
            def delivery_action
                return @delivery_action
            end
            ## 
            ## Sets the deliveryAction property value. Delivery action of the email. The possible values are: delivered, deliveredAsSpam, junked, blocked, or replaced.
            ## @param value Value to set for the deliveryAction property.
            ## @return a void
            ## 
            def delivery_action=(value)
                @delivery_action = value
            end
            ## 
            ## Gets the deliveryLocation property value. Location where the email was delivered. The possible values are: inbox, external, junkFolder, quarantine, failed, dropped, deletedFolder or forwarded.
            ## @return a string
            ## 
            def delivery_location
                return @delivery_location
            end
            ## 
            ## Sets the deliveryLocation property value. Location where the email was delivered. The possible values are: inbox, external, junkFolder, quarantine, failed, dropped, deletedFolder or forwarded.
            ## @param value Value to set for the deliveryLocation property.
            ## @return a void
            ## 
            def delivery_location=(value)
                @delivery_location = value
            end
            ## 
            ## The deserialization information for the current model
            ## @return a i_dictionary
            ## 
            def get_field_deserializers()
                return super.merge({
                    "antiSpamDirection" => lambda {|n| @anti_spam_direction = n.get_string_value() },
                    "attachmentsCount" => lambda {|n| @attachments_count = n.get_object_value(lambda {|pn| Int64.create_from_discriminator_value(pn) }) },
                    "deliveryAction" => lambda {|n| @delivery_action = n.get_string_value() },
                    "deliveryLocation" => lambda {|n| @delivery_location = n.get_string_value() },
                    "internetMessageId" => lambda {|n| @internet_message_id = n.get_string_value() },
                    "language" => lambda {|n| @language = n.get_string_value() },
                    "networkMessageId" => lambda {|n| @network_message_id = n.get_string_value() },
                    "p1Sender" => lambda {|n| @p1_sender = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::SecurityEmailSender.create_from_discriminator_value(pn) }) },
                    "p2Sender" => lambda {|n| @p2_sender = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::SecurityEmailSender.create_from_discriminator_value(pn) }) },
                    "receivedDateTime" => lambda {|n| @received_date_time = n.get_date_time_value() },
                    "recipientEmailAddress" => lambda {|n| @recipient_email_address = n.get_string_value() },
                    "senderIp" => lambda {|n| @sender_ip = n.get_string_value() },
                    "subject" => lambda {|n| @subject = n.get_string_value() },
                    "threatDetectionMethods" => lambda {|n| @threat_detection_methods = n.get_collection_of_primitive_values(String) },
                    "threats" => lambda {|n| @threats = n.get_collection_of_primitive_values(String) },
                    "urlCount" => lambda {|n| @url_count = n.get_object_value(lambda {|pn| Int64.create_from_discriminator_value(pn) }) },
                    "urls" => lambda {|n| @urls = n.get_collection_of_primitive_values(String) },
                    "urn" => lambda {|n| @urn = n.get_string_value() },
                })
            end
            ## 
            ## Gets the internetMessageId property value. Public-facing identifier for the email that is set by the sending email system.
            ## @return a string
            ## 
            def internet_message_id
                return @internet_message_id
            end
            ## 
            ## Sets the internetMessageId property value. Public-facing identifier for the email that is set by the sending email system.
            ## @param value Value to set for the internetMessageId property.
            ## @return a void
            ## 
            def internet_message_id=(value)
                @internet_message_id = value
            end
            ## 
            ## Gets the language property value. Detected language of the email content.
            ## @return a string
            ## 
            def language
                return @language
            end
            ## 
            ## Sets the language property value. Detected language of the email content.
            ## @param value Value to set for the language property.
            ## @return a void
            ## 
            def language=(value)
                @language = value
            end
            ## 
            ## Gets the networkMessageId property value. Unique identifier for the email, generated by Microsoft 365.
            ## @return a string
            ## 
            def network_message_id
                return @network_message_id
            end
            ## 
            ## Sets the networkMessageId property value. Unique identifier for the email, generated by Microsoft 365.
            ## @param value Value to set for the networkMessageId property.
            ## @return a void
            ## 
            def network_message_id=(value)
                @network_message_id = value
            end
            ## 
            ## Gets the p1Sender property value. The P1 sender.
            ## @return a security_email_sender
            ## 
            def p1_sender
                return @p1_sender
            end
            ## 
            ## Sets the p1Sender property value. The P1 sender.
            ## @param value Value to set for the p1Sender property.
            ## @return a void
            ## 
            def p1_sender=(value)
                @p1_sender = value
            end
            ## 
            ## Gets the p2Sender property value. The P2 sender.
            ## @return a security_email_sender
            ## 
            def p2_sender
                return @p2_sender
            end
            ## 
            ## Sets the p2Sender property value. The P2 sender.
            ## @param value Value to set for the p2Sender property.
            ## @return a void
            ## 
            def p2_sender=(value)
                @p2_sender = value
            end
            ## 
            ## Gets the receivedDateTime property value. Date and time when the email was received.
            ## @return a date_time
            ## 
            def received_date_time
                return @received_date_time
            end
            ## 
            ## Sets the receivedDateTime property value. Date and time when the email was received.
            ## @param value Value to set for the receivedDateTime property.
            ## @return a void
            ## 
            def received_date_time=(value)
                @received_date_time = value
            end
            ## 
            ## Gets the recipientEmailAddress property value. Email address of the recipient, or email address of the recipient after distribution list expansion.
            ## @return a string
            ## 
            def recipient_email_address
                return @recipient_email_address
            end
            ## 
            ## Sets the recipientEmailAddress property value. Email address of the recipient, or email address of the recipient after distribution list expansion.
            ## @param value Value to set for the recipientEmailAddress property.
            ## @return a void
            ## 
            def recipient_email_address=(value)
                @recipient_email_address = value
            end
            ## 
            ## Gets the senderIp property value. IP address of the last detected mail server that relayed the message.
            ## @return a string
            ## 
            def sender_ip
                return @sender_ip
            end
            ## 
            ## Sets the senderIp property value. IP address of the last detected mail server that relayed the message.
            ## @param value Value to set for the senderIp property.
            ## @return a void
            ## 
            def sender_ip=(value)
                @sender_ip = value
            end
            ## 
            ## Serializes information the current object
            ## @param writer Serialization writer to use to serialize this model
            ## @return a void
            ## 
            def serialize(writer)
                raise StandardError, 'writer cannot be null' if writer.nil?
                super
                writer.write_string_value("antiSpamDirection", @anti_spam_direction)
                writer.write_object_value("attachmentsCount", @attachments_count)
                writer.write_string_value("deliveryAction", @delivery_action)
                writer.write_string_value("deliveryLocation", @delivery_location)
                writer.write_string_value("internetMessageId", @internet_message_id)
                writer.write_string_value("language", @language)
                writer.write_string_value("networkMessageId", @network_message_id)
                writer.write_object_value("p1Sender", @p1_sender)
                writer.write_object_value("p2Sender", @p2_sender)
                writer.write_date_time_value("receivedDateTime", @received_date_time)
                writer.write_string_value("recipientEmailAddress", @recipient_email_address)
                writer.write_string_value("senderIp", @sender_ip)
                writer.write_string_value("subject", @subject)
                writer.write_collection_of_primitive_values("threatDetectionMethods", @threat_detection_methods)
                writer.write_collection_of_primitive_values("threats", @threats)
                writer.write_object_value("urlCount", @url_count)
                writer.write_collection_of_primitive_values("urls", @urls)
                writer.write_string_value("urn", @urn)
            end
            ## 
            ## Gets the subject property value. Subject of the email.
            ## @return a string
            ## 
            def subject
                return @subject
            end
            ## 
            ## Sets the subject property value. Subject of the email.
            ## @param value Value to set for the subject property.
            ## @return a void
            ## 
            def subject=(value)
                @subject = value
            end
            ## 
            ## Gets the threatDetectionMethods property value. Collection of methods used to detect malware, phishing, or other threats found in the email.
            ## @return a string
            ## 
            def threat_detection_methods
                return @threat_detection_methods
            end
            ## 
            ## Sets the threatDetectionMethods property value. Collection of methods used to detect malware, phishing, or other threats found in the email.
            ## @param value Value to set for the threatDetectionMethods property.
            ## @return a void
            ## 
            def threat_detection_methods=(value)
                @threat_detection_methods = value
            end
            ## 
            ## Gets the threats property value. Collection of detection names for malware or other threats found.
            ## @return a string
            ## 
            def threats
                return @threats
            end
            ## 
            ## Sets the threats property value. Collection of detection names for malware or other threats found.
            ## @param value Value to set for the threats property.
            ## @return a void
            ## 
            def threats=(value)
                @threats = value
            end
            ## 
            ## Gets the urlCount property value. Number of embedded URLs in the email.
            ## @return a int64
            ## 
            def url_count
                return @url_count
            end
            ## 
            ## Sets the urlCount property value. Number of embedded URLs in the email.
            ## @param value Value to set for the urlCount property.
            ## @return a void
            ## 
            def url_count=(value)
                @url_count = value
            end
            ## 
            ## Gets the urls property value. Collection of the URLs contained in this email.
            ## @return a string
            ## 
            def urls
                return @urls
            end
            ## 
            ## Sets the urls property value. Collection of the URLs contained in this email.
            ## @param value Value to set for the urls property.
            ## @return a void
            ## 
            def urls=(value)
                @urls = value
            end
            ## 
            ## Gets the urn property value. Uniform resource name (URN) of the automated investigation where the cluster was identified.
            ## @return a string
            ## 
            def urn
                return @urn
            end
            ## 
            ## Sets the urn property value. Uniform resource name (URN) of the automated investigation where the cluster was identified.
            ## @param value Value to set for the urn property.
            ## @return a void
            ## 
            def urn=(value)
                @urn = value
            end
        end
    end
end
