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.")
        super().serialize(writer)
        writer.write_str_value("assignedUserPrincipalName", self.assigned_user_principal_name)
        writer.write_str_value("groupTag", self.group_tag)
        writer.write_bytes_value("hardwareIdentifier", self.hardware_identifier)
        writer.write_str_value("importId", self.import_id)
        writer.write_str_value("productKey", self.product_key)
        writer.write_str_value("serialNumber", self.serial_number)
        writer.write_object_value("state", self.state)

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