def serialize(self,writer: SerializationWriter) -> None:
        """
        Serializes information the current object
        param writer: Serialization writer to use to serialize this model
        Returns: None
        """
        if writer is None:
            raise TypeError("writer cannot be null.")
        writer.write_str_value("applicationName", self.application_name)
        writer.write_str_value("destinationAddress", self.destination_address)
        writer.write_str_value("destinationDomain", self.destination_domain)
        writer.write_str_value("destinationLocation", self.destination_location)
        writer.write_str_value("destinationPort", self.destination_port)
        writer.write_str_value("destinationUrl", self.destination_url)
        writer.write_enum_value("direction", self.direction)
        writer.write_datetime_value("domainRegisteredDateTime", self.domain_registered_date_time)
        writer.write_str_value("localDnsName", self.local_dns_name)
        writer.write_str_value("natDestinationAddress", self.nat_destination_address)
        writer.write_str_value("natDestinationPort", self.nat_destination_port)
        writer.write_str_value("natSourceAddress", self.nat_source_address)
        writer.write_str_value("natSourcePort", self.nat_source_port)
        writer.write_str_value("@odata.type", self.odata_type)
        writer.write_enum_value("protocol", self.protocol)
        writer.write_str_value("riskScore", self.risk_score)
        writer.write_str_value("sourceAddress", self.source_address)
        writer.write_str_value("sourceLocation", self.source_location)
        writer.write_str_value("sourcePort", self.source_port)
        writer.write_enum_value("status", self.status)
        writer.write_str_value("urlParameters", self.url_parameters)
        writer.write_additional_data_value(self.additional_data)

        Serializes information the current object
        param writer: Serialization writer to use to serialize this model
        Returns: None
        
msgraph/generated/models/network_connection.py